【转】Androidフォントのリボン

9603 ワード

【转】Androidフォントのリボン
 
http://wangluo4sfx.blog.163.com/blog/static/4896338420114391638305/からの転載 
 
 
 
android:aut Link  テキストがURLリンク/email/電話番号/mapの場合、クリックできるリンクとしてテキストが表示されるかどうかを設定します。オプション値(none/web/email/phone/map/all)android:autTextを設定すると、入力値のスペル補正が自動的に実行されます。ここでは効果がありません。入力法を表示して入力するときに役立ちます。android:bufferType指定get Text()方式で取得したテキストカテゴリです。オプションのeditableは、StringBuiderに似ています。つまり、get Textの後にappedメソッドを呼び出してテキストの内容を設定します。spannableは、与えられた文字領域でスタイルを使用します。ここ1、ここ2を参照してください。android:capitalize英字大文字タイプを設定します。ここでは効果がありません。入力方法をポップアップしてから見えます。EditViewのこの属性の説明を参照してください。 android:cursorVisible設定カーソルは表示/非表示、デフォルト表示です。android:digits  どの文字を入力できるかを設定します。例えば、「123457890.+-*/()」android:drawable Bottom  textの下にdrawableを出力します。写真のように。色を指定するとテキストの背景をこの色に設定し、バックグラウンドと同時に使用する場合は後者を上書きします。android:drawable Leftはtextの左側にdrawableを出力します。android:drawable Padding   textとdrawableの間隔を設けて、drawable Left、drawable Right、drawable Top、drawable Bottomと一緒に使うと、マイナスに設定できます。単独で使うと効果がありません。android:drawable Right textの右側にdrawableを出力します。  android:drawable Topはtextの真上にdrawableを出力します。android:editable  編集可能かどうかを設定します。ここでは効果がありません。EditViewを参照してください。android:editor Extras  テキストの追加入力データを設定します。EditViewでまた検討します。android:ellipsize  テキストが長すぎる場合、コントロールはどのように表示されますか?下記の値の設定があります。「start」--省略番号は冒頭に表示されます。」end"——省略記号は最後に表示されます。"middle"--省略記号は中間に表示されます。"マーク」――走馬灯で表示(動画の横移動)  android:freezes Textはテキストを保存する内容とカーソルの位置を設定します。ここですandroid:gravity  テキスト位置を「センター」に設定するとテキストが中央に表示されます。android:hint  Textが空の場合に表示されるメッセージメッセージの色は、text ColorHitで設定できます。おかしいのはTextViewは元々Labelに相当していますが、なぜTextを設置しないですか?  android:imeOptions  機能を追加して、右下のIME動作を設定して編集枠に関連する動作を設定します。たとえば、actiondone右下の角には「完了」が表示されます。標準設定ではなく、リターン記号が表示されます。これはEditViewで詳しく説明しますが、ここでは不要です。 android:imeActionicはIME動作IDを設定します。EditViewで説明します。ここをご覧ください。  android:imeAction LabelはIME動作ラベルを設定します。EditViewで説明します。  android:include FontPadding設定テキストは上部と下部に追加の空白が含まれていますか?デフォルトはtrueです。  android:input Method  テキストの入力法を指定するには、完全に名前を限定する必要があります。例えば、comple.google.android.inputmethod.pinyですが、ここで間違えて見つけられません。  Android:inputTypeテキストの種類を設定して、入力方法に適切なキーボードの種類を表示するように助けます。EditViewで詳しく説明しますが、ここでは効果がありません。  android:linksClicableはリンクをクリックして接続するかどうかを設定します。android:maquee Repeat Limitはellipsizeでmaqueeを指定した場合、繰返しスクロールの回数を設定します。maquee_に設定します。foreverは無限回を表します。android:ems  TextViewの幅はN文字の幅に設定します。ここでは漢字の幅をテストします。図のように、android:maxEms  TextViewの幅は最長N文字の幅に設定します。emsと同時に使用する場合はemsオプションを上書きします。android:minEms  TextViewの幅をN文字の一番短い幅に設定します。emsと同時に使用する場合はemsオプションを上書きします。android:maxLength  表示されるテキストの長さを制限し、オーバーした部分は表示されません。Android:lines設定テキストの行数は、2行目にデータがなくても2行目で表示されます。android:maxLiness設定テキストの最大表示行数は、widthまたはlayout_widthを組み合わせて使用すると、超えた部分が自動的に改行され、行数を超えては表示されません。  android:minlines設定テキストの最小行数は、ラインと似ています。android:line SpacingExtra  行の間隔を設定しますandroid:ラインSpacingMultilier行間隔の倍数を設定します。“1.2”android:numeric  設定されている場合、TextViewには数字入力法があります。ここでは不要です。設定後の唯一の効果はTextViewでクリック効果があります。この属性はEdtiViewで詳しく説明します。Android:passwordは小さい点で"."表示テキストandroid:phoneNumberは電話番号の入力方式に設定されます。android:prvateImeOptions入力オプションを設定します。ここでは不要です。EditTextでさらに検討します。android:scrollHorizontally設定テキストがTextViewの幅を超えている場合、横縞が発生しますか?android:selectAll OnFocus  テキストが選択可能であれば、カーソルをテキストの開始位置または末尾位置に移動するのではなく、フォーカスを取得します。TextViewで設定したら効果がありません。android:sharow Color  テキストの影の色を指定します。シャドーRadiusと一緒に使う必要があります。効果:android:shardowDx影の横座標の開始位置を設定します。  android:sharowDyシャドウ縦座標開始位置を設定します。android:sharow Radius  影の半径を設定します。0.1に設定するとフォントの色になりますが、3.0に設定すると効果的です。android:single Line  単一行表示を設定します。ラyoutと一緒ならwidthと一緒に使用します。テキストが全部表示できない場合は、後に「...」と表示されます。android:text=「test(usingle Line)」android:single Line=「true」android:layout_width=「20 dp」は「t...」のみ表示されます。single Lineが設定されていない場合やfalseに設定されている場合、テキストは自動的に改行されます。  android:text設定表示テキスト.android:textApppearance  テキストの外観を設定します。「?android:atr/textApple ceLargInverse」というように、ここで引用されているのはシステムが持っている外観の一つです。このような外観がシステムにあるかどうかを示します。設定可能な値は以下の通りです。textApplearanceButton/textApplearance Inverse/textApplearanceLarge/textAppleare/textApple Large Inverse/textApple Medium/textApple Medium Inverse/textApplearance/textApple Small  android:text Color設定テキスト色android:text ColorHighlight  選択されたテキストの下の色は、デフォルトでは青android:text ColorHit設定メッセージのテキストの色で、デフォルトでは灰色です。hintと一緒に使います。android:text ColorLinkテキストリンクの色.android:text ScreX  テキスト間の間隔を設定します。デフォルトは1.0 fです。それぞれ0.5 f/1.0 f/1.5 f/2.0 fの効果を設定します。android:textSize  文字の大きさを設定し、計量単位「sp」などを推奨します。「15 sp」android:text Style  字形[bold(太字)0,italic(斜体)1,bold italic(太字で斜め)2]を設定し、一つ以上を設定して、「|」で仕切ることができます。  android:typeface  テキストフォントを設定するには、下記の定数値の一つが必要です。normal 0,sans 1,serif 2,monoospace(等幅フォント)3)  android:heightテキスト領域の高さを設定し、サポートメトリック単位:px/dp/sp/in/mm(ミリ)android:maxHeight設定テキストエリアの最大高さandroid:minHeight設定テキストエリアの最小高さandroid:width設定テキストエリアの幅、サポートメトリック単位:pxwidthの違いはここを見てください。  android:maxWidth設定テキストエリアの最大幅android:minWidth設定テキストエリアの最小幅
 
