Is it possible to create an Options Menu without an Action Bar on Android?

0

I'm creating a Profile screen, and I'd like to put an Options Menu with the 'Edit profile' and 'Exit' options. The problem is that I do not have an Action Bar on this screen, nor do I want to put one, but I would like to create this Options Menu in the upper right corner of the screen. It is possible? How can I do this?

TheXMLofthisscreenlookslikethis:

<?xmlversion="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/greylight"
    android:orientation="vertical">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="300dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="260dp"
            android:orientation="vertical"
            android:background="@drawable/gradient_background_profile">

            <ImageView
                android:layout_marginTop="35dp"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:src="@drawable/profile"/>

            <TextView
                android:layout_marginTop="10dp"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:text="Caíque Araujo"
                android:textColor="@color/white"
                android:textStyle="bold"
                android:textSize="21sp"/>

            <TextView
                android:layout_marginTop="5dp"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:text="Universidade Federal do Ceará"
                android:textColor="@color/white"
                android:textSize="15sp"/>

        </LinearLayout>

    </RelativeLayout>

</LinearLayout>
    
asked by anonymous 09.11.2017 / 13:01

0 answers