可拉伸標識具有可抽拉我想找到標識符如何從代碼
佈局
<TextView
...
android:drawablePadding="5dp"
android:drawableLeft="@drawable/account_lock"
/>
活動
...
TextView tv = ...;
Drawable d = tv.getCompoundDrawables()[0];
int id = d.???????
我已經看過getResources().getIdentifier(name, defType, defPackage)
,但我不認爲這有助於我找到它;
我不認爲這是可能的 –
我正好沒有得到這個問題,你可以請你ellaborate需要什麼?你想要左邊的drawable嗎? –
我問我是否可以從Drawable對象獲取標識符 – pbaris