Я хочу разработать приложение для Android с Kotlin языком в Android studio 3.2.1 .
Когда я разрабатываю приложение с java , после создания XML
при использовании Ctrl + Alt + L (или Shift + Ctrl + Alt + L ) переформатируйте XML
коды.
Но при разработке приложения с kotlin , после создания XML
при использовании Ctrl + Alt + L не переформатировать XML
коды. покажи мне плохой стиль кодов !!!
Мои xml-коды:
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:text="File page"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/btnFile"
android:background="@color/blue_grey_800"
android:textColor="@color/amber_50"
android:layout_marginTop="1dp" app:layout_constraintTop_toBottomOf="@+id/btnSend"
android:textAllCaps="false"
app:layout_constraintEnd_toEndOf="@+id/btnSend"
app:layout_constraintStart_toStartOf="@+id/btnSend" android:typeface="sans"
android:textSize="18sp"/>
<Button
android:text="AsyncTask with Quiz app"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/btnAsync"
android:background="@color/blue_grey_400"
android:textColor="@color/amber_50"
android:textAllCaps="false"
app:layout_constraintEnd_toEndOf="@+id/btnSend"
app:layout_constraintStart_toStartOf="@+id/btnSend" app:layout_constraintHorizontal_bias="1.0"
android:typeface="sans" android:textSize="18sp"
android:layout_marginTop="1dp" app:layout_constraintTop_toBottomOf="@+id/btnBasicFragment"/>
<Button
android:text="Basic Fragment"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/btnBasicFragment"
android:background="@color/blue_grey_500"
android:textColor="@color/amber_50"
android:textAllCaps="false"
app:layout_constraintEnd_toEndOf="@+id/btnSend"
app:layout_constraintStart_toStartOf="@+id/btnSend" app:layout_constraintHorizontal_bias="0.0"
android:typeface="sans" android:textSize="18sp" android:layout_marginTop="1dp"
app:layout_constraintTop_toBottomOf="@+id/btnBasicRetrofit"/>
<Button
android:text="Retrofit and RxJava"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/btnBasicRetrofit"
android:background="@color/blue_grey_600"
android:textColor="@color/amber_50"
android:textAllCaps="false"
app:layout_constraintEnd_toEndOf="@+id/btnSend"
app:layout_constraintStart_toStartOf="@+id/btnSend" app:layout_constraintHorizontal_bias="0.0"
android:layout_marginTop="1dp" app:layout_constraintTop_toBottomOf="@+id/btnBasicRecycler"
android:typeface="sans" android:textSize="18sp"/>
<Button
android:text="Divar simple"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/btnDivar"
android:background="@color/blue_grey_200"
android:textColor="@color/amber_50"
android:textAllCaps="false"
app:layout_constraintEnd_toEndOf="@+id/btnSend"
app:layout_constraintStart_toStartOf="@+id/btnSend" app:layout_constraintHorizontal_bias="0.0"
android:typeface="sans" android:textSize="18sp"
android:layout_marginTop="1dp" app:layout_constraintTop_toBottomOf="@+id/btnCustomView"/>
<Button
android:text="Custom View"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/btnCustomView"
android:background="@color/blue_grey_300"
android:textColor="@color/amber_50"
android:textAllCaps="false"
app:layout_constraintEnd_toEndOf="@+id/btnSend"
app:layout_constraintStart_toStartOf="@+id/btnSend" app:layout_constraintHorizontal_bias="0.0"
android:typeface="sans" android:textSize="18sp"
android:layout_marginTop="1dp" app:layout_constraintTop_toBottomOf="@+id/btnAsync"/>
<Button
android:text="Send page"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/btnSend" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="1dp"
app:layout_constraintTop_toTopOf="parent" android:background="@color/blue_grey_900"
android:textColor="@color/amber_50" android:textAllCaps="false" android:textSize="18sp"
android:typeface="sans"/>
<Button
android:text="Basic RecyclerView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/btnBasicRecycler"
android:background="@color/blue_grey_700"
android:textColor="@color/amber_50"
android:textAllCaps="false"
app:layout_constraintEnd_toEndOf="@+id/btnSend"
app:layout_constraintStart_toStartOf="@+id/btnSend" app:layout_constraintHorizontal_bias="0.0"
android:layout_marginTop="1dp" app:layout_constraintTop_toBottomOf="@+id/btnFile"
android:textSize="18sp"
android:typeface="sans"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
Как я могу переформатировать XML
коды при использовании Kotlin ?!