clickArea
clickArea copied to clipboard
Results
clickArea issues
Sort by
recently updated
recently updated
newest added
当xml里设置match_parent时,这句代码( int pixel = bitmap.getPixel(x, y);)在某些手机上会报错(x must be
``` Drawable drawable = ((StateListDrawable)getBackground()).getCurrent(); bitmap = ((BitmapDrawable)drawable).getBitmap(); 以上代码好像有bug:在华为p6等高分辨率的手机上,点击的屏幕区域并不对应图片区域。可以通过把当view(而不是背景图)转化为bitmap来解决 ```