Customize quick action dialog for android -
i'm developing application in have show quick action dialog on click of button. here example how want implement.
till not figure out how make custom quick action dialog. have tried using activity , i'm near have achieve. here have done till now.
on click of button i'm passing intent activity:
if (v.getid() == r.id.points) { toast.maketext(mainactivity.this, "clicked on points", toast.length_short).show(); intent = new intent(mainactivity.this, pointsactionmenu.class); startactivity(i); }
and have used styles.xml
make activity transparent.
styles.xml
<style name="theme.transparent" parent="android:theme"> <item name="android:windowistranslucent">true</item> <item name="android:windowbackground">@android:color/transparent</item> <item name="android:windowcontentoverlay">@null</item> <item name="android:windownotitle">true</item> <item name="android:windowisfloating">true</item> <item name="android:backgrounddimenabled">false</item> </style>
implementing these things have got ui on screen.
now, have 2 questions:
- i have used activity , designed layout work needs. there easy way implement using quick action dialog. have gone through 2-3 examples that, unable customize according need.
- as far have implemented using activity, showing in center of screen, can change default place of activity right corner shown in picture.
either of answer can me.
any kind of appreciated this.
i think solved problem. here looks like.
integrated following code setting it's position.
windowmanager.layoutparams wmlp = this.getwindow().getattributes(); wmlp.gravity = gravity.top | gravity.left; wmlp.x = 80; // x position wmlp.y = 60; // y position
Comments
Post a Comment