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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:22:08+00:00 2026-05-27T01:22:08+00:00

This has puzzled me for two days now. I have a LinearLayout like the

  • 0

This has puzzled me for two days now. I have a LinearLayout like the following:

        <LinearLayout
                android:background="@drawable/rounded_rect_wht_bg"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:orientation="horizontal"
                android:layout_margin="5dp"
                android:minHeight="30dp"
                android:padding="5dp"
                android:visibility="gone">
            <ImageView
                    android:id="@+id/timage"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="5dp"
                    android:layout_marginRight="10dp"
                    android:layout_marginLeft="10dp"
                    android:layout_marginBottom="5dp"
                    android:scaleType="fitXY"
                    />
            <TextView
                    android:id="@+id/tname"
                    android:layout_width="wrap_content"
                    android:layout_height="fill_parent"
                    android:layout_marginRight="5dp"
                    android:textColor="@android:color/black"
                    android:textSize="13sp"
                    android:textStyle="bold"/>
            <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:layout_marginLeft="5dp"
                    android:layout_marginRight="5dp"
                    android:src="@drawable/ticon" />
        </LinearLayout>

The last ImageView (ticon) doesn’t showup. I only see timage and tname. But, if I switched it:

<LinearLayout>
        <ImageView android:src="@drawable/ticon" />
        <ImageView android:id="@+id/timage" />
        <TextView android:id="@+id/tname" />
</LinearLayout>

It’s there. What is going on here?

  • 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-27T01:22:09+00:00Added an answer on May 27, 2026 at 1:22 am

    Since you’re defining the layout_height of your TextView as “fill_parent”, it will take the remaining space. That’s why it shows properly if it’s declared last: the images use only the space they need (layout_height=”wrap_content”).

    Depending on what you want to do, you can either try setting the layout_height of the TextView to “wrap_content” or, if you want the TextView to fill up the space between the images, I would suggest you to use RelativeLayout:

    <RelativeLayout
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         ...>
         <ImageView
              android:id="@+id/timage"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              ...
              android:layout_alignParentTop="true" />
         <ImageView
              android:id="@+id/ticon"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              ...
              android:layout_alignParentBottom="true" />
         <TextView
              android:id="@+id/tname"
              android:layout_width="wrap_content"
              android:layout_height="fill_parent"
              ...
              android:layout_below="@+id/timage"
              android:layout_above="@+id/ticon" />
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This one has me puzzled. It seemed like an easy task, but the solution
This has been driving me crazy for a few days. Why doesn't the following
This topic has been scratched once or twice, but I am still puzzled. And
This has happened to me 3 times now, and I am wondering if anyone
This question has puzzled me for a while. A public property that can be
This is something which has always puzzled me. If I want to make a
I am quite new to Android yet, and I have an application that has
this has me puzzled - I am no expert on page life cycle but
This has been a problem that I haven't been able to figure out for
This has been an adventure. I started with the looping duplicate query located in

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.