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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:17:56+00:00 2026-06-10T09:17:56+00:00

i have a LinearLayout inside another LinearLayout . the issue i have is that

  • 0

i have a LinearLayout inside another LinearLayout. the issue i have is that the ToggleButton is not visible in the second LinearLayout..here is my complete UI.also i want to know is this layout design efficient or no. i know i can use TableLayout but then i have problem in fitting 3 components on one line

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dip" >

<TextView
    android:id="@+id/supplierNameTV"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/supplierNameTV"
    android:textColor="#FFFFFF" 
    android:layout_gravity="right"/>

<LinearLayout android:orientation="horizontal" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content"> 

    <AutoCompleteTextView
        android:id="@+id/supplierName_CB"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />

    <ToggleButton
        android:id="@+id/toggleButton1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="right"
        android:checked="false"
        android:text="ToggleButton" />

</LinearLayout>
<TextView
    android:id="@+id/prodNameTV"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/prodNameTV"
    android:textColor="#FFFFFF" 
    android:layout_gravity="right"
    android:layout_marginBottom="5dip"
    android:layout_marginTop="5dip"/>

<AutoCompleteTextView
    android:id="@+id/prodName_CB"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"/>

<Button
    android:id="@+id/add_button"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="@string/addproduct_button"
    android:textColor="#372c24" />


<ListView
    android:id="@+id/listview"
    android:layout_height="wrap_content"
    android:layout_width="match_parent">
</ListView>


</LinearLayout>
  • 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-10T09:17:58+00:00Added an answer on June 10, 2026 at 9:17 am

    Try to assign a layout_weight to your AutoCompleteTextView:

        <AutoCompleteTextView
        android:id="@+id/supplierName_CB"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one activity and want to display another inside it. Here's my layout:
I have a code that should get a LinearLayout (with more LinearLayout's inside), and
I have a FrameLayout with a vertical LinearLayout inside. I have an ImageView that
I have a 4x1 widget that holds several ImageView views inside a LinearLayout .
I have layout included inside another layout , I want this included one aligned
H have multiple TextViews inside an LinearLayout . Now I want to delete this
I have a LinearLayout view that already contains several elements. I want to add
I have a horizontal LinearLayout, inside which I have 2 TextViews. Let's say that
I have a GridView inside of a LinearLayout inside of a ScrollView that pages
I have a LinearLayout and I want to see when a user has touched

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.