activy的onTouch事件中根据坐标能否转换成相应的控件?? @Override public boolean onTouch(View v, MotionEvent event) {event。x y 通过坐标 得到点击下的控件对象能否实现??} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Rect frame = mTempRect; final int count = getChildCount(); for (int i = count - 1; i >= 0; i--) { final View child = getChildAt(i); child.getHitRect(frame); if (frame.contains(x, y)) { return child; } } 没有直接点的方法??类似getcontrolbyposion() 问题是每个控件都有一个onTouch事件,何必用这个方法去找到哪个控件被touch呢? 不是有View参数吗所有的控件都 用一个listener侦听不行吗 移植android系统遇到的难题 android button的显示问题 sdcard/Android/data下的文件夹在程序安装完成如何自动创建? 求一个播放GIF图片的源码包? 帮忙解释一下THIS指针 camera service的callback android 交叉编译问题 android手机开发高手帮帮忙?? 安卓 支付宝接口的问题 我创建一个安卓项目就有错,求大神们解决下 找不到文件 关于TextView显示换行的问题
final int count = getChildCount();
for (int i = count - 1; i >= 0; i--) {
final View child = getChildAt(i);
child.getHitRect(frame);
if (frame.contains(x, y)) {
return child;
}
}
类似getcontrolbyposion()