2012-03-07 4 views
-1

私はtext = "Address"のtextViewを持っています。アンドロイドICSでは、私は時々私はそれを修正することができますどのように、同じ行ICS 4テキストの外観設定

Addres 

s 

ないように私の画面でそれを参照してください?画面で利用可能なスペースとの問題はありません。 .Thanks

これはTextViewのためのXMLです:

<TextView android:id="@+id/text_title" 
android:textColor="#780000" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:textSize="26px" 
android:textStyle="bold" 
android:layout_gravity="center" 
android:layout_marginLeft="20px" 
/> 
+0

に調整されますが、私は同じラインでのTextViewを持つように常にしたいということを伝えるためにどのような方法があります? –

+0

私はandroid:lines = "1"を使用していますが、動作しません。 –

答えて

1

//フォントのために、常に "SP" を使用して」と休息DP」

//ここにあなたがして位置が

android:layout_weight="1"を試すか、アンドロイドあなたを変更するにテキストの内容を表示するのに十分ではないラップコンテンツを使用している:layout_width = 『fill_parent』

<TextView android:id="@+id/text_title" 
android:textColor="#780000" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:textSize="16sp" 
android:singleLine="true" 
android:textStyle="bold" 
android:layout_gravity="center" 
android:layout_marginLeft="10dp" 
/> 

所与の16spのデフォルトを14spです。

実行中のICSすなわちxhdpi場合、それが自動的に

16×240÷160 = 24 //hdpi 
16×320÷160 =32 //for xhdpi 
+0

はい、私はあなたの答えの前にそれを修正しました!とにかくあなたの時間のおかげで、それは愚かな質問でした! –

関連する問題