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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:23:19+00:00 2026-05-25T21:23:19+00:00

I want to design a Layout in which I want subtext right below main

  • 0

I want to design a Layout in which I want subtext right below main text in Android.
Pictorially something like below.

 ____________________________________________
|<EMP NAME >        | Location   | ImageView |
|<designation>      |                        |
|________________________________|___________|

In Iphone, UITableView there is option for detaulTextLable. How can I achieve this in Android. Any Idea?

My Xml file goes like below:

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

    <LinearLayout android:orientation="horizontal"
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent" android:layout_below="@+id/addEmployee"
        android:layout_weight="1" android:layout_height="wrap_content"
        android:clickable="true" android:padding="2dip" android:layout_margin="5dip"
        android:layout_marginBottom="2dip" android:layout_marginTop="2dip"
        android:paddingBottom="2dip" android:background="#F5F5F5"         android:fitsSystemWindows="true" 
        android:focusableInTouchMode="true">



        <TextView android:layout_weight="1" android:id="@+id/add_employee_name"
            android:clickable="true" android:layout_width="0dp" android:text="Enter Name"
            android:layout_gravity="fill" android:layout_marginLeft="2dip"
            android:layout_marginRight="2dip" android:layout_height="match_parent"
            android:gravity="left|center" android:textStyle="bold"
            android:paddingLeft="5dip" android:lineSpacingMultiplier="1.0"      android:lines="3">
       </TextView>

   <!--
      <TextView android:layout_weight="1" android:id="@+id/add_emp_designation"> 
      </TextView>
      Need to add a new text view for employees designation or textview has options for subtitles.
    -->


        <TextView android:layout_weight="0.4"
            android:id="@+id/add_employee_location" android:clickable="true"
            android:layout_width="0dp" android:text="Location" android:layout_gravity="fill"
            android:layout_marginLeft="0dip" android:layout_marginRight="2dip"
            android:layout_height="match_parent" android:textStyle="normal" android:paddingLeft="5dip" android:textColor="#B03060" android:gravity="bottom|right">
        </TextView>



        <ImageView android:id="@+id/employee_pic"
            android:layout_gravity="right" android:src="@drawable/edit"
            android:layout_width="wrap_content" android:layout_height="match_parent">
        </ImageView>

    </LinearLayout>

I am just confused how to achieve above layout. Adding a new textview adds it horizontally. Any idea?

  • 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-25T21:23:20+00:00Added an answer on May 25, 2026 at 9:23 pm

    Provided that you want the Location and ImageView to take up only just as much space as they need, the following layout will do the trick:

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal" android:layout_width="fill_parent"
    android:layout_height="wrap_content">
      <LinearLayout android:layout_height="fill_parent"
        android:layout_width="wrap_content" android:id="@+id/linearLayout1"
        android:orientation="vertical" android:layout_weight="1">
        <TextView android:text="TextView" android:id="@+id/EMP_NAME"
            android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:layout_weight="1"></TextView>
        <TextView android:text="TextView" android:id="@+id/Description"
            android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:layout_weight="1"></TextView>
      </LinearLayout>
      <TextView android:id="@+id/location" android:text="TextView"
        android:layout_height="fill_parent" android:layout_width="wrap_content"
        android:gravity="center"></TextView>
      <ImageView android:layout_height="wrap_content"
        android:layout_width="wrap_content" android:id="@+id/YourImageView"
        android:src="@drawable/icon"></ImageView>
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new in android, and want to design the layout which run in
I want to design a login and register layout using android tabs. Image is
I want to design layout which contains one button which is on the top
I'm trying to design a page layout with two floated divs which I want
I want to design this layout in Android XML i wrote the xml and
i design a login view. I want to insert a fragment layout which is
I have a lot of customized javascript and layout design, and I want to
I want to design a c# program which can run program a 3rd exe
I want to design a chat view like BlackBerry messenger (unfortunately new users are
I want to design a TableLayout with some big buttons with icon and text

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.