diff --git a/app/src/main/java/mod/hey/studios/project/ProjectSettingsDialog.java b/app/src/main/java/mod/hey/studios/project/ProjectSettingsDialog.java index 7177592fb5..37018d4484 100644 --- a/app/src/main/java/mod/hey/studios/project/ProjectSettingsDialog.java +++ b/app/src/main/java/mod/hey/studios/project/ProjectSettingsDialog.java @@ -37,18 +37,22 @@ public void show() { behavior.setSkipCollapsed(true); } }); - + binding.etMinimumSdkVersion.setText(settings.getValue(ProjectSettings.SETTING_MINIMUM_SDK_VERSION, String.valueOf(VAR_DEFAULT_MIN_SDK_VERSION))); binding.etTargetSdkVersion.setText(settings.getValue(ProjectSettings.SETTING_TARGET_SDK_VERSION, String.valueOf(VAR_DEFAULT_TARGET_SDK_VERSION))); binding.etApplicationClassName.setText(settings.getValue(ProjectSettings.SETTING_APPLICATION_CLASS, ".SketchApplication")); - binding.enableViewbinding.setChecked( + binding.cbEnableViewbinding.setChecked( settings.getValue(ProjectSettings.SETTING_ENABLE_VIEWBINDING, "false").equals("true")); binding.cbRemoveOldMethods.setChecked( settings.getValue(ProjectSettings.SETTING_DISABLE_OLD_METHODS, "false").equals("true")); binding.cbUseNewMaterialComponentsAppTheme.setChecked( settings.getValue(ProjectSettings.SETTING_ENABLE_BRIDGELESS_THEMES, "false").equals("true")); + binding.enableViewbinding.setOnClickListener(v -> binding.cbEnableViewbinding.performClick()); + binding.removeOldMethods.setOnClickListener(v -> binding.cbRemoveOldMethods.performClick()); + binding.useNewMaterialComponentsAppTheme.setOnClickListener(v -> binding.cbUseNewMaterialComponentsAppTheme.performClick()); + binding.enableViewbinding.setTag(ProjectSettings.SETTING_ENABLE_VIEWBINDING); binding.etMinimumSdkVersion.setTag(ProjectSettings.SETTING_MINIMUM_SDK_VERSION); binding.etTargetSdkVersion.setTag(ProjectSettings.SETTING_TARGET_SDK_VERSION); @@ -62,7 +66,7 @@ public void show() { binding.etMinimumSdkVersion, binding.etTargetSdkVersion, binding.etApplicationClassName, - binding.enableViewbinding, + binding.cbEnableViewbinding, binding.cbRemoveOldMethods, binding.cbUseNewMaterialComponentsAppTheme }; diff --git a/app/src/main/res/layout/activity_logcatreader.xml b/app/src/main/res/layout/activity_logcatreader.xml index 11cb5401d4..14cb03c22b 100644 --- a/app/src/main/res/layout/activity_logcatreader.xml +++ b/app/src/main/res/layout/activity_logcatreader.xml @@ -70,7 +70,7 @@ android:background="?attr/colorSurface" android:gravity="center" android:orientation="vertical" - android:paddingHorizontal="16dp" + android:paddingHorizontal="24dp" android:paddingBottom="100dp" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:visibility="gone"> @@ -78,6 +78,7 @@ @@ -86,6 +87,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4dp" + android:gravity="center" android:text="Keep this screen open then run your app" android:textColor="?attr/colorOnSurfaceVariant" android:textSize="14sp" /> diff --git a/app/src/main/res/layout/bottom_sheet_project_options.xml b/app/src/main/res/layout/bottom_sheet_project_options.xml index f9dd1ac0f8..42da01742b 100644 --- a/app/src/main/res/layout/bottom_sheet_project_options.xml +++ b/app/src/main/res/layout/bottom_sheet_project_options.xml @@ -16,7 +16,7 @@ android:layout_marginStart="16dp" android:layout_marginBottom="10dp" android:text="Project Settings" - android:textAppearance="?attr/textAppearanceHeadlineSmallEmphasized" /> + android:textAppearance="?attr/textAppearanceTitleLarge" /> - - + + android:orientation="vertical"> + android:layout_weight="1"> + android:orientation="vertical"> + android:layout_marginEnd="24dp" + android:layout_marginStart="24dp" + android:layout_marginTop="12dp" + android:hint="Minimum SDK version"> @@ -45,13 +42,15 @@ android:id="@+id/til_target_sdk_version" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="10dp"> + android:layout_marginEnd="24dp" + android:layout_marginStart="24dp" + android:layout_marginTop="12dp" + android:hint="Target SDK version"> @@ -59,118 +58,153 @@ android:id="@+id/til_application_class_name" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="10dp"> + android:layout_marginEnd="24dp" + android:layout_marginStart="24dp" + android:layout_marginTop="12dp" + android:hint="Application class name"> - + android:layout_marginTop="8dp" + android:background="?attr/selectableItemBackground" + android:clickable="true" + android:focusable="true" + android:orientation="horizontal" + android:gravity="center" + android:paddingHorizontal="24dp" + android:paddingVertical="16dp"> + android:layout_weight="1" + android:orientation="vertical"> - + android:textAppearance="?attr/textAppearanceBodyLarge" + android:textColor="?attr/colorOnSurface" /> + android:textAppearance="?attr/textAppearanceBodyMedium" + android:textColor="?attr/colorOnSurfaceVariant" /> - + + + - + android:background="?attr/selectableItemBackground" + android:clickable="true" + android:focusable="true" + android:orientation="horizontal" + android:gravity="center" + android:paddingHorizontal="24dp" + android:paddingVertical="16dp"> + android:layout_weight="1" + android:orientation="vertical"> - + android:textAppearance="?attr/textAppearanceBodyLarge" + android:textColor="?attr/colorOnSurface" /> + android:textAppearance="?attr/textAppearanceBodyMedium" + android:textColor="?attr/colorOnSurfaceVariant" /> - - + + + + + android:background="?attr/selectableItemBackground" + android:clickable="true" + android:focusable="true" + android:orientation="horizontal" + android:gravity="center" + android:paddingHorizontal="24dp" + android:paddingVertical="16dp"> + android:layout_weight="1" + android:orientation="vertical"> - + android:textAppearance="?attr/textAppearanceBodyLarge" + android:textColor="?attr/colorOnSurface" /> + android:textAppearance="?attr/textAppearanceBodyMedium" + android:textColor="?attr/colorOnSurfaceVariant" /> - + + + + @@ -179,21 +213,25 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" - android:gravity="end" - android:layout_marginTop="16dp"> + android:layout_marginEnd="24dp" + android:layout_marginStart="24dp" + android:layout_marginVertical="8dp">