android - Slim Spinner when i use FILL_PARENT (or MATCH_PARENT) as WIDTH -


i've strange problem when set android:layout_width="fill_parent" in spinner:

the clickable area reduced line (red square) , pressing on line possibile show elements of spinner: enter image description here

if use android:layout_width="wrap_content" obtain correct area: enter image description here

i same thing using "fill_parent" enter image description here

the elements of spinner correctly visualized.. problem clicking on spinner. possible problem?

<linearlayout  xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" >  <linearlayout     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:background="#040404"     android:gravity="center"     android:paddingtop="2dp"     android:weightsum="4" >      <textview         android:id="@+id/mpp_movimento_lbl"         android:background="@drawable/selector_black_btn"         android:layout_width="0dp"         android:layout_height="wrap_content"         android:layout_weight="1"         android:drawabletop="@drawable/freccia_verde"         android:gravity="center"         android:text="@string/movimento"         android:textcolor="@color/white"         android:textstyle="bold"         android:textsize="17sp" />      <textview         android:id="@+id/mpp_eccesso_lbl"         android:background="@drawable/selector_black_btn"         android:layout_width="0dp"         android:layout_height="wrap_content"         android:layout_weight="1"         android:drawabletop="@drawable/freccia_rossa"         android:gravity="center"         android:text="@string/eccesso"         android:textcolor="@color/white"         android:textstyle="bold"         android:textsize="17sp" />      <textview         android:id="@+id/mpp_fermo_lbl"         android:background="@drawable/selector_black_btn"         android:layout_width="0dp"         android:layout_height="wrap_content"         android:layout_weight="1"         android:drawabletop="@drawable/freccia_grigia"         android:gravity="center"         android:text="@string/fermo"         android:textcolor="@color/white"         android:textstyle="bold"         android:textsize="17sp" />      <textview         android:id="@+id/mpp_ripristina_lbl"         android:background="@drawable/selector_black_btn"         android:layout_width="0dp"         android:layout_height="wrap_content"         android:layout_weight="1"         android:drawabletop="@drawable/ripristina_mappa_40x40"         android:gravity="center"         android:text="@string/ripristina"         android:textcolor="@color/white"         android:textstyle="bold"         android:textsize="17sp" />  </linearlayout>  <textview     android:id="@+id/mpp_automezzi_visualizzati_lbl"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:background="@color/black"     android:gravity="center"     android:paddingtop="5dp"     android:text="@string/automezzivisualizzati"     android:textcolor="@color/white"     android:textsize="17sp" />  <relativelayout     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:background="@color/white"     android:paddingtop="5dp" >      <framelayout         android:id="@+id/mpp_spinner_frame_fly"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignparentleft="true"         android:layout_toleftof="@+id/mpp_cerca_btn" >          <spinner             android:id="@+id/mpp_spinner_spn"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_gravity="right"             android:textsize="17sp" />      </framelayout>      <imagebutton         android:id="@+id/mpp_cerca_btn"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignparentright="true"         android:layout_centervertical="true"         android:layout_marginleft="5dp"         android:background="@drawable/selector_white_btn"         android:contentdescription="@string/descrizionecerca"         android:gravity="center"         android:onclick="docerca"         android:src="@drawable/cerca" /> </relativelayout>  <linearlayout     android:layout_width="match_parent"     android:layout_height="5dp"     android:background="#040404"     android:gravity="center" > </linearlayout>  <relativelayout     android:layout_width="match_parent"     android:layout_height="match_parent" >      <fragment         android:id="@+id/mpp_mappa_fragment"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:layout_alignparentbottom="true"         android:layout_alignparentright="true"         android:layout_alignparenttop="true"         class="com.google.android.gms.maps.supportmapfragment" />  </relativelayout> 

try setting spinner's parent's height match_parent. , need such layout? there no need place spinner in framelayout, try setting spinners's weight 1 , replace relativelayout linearlayout


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -