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 9242259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:32:43+00:00 2026-06-18T08:32:43+00:00

I am trying to show maps in android using API v2. I want UI

  • 0

I am trying to show maps in android using API v2.
I want UI some thing like this.But whenever I try to add button in layout it does not reflect in output
I am able to get maps without buttons.
I need buttons to integrate with map like below
code for Mylayout.xml:

<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"
tools:context=".MapActivity" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="48dp">
<LinearLayout 
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioGroup 
android:id="@+id/radio_group_list_selector"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal|center_vertical"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:layout_weight="1"

>
<RadioButton
android:id="@+id/radioPopular"
android:layout_width="0dp"
android:layout_height="match_parent"
android:gravity="center_horizontal|center_vertical"
android:text="@string/Popular"
android:layout_weight="1"
android:button="@null"
android:background="@drawable/shape_radiobutton"
android:layout_marginBottom="4dp"
android:layout_marginTop="4dp"
android:layout_marginLeft="4dp"
android:textColor="@drawable/textcolor_radiobutton"

/>
<View
android:id="@+id/VerticalLine"
android:layout_width="1dip"
android:layout_height="wrap_content"
android:layout_marginBottom="4dip"
android:layout_marginTop="4dip"
android:background="#aaa"
            />
<RadioButton
android:id="@+id/radioAZ"
android:layout_width="0dp"
android:layout_height="match_parent"
android:gravity="center_horizontal|center_vertical"
android:text="@string/AZ"
android:layout_weight="1"
android:button="@null"
android:background="@drawable/shape_radiobutton2"
android:layout_marginBottom="4dp"
android:layout_marginTop="4dp"
android:textColor="@drawable/textcolor_radiobutton"

/>
 <View
android:id="@+id/VerticalLine"
android:layout_width="1dip"
android:layout_height="wrap_content"
android:layout_marginBottom="4dip"
android:layout_marginTop="4dip"
android:background="#aaa"
            />
<RadioButton
android:id="@+id/radioCategory"
android:layout_width="0dp"
android:layout_height="match_parent"
android:gravity="center_horizontal|center_vertical"
android:text="@string/Category"
android:layout_weight="1"
android:button="@null"
android:background="@drawable/shape_radiobutton2"
android:layout_marginBottom="4dp"
android:layout_marginTop="4dp"
android:textColor="@drawable/textcolor_radiobutton"

/>
<View
android:id="@+id/VerticalLine"
android:layout_width="1dip"
android:layout_height="wrap_content"
android:layout_marginBottom="4dip"
android:layout_marginTop="4dip"
android:background="#aaa"
/>

<RadioButton
android:id="@+id/radioNearBy"
android:layout_width="0dp"
android:layout_height="match_parent"
android:gravity="center_horizontal|center_vertical"
android:text="@string/NearBy"
android:layout_weight="1"
android:button="@null"
android:background="@drawable/shape_radiobutton3"
android:layout_marginBottom="4dp"
android:layout_marginTop="4dp"
android:layout_marginRight="4dp"
android:textColor="@drawable/textcolor_radiobutton"
/>

</RadioGroup>

</LinearLayout>
<!-- For Horizontal Line-->
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:layout_marginLeft="4dip"
android:layout_marginRight="4dip"
android:background="#aaa"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:scrollbars="vertical"  
class="com.google.android.gms.maps.SupportMapFragment"/>
</RelativeLayout>

Maps with Button

  • 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-18T08:32:44+00:00Added an answer on June 18, 2026 at 8:32 am

    Maybe a simpler solution is to set an overlay in front of your map using FrameLayout or RelativeLayout and treating them as regular buttons in your activity. You should declare your layers in back to front order, e.g., map before buttons. I modified your layout, simplified it a little bit. Try the following layout and see if it works for you:

    <FrameLayout 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"
        tools:context=".MapActivity" >
    
        <fragment xmlns:map="http://schemas.android.com/apk/res-auto"
            android:id="@+id/map"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:scrollbars="vertical"  
            class="com.google.android.gms.maps.SupportMapFragment"/>
    
        <RadioGroup 
            android:id="@+id/radio_group_list_selector"
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:orientation="horizontal" 
            android:background="#80000000"
            android:padding="4dp" >
    
            <RadioButton
                android:id="@+id/radioPopular"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="@string/Popular"
                android:gravity="center_horizontal|center_vertical"
                android:layout_weight="1"
                android:background="@drawable/shape_radiobutton"
                android:textColor="@color/textcolor_radiobutton" />
            <View
                android:id="@+id/VerticalLine"
                android:layout_width="1dip"
                android:layout_height="match_parent"
                android:background="#aaa" />
    
            <RadioButton
                android:id="@+id/radioAZ"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:gravity="center_horizontal|center_vertical"
                android:text="@string/AZ"
                android:layout_weight="1"
                android:background="@drawable/shape_radiobutton2"
                android:textColor="@color/textcolor_radiobutton" />
    
            <View
                android:id="@+id/VerticalLine"
                android:layout_width="1dip"
                android:layout_height="match_parent"
                android:background="#aaa" />
    
            <RadioButton
                android:id="@+id/radioCategory"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:gravity="center_horizontal|center_vertical"
                android:text="@string/Category"
                android:layout_weight="1"
                android:background="@drawable/shape_radiobutton2"
                android:textColor="@color/textcolor_radiobutton" />
            <View
                android:id="@+id/VerticalLine"
                android:layout_width="1dip"
                android:layout_height="match_parent"
                android:background="#aaa" />
    
            <RadioButton
                android:id="@+id/radioNearBy"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:gravity="center_horizontal|center_vertical"
                android:text="@string/NearBy"
                android:layout_weight="1"
                android:background="@drawable/shape_radiobutton3"
                android:textColor="@color/textcolor_radiobutton" />
        </RadioGroup>
    </FrameLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to show a custom map using the Google Maps Javascript API. In
I'm trying Google Maps JavaScript API v2. I want to show a message in
I am trying to show some videos on a website using HTML5. On my
I am trying to show a MapView as a circle on Android just like
I'm new to android and I'm having some trouble trying to read this JSON
I am trying to implement this example http://www.javacodegeeks.com/2011/02/android-google-maps-tutorial.html and i have followed exactly all
I am trying to use the Google maps API on my android app. I
I'm trying to add markers to a Google maps using V3. I have my
I'm using the Google Maps API (v3) on my website to show a map
I'm trying to display locally stored maps with a api to show maps. I

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.