Refactor[UI]: Migrate to LinearLayout

This commit is contained in:
Mathias-Boulay 2023-06-29 14:04:35 +02:00
parent d7f76d5a15
commit 63dec3fb2a

View File

@ -1,99 +1,112 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <com.kdt.DefocusableScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/background_app" android:background="@color/background_app"
android:paddingHorizontal="@dimen/fragment_padding_medium" >
android:orientation="vertical">
<LinearLayout
<!-- Vanilla like version -->
<TextView
android:id="@+id/title_textview"
style="@style/TextAppearance.AppCompat.Title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/create_profile_vanilla_like_versions"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/guideline2" />
<View
android:id="@+id/view"
style="@style/ThickDivider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_marginTop="@dimen/padding_large" android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@+id/title_textview"
/>
<com.kdt.mcgui.MineButton android:paddingHorizontal="@dimen/fragment_padding_medium"
android:id="@+id/vanilla_profile" android:orientation="vertical">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/padding_large"
android:text="@string/create_profile_vanilla"
android:layout_marginTop="@dimen/padding_large"
app:layout_constraintTop_toBottomOf="@+id/view" />
<!-- Modded versions --> <!-- Vanilla like version -->
<TextView <TextView
android:id="@+id/title_modded_textview" android:id="@+id/title_textview"
style="@style/TextAppearance.AppCompat.Title" style="@style/TextAppearance.AppCompat.Title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/create_profile_modded_versions" android:text="@string/create_profile_vanilla_like_versions"
app:layout_constraintEnd_toEndOf="parent" android:layout_gravity="center"
app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="@dimen/padding_large"
app:layout_constraintTop_toTopOf="@+id/guideline" /> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/guideline2" />
<View <View
android:id="@+id/view_modded" android:id="@+id/view"
style="@style/ThickDivider" style="@style/ThickDivider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_marginTop="@dimen/padding_large" android:layout_marginTop="@dimen/padding_large"
app:layout_constraintTop_toBottomOf="@+id/title_modded_textview" app:layout_constraintTop_toBottomOf="@+id/title_textview"
/> />
<com.kdt.mcgui.MineButton <com.kdt.mcgui.MineButton
android:id="@+id/modded_profile_fabric" android:id="@+id/vanilla_profile"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/padding_large" android:layout_marginHorizontal="@dimen/padding_large"
android:layout_marginTop="@dimen/padding_large" android:text="@string/create_profile_vanilla"
android:text="@string/modloader_dl_install_fabric" android:layout_marginTop="@dimen/padding_large"
app:layout_constraintTop_toBottomOf="@+id/view_modded" app:layout_constraintTop_toBottomOf="@+id/view" />
tools:layout_editor_absoluteX="50dp" />
<com.kdt.mcgui.MineButton
android:id="@+id/modded_profile_forge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/padding_large"
android:layout_marginTop="@dimen/padding_large"
android:text="@string/modloader_dl_install_forge"
app:layout_constraintTop_toBottomOf="@+id/modded_profile_fabric" /> <!-- Modded versions -->
<androidx.constraintlayout.widget.Guideline <TextView
android:id="@+id/guideline" android:id="@+id/title_modded_textview"
android:layout_width="wrap_content" style="@style/TextAppearance.AppCompat.Title"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:orientation="horizontal" android:layout_height="wrap_content"
app:layout_constraintGuide_percent="0.55" /> android:layout_gravity="center"
android:layout_marginTop="@dimen/padding_extra_extra_large"
android:text="@string/create_profile_modded_versions"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/guideline" />
<View
android:id="@+id/view_modded"
style="@style/ThickDivider"
android:layout_width="match_parent"
android:layout_marginTop="@dimen/padding_large"
app:layout_constraintTop_toBottomOf="@+id/title_modded_textview"
/>
<com.kdt.mcgui.MineButton
android:id="@+id/modded_profile_fabric"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/padding_large"
android:layout_marginTop="@dimen/padding_large"
android:text="@string/modloader_dl_install_fabric"
app:layout_constraintTop_toBottomOf="@+id/view_modded"
tools:layout_editor_absoluteX="50dp" />
<com.kdt.mcgui.MineButton
android:id="@+id/modded_profile_forge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/padding_large"
android:layout_marginTop="@dimen/padding_large"
android:text="@string/modloader_dl_install_forge"
app:layout_constraintTop_toBottomOf="@+id/modded_profile_fabric" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.55" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.25" />
</LinearLayout>
</com.kdt.DefocusableScrollView>
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.25" />
</androidx.constraintlayout.widget.ConstraintLayout>