-1
텍스트 뷰의 텍스트를 가운데에 배치하려고합니다. 나는 이미 layout_gravity = "center"를 사용했지만 아무 쓸모가 없습니다. 누구든지 아래 코드에서 잘못된 점을 제안 할 수 있습니까? 필자는 framelayout과 Linear Layout을 사용해야합니다. 이것은 변경할 수 없습니다. 최소 SDK 버전Framelayout의 선형 레이아웃에서 TextView의 중심에 텍스트 정렬
<FrameLayout 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:background="#0099cc"
tools:context="com.SKSDroid.notifydaily.NotifyDaily" >
<LinearLayout
android:id="@+id/fullscreen_content"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:background="@color/black_overlay"
android:orientation="vertical"
tools:ignore="UselessParent" >
<TextView
android:id="@+id/textView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:keepScreenOn="true"
android:text="@string/dummy_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#33b5e5"
android:textStyle="bold" />
<TextView
android:id="@+id/autorTextView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:keepScreenOn="true"
android:text="Sonu"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#33b5e5"
android:textStyle="bold" />
</LinearLayout>
</FrameLayout>