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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:15:00+00:00 2026-05-22T18:15:00+00:00

I am using spinner in an activity with Theme dialog. I can’t get the

  • 0

I am using spinner in an activity with Theme dialog.
I can’t get the spinners to fill parent width – those are always in the length of the text only – no matter what i do. this ismy layout definition.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="match_parent"  android:layout_width="match_parent" android:orientation="vertical">
        <LinearLayout android:id="@+id/weight_units"
            android:layout_width="match_parent" android:gravity="top|center_vertical|center_horizontal"
            android:orientation="horizontal" android:layout_marginBottom="3dip" android:layout_marginTop="3dip"  android:layout_height="wrap_content">
            <TextView android:layout_marginRight="3dip" android:id="@+id/spinner_lbl"
                android:text="@string/weight_units"
                android:layout_marginLeft="3dip" android:layout_height="wrap_content"
                android:layout_width="match_parent" android:layout_gravity="center_vertical|center_horizontal"  android:layout_weight="1" ></TextView>
            <Spinner android:id="@+id/weight_spinner" android:layout_height="wrap_content" android:layout_weight="1" android:layout_width="match_parent"></Spinner>
        </LinearLayout>

        <LinearLayout android:orientation="vertical"
            android:paddingTop="2dip" android:paddingBottom="2dip" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1">
            <TextView android:layout_width="match_parent"
                android:layout_height="wrap_content" android:layout_marginTop="10dip"
                android:text="@string/calc_formula_prompt" />
            <Spinner android:id="@+id/calc_spinner" android:layout_height="wrap_content" android:prompt="@string/calc_formula_prompt" android:layout_width="fill_parent"/>
        </LinearLayout>

To be clear – i do want the activity to be opened as dialog , and grab most of the screen – but when i landscape – spinner is not stretched to the full parent width.

Thanks in advance

  • 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-22T18:15:01+00:00Added an answer on May 22, 2026 at 6:15 pm

    The problem was in the fact that this view was inflated and used as one of the vies in ViewFlipper.
    The code which was missing and caused this annoying behaviur was the addition of the flipper to its parent layout with the correct LayoutParams.

        flipper = new MyViewFlipper(this, gestureDetector);
        lay1.addView(flipper,new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
    

    I apologize for incomplete question – i had no idea it could be related to the way flipper was added to its parent.

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

Sidebar

Related Questions

I've an activity, in which I am using Spinner to populate it from WebService
I have a selection for some items using a spinner widget. At the moment
I am using the jQuery spinner tool found here: http://btburnett.com/spinner/example/example.html When I try using
I'm trying to create a new spinner background using a 9 patch picture. I've
I am setting a spinner to the diabled state by using mySpinner.setEnabled(false); The spinner
I want to show page loading spinner in my html page content using jquery
I'm using the SpinnerList component in a flex mobile application, the spinner turn too
using the jquery ui modal dialog , the background shades grey (i assuming this
Using of mobile dialog authentication is working well for other mobile devices except on
Me again! I am using NSURL to get a file then parse it. I

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.