Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8504271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:58:54+00:00 2026-06-11T01:58:54+00:00

I want to create something like this : So far what I’ve done :

  • 0

I want to create something like this : enter image description here

So far what I’ve done :

public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
    case R.id.menu_layer:
        //I want to create my menu here
        break;

    case R.id.menu_direction:

        break;

    default:
        break;
    }
    return (true);
}`

It’s my main menu.xml :

<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menu_layer"
      android:icon="@drawable/ic_action_search"
      android:title="@string/menu_layers"
      android:showAsAction="ifRoom|withText" />
<item android:id="@+id/menu_direction"
      android:icon="@drawable/ic_action_search"
      android:title="@string/menu_directions"
      android:showAsAction="ifRoom|withText" />
</menu>

& It’s the menu I want to create after clicking on menu_layer :

<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/satView"
android:icon="@drawable/ic_action_search"
android:orderInCategory="0"
android:showAsAction="always"
android:title="@string/sat_View"/>
<item
android:id="@+id/streetView"
android:icon="@drawable/ic_action_search"
android:orderInCategory="1"
android:showAsAction="always"
android:title="@string/street_View"/>  
</menu>

Can anyone please help me with this ? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:58:56+00:00Added an answer on June 11, 2026 at 1:58 am

    What you see in that Maps app is a custom dialog. You can indeed make your own, fully customized dialogs. Create a layout, just like your Activity layout (say custom_dialog.xml)

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
    >
       <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="Hey!"
       />
    
       <ListView
          android:layout_width="match_parent"
          android:layout_height="match_parent"
       />
    </LinearLayout>
    

    Put this file into projects /layout folder.

    And put this code to Activity’s onCreateDialog(int), where you create dialogs that you want to show.

    Dialog dialog = new Dialog(getApplicationContext());
    dialog.setContentView(R.layout.custom_dialog);
    
    [... misc. initialization]
    

    I tried to simply answer your question but there is plenty of source available and Android’s API Guide fully explains how to create and customize Dialogs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to do something like this create type Item as object ( id
I want to create something like this |Button| item 1 item 2 item 3
I want to do something like this in PostgreSQL. I tried this: CREATE or
I want to achieve something like this inside a UIView: I have created a
I want to create something like a leaflet/magazine using Latex. Is it possible to
Is there a open source meme tracker ? I want to create something like
I want to try create something like Zend's Server Pagecache. What I want to
I have a simple GridView ; something like this for a regular Item or
I have a table with a composite Primary Key, arranged something like this: CREATE
In C#, if you have multiple constructors, you can do something like this: public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.