「TextView設定」の編集履歴(バックアップ)一覧はこちら
TextView設定 - (2010/09/23 (木) 17:59:01) の最新版との変更点
追加された行は緑色になります。
削除された行は赤色になります。
*TextView各種設定に関して
***幅(width)の設定
[[リファレンス(XML)>http://developer.android.com/reference/android/widget/TextView.html#attr_android:width]]
[[リファレンス(Method)>http://developer.android.com/reference/android/widget/TextView.html#setWidth(int)]]
|方法|書式|説明|
|XML|android:width|単位は以下の通り&br()・mm(ミリ)&br()・px(ピクセル)&br()・dp(density-independent pixels)&br()・sp(scaled pixels based on preferred font size)&br()・in(inches)&br()記述する場合は単位をつけて記述します。&br()(例)android:width="30px"|
|Method|setWidth( int )|メソッドで記述する場合は単位はぴピクセルのみの指定になります。|
***高さ(height)の設定
*TextView各種設定に関して
&bold(){&link_anchor(width){幅の設定}}
&bold(){&link_anchor(height){高さの設定}}
&bold(){&link_anchor(moji_color){文字色の設定}}
-&aname(width,option=nolink){幅の設定}
[[リファレンス(XML)>http://developer.android.com/reference/android/widget/TextView.html#attr_android:width]]
[[リファレンス(Method)>http://developer.android.com/reference/android/widget/TextView.html#setWidth(int)]]
|BGCOLOR(#ccc):&bold(){方法}|BGCOLOR(#ccc):&bold(){書式}|BGCOLOR(#ccc):&bold(){説明}|
|XML|android:width|単位は以下の通り&br()・mm(ミリ)&br()・px(ピクセル)&br()・dp(density-independent pixels)&br()・sp(scaled pixels based on preferred font size)&br()・in(inches)&br()記述する場合は単位をつけて記述します。&br()(例)android:height="30px"|
|Method|setWidth( int )|メソッドで記述する場合は単位はピクセルのみの指定になります。|
-&aname(height,option=nolink){高さの設定}
[[リファレンス(XML)>http://developer.android.com/reference/android/widget/TextView.html#attr_android:width]]
[[リファレンス(Method)>http://developer.android.com/reference/android/widget/TextView.html#setWidth(int)]]
|BGCOLOR(#ccc):&bold(){方法}|BGCOLOR(#ccc):&bold(){書式}|BGCOLOR(#ccc):&bold(){説明}|
|XML|android:height|単位は以下の通り&br()・mm(ミリ)&br()・px(ピクセル)&br()・dp(density-independent pixels)&br()・sp(scaled pixels based on preferred font size)&br()・in(inches)&br()記述する場合は単位をつけて記述します。&br()(例)android:height="30px"|
|Method|setMaxHeight( int )|メソッドで記述する場合は単位はピクセルのみの指定になります。|
&bold(){&color(red){※幅と高さに関する注意点}}
&bold(){&color(red){ViewGroup.LayoutParamsのlayout_widthとlayout_heightを指定してサイズを指定している場合はFILL_PARENT指定が優先されるので気をつけること。}}
-&aname(moji_color,option=nolink){文字色の設定}
[[リファレンス(XML)>http://developer.android.com/reference/android/widget/TextView.html#attr_android:textColor]]
[[リファレンス(Method)>http://developer.android.com/reference/android/widget/TextView.html#setWidth(int)]]
[[リファレンス(ColorStateList)>http://developer.android.com/reference/android/content/res/ColorStateList.html]]
|BGCOLOR(#ccc):&bold(){方法}|BGCOLOR(#ccc):&bold(){書式}|BGCOLOR(#ccc):&bold(){説明}|
|XML|android:textColor|色コードで指定する場合:"#rgb", "#argb", "#rrggbb", or "#aarrggbb"&br()リソースの参照は"@[+][package:]type:name" 形式で可能。&br()|
|Method|setTextColor( ColorStateList )|指定の方法はXMLと同様に指定可能。&br()ColorStateListクラスに関してはまだ未確認。|
表示オプション
横に並べて表示:
変化行の前後のみ表示: