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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:16:52+00:00 2026-05-19T03:16:52+00:00

I want a layout such that user can toggle between listview and mapview and

  • 0

I want a layout such that user can toggle between listview and mapview and menu button click. When the activity is first created it fetches data from server and display list result and upon menu button click maps all result on mapview.
The problem I am having is displaying the loading screen initially and again after user click refresh result menu button.
My layout is below, activity extends MapActivity. I expect loading view to be gone when list data becomes available of when notifyDataSetInvalidated() is called. I have used similar logic in other activity without mapview and activity extends listactivity and it works but not in this case.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" 
    android:orientation="vertical"
    >
    <LinearLayout 
        android:id="@+id/data_view"
        android:layout_width="fill_parent"
        android:layout_height="0dip" 
        android:layout_weight="1"
        >
        <ListView 
            android:id="@android:id/list"
            android:layout_height="fill_parent" 
            android:layout_width="fill_parent"
            android:drawSelectorOnTop="false"
            android:scrollbars="vertical" 
            />
        <com.google.android.maps.MapView
            android:id="@+id/map_view"
            android:layout_height="fill_parent" 
            android:layout_width="fill_parent"
            android:clickable="true" 
            android:visibility="gone"
            android:apiKey="@string/google_maps_api_key"
            />
    </LinearLayout> 
    <LinearLayout
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:gravity="center"
      android:background="@color/white"
      >
      <ProgressBar
        android:id="@+id/emptyProgress"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginRight="6dip"
        style="?android:attr/progressBarStyleSmall" 
        />
      <TextView
        android:id="@+id/emptyText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:text="@string/loading" 
        />
    </LinearLayout>
</LinearLayout>
  • 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-05-19T03:16:52+00:00Added an answer on May 19, 2026 at 3:16 am

    I have decided to use FrameLayout and switch between these 3 views based on what to display.

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

Sidebar

Related Questions

I want to create a layout in such a way that on top edittext
I want to create such layout: +-----------container-----------+ | +-----fixed-height-div-------+| | +-------fixed-height-div-----+| | +-fill-height-scrollable-div-+| | +-fixed-height-bottom-div-+| +---------end-container-------+ The problem
I want following layout in my app. A button at top, second botton at
First let me tell you what I want to achieve. I want a layout
I want to set layout something like What i thought that i will have
I want to create a Button otherthan creating it from xml layout.i want to
I want to create a layout for an Android app that has a numeric
I want to create a layout that has 6 TextViews on the very top,
I'm looking for a WPF layout that works like a horizontal stack panel, such
I understand that Primefaces Layout and Dashboard have state which can be saved. Could

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.