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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:02:00+00:00 2026-06-12T19:02:00+00:00

I have a view that looks like this: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:paddingTop=0dp android:paddingLeft=0dp android:paddingRight=0dp android:paddingBottom=10dp

  • 0

I have a view that looks like this:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:paddingTop="0dp"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingBottom="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<RelativeLayout android:id="@+id/header"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent"
    android:orientation="horizontal" 
    android:paddingTop="5dp"
    android:paddingBottom="10dp"
    android:paddingLeft="15dp"
    android:paddingRight="15dp">

    <ImageView android:id="@+id/title_icon"
        android:layout_width="12dp"
        android:layout_height="12dp"
        android:layout_alignParentLeft="true"
        android:layout_centerVertical="true"
        android:layout_gravity="center_vertical"
        android:src="@drawable/title_icon" />

    <LinearLayout android:id="@+id/title_layout"
        android:layout_toRightOf="@id/title_icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_gravity="center_vertical"
        android:layout_marginLeft="10dp"
        android:orientation="vertical" >

        <TextView android:id="@+id/title_text"
            android:text="@string/activity_complete"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_gravity="center_vertical"
            android:paddingRight="15dp"
            android:textSize="12dp"
            android:textStyle="bold"/>

    </LinearLayout>

    <TextView android:id="@+id/status_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:textSize="8dp" />

</RelativeLayout>

<TextView android:id="@+id/message_text" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"
    android:layout_marginTop="5dp"
    android:layout_marginLeft="0dp"
    android:layout_marginRight="0dp"
    android:layout_marginBottom="5dp"
    android:paddingLeft="15dp"
    android:textSize="10dp"/>

<ImageView android:id="@+id/main_image"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@color/grey"
    android:padding="5dp"/>

</LinearLayout>

My problem is that the main LinearLayout view doesn’t match_parent or fill_parent. It seems to want to only contain the smallest item within it. In my case it will result in a width the same as main_image, cutting off the content of everything else. However, if I set main_image to visibility.gone then it will match the width of message_text.

I’ve tried removing everything except main_image and the main LinearLayout still only fits the image width.

The other thing is that this layout is inflated into another LinearLayout which is set to fill_parent.

  • 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-12T19:02:02+00:00Added an answer on June 12, 2026 at 7:02 pm

    Wrapping the ImageView in another LinearLayout fixed the issue.

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

Sidebar

Related Questions

I have a view that looks like this: http://whatever/Download/viaId/12345 And i would like to
I have a view model that looks like this public class ViewModelRound2 { public
I have a list view that looks like this and that's its code ..
I have a view model that has a property that looks like this Property
I have a view that looks like this: And I display a pop up
I have a view model that looks like this: public class VenueIndexViewModel : BaseViewModel
I have a view hierarchy that looks something like this: UIView (A) UIView >
I have a Javascript statement in an MVC view that looks like this and
Here goes: I have a view that looks like this: public interface IAddressView {
I'm using SQL Server 2008 and I have a view that looks like this:

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.