<?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:id="@+id/security_settings_list"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical">
       
        <TextView

        android:orientation="horizontal"

        android:layout_width="fill_parent"

        android:layout_height="wrap_content"

        android:paddingLeft="5sp"

        android:typeface="monospace"

        android:text="Hello Red Monospace"

        android:textSize="16sp"

        android:textColor="#ff0000"

        /> 

  

    <TextView

        android:orientation="horizontal"

        android:layout_width="fill_parent"

        android:layout_height="wrap_content"

        android:text="Sans Font:"

        android:textSize="16sp"

        android:paddingLeft="5sp"

        /> 

    <TextView

        android:orientation="horizontal"

        android:layout_width="fill_parent"

        android:layout_height="wrap_content"

        android:paddingLeft="5sp"

        android:typeface="sans"

        android:text="Hello Blue Sans"

        android:textSize="16sp"

        android:textColor="#0000ff"

        /> 

  

    <TextView

        android:orientation="horizontal"

        android:layout_width="fill_parent"

        android:layout_height="wrap_content"

        android:text="Serif Font:"

        android:textSize="16sp"

        android:paddingLeft="5sp"

        /> 

    <TextView

        android:orientation="horizontal"

        android:layout_width="fill_parent"

        android:layout_height="wrap_content"

        android:paddingLeft="5sp"

        android:paddingRight="2sp"

        android:typeface="serif"

        android:text="Hello Green Serif"

        android:textSize="16sp"

        android:textColor="#00ff00"

        />
       
         <TextView

        android:orientation="horizontal"

        android:layout_width="fill_parent"

        android:layout_height="wrap_content"

        android:paddingLeft="5sp"

        android:paddingTop="15sp"

        android:typeface="normal"

        android:text="I'm normal font but I'm also bold and italic"

        android:textSize="16sp"

        android:textStyle="bold|italic"

        android:textColor="#ffffff"

        /> 
       
        <TextView

        android:orientation="horizontal"

        android:layout_width="fill_parent"

        android:layout_height="wrap_content"

        android:paddingLeft="5sp"

        android:paddingTop="15sp"

        android:paddingBottom="15sp"

        android:typeface="normal"

        android:text="I'm normal (bold) font but I have a shadow"

        android:textSize="16sp"

        android:textStyle="bold"

        android:shadowColor ="#0f0f0f"

        android:shadowRadius="0.5"

        android:shadowDx="1.5"

        android:shadowDy="1.3"

        android:textColor="#ffffff"

        android:background="#0000ff"

        />

    </LinearLayout>
</ScrollView>