Ändern Sie das Android-Layout von Relativ zu Linear
Ich habe gerade angefangen, Android Apps zu erstellen, aber ich habe ein Problem beim Ändern derlayout
Jedes Mal, wenn ich ein neues Android-Projekt erstelle, gibt es mirRelativeLayout
anstattLinearLayout
Ich gehe davon aus, dass es eine Standardeinstellung geben muss, damit ich das Buch ändern kannRelativelayout
zuLinearLayout
.
<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" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/hello_world"
tools:context=".MainActivity" />
</RelativeLayout>