中心设置文本我,这是我的xml:在AppBar
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_height="57dp"
android:layout_width="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Ranger"
android:id="@+id/logoSign"/>
</android.support.design.widget.AppBarLayout>
</RelativeLayout>
我想做的TextView在AppBar的中心。但我得到这个:
感谢您的帮助。 :)
谢谢!你救了我的一天! :d –