[UI] Add Pull & Release Counter Badge to TabLable (#350)
fix cp error fix reformat code remove issuesCounter check if API return new objects, make settings option more generic Merge branch 'master' into 218-PR-Tab_OpenNumber add Release Counter Rename Issue Badge and add Pull Badge Upgrade Gradle and delete a useles commend Json Responce: add OpenPullCount and ReleaseCount Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: M M Arif <mmarif@swatian.com> Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/350 Reviewed-by: M M Arif <mmarif@swatian.com>
This commit is contained in:
@ -1,12 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/relativeLayoutTabHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/counterBadgeText"
|
||||
android:id="@+id/counterBadgeIssueText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
@ -16,14 +15,14 @@
|
||||
android:textColor="@color/lightGray" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/counterBadge"
|
||||
android:id="@+id/counterBadgeIssue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginTop="1dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_toEndOf="@+id/counterBadgeText"
|
||||
android:layout_toEndOf="@+id/counterBadgeIssueText"
|
||||
android:background="@drawable/badge_background"
|
||||
android:text="@string/infoTabRepoZero"
|
||||
android:textColor="@color/white" />
|
30
app/src/main/res/layout/badge_pull.xml
Normal file
30
app/src/main/res/layout/badge_pull.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/counterBadgePullText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="16sp"
|
||||
app:textAllCaps="true"
|
||||
android:text="@string/tabPullRequests"
|
||||
android:textColor="@color/lightGray" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/counterBadgePull"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="1dp"
|
||||
android:layout_toEndOf="@id/counterBadgePullText"
|
||||
android:background="@drawable/badge_background"
|
||||
android:gravity="center"
|
||||
android:text="@string/infoTabRepoZero"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</RelativeLayout>
|
30
app/src/main/res/layout/badge_release.xml
Normal file
30
app/src/main/res/layout/badge_release.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/counterBadgeReleaseText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="16sp"
|
||||
app:textAllCaps="true"
|
||||
android:text="@string/tab_text_releases"
|
||||
android:textColor="@color/lightGray" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/counterBadgeRelease"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="1dp"
|
||||
android:layout_toEndOf="@id/counterBadgeReleaseText"
|
||||
android:background="@drawable/badge_background"
|
||||
android:gravity="center"
|
||||
android:text="@string/infoTabRepoZero"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</RelativeLayout>
|
@ -109,25 +109,25 @@
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/issueBadgeFrame"
|
||||
android:id="@+id/counterBadgeFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIssueBadgeHeader"
|
||||
android:id="@+id/tvCounterBadgeHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginStart="44dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:text="@string/settingsIssueBadgeHeaderText"
|
||||
android:text="@string/settingsCounterBadges"
|
||||
android:textColor="?attr/primaryTextColor"/>
|
||||
|
||||
<Switch
|
||||
android:id="@+id/switchIssuesBadge"
|
||||
android:layout_toEndOf="@+id/tvIssueBadgeHeader"
|
||||
android:id="@+id/switchCounterBadge"
|
||||
android:layout_toEndOf="@+id/tvCounterBadgeHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:switchMinWidth="56dp"
|
||||
|
@ -275,6 +275,7 @@
|
||||
<string name="themeSelectionSelectedText" translatable="false">Dark</string>
|
||||
<string name="settingsPdfModeHeaderText">PDF Night Mode</string>
|
||||
<string name="fileViewerHeader">File Viewer</string>
|
||||
<string name="settingsCounterBadges">Counter Badges</string>
|
||||
<!-- settings -->
|
||||
|
||||
<string name="noMoreData">No more data available</string>
|
||||
|
Reference in New Issue
Block a user