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

  • Home
  • SEARCH
  • 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 8029713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:31:01+00:00 2026-06-05T00:31:01+00:00

i want to add at run time a Map and some transparent(as in map

  • 0

i want to add at run time a Map and some transparent(as in map visible underneath) buttons to controll the type of map shows(normal/satellite/traffic).

I can do it with xml like

<RelativeLayout ...>
<map>
<button .../>
<button .../>
</RelativeLayout>

However since i want to select api key based on debug/release i can’t get the map to go “under” the buttons, here is what i try

this.mapView = new MyMapView(this, map_key);
        this.mapView.setClickable(true);

        RelativeLayout.LayoutParams p = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);
        //p.addRule(RelativeLayout.BELOW, R.id.tipo_mappa);
        p.addRule(RelativeLayout.CENTER_IN_PARENT);


        this.mapView.setLayoutParams( p );



        layout.addView(this.mapView, 0);

The result is i only see the map in fullscreen, the buttons are hidden/underneath maybe.

This is my layout.xml

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/linearLayoutMappa"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >




    <!--

    <com.google.android.maps.MapView
        android:id="@+id/mapview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_alignParentBottom="true"
        android:apiKey="abc"
        android:clickable="true" />

    -->

    <RadioGroup
        android:id="@+id/tipo_mappa"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:orientation="horizontal" >

        <RadioButton
            android:id="@+id/normal"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:checked="true"
            android:text="@string/mappa_normale" />

        <RadioButton
            android:id="@+id/sat"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="8dp"
            android:text="@string/mappa_satelite" />
    </RadioGroup>

    <CheckBox
        android:id="@+id/traffic"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_toRightOf="@+id/tipo_mappa"
        android:onClick="myClickHandler"
        android:text="@string/mappe_traffic" />

</RelativeLayout>
  • 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-05T00:31:02+00:00Added an answer on June 5, 2026 at 12:31 am

    Not sure if it’ll work, but try requesting focus back to your buttons after adding the map. It might pull them back to the surface.
    View.requestFocus()

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

Sidebar

Related Questions

I want to add image buttons in a table layout at run time. My
I want to add different buttons, vertically stacked, to a JPanel at run-time and
I have a website built with ASP.NET (3.5) and want add some level of
How can I add a camel route at run-time in Java? I have found
I have some problems adding new pages. I want to add new pages only
I want to add some functionality to my Android device. However i don't want
I am adding tag at run time using jquery. <a id=add class=add href=#>Test</a> I
Hello I want to run eclipse for the first time, when I click on
I want to change the app.setting connection string at the run time. I have
I implemented addTableModelListener at run-time in my table-model, but I want to create one

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.