所以,我有一个以编程方式添加PopupWindow,如下所示:
dialog = new PopupWindow(context);
dialog.setContentView(ll);
dialog.showAtLocation(view, Gravity.LEFT | Gravity.TOP, -70, 0);
dialog.setWidth(w);
dialog.setHeight(h - 50);
dialog.setOutsideTouchable(true);
//The dialog.update is somewhere else, I didn't bother adding it too as it is not important for this matter (I guess)
Run Code Online (Sandbox Code Playgroud)
我想要做的是有一些动画效果,就像它从我按下的按钮弹出,弹出窗口.(这只是一个例子,我只想要任何类型的动画).
文档也可以,只要它不是基于XML的(我发现那些已经没有真正帮助过我).
如果需要其他详细信息,我将评论或编辑问题.
所以,此时,我得到了一个生成3个随机整数的方法,从0到255.
我使用3个整数来表示颜色.红色,绿色,蓝色.
所以,在这个时刻,如果我想用生成的颜色设置某些东西的颜色,我使用这个:
Color.argb(255, r, g, b); //255 =max intensity and after ,there are red green blue
Run Code Online (Sandbox Code Playgroud)
我需要做的是将3个整数或最终强度值转换为8位整数.
任何形式的文档或指导都非常感谢!
如果需要更多信息,我将评论或修改问题的正文.