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
|
// 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
|
||||||
|
@ -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"
|
||||||
|
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 |