[問題] extends layout問題
class GridItem extends Layout{
private ImageView iv;
private TextView tv;
}
xml http://pastebin.com/zuNqDLem
希望gridItem的iv,tv對到xml中的
imageview,textview
我查到的做法是constructor內
LayoutInflater layoutInflater =
(LayoutInflater)context.getSystemService(context.LAYOUT_INFLATER_SERVICE);
View view=layoutInflater.inflate(R.layout.griditem,this);
不過好像沒有用
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.168.20.236
→
03/28 18:09, , 1F
03/28 18:09, 1F
推
03/28 21:08, , 2F
03/28 21:08, 2F
→
03/29 20:33, , 3F
03/29 20:33, 3F