素材牛VIP会员
关于浮动框的焦点问题
 xu***ui  分类:Java代码  人气:763  回帖:2  发布于6年前 收藏

WindowManager.LayoutParams.gravity = Gravity.TOP | Gravity.LEFT;
WindowManager.add();通过这个方法在界面上加载上去的一个浮动框(矩形的)它的坐标应该是哪一个点啊 是左上角的还是左下角的还是别的?

 标签:eclipseandroidjava

讨论这个帖子(2)垃圾回帖将一律封号处理……

Lv7 码师
ad***cn CEO 6年前#1

你既然都知道方法了,自己写下代码测试下看看不就行了,比到这里来提问更有效率。

Lv2 入门
逸***S JS工程师 6年前#2

WindowManagerLayoutParams没有gravity这个值吧,

他有几个构造,默认是左上

WindowManager.LayoutParams()
WindowManager.LayoutParams(int _type)
WindowManager.LayoutParams(int _type, int _flags)
WindowManager.LayoutParams(int _type, int _flags, int _format)
WindowManager.LayoutParams(int w, int h, int _type, int _flags, int _format)
WindowManager.LayoutParams(int w, int h, int xpos, int ypos, int _type, int _flags, int _format)
 文明上网,理性发言!   😉 阿里云幸运券,戳我领取