Android Example to show Popup Menu
In this tutorials you’ll see how “PopupMenu” app is created in Android. Have a look! 1. First of all copy the following code into “activity_main.xml” file <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” android:paddingLeft=”@dimen/activity_horizontal_margin” android:paddingRight=”@dimen/activity_horizontal_margin” android:paddingTop=”@dimen/activity_vertical_margin” android:paddingBottom=”@dimen/activity_vertical_margin” tools:context=”.MainActivity”> <TextView android:text=”@string/hello_world” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_alignParentTop=”true” android:layout_alignRight=”@+id/button1″ android:layout_alignEnd=”@+id/button1″ android:textSize=”20dp” android:textColor=”#ff00ff”/> <Button android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:id=”@+id/button1″ android:text=”Show popup” android:layout_centerVertical=”true” android:layout_centerHorizontal=”true” /> </RelativeLayout> […]
Android Example to show Popup Menu Read More ยป
