TextView を使用したアクティビティがあります。画面の下部、中央に配置したいと思います。TextView が画面の幅に収まるようにしたいと思います。
これは私のXMLです:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="#ffffff"
tools:context=".ShowCard" >
<TextView
android:id="@+id/textView"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="#33000000"
android:textColor="#000000"
android:text="@string/lorem_ipsum" />
結果は私が期待していたものではありません。TextView は幅がフルスクリーンではありませんが、左右に小さな空きスペースが残ります (パディング/ボーダーのようですが、パディング/ボーダーを設定していません!)。
なぜなのかご存知ですか?提案?