1
我是編程新手,我有一些ImageViews內容描述。 我只能使用ImageViews的內容描述來填充ImageViews一些特定的背景顏色。而且我不需要在這裏使用資源ID。 請幫幫我。我們可以根據內容描述填寫ImageView
這裏是我的樣品的ImageView
<ImageView
android:id="@+id/iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="iv"/>
你的問題不清楚 – Jas
你可以通過ID獲得資源ID – comeback4you
你至少需要使用資源ID來聲明你的圖片vie ws in activity,那麼你可以通過使用這個id作爲getContentDescription來檢查內容描述,並根據你的需求進行比較和填充 – Vickyexpert