-1
Я создаю такой интерфейс, я хочу помочь макету розовой области. Это результат, который я хочу. Выравнивать центр Текстовое изображение в LinearLayout
Я пробовал, но не успел. Вот мой код:
<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"
tools:context="com.kilobolt.robotgame.MainActivity" >
<LinearLayout
android:id="@+id/layout1"
android:layout_width="match_parent"
android:layout_height="49dp"
android:orientation="horizontal"
android:background="@color/Heading">
<ImageButton
android:id="@+id/prevMonth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:src="@drawable/PrevMonth" />
<TextView
android:id="@+id/txtShowDay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sample_date"
android:textColor="@color/White"
android:textSize="14sp"
android:layout_gravity="center"
android:gravity="center" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/welcome_nam"
android:gravity="center_vertical|center" />
</RelativeLayout>
А вот интерфейс после этого:
пытаются использовать отдельный линейный макет для TextView и сделать это линейный центр макета будет работать –
большое спасибо ... – user3331563