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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:03:29+00:00 2026-05-28T01:03:29+00:00

In My application i want to create the layout as like below image: So

  • 0

In My application i want to create the layout as like below image:

enter image description here

So How to make it possible ?

I have done Something like below code:

public void showResult()
{

    List<TextView> textListWord = new ArrayList<TextView>(tempEmployerList.size());
    List<TextView> textListAnswer = new ArrayList<TextView>(tempEmployerList.size());
    List<TextView> imageListAnswer = new ArrayList<TextView>(tempEmployerList.size());
    for(int i = 0; i<=tempEmployerList.size()-1; i++)
    {    
        LinearLayout innerLayout = new LinearLayout(this);
        innerLayout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
        innerLayout.setBackgroundColor(0x00000000);

        // set the Multiple TextView
        TextView mHeading = new TextView(getApplicationContext());
        TextView middleValue = new TextView(getApplicationContext());
        TextView aImageView = new TextView(getApplicationContext());

        mHeading.setText("\n"+"1");
        //mHeading.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
        mHeading.setTextColor(0xFFFF0000);
        mHeading.setPadding(3, 0, 0, 0);


        middleValue.setText("\n"+"2");
        //middleValue.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
        middleValue.setTextColor(0xFFFF0000);
        middleValue.setGravity(Gravity.RIGHT);
        middleValue.setPadding(2, 0, 9, 0);

        aImageView.setText("\n"+"3");
        //aImageView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
        aImageView.setGravity(Gravity.RIGHT);
        aImageView.setTextColor(0xFF000000);
        aImageView.setPadding(0, 0, 9, 0);

        View line = new View(getApplicationContext());
        //line.setOrientation(1);
        line.setLayoutParams(new LayoutParams(2, android.view.ViewGroup.LayoutParams.FILL_PARENT)); 
        line.setBackgroundColor(0xFF000000); 

        /**** Any other text view setup code ****/    

        innerLayout.addView(mHeading);
        innerLayout.addView(middleValue);
        innerLayout.addView(aImageView);
        innerLayout.addView(line);
        myLinearLayout.addView(innerLayout);  

        textListWord.add(mHeading); 
        textListAnswer.add(middleValue);
        imageListAnswer.add(aImageView);

    } 
}

So please guide me that what more i have to do to create such view ?
Thanks.

  • 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-28T01:03:30+00:00Added an answer on May 28, 2026 at 1:03 am

    try TableLayout and TableRow instead of LinearLayout.

    You can create TableLayout in xml as well, as it, I think would be static and add TableRows. To Create a TableLayout in Java use,

    TableLayout tblLayout=new TableLayout(this); 
    

    Set LayoutParams and other properties of table layout in java, like I am setting LayoutParams:

    LayoutParams params=new LayoutParams(LayoutParams.Fill_Parent, LayoutParams.Wrap_Content); 
    tblLayout.setLayoutParams(params);
    

    Create a loop for TableRows creation and insertion:

    for(int i=0;i<arrList1.size();i++)
    {
       TableRow row=new TableRow(this);
       row.setLayoutParams(params);
    
       TextView lbl1=new TextView(this);
       lbl1.setText(arrList1.get(i));
       row.addView(lbl1);
    
       TextView lbl2=new TextView(this);
       lbl2.setText(arrList2.get(i));
       row.addView(lbl2);
    
       TextView lbl3=new TextView(this);
       lbl3.setText(arrList3.get(i));
       row.addView(lbl3);
    
       tblLayout.addView(row);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write application where I create layout in the code (without xml-layout
Hey I want to create a layout like this for my application. Of course
I want to create my Rails application with MySQL, because I like it so
I want to create an application which will have a client and server components.
I want to create an Application with tabs, and I have found this guide
I'm using AvalonDock to layout my application. I want to create a View MenuItem
I want to create application with two Tabs, like follow: MainClass: private TabHost tabHost;
I want to create web application using Grails. The main layout consists of few
I want to create a modules layout in my web application so I can
In my application, I want to create a Receipt Layout for printing. I'm struggling

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.