add on - Android: Option menu like on Motorola Gallery app? -


i'd design option menus of new app similar option menu in motorola gallery app. when click on album, screen darkens, , on bottom right corner, option menu buttons scroll up.

do know add-on, library or whatever achieve such behaviour or have program own (that means darkening screen, animations on buttons,...)

gallery app

you can in way.

first create layout of window

<relativelayout      xmlns:android="http://schemas.android.com/apk/res/android"         android:layout_width="match_parent"     android:layout_height="match_parent"     android:background="#7f000000">     <button         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="close"/>  </relativelayout> 

in onclicklistner method of item (say album) can write code open dialog

listview.setonitemlongclicklistener(new adapterview.onitemlongclicklistener() {                 @override                 public boolean onitemlongclick(adapterview<?> parent, view view, int position, long id) { dialog = new dialog(mainactivity.this);         dialog.requestwindowfeature(window.feature_no_title);         dialog.setcontentview(r.layout.dialog);         dialog.show();         button close = (button) dialog.findviewbyid(r.id.close);         close.setonclicklistener(new view.onclicklistener() {             @override             public void onclick(view v) {                 dialog.dismiss();             }         }); 

you can manage transparency of window changing apha value of background attribute. add different buttons per requirement


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -