[app] Fix layouts

This commit is contained in:
tehcneko 2021-02-14 14:32:45 +08:00
parent 708b70d149
commit 7067f147fd
2 changed files with 244 additions and 236 deletions

View File

@ -49,288 +49,296 @@
android:visibility="gone"
tools:ignore="ContentDescription" />
<androidx.core.widget.NestedScrollView
android:id="@+id/nestedScrollView"
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:clipChildren="false"
app:fitSystemWindowsInsets="top|bottom"
android:scrollbars="none">
tools:ignore="MissingPrefix">
<LinearLayout
<androidx.core.widget.NestedScrollView
android:id="@+id/nestedScrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:orientation="vertical"
tools:context=".ui.activity.MainActivity">
android:scrollbars="none">
<RelativeLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="72dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="10dp"
android:clipChildren="false"
android:clipToPadding="false">
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:orientation="vertical"
tools:context=".ui.activity.MainActivity">
<ImageView
android:id="@+id/app_icon"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_centerVertical="true"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="72dp"
android:layout_marginStart="16dp"
android:contentDescription="@string/app_name" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="10dp"
android:layout_toEndOf="@id/app_icon"
android:contentDescription="@string/app_name"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textSize="20sp"
tools:ignore="RelativeOverlap" />
</RelativeLayout>
<com.google.android.material.card.MaterialCardView
android:id="@+id/status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
app:cardBackgroundColor="#4CAF50"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardPreventCornerOverlap="false">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="18dp"
android:paddingTop="20dp"
android:paddingEnd="18dp"
android:paddingBottom="20dp">
android:layout_marginEnd="16dp"
android:layout_marginBottom="10dp"
android:clipChildren="false"
android:clipToPadding="false">
<ImageView
android:id="@+id/status_icon"
android:layout_width="28dp"
android:layout_height="28dp"
android:id="@+id/app_icon"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_centerVertical="true"
app:srcCompat="@drawable/ic_check_circle"
app:tint="?android:attr/textColorPrimaryInverse" />
android:layout_marginStart="16dp"
android:contentDescription="@string/app_name" />
<TextView
android:id="@+id/status_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_toEndOf="@id/status_icon"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?android:attr/textColorPrimaryInverse" />
<TextView
android:id="@+id/status_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/status_title"
android:layout_alignStart="@id/status_title"
android:layout_marginTop="5dp"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorPrimaryInverse" />
android:layout_centerVertical="true"
android:layout_marginStart="10dp"
android:layout_toEndOf="@id/app_icon"
android:contentDescription="@string/app_name"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textSize="20sp"
tools:ignore="RelativeOverlap" />
</RelativeLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:id="@+id/modules"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
android:outlineAmbientShadowColor="#3A000000"
android:outlineSpotShadowColor="#3A000000"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardPreventCornerOverlap="false">
<RelativeLayout
<com.google.android.material.card.MaterialCardView
android:id="@+id/status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="18dp"
android:paddingTop="16dp"
android:paddingEnd="18dp"
android:paddingBottom="16dp">
android:layout_marginHorizontal="16dp"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
app:cardBackgroundColor="#4CAF50"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardPreventCornerOverlap="false">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="18dp"
android:paddingTop="20dp"
android:paddingEnd="18dp"
android:paddingBottom="20dp">
<ImageView
android:id="@+id/status_icon"
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_centerVertical="true"
app:srcCompat="@drawable/ic_check_circle"
app:tint="?android:attr/textColorPrimaryInverse" />
<TextView
android:id="@+id/status_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_toEndOf="@id/status_icon"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?android:attr/textColorPrimaryInverse" />
<TextView
android:id="@+id/status_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/status_title"
android:layout_alignStart="@id/status_title"
android:layout_marginTop="5dp"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorPrimaryInverse" />
</RelativeLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:id="@+id/modules"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
android:outlineAmbientShadowColor="#3A000000"
android:outlineSpotShadowColor="#3A000000"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardPreventCornerOverlap="false">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="18dp"
android:paddingTop="16dp"
android:paddingEnd="18dp"
android:paddingBottom="16dp">
<ImageView
android:id="@+id/modules_icon"
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_centerVertical="true"
android:contentDescription="@string/Modules"
app:srcCompat="@drawable/ic_modules" />
<TextView
android:id="@+id/modules_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_toEndOf="@id/modules_icon"
android:text="@string/Modules"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<TextView
android:id="@+id/modules_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/modules_title"
android:layout_alignStart="@id/modules_title"
android:layout_marginTop="2dp"
android:text="@string/ModulesDetail"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="@android:color/darker_gray" />
</RelativeLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:id="@+id/download"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
android:outlineAmbientShadowColor="#3A000000"
android:outlineSpotShadowColor="#3A000000"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardPreventCornerOverlap="false">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="18dp"
android:paddingTop="16dp"
android:paddingEnd="18dp"
android:paddingBottom="16dp">
<ImageView
android:id="@+id/download_icon"
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_centerVertical="true"
android:contentDescription="@string/module_repo"
app:srcCompat="@drawable/ic_get_app" />
<TextView
android:id="@+id/download_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_toEndOf="@id/download_icon"
android:text="@string/module_repo"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<TextView
android:id="@+id/download_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/download_title"
android:layout_alignStart="@id/download_title"
android:layout_marginTop="2dp"
android:text="@string/module_repo_summary"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="@android:color/darker_gray" />
</RelativeLayout>
</com.google.android.material.card.MaterialCardView>
<LinearLayout
android:id="@+id/logs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:background="@drawable/item_background_round_nopadding"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
android:padding="18dp">
<ImageView
android:id="@+id/modules_icon"
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_centerVertical="true"
android:contentDescription="@string/Modules"
app:srcCompat="@drawable/ic_modules" />
android:contentDescription="@string/Logs"
app:srcCompat="@drawable/ic_assignment" />
<TextView
android:id="@+id/modules_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_toEndOf="@id/modules_icon"
android:text="@string/Modules"
android:text="@string/Logs"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
</LinearLayout>
<TextView
android:id="@+id/modules_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/modules_title"
android:layout_alignStart="@id/modules_title"
android:layout_marginTop="2dp"
android:text="@string/ModulesDetail"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="@android:color/darker_gray" />
</RelativeLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:id="@+id/download"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
android:outlineAmbientShadowColor="#3A000000"
android:outlineSpotShadowColor="#3A000000"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardPreventCornerOverlap="false">
<RelativeLayout
<LinearLayout
android:id="@+id/settings"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="18dp"
android:paddingTop="16dp"
android:paddingEnd="18dp"
android:paddingBottom="16dp">
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:background="@drawable/item_background_round_nopadding"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
android:padding="18dp">
<ImageView
android:id="@+id/download_icon"
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_centerVertical="true"
android:contentDescription="@string/module_repo"
app:srcCompat="@drawable/ic_get_app" />
android:contentDescription="@string/Settings"
app:srcCompat="@drawable/ic_settings" />
<TextView
android:id="@+id/download_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_toEndOf="@id/download_icon"
android:text="@string/module_repo"
android:text="@string/Settings"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
</LinearLayout>
<LinearLayout
android:id="@+id/about"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:background="@drawable/item_background_round_nopadding"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
android:padding="18dp">
<ImageView
android:layout_width="28dp"
android:layout_height="28dp"
android:contentDescription="@string/About"
app:srcCompat="@drawable/ic_info" />
<TextView
android:id="@+id/download_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/download_title"
android:layout_alignStart="@id/download_title"
android:layout_marginTop="2dp"
android:text="@string/module_repo_summary"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="@android:color/darker_gray" />
</RelativeLayout>
</com.google.android.material.card.MaterialCardView>
android:layout_marginStart="25dp"
android:text="@string/About"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
</LinearLayout>
<LinearLayout
android:id="@+id/logs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:background="@drawable/item_background_round_nopadding"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
android:padding="18dp">
<ImageView
android:layout_width="28dp"
android:layout_height="28dp"
android:contentDescription="@string/Logs"
app:srcCompat="@drawable/ic_assignment" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:text="@string/Logs"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
</LinearLayout>
<LinearLayout
android:id="@+id/settings"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:background="@drawable/item_background_round_nopadding"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
android:padding="18dp">
<ImageView
android:layout_width="28dp"
android:layout_height="28dp"
android:contentDescription="@string/Settings"
app:srcCompat="@drawable/ic_settings" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:text="@string/Settings"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
</LinearLayout>
<LinearLayout
android:id="@+id/about"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:background="@drawable/item_background_round_nopadding"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
android:padding="18dp">
<ImageView
android:layout_width="28dp"
android:layout_height="28dp"
android:contentDescription="@string/About"
app:srcCompat="@drawable/ic_info" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:text="@string/About"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.core.widget.NestedScrollView>
</FrameLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -19,7 +19,7 @@
~ Copyright (C) 2021 LSPosed Contributors
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<rikka.widget.borderview.BorderNestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="wrap_content"
android:layout_width="match_parent">
@ -114,4 +114,4 @@
android:visibility="gone" />
</LinearLayout>
</ScrollView>
</rikka.widget.borderview.BorderNestedScrollView>