Shuffle tabs, add images (#430)

update images
workaround for #414 (shuffle tabs)

Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/430
Reviewed-by: 6543 <6543@noreply.gitea.io>
This commit is contained in:
M M Arif 2020-04-21 08:50:51 +00:00 committed by 6543
parent c2b316446c
commit eba170f7e9
7 changed files with 20 additions and 20 deletions

View File

@ -165,8 +165,8 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
// pull count // pull count
if (textViewBadgePull.getText() != "") { // only show if API returned a number if (textViewBadgePull.getText() != "") { // only show if API returned a number
Objects.requireNonNull(tabLayout.getTabAt(3)).setCustomView(tabHeader4); Objects.requireNonNull(tabLayout.getTabAt(4)).setCustomView(tabHeader4);
TabLayout.Tab tabOpenPulls = tabLayout.getTabAt(3); TabLayout.Tab tabOpenPulls = tabLayout.getTabAt(4);
assert tabOpenPulls != null; assert tabOpenPulls != null;
TextView openPullTabView = Objects.requireNonNull(tabOpenPulls.getCustomView()).findViewById(R.id.counterBadgePullText); TextView openPullTabView = Objects.requireNonNull(tabOpenPulls.getCustomView()).findViewById(R.id.counterBadgePullText);
openPullTabView.setTextColor(textColor); openPullTabView.setTextColor(textColor);
@ -299,18 +299,18 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
Fragment fragment = null; Fragment fragment = null;
switch (position) { switch (position) {
case 0: // information case 0: // files
return RepoInfoFragment.newInstance(repoOwner, repoName);
case 1: // files
return FilesFragment.newInstance(repoOwner, repoName); return FilesFragment.newInstance(repoOwner, repoName);
case 1: // information
return RepoInfoFragment.newInstance(repoOwner, repoName);
case 2: // issues case 2: // issues
fragment = new IssuesMainFragment(); fragment = new IssuesMainFragment();
break; break;
case 3: // pull requests case 3: // branches
return BranchesFragment.newInstance(repoOwner, repoName);
case 4: // pull requests
fragment = new PullRequestsFragment(); fragment = new PullRequestsFragment();
break; break;
case 4: // branches
return BranchesFragment.newInstance(repoOwner, repoName);
case 5: // releases case 5: // releases
return ReleasesFragment.newInstance(repoOwner, repoName); return ReleasesFragment.newInstance(repoOwner, repoName);
case 6: // milestones case 6: // milestones

View File

@ -44,36 +44,36 @@
app:tabTextColor="?attr/primaryTextColor" app:tabTextColor="?attr/primaryTextColor"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<com.google.android.material.tabs.TabItem
android:id="@+id/tabItem1_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tab_text_info" />
<com.google.android.material.tabs.TabItem <com.google.android.material.tabs.TabItem
android:id="@+id/tabItemFiles" android:id="@+id/tabItemFiles"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/tab_text_files" /> android:text="@string/tab_text_files" />
<com.google.android.material.tabs.TabItem
android:id="@+id/tabItem1_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tab_text_info" />
<com.google.android.material.tabs.TabItem <com.google.android.material.tabs.TabItem
android:id="@+id/tabItem2_issues" android:id="@+id/tabItem2_issues"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/pageTitleIssues" /> android:text="@string/pageTitleIssues" />
<com.google.android.material.tabs.TabItem
android:id="@+id/tabItemPullRequests"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tabPullRequests" />
<com.google.android.material.tabs.TabItem <com.google.android.material.tabs.TabItem
android:id="@+id/tabItem5_branches" android:id="@+id/tabItem5_branches"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/tab_text_branches" /> android:text="@string/tab_text_branches" />
<com.google.android.material.tabs.TabItem
android:id="@+id/tabItemPullRequests"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tabPullRequests" />
<com.google.android.material.tabs.TabItem <com.google.android.material.tabs.TabItem
android:id="@+id/tabItem6_releases" android:id="@+id/tabItem6_releases"
android:layout_width="wrap_content" android:layout_width="wrap_content"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 67 KiB