現在、標準のテキスト ビューを使用しています
<TextView
android:id="@+id/tvTaskDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tvTaskName"
android:text="Date"
android:layout_marginRight="30dp"
android:paddingLeft="30dp"
android:textAppearance="?android:attr/textAppearanceLarge" />
ビューのフォント、テキストサイズ、テキストをプログラムで設定しています。
font = Typeface.createFromAsset(getAssets(), "fonts/Helvetica LT 75 Bold.ttf");
TextView tv = (TextView)(findViewById(R.id.tvTaskDate));
tv.setTypeface(font);
tv.setTextSize(20.0f);
tv.setText(getIntent().getExtras().getString("name"));
問題は、次のように出てくることです。
フォントを設定する行をコメントアウトすると、textView は次の行に移動し、想定どおりにテキストを処理します。プロパティを設定しようMaxLine()
としましたが、それでも同じように動作します。
textView の書体を設定するときに、追加のプロパティを設定する必要がありますか?