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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:57:41+00:00 2026-05-26T01:57:41+00:00

I have been fiddling a bit with android the last few days. I have

  • 0

I have been fiddling a bit with android the last few days.
I have run into an issue when including views in other views.

When working with simple views, this is no problem, but as soon as the view has some fancy activity working with it, like ListActivity or MapActivity (when using google maps view)

Lets say that i need a list of some dynamic kind, and a google maps view in the same view.
Since they both have a specific activity associated with it, how would i go about creating that?

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="fill_parent" android:orientation="vertical" android:layout_width="fill_parent" android:id="@+id/linearLayout1" android:weightSum="1">
    <include android:id="@+id/include1" layout="@layout/list" android:layout_height="wrap_content"  android:layout_width="match_parent"></include>
    <include android:id="@+id/include2" layout="@layout/map" android:layout_width="match_parent" android:layout_height="wrap_content"></include>
</LinearLayout>

Should i use that Inflater thingy instead?

I have been searching for a solution to this problem, but i havent found any.
Either my google fu is missing, or i’m looking at this the wrong way.

While writing this, and reading the related questions here on SO, i may have found the solution.
Since the ListActivity and MapActivity is just extended Activities, instead of using the ListActivity and MapActivity that the android SDK provide, i should just use an ordinary Activity, and implement the stuff myself, or if possible, reuse their activities in my own activity?

Can anyone confirm 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-05-26T01:57:41+00:00Added an answer on May 26, 2026 at 1:57 am

    MapViews are not always inside MapActivities and ListViews are not always inside ListActivities. Those activities exist as starting points for other Activities that revolve around a single view type.

    To answer your question: If you want an activity that contains both a ListView and a MapView you can simply add them to the root view group of the activity. Then simply implement the required methods to get the MapView and ListView working properly.

    I’m not sure what you mean about having multiple view types in a single view. Usually people talk about adding views to view groups for example:

    <LinearLayout ....>
        <Button ..../>
        <ImageView ..../>
    </LinearLayout>
    

    In this case you have a LinearLayout viewgroup that contains 2 views a Button and a ImageView. In Android it doesn’t make sense to talk about a ImageView containing another view.

    This leads me to think that the Title of you question should really be:

    Multiple view types in one Activity (like Map and List)

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

Sidebar

Related Questions

I have been fiddling with ormlite on android. It's early days and so far
I have been fiddling with a few lines of code for two days now
I have been fiddling with OpenCL recently, and I have run into a serious
I am just learning C# (have been fiddling with it for about 2 days
I've been fiddling with WebGL lately, and have gotten a Collada reader working. Problem
I have been fiddling around with server side interceptors on CXF. But is seems
I have been fiddling with code to call a function with the name of
I Have been fiddling with this for hours. I can not get my text
Have been working on this question for a couple hours and have come close
I have been fiddling around with settings for a while, and cannot seem to

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.