简体   繁体   English

对话框中触摸事件的Android Java颜色触摸区域

[英]Android Java color touch area on touch event in Dialog

I am new to android development and I was confused in how to implement a simple color around touch area when using a dialog. 我是android开发的新手,使用对话框时如何在触摸区域周围实现简单的颜色感到困惑。 I tried using the TouchPaint.java sample from Android.com/references but could not get the methods to work Dialog. 我尝试使用Android.com/references中的TouchPaint.java示例,但无法使用Dialog方法。

Please help me with links or code snippets. 请通过链接或代码段帮助我。 I wanna color the area around a touch in a Dialog screen and make it redraw itself in the next touch event. 我想在“对话”屏幕中为触摸周围的区域着色,并使其在下次触摸事件中重绘。

int color = bitmap.getPixel((int)event.getX(),(int)event.getX());

                  RGB.setText(" R:"+Color.red(color)+" G:"+Color.green(color)+" B:"+Color.blue(color));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM