diff --git a/app/src/main/java/com/fox2code/mmm/SetupActivity.java b/app/src/main/java/com/fox2code/mmm/SetupActivity.java index 71ef9db..a0f9568 100644 --- a/app/src/main/java/com/fox2code/mmm/SetupActivity.java +++ b/app/src/main/java/com/fox2code/mmm/SetupActivity.java @@ -22,6 +22,7 @@ import com.fox2code.mmm.repo.RepoManager; import com.fox2code.mmm.utils.realm.ReposList; import com.fox2code.rosettax.LanguageActivity; import com.fox2code.rosettax.LanguageSwitcher; +import com.google.android.material.bottomnavigation.BottomNavigationItemView; import com.google.android.material.button.MaterialButton; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.materialswitch.MaterialSwitch; @@ -48,11 +49,7 @@ public class SetupActivity extends FoxActivity implements LanguageActivity { ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { // back button is close button - actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_USE_LOGO | ActionBar.DISPLAY_SHOW_HOME); - actionBar.setLogo(R.drawable.ic_foreground); - // set title - actionBar.setTitle(R.string.setup_title); - actionBar.show(); + actionBar.hide(); } this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, 0); createFiles(); @@ -153,7 +150,7 @@ public class SetupActivity extends FoxActivity implements LanguageActivity { }); // Set up the buttons // Setup button - MaterialButton setupButton = view.findViewById(R.id.setup_finish); + BottomNavigationItemView setupButton = view.findViewById(R.id.setup_finish); setupButton.setOnClickListener(v -> { Timber.i("Setup button clicked"); // get instance of editor @@ -191,8 +188,7 @@ public class SetupActivity extends FoxActivity implements LanguageActivity { finish(); }); // Cancel button - MaterialButton cancelButton = view.findViewById(R.id.setup_cancel); - cancelButton.setText(R.string.cancel); + BottomNavigationItemView cancelButton = view.findViewById(R.id.cancel_setup); cancelButton.setOnClickListener(v -> { Timber.i("Cancel button clicked"); // Set first launch to false and restart the activity diff --git a/app/src/main/res/drawable/baseline_close_24.xml b/app/src/main/res/drawable/baseline_close_24.xml new file mode 100644 index 0000000..b30f24d --- /dev/null +++ b/app/src/main/res/drawable/baseline_close_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/layout/content_scrolling.xml b/app/src/main/res/layout/content_scrolling.xml index 4488d33..aad5a1b 100644 --- a/app/src/main/res/layout/content_scrolling.xml +++ b/app/src/main/res/layout/content_scrolling.xml @@ -1,10 +1,9 @@ - - + + + + @@ -30,62 +39,60 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - - - - - - - + android:layout_marginTop="4dp" + android:layout_marginEnd="4dp" + android:layout_weight="1" + android:padding="12dp" + android:text="@string/setup_theme_button" + android:textSize="16sp" + app:icon="@drawable/ic_baseline_palette_24" + style="@style/Widget.Material3.Button.IconButton.Outlined" + app:iconGravity="textStart" + app:iconPadding="8dp" + app:iconTintMode="src_in" + app:rippleColor="@color/gray_800" + tools:ignore="DuplicateSpeakableTextCheck" /> + + + + + + + + - + - + - + - - - - - - - + + + + + + + + + + + + + + + - - + - - - - - - + app:menu="@menu/setup_bottom_nav" + app:compatShadowEnabled="true" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + android:background="?attr/colorSurface" + android:elevation="4dp" /> \ No newline at end of file diff --git a/app/src/main/res/menu/setup_bottom_nav.xml b/app/src/main/res/menu/setup_bottom_nav.xml new file mode 100644 index 0000000..4ff2f5d --- /dev/null +++ b/app/src/main/res/menu/setup_bottom_nav.xml @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 71365aa..e21f47e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -375,4 +375,8 @@ Modules You do not have a browser installed. Please install one to continue. Search + Crash reporting + Update checks + Require wifi for update checks + Require wifi or an otherwise unmetered connection to do update checks