Move branch commits to files popup (#682)
Move commits to file sub menu Co-authored-by: M M Arif <mmarif@swatian.com> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/682 Reviewed-by: 6543 <6543@noreply.codeberg.org>
This commit is contained in:
27
app/src/main/res/drawable/ic_commit.xml
Normal file
27
app/src/main/res/drawable/ic_commit.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M12,12m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="?attr/iconsColor"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M1.05,12L7,12"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="?attr/iconsColor"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M17.01,12L22.96,12"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="?attr/iconsColor"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle" >
|
||||
<solid android:color="?attr/primaryBackgroundColor"/>
|
||||
<corners android:radius="8dp"/>
|
||||
|
||||
</shape>
|
||||
|
||||
@@ -68,12 +68,6 @@
|
||||
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/tabItem6_releases"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".activities.RepoDetailActivity">
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/pullToRefresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:scrollbars="vertical" />
|
||||
|
||||
<GridView
|
||||
android:id="@+id/gridView"
|
||||
android:numColumns="auto_fit"
|
||||
android:gravity="center"
|
||||
android:columnWidth="50dp"
|
||||
android:stretchMode="columnWidth"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<com.google.android.material.progressindicator.ProgressIndicator
|
||||
android:id="@+id/progress_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.MaterialComponents.ProgressIndicator.Linear.Indeterminate"
|
||||
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noDataBranches"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="15dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/noDataBranchesTab"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="20sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/relativeLayoutMainFrame"
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="5dp"
|
||||
android:id="@+id/branchesFrame"
|
||||
android:layout_margin="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/branchName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/branchCommitAuthor"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textIsSelectable="true"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/branchCommitHash"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="60dp"
|
||||
android:text="@string/viewCommits"
|
||||
android:layout_marginTop="15dp"
|
||||
android:textColor="@color/btnTextColor"
|
||||
android:textSize="14sp"
|
||||
android:minHeight="0dp"
|
||||
android:minWidth="0dp"
|
||||
android:padding="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -1,12 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/switchBranches"
|
||||
android:icon="@drawable/ic_branch"
|
||||
android:title="@string/strSwitchBranches"
|
||||
android:orderInCategory="0"
|
||||
app:showAsAction="ifRoom" />
|
||||
android:id="@+id/mainRepoMenu"
|
||||
android:icon="@drawable/ic_dotted_menu"
|
||||
android:title="@string/menuTitleText"
|
||||
android:orderInCategory="1"
|
||||
app:showAsAction="always" >
|
||||
|
||||
<menu>
|
||||
|
||||
<item
|
||||
android:id="@+id/repoMenu"
|
||||
android:icon="@drawable/ic_dotted_menu"
|
||||
android:title="@string/menuTitleText"
|
||||
android:orderInCategory="0"
|
||||
app:showAsAction="ifRoom|withText" />
|
||||
|
||||
<item
|
||||
android:id="@+id/switchBranches"
|
||||
android:icon="@drawable/ic_branch"
|
||||
android:title="@string/strSwitchBranches"
|
||||
android:orderInCategory="1"
|
||||
app:showAsAction="ifRoom|withText" />
|
||||
|
||||
<item
|
||||
android:id="@+id/branchCommits"
|
||||
android:icon="@drawable/ic_commit"
|
||||
android:title="@string/commitTitle"
|
||||
android:orderInCategory="2"
|
||||
app:showAsAction="ifRoom|withText" />
|
||||
|
||||
</menu>
|
||||
|
||||
</item>
|
||||
|
||||
</menu>
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
android:orderInCategory="1"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
</menu>
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
<item name="fabColor">@color/darkGreen</item>
|
||||
<item name="iconsColor">@color/darkGreen</item>
|
||||
<item name="pagerTabIndicatorColor">@color/darkGreen</item>
|
||||
<item name="android:actionOverflowButtonStyle">@style/customOverflowButtonStyle</item>
|
||||
<item name="actionOverflowMenuStyle">@style/customOverflowMenuStyle</item>
|
||||
</style>
|
||||
<!-- Light theme -->
|
||||
|
||||
@@ -69,6 +71,8 @@
|
||||
<item name="fabColor">@color/retroThemeColorPrimary</item>
|
||||
<item name="iconsColor">@color/retroThemeColorPrimary</item>
|
||||
<item name="pagerTabIndicatorColor">@color/retroThemeColorPrimary</item>
|
||||
<item name="android:actionOverflowButtonStyle">@style/customOverflowButtonStyle</item>
|
||||
<item name="actionOverflowMenuStyle">@style/customOverflowMenuStyle</item>
|
||||
</style>
|
||||
<!-- Retro theme -->
|
||||
|
||||
|
||||
@@ -579,7 +579,7 @@
|
||||
<string name="sharePr">Share Pull Request</string>
|
||||
<string name="shareRepository">Share Repository</string>
|
||||
<string name="createRepository">Create Repository</string>
|
||||
<string name="commitTitle">Branch Commits</string>
|
||||
<string name="commitTitle">Commits</string>
|
||||
<string name="commitCommittedBy">Committed by %1$s</string>
|
||||
<string name="viewCommits">View Commits</string>
|
||||
<string name="changelogTitle" translatable="false">Changelog</string>
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
<item name="fabColor">@color/darkGreen</item>
|
||||
<item name="iconsColor">@color/darkGreen</item>
|
||||
<item name="pagerTabIndicatorColor">@color/darkGreen</item>
|
||||
<item name="android:actionOverflowButtonStyle">@style/customOverflowButtonStyle</item>
|
||||
<item name="actionOverflowMenuStyle">@style/customOverflowMenuStyle</item>
|
||||
</style>
|
||||
<!-- Dark theme - default -->
|
||||
|
||||
@@ -68,6 +70,8 @@
|
||||
<item name="fabColor">@color/darkGreen</item>
|
||||
<item name="iconsColor">@color/darkGreen</item>
|
||||
<item name="pagerTabIndicatorColor">@color/darkGreen</item>
|
||||
<item name="android:actionOverflowButtonStyle">@style/customOverflowButtonStyle</item>
|
||||
<item name="actionOverflowMenuStyle">@style/customOverflowMenuStyle</item>
|
||||
</style>
|
||||
<!-- Light theme -->
|
||||
|
||||
@@ -103,9 +107,21 @@
|
||||
<item name="fabColor">@color/retroThemeColorPrimary</item>
|
||||
<item name="iconsColor">@color/retroThemeColorPrimary</item>
|
||||
<item name="pagerTabIndicatorColor">@color/retroThemeColorPrimary</item>
|
||||
<item name="android:actionOverflowButtonStyle">@style/customOverflowButtonStyle</item>
|
||||
<item name="actionOverflowMenuStyle">@style/customOverflowMenuStyle</item>
|
||||
</style>
|
||||
<!-- Retro theme -->
|
||||
|
||||
<style name="customOverflowButtonStyle">
|
||||
<item name="android:src">@drawable/ic_dotted_menu</item>
|
||||
<item name="android:paddingStart">12dp</item>
|
||||
<item name="android:paddingEnd">12dp</item>
|
||||
</style>
|
||||
|
||||
<style name="customOverflowMenuStyle" parent="@style/Widget.MaterialComponents.PopupMenu.Overflow">
|
||||
<item name="android:popupBackground">@drawable/shape_round_corners</item>
|
||||
</style>
|
||||
|
||||
<style name="AppSearchViewStyle" parent="Widget.AppCompat.SearchView">
|
||||
<item name="searchHintIcon">@drawable/ic_search</item>
|
||||
<item name="searchIcon">@null</item>
|
||||
|
||||
Reference in New Issue
Block a user