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>
@ -165,8 +165,8 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
|
||||
|
||||
// pull count
|
||||
if (textViewBadgePull.getText() != "") { // only show if API returned a number
|
||||
Objects.requireNonNull(tabLayout.getTabAt(3)).setCustomView(tabHeader4);
|
||||
TabLayout.Tab tabOpenPulls = tabLayout.getTabAt(3);
|
||||
Objects.requireNonNull(tabLayout.getTabAt(4)).setCustomView(tabHeader4);
|
||||
TabLayout.Tab tabOpenPulls = tabLayout.getTabAt(4);
|
||||
assert tabOpenPulls != null;
|
||||
TextView openPullTabView = Objects.requireNonNull(tabOpenPulls.getCustomView()).findViewById(R.id.counterBadgePullText);
|
||||
openPullTabView.setTextColor(textColor);
|
||||
@ -299,18 +299,18 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
|
||||
|
||||
Fragment fragment = null;
|
||||
switch (position) {
|
||||
case 0: // information
|
||||
return RepoInfoFragment.newInstance(repoOwner, repoName);
|
||||
case 1: // files
|
||||
case 0: // files
|
||||
return FilesFragment.newInstance(repoOwner, repoName);
|
||||
case 1: // information
|
||||
return RepoInfoFragment.newInstance(repoOwner, repoName);
|
||||
case 2: // issues
|
||||
fragment = new IssuesMainFragment();
|
||||
break;
|
||||
case 3: // pull requests
|
||||
case 3: // branches
|
||||
return BranchesFragment.newInstance(repoOwner, repoName);
|
||||
case 4: // pull requests
|
||||
fragment = new PullRequestsFragment();
|
||||
break;
|
||||
case 4: // branches
|
||||
return BranchesFragment.newInstance(repoOwner, repoName);
|
||||
case 5: // releases
|
||||
return ReleasesFragment.newInstance(repoOwner, repoName);
|
||||
case 6: // milestones
|
||||
|
@ -44,36 +44,36 @@
|
||||
app:tabTextColor="?attr/primaryTextColor"
|
||||
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
|
||||
android:id="@+id/tabItemFiles"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
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
|
||||
android:id="@+id/tabItem2_issues"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
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
|
||||
android:id="@+id/tabItem5_branches"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
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
|
||||
android:id="@+id/tabItem6_releases"
|
||||
android:layout_width="wrap_content"
|
||||
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 136 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 67 KiB |