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 <mmarif@swatian.com>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/588
Reviewed-by: 6543 <6543@noreply.codeberg.org>
This commit is contained in:
M M Arif 2020-07-19 12:05:08 +02:00 committed by 6543
parent 8a7923cba7
commit 26f54280a1
3 changed files with 16 additions and 4 deletions

View File

@ -335,6 +335,18 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
navigationView.setCheckedItem(R.id.nav_profile); navigationView.setCheckedItem(R.id.nav_profile);
break; 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: default:
toolbarTitle.setText(getResources().getString(R.string.pageTitleMyRepos)); toolbarTitle.setText(getResources().getString(R.string.pageTitleMyRepos));
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new MyRepositoriesFragment()).commit(); getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new MyRepositoriesFragment()).commit();

View File

@ -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 String[] codeBlockList = {"Green - Black", "White - Black", "Grey - Black", "White - Grey", "Dark - White"};
private static int codeBlockSelectedChoice = 0; 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 int homeScreenSelectedChoice = 0;
private static String[] customFontList = {"Roboto", "Manrope", "Source Code Pro"}; private static String[] customFontList = {"Roboto", "Manrope", "Source Code Pro"};

View File

@ -75,7 +75,7 @@
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:layout_width="15dp" android:layout_width="18dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:contentDescription="@string/generalImgContentText" android:contentDescription="@string/generalImgContentText"
@ -98,7 +98,7 @@
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:layout_width="15dp" android:layout_width="18dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:contentDescription="@string/generalImgContentText" android:contentDescription="@string/generalImgContentText"
@ -120,7 +120,7 @@
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:layout_width="15dp" android:layout_width="18dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:contentDescription="@string/generalImgContentText" android:contentDescription="@string/generalImgContentText"