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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:31:54+00:00 2026-06-10T00:31:54+00:00

Problem Statement:- I am working on the android project in which I need to

  • 0

Problem Statement:-

I am working on the android project in which I need to create the Bottom Half part of the android screen dynamically depending on the Markers (Users) on the Map. So I divided the android screen in two half. In the Top Half I am showing the Google Maps which is working fine. And in the Bottom Half I need to dynamically create the linear layout and few other stuff on the linear layout. I have created an image using Paint just to make people understand how I need my UI. So currently I have shown only one Linear Layout example in the bottom half just for one user. I need same thing for n number of users with Scrollable. Suppose if I need to draw two times (two user’s are there) , then in the bottom half same thing will be there two times in the scrollable mode. And if I need to draw three times, then in the bottom half it should be there three times.

enter image description here

Below is the code where I need to add my dynamic layout code.

    @Override
    protected void onPostExecute(ArrayList<User> response) {

        if (response!=null) {
        // Need to create here dynamically the linear layout.
        }

        for(User user : response){

        // In this loop, I am showing all the user's on the google maps

        }


    }

Any help will be appreciated. And what should be XML file for this case.

Currently the XML that I have is below which is a simple UI without the proper bottom half part as I have shown in my image-

<?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" > 

    <com.google.android.maps.MapView 
        android:id="@+id/mapView" 
        android:layout_width="fill_parent" 
        android:layout_height="fill_parent" 
        android:layout_weight="1" 
        android:apiKey="0vAX8Xe9xjo5gkFNEEIH7KdHkNZNJWNnsjUPKkQ" 
        android:clickable="true" 
        android:enabled="true" /> 

    <TextView 
        android:id="@+id/textView" 
        android:layout_width="fill_parent" 
        android:layout_height="fill_parent" 
        android:layout_weight="1" 
        android:text="TextView" /> 

</LinearLayout> 

Note:

In the bottom half part, I need an image and some text next to an image like Name etc etc.

  • 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-10T00:31:56+00:00Added an answer on June 10, 2026 at 12:31 am

    You do not need to do the layout dynamically… You can just use a ListView on the bottom half of your layout, and set the map to the top half.. Then when you get your user list, add as many of the users to the adapter as you end up needing. You can return the current view you have for a user to display each item in the list. Here is a brief example..

    public class MyActivity extends Activity{
    
         ListView mListView;
         ArrayAdapter<User> mAdapter;
    
         public void onCreate(Bundle savedInstanceState){
              super.onCreate(savedInstanceState);
              setContentView(R.layout.main);
    
              //get the listview from xml. I think you know how to layout half and half...
              mListView = (ListView)findViewById(R.id.list);
              mAdapter = new ArrayAdapter<User>(this,R.id.userviewlayout){
    
                   @Override
                   public View getView(){
                        //here is where you add the code to inflate and display a view for a single user
                   }
              };
    
              for(User user : Users)
                   mAdapter.add(user);
    
              mListView.setAdapter(mAdapter);
         }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on the android project in which I need to draw a
Problem statement: It is necessary for me to write a code, whether which before
I'm coming up stumped on forming a working SQL statement for a project of
I'm having a problem with my preg_match_all statement. It's been working perfectly as I've
I'm working on a project in VB.net which takes large text files containing T-SQL
I am working on a project which uses Java,MySql,Struts2 MVC and Hibernate. I tried
I am working on a homework assignment for a class. The problem statement says
Problem Statement:- In my below code, I am getting list of User's which I
Problem Statement:- I need to search a particular String Pattern in around 10000 files
Problem Statement is : Given 2 Dimensional array, print output for example If 4

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.