From 26f54280a138e304c7af2a65e40fcc7fec3a0fb4 Mon Sep 17 00:00:00 2001 From: M M Arif Date: Sun, 19 Jul 2020 12:05:08 +0200 Subject: [PATCH] Add explore and drafts to set as home screen options (#588) Fix icon cut off sizes Add explore and drafts to set as home screen options Co-authored-by: 6543 <6543@noreply.codeberg.org> Co-authored-by: M M Arif Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/588 Reviewed-by: 6543 <6543@noreply.codeberg.org> --- .../org/mian/gitnex/activities/MainActivity.java | 12 ++++++++++++ .../activities/SettingsAppearanceActivity.java | 2 +- app/src/main/res/layout/list_milestones.xml | 6 +++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/mian/gitnex/activities/MainActivity.java b/app/src/main/java/org/mian/gitnex/activities/MainActivity.java index 277e70d3..2577026d 100644 --- a/app/src/main/java/org/mian/gitnex/activities/MainActivity.java +++ b/app/src/main/java/org/mian/gitnex/activities/MainActivity.java @@ -335,6 +335,18 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig navigationView.setCheckedItem(R.id.nav_profile); break; + case 5: + toolbarTitle.setText(getResources().getString(R.string.pageTitleExplore)); + getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new ExploreRepositoriesFragment()).commit(); + navigationView.setCheckedItem(R.id.nav_explore); + break; + + case 6: + toolbarTitle.setText(getResources().getString(R.string.titleDrafts)); + getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new DraftsFragment()).commit(); + navigationView.setCheckedItem(R.id.nav_comments_draft); + break; + default: toolbarTitle.setText(getResources().getString(R.string.pageTitleMyRepos)); getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new MyRepositoriesFragment()).commit(); diff --git a/app/src/main/java/org/mian/gitnex/activities/SettingsAppearanceActivity.java b/app/src/main/java/org/mian/gitnex/activities/SettingsAppearanceActivity.java index 929ad7d6..949a142f 100644 --- a/app/src/main/java/org/mian/gitnex/activities/SettingsAppearanceActivity.java +++ b/app/src/main/java/org/mian/gitnex/activities/SettingsAppearanceActivity.java @@ -27,7 +27,7 @@ public class SettingsAppearanceActivity extends BaseActivity { private static String[] codeBlockList = {"Green - Black", "White - Black", "Grey - Black", "White - Grey", "Dark - White"}; private static int codeBlockSelectedChoice = 0; - private static String[] homeScreenList = {"My Repositories", "Starred Repositories", "Organizations", "Repositories", "Profile"}; + private static String[] homeScreenList = {"My Repositories", "Starred Repositories", "Organizations", "Repositories", "Profile", "Explore", "Drafts"}; private static int homeScreenSelectedChoice = 0; private static String[] customFontList = {"Roboto", "Manrope", "Source Code Pro"}; diff --git a/app/src/main/res/layout/list_milestones.xml b/app/src/main/res/layout/list_milestones.xml index 6b3540ad..dea28142 100644 --- a/app/src/main/res/layout/list_milestones.xml +++ b/app/src/main/res/layout/list_milestones.xml @@ -75,7 +75,7 @@ android:orientation="horizontal">