XML は次のとおりです。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/modal_list_row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="7.5dp"
android:orientation="vertical" >
<TextView
android:id="@+id/title_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:gravity="center"
android:text="@string/alert_title_small"
android:textColor="@color/alert_dialog_text_color"
android:textSize="@dimen/alert_dialog_title_font_size"
android:textStyle="bold" />
</RelativeLayout>
グラフィカル レイアウトでは太字のテキストが表示されますが、デバイスでは太字ではありません。それはデバイスのことですか、それとも何ですか?
アップデート:
完全な XML を求め続ける人々のために、ここで更新します。シンプルな相対レイアウト。そして、ここにJavaコードがあります:
this.titleTextView.setText(this.modalListState.title);
考慮事項: デバイスの書体が原因でしょうか? 確認するGalaxy S3を持っている人はいますか? 活動スタイルでしょうか。アプリ全体で使用されるものは次のとおりです。
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
<style name="TransparentActivity" >
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowFullscreen">false</item>
</style>
関連するアクティビティには、TransparentActivity スタイルが使用されます。