解决方案 »
- android google地图开发的时候用DDMS传不了GPS坐标~~~~
- 怎么获取联系人名字和号码
- 求助关于simpleAdapter
- Android 电子书
- 请问如何在Android程序中实现来电转移功能??
- 系统屏幕密码锁定,是如何监听屏幕开启的
- Android LogCat 中显示的颜色和字体怎么改?
- android 在SDCARD新建文件夹怎么不行?
- android launcher竖屏显示
- android loop设备设置
- lan8720网卡mac地址如何固定android4.0(linux2.6.34)
- 紧急求助 android如何通过post请求获得服务器返回string信息 急用但是本人被赶鸭子上架、、
for(int i = 0; i < v.getChildCount();i++) {
View vv = v.getChildAt(i);
vv.setOnClickL..(new Cl.///() {
public void click(View view) {
id= vv.getId();
}
})
}
你试试
然后把MainActivity的监听传过去
View没有getChildCount()属性,但mScrollTypeLayout.getChildCount();因为我在HorizontalScrollView下还加了LinearLayout,所以我这样写:mScrollTypeLayout = (ScrollTypeLayout)findViewById(R.id.article_type_layout);
LinearLayout mLinearLayout = (LinearLayout)mScrollTypeLayout.getChildAt(0);
for(int i = 0; i < mLinearLayout.getChildCount(); i++)
{
View child = mLinearLayout.getChildAt(i);
child.setOnClickListener(this);
}但还是不行,LinearLayout下面已经是我想要的TextView,但是mLinearLayout.getChildCount为0
所以结贴了,再开一个来问.