现在要实现一个不规则图片响应事件,要求是点击图片空白的地方时,不响应事件,只有点击图片位置时才响应事件。
解决方案 »
- android ndk 多线程
- android模拟器无法启动
- 我写的手势识别怎么只响应down,onshowpress,onLongpress啊?
- 程序什么时候执行Onstart()和Onresume()?在线等!!!!!!!!!!!!!!1
- 在Ubuntu 中编译自带的JNI 总是弹出MountManager 编译失败.
- 请教背景图片显示问题
- APKDEC为什么双击图标打不开?
- webview不能再4.3中加载网页,4.1可以,2.3也可以
- 求Service线程模型
- ArcGis For Android 怎么实现画矩形
- 关于android tab分页的问题
- android 传递图片的问题,急用
我曾经做过的一个获得checkbox的区域的代码:// Padding to increase clickable areas on left & right of each list item
private final static float SELECT_PAD = 10.0F;
float paddingScale = getContext().getResources().getDisplayMetrics().density;
int selectPadding = (int) ((SELECT_PAD * paddingScale) + 0.5);
mSelectRight = findViewById(R.id.selected).getRight() + selectPadding;
然后通过event.getAction()来获得动作,在你的情况下是点击图片事件.最后做处理.