android - my textview are shorten if I don't set an enought large string in my layout :S -
i've strange issue, when try set text on 1 of textview, text appear entirely if i've set in layout bigget text. if text in layout smaller, new string shorten between 2 words fit smaller place. if don't set text in layout, doesn't appear !
have idea have ?
(i'm in custom view group involving 3 layout in same activity, without fragments)
<?xml version="1.0" encoding="utf-8"?> <scrollview xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <linearlayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > <textview android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="5dp" android:gravity="center" android:text="jury" android:textsize="30dp" android:textstyle="bold" /> <com.clicmobile.cannes.widget.aspectratioimageview android:id="@+id/juryprezimageview" android:layout_width="fill_parent" android:layout_height="wrap_content" android:adjustviewbounds="true" android:src="@drawable/ic_launcher" /> <relativelayout android:layout_width="wrap_content" android:layout_height="wrap_content" > <imageview android:id="@+id/juryprezichiddenimageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentleft="true" android:layout_alignparenttop="true" android:visibility="invisible" android:src="@drawable/ic_launcher" /> <textview android:id="@+id/juryfonctionpreztextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparenttop="true" android:layout_torightof="@id/juryprezichiddenimageview" android:text="president du jury - " /> <textview android:id="@+id/jurycategorytextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/juryfonctionpreztextview" android:layout_alignleft="@id/juryfonctionpreztextview" android:text="cinefondation et courts metrages" /> <imageview android:id="@+id/juryprezicimageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentleft="true" android:layout_below="@id/jurycategorytextview" android:src="@drawable/ic_launcher" /> <textview android:id="@+id/jurynompreztextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_aligntop="@id/juryprezicimageview" android:layout_torightof="@id/juryprezicimageview" android:textsize="25dp" android:minwidth="50dp" android:textstyle="bold" /> <textview android:id="@+id/juryfonctiontextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/jurynompreztextview" android:layout_torightof="@id/juryprezicimageview" android:text="realisateur" /> <textview android:id="@+id/jurymembertextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/juryfonctiontextview" android:layout_torightof="@id/juryprezicimageview" android:text="membre du jury" /> <linearlayout android:layout_width="match_parent" android:layout_height="1dp" android:layout_below="@id/jurymembertextview" android:layout_torightof="@id/juryprezicimageview" android:background="@color/white" android:orientation="vertical" > </linearlayout> </relativelayout> <linearlayout android:id="@+id/jurymembrelinearlayout1" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <relativelayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/jurymembre1relativelayout" android:layout_weight="1" > <imageview android:id="@+id/jurymembre1imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_launcher" /> <textview android:id="@+id/jurymembre1nomtextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_torightof="@id/jurymembre1imageview" android:text="machin" android:textsize="22dp" android:textstyle="bold" /> <textview android:id="@+id/jurymember1fonctiontextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/jurymembre1nomtextview" android:layout_torightof="@id/jurymembre1imageview" android:text="fonction du jury" /> </relativelayout> <relativelayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/jurymembre2relativelayout" android:layout_weight="1" > <imageview android:id="@+id/jurymembre2imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_launcher" /> <textview android:id="@+id/jurymembre2nomtextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_torightof="@id/jurymembre2imageview" android:text="machin" android:textsize="22dp" android:textstyle="bold" /> <textview android:id="@+id/jurymember2fonctiontextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/jurymembre2nomtextview" android:layout_torightof="@id/jurymembre2imageview" android:text="fonction du jury" /> </relativelayout> </linearlayout> </linearlayout> </scrollview>
probably happening because second textview adjusting size first textview. so, if first textview fills lets 50% of screen second 1 not able exceed size.
try setting layout_width wrap_content on second textview, if not work please show xml layout can help.
Comments
Post a Comment