0
我想設置運行時間id並獲取id。 我的代碼是...Android如何設置運行時間Id
TextView image=new TextView(this);
LinearLayout.LayoutParams imageParams = new LinearLayout.LayoutParams(100,100);
image.setLayoutParams(imageParams);
image.setBackgroundResource(R.drawable.grey);
image.setId(1);
image.setOnclickListner(this);
但是當我設置image.setId(1),然後給出錯誤在Android Studio中。 然後如何在視圖下查找圖像ID ..
什麼是錯誤你得到 – koutuk 2015-02-24 11:22:49
誤差預計ID類型的資源 – Destro 2015-02-24 11:28:10
#Destro我們的代碼是絕對被罰款......請其他人導致此錯誤 – koutuk 2015-02-24 11:29:57