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:
M M Arif 2020-09-05 15:43:29 +02:00 committed by 6543
parent 37f622b952
commit b2b42887f7
15 changed files with 117 additions and 367 deletions

View File

@ -16,6 +16,24 @@
</value> </value>
</option> </option>
</JavaCodeStyleSettings> </JavaCodeStyleSettings>
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value>
<package name="java.util" alias="false" withSubpackages="false" />
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
<package name="io.ktor" alias="false" withSubpackages="true" />
</value>
</option>
<option name="PACKAGES_IMPORT_LAYOUT">
<value>
<package name="" alias="false" withSubpackages="true" />
<package name="java" alias="false" withSubpackages="true" />
<package name="javax" alias="false" withSubpackages="true" />
<package name="kotlin" alias="false" withSubpackages="true" />
<package name="" alias="true" withSubpackages="true" />
</value>
</option>
</JetCodeStyleSettings>
<codeStyleSettings language="JAVA"> <codeStyleSettings language="JAVA">
<option name="RIGHT_MARGIN" value="220" /> <option name="RIGHT_MARGIN" value="220" />
<option name="KEEP_LINE_BREAKS" value="false" /> <option name="KEEP_LINE_BREAKS" value="false" />

View File

@ -33,7 +33,6 @@ import org.mian.gitnex.fragments.BottomSheetIssuesFilterFragment;
import org.mian.gitnex.fragments.BottomSheetMilestonesFilterFragment; import org.mian.gitnex.fragments.BottomSheetMilestonesFilterFragment;
import org.mian.gitnex.fragments.BottomSheetPullRequestFilterFragment; import org.mian.gitnex.fragments.BottomSheetPullRequestFilterFragment;
import org.mian.gitnex.fragments.BottomSheetRepoFragment; import org.mian.gitnex.fragments.BottomSheetRepoFragment;
import org.mian.gitnex.fragments.BranchesFragment;
import org.mian.gitnex.fragments.CollaboratorsFragment; import org.mian.gitnex.fragments.CollaboratorsFragment;
import org.mian.gitnex.fragments.FilesFragment; import org.mian.gitnex.fragments.FilesFragment;
import org.mian.gitnex.fragments.IssuesFragment; import org.mian.gitnex.fragments.IssuesFragment;
@ -163,7 +162,7 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
} }
// Only show collaborators tab, if you have permission to // Only show collaborators tab, if you have permission to
View collaboratorTab = viewGroup.getChildAt(8); View collaboratorTab = viewGroup.getChildAt(7);
if(tinyDB.getBoolean("isRepoAdmin") || new Version(tinyDB.getString("giteaVersion")).higherOrEqual("1.12.0")) { if(tinyDB.getBoolean("isRepoAdmin") || new Version(tinyDB.getString("giteaVersion")).higherOrEqual("1.12.0")) {
@ -229,8 +228,8 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
if(textViewBadgeRelease.getText() != "") { // only show if API returned a number if(textViewBadgeRelease.getText() != "") { // only show if API returned a number
Objects.requireNonNull(tabLayout.getTabAt(5)).setCustomView(tabHeader6); Objects.requireNonNull(tabLayout.getTabAt(4)).setCustomView(tabHeader6);
TabLayout.Tab tabOpenRelease = tabLayout.getTabAt(5); TabLayout.Tab tabOpenRelease = tabLayout.getTabAt(4);
assert tabOpenRelease != null; // FIXME This should be cleaned up assert tabOpenRelease != null; // FIXME This should be cleaned up
TextView openReleaseTabView = Objects.requireNonNull(tabOpenRelease.getCustomView()).findViewById(R.id.counterBadgeReleaseText); TextView openReleaseTabView = Objects.requireNonNull(tabOpenRelease.getCustomView()).findViewById(R.id.counterBadgeReleaseText);
openReleaseTabView.setTextColor(textColor); openReleaseTabView.setTextColor(textColor);
@ -300,6 +299,12 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
chooseBranch(); chooseBranch();
return true; return true;
case R.id.branchCommits:
Intent intent = new Intent(ctx, CommitsActivity.class);
intent.putExtra("branchName", tinyDB.getString("repoBranch"));
ctx.startActivity(intent);
return true;
default: default:
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
@ -490,20 +495,17 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
fragment = new PullRequestsFragment(); fragment = new PullRequestsFragment();
break; break;
case 4: // Branches case 4: // Releases
return BranchesFragment.newInstance(repositoryOwner, repositoryName);
case 5: // Releases
return ReleasesFragment.newInstance(repositoryOwner, repositoryName); return ReleasesFragment.newInstance(repositoryOwner, repositoryName);
case 6: // Milestones case 5: // Milestones
fragment = new MilestonesFragment(); fragment = new MilestonesFragment();
break; break;
case 7: // Labels case 6: // Labels
return LabelsFragment.newInstance(repositoryOwner, repositoryName); return LabelsFragment.newInstance(repositoryOwner, repositoryName);
case 8: // Collaborators case 7: // Collaborators
return CollaboratorsFragment.newInstance(repositoryOwner, repositoryName); return CollaboratorsFragment.newInstance(repositoryOwner, repositoryName);
} }

View File

@ -1,90 +0,0 @@
package org.mian.gitnex.adapters;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import org.mian.gitnex.R;
import org.mian.gitnex.activities.CommitsActivity;
import org.mian.gitnex.helpers.TinyDB;
import org.mian.gitnex.models.Branches;
import java.util.List;
import java.util.Objects;
/**
* Author M M Arif
*/
public class BranchesAdapter extends RecyclerView.Adapter<BranchesAdapter.BranchesViewHolder> {
private List<Branches> branchesList;
private Context mCtx;
static class BranchesViewHolder extends RecyclerView.ViewHolder {
private TextView branchNameTv;
private TextView branchCommitAuthor;
private BranchesViewHolder(View itemView) {
super(itemView);
branchNameTv = itemView.findViewById(R.id.branchName);
branchCommitAuthor = itemView.findViewById(R.id.branchCommitAuthor);
Button branchCommitHash = itemView.findViewById(R.id.branchCommitHash);
branchCommitHash.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent(v.getContext(), CommitsActivity.class);
intent.putExtra("branchName", String.valueOf(branchNameTv.getText()));
Objects.requireNonNull(v.getContext()).startActivity(intent);
}
});
}
}
public BranchesAdapter(Context mCtx, List<Branches> branchesMain) {
this.mCtx = mCtx;
this.branchesList = branchesMain;
}
@NonNull
@Override
public BranchesAdapter.BranchesViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_branches, parent, false);
return new BranchesAdapter.BranchesViewHolder(v);
}
@Override
public void onBindViewHolder(@NonNull BranchesAdapter.BranchesViewHolder holder, int position) {
final TinyDB tinyDb = new TinyDB(mCtx);
final String instanceUrl = tinyDb.getString("instanceUrl");
Branches currentItem = branchesList.get(position);
holder.branchNameTv.setText(currentItem.getName());
if(currentItem.getCommit().getAuthor().getName() != null || !currentItem.getCommit().getAuthor().getName().equals("")) {
holder.branchCommitAuthor.setText(mCtx.getResources().getString(R.string.commitAuthor, currentItem.getCommit().getAuthor().getName()));
}
else {
holder.branchCommitAuthor.setText(mCtx.getResources().getString(R.string.commitAuthor, currentItem.getCommit().getAuthor().getUsername()));
}
}
@Override
public int getItemCount() {
return branchesList.size();
}
}

View File

@ -1,149 +0,0 @@
package org.mian.gitnex.fragments;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import org.mian.gitnex.R;
import org.mian.gitnex.adapters.BranchesAdapter;
import org.mian.gitnex.helpers.Authorization;
import org.mian.gitnex.helpers.TinyDB;
import org.mian.gitnex.models.Branches;
import org.mian.gitnex.viewmodels.BranchesViewModel;
import java.util.List;
/**
* Author M M Arif
*/
public class BranchesFragment extends Fragment {
private ProgressBar mProgressBar;
private BranchesAdapter adapter;
private RecyclerView mRecyclerView;
private TextView noDataBranches;
private static String repoNameF = "param2";
private static String repoOwnerF = "param1";
private String repoName;
private String repoOwner;
private OnFragmentInteractionListener mListener;
public BranchesFragment() {
}
public static BranchesFragment newInstance(String param1, String param2) {
BranchesFragment fragment = new BranchesFragment();
Bundle args = new Bundle();
args.putString(repoOwnerF, param1);
args.putString(repoNameF, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
repoName = getArguments().getString(repoNameF);
repoOwner = getArguments().getString(repoOwnerF);
}
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_branches, container, false);
TinyDB tinyDb = new TinyDB(getContext());
final String instanceUrl = tinyDb.getString("instanceUrl");
final String loginUid = tinyDb.getString("loginUid");
final String instanceToken = "token " + tinyDb.getString(loginUid + "-token");
final String locale = tinyDb.getString("locale");
final String timeFormat = tinyDb.getString("dateFormat");
noDataBranches = v.findViewById(R.id.noDataBranches);
final SwipeRefreshLayout swipeRefresh = v.findViewById(R.id.pullToRefresh);
mRecyclerView = v.findViewById(R.id.recyclerView);
mRecyclerView.setHasFixedSize(true);
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mRecyclerView.getContext(),
DividerItemDecoration.VERTICAL);
mRecyclerView.addItemDecoration(dividerItemDecoration);
mProgressBar = v.findViewById(R.id.progress_bar);
swipeRefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
swipeRefresh.setRefreshing(false);
BranchesViewModel.loadBranchesList(instanceUrl, instanceToken, repoOwner, repoName, getContext());
}
}, 50);
}
});
fetchDataAsync(instanceUrl, Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName);
return v;
}
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
public interface OnFragmentInteractionListener {
void onFragmentInteraction(Uri uri);
}
private void fetchDataAsync(String instanceUrl, String instanceToken, String owner, String repo) {
BranchesViewModel branchesModel = new ViewModelProvider(this).get(BranchesViewModel.class);
branchesModel.getBranchesList(instanceUrl, instanceToken, owner, repo, getContext()).observe(getViewLifecycleOwner(), new Observer<List<Branches>>() {
@Override
public void onChanged(@Nullable List<Branches> branchesListMain) {
adapter = new BranchesAdapter(getContext(), branchesListMain);
if(adapter.getItemCount() > 0) {
mRecyclerView.setAdapter(adapter);
noDataBranches.setVisibility(View.GONE);
}
else {
adapter.notifyDataSetChanged();
mRecyclerView.setAdapter(adapter);
noDataBranches.setVisibility(View.VISIBLE);
}
mProgressBar.setVisibility(View.GONE);
}
});
}
}

View File

@ -30,7 +30,6 @@ import org.mian.gitnex.helpers.TinyDB;
import org.mian.gitnex.viewmodels.FilesViewModel; import org.mian.gitnex.viewmodels.FilesViewModel;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Objects;
import moe.feng.common.view.breadcrumbs.BreadcrumbsView; import moe.feng.common.view.breadcrumbs.BreadcrumbsView;
import moe.feng.common.view.breadcrumbs.DefaultBreadcrumbsCallback; import moe.feng.common.view.breadcrumbs.DefaultBreadcrumbsCallback;
import moe.feng.common.view.breadcrumbs.model.BreadcrumbItem; import moe.feng.common.view.breadcrumbs.model.BreadcrumbItem;
@ -111,7 +110,7 @@ public class FilesFragment extends Fragment implements FilesAdapter.FilesAdapter
mBreadcrumbsView = v.findViewById(R.id.breadcrumbs_view); mBreadcrumbsView = v.findViewById(R.id.breadcrumbs_view);
mBreadcrumbsView.setItems(new ArrayList<>(Collections.singletonList(BreadcrumbItem.createSimpleItem(getResources().getString(R.string.filesBreadcrumbRoot) + getResources().getString(R.string.colonDivider) + ref)))); mBreadcrumbsView.setItems(new ArrayList<>(Collections.singletonList(BreadcrumbItem.createSimpleItem(getResources().getString(R.string.filesBreadcrumbRoot) + getResources().getString(R.string.colonDivider) + ref))));
((RepoDetailActivity) Objects.requireNonNull(getActivity())).setFragmentRefreshListenerFiles(repoBranch -> { ((RepoDetailActivity) requireActivity()).setFragmentRefreshListenerFiles(repoBranch -> {
fileStructure.setText(""); fileStructure.setText("");
ref = repoBranch; ref = repoBranch;
@ -198,7 +197,7 @@ public class FilesFragment extends Fragment implements FilesAdapter.FilesAdapter
intent.putExtra("singleFileName", fileName); intent.putExtra("singleFileName", fileName);
} }
Objects.requireNonNull(getContext()).startActivity(intent); requireContext().startActivity(intent);
} }
private void fetchDataAsync(String instanceUrl, String instanceToken, String owner, String repo, String ref) { private void fetchDataAsync(String instanceUrl, String instanceToken, String owner, String repo, String ref) {
@ -263,6 +262,7 @@ public class FilesFragment extends Fragment implements FilesAdapter.FilesAdapter
@Override @Override
public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) { public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) {
menu.clear();
inflater.inflate(R.menu.search_menu, menu); inflater.inflate(R.menu.search_menu, menu);
inflater.inflate(R.menu.files_switch_branches_menu, menu); inflater.inflate(R.menu.files_switch_branches_menu, menu);
super.onCreateOptionsMenu(menu, inflater); super.onCreateOptionsMenu(menu, inflater);

View 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>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" > android:shape="rectangle" >
<solid android:color="?attr/primaryBackgroundColor"/>
<corners android:radius="8dp"/> <corners android:radius="8dp"/>
</shape> </shape>

View File

@ -68,12 +68,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/tabPullRequests" /> 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 <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"

View File

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

View File

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

View File

@ -1,12 +1,39 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" <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 <item
android:id="@+id/switchBranches" android:id="@+id/mainRepoMenu"
android:icon="@drawable/ic_branch" android:icon="@drawable/ic_dotted_menu"
android:title="@string/strSwitchBranches" android:title="@string/menuTitleText"
android:orderInCategory="0" android:orderInCategory="1"
app:showAsAction="ifRoom" /> 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> </menu>

View File

@ -9,4 +9,4 @@
android:orderInCategory="1" android:orderInCategory="1"
app:showAsAction="ifRoom" /> app:showAsAction="ifRoom" />
</menu> </menu>

View File

@ -33,6 +33,8 @@
<item name="fabColor">@color/darkGreen</item> <item name="fabColor">@color/darkGreen</item>
<item name="iconsColor">@color/darkGreen</item> <item name="iconsColor">@color/darkGreen</item>
<item name="pagerTabIndicatorColor">@color/darkGreen</item> <item name="pagerTabIndicatorColor">@color/darkGreen</item>
<item name="android:actionOverflowButtonStyle">@style/customOverflowButtonStyle</item>
<item name="actionOverflowMenuStyle">@style/customOverflowMenuStyle</item>
</style> </style>
<!-- Light theme --> <!-- Light theme -->
@ -69,6 +71,8 @@
<item name="fabColor">@color/retroThemeColorPrimary</item> <item name="fabColor">@color/retroThemeColorPrimary</item>
<item name="iconsColor">@color/retroThemeColorPrimary</item> <item name="iconsColor">@color/retroThemeColorPrimary</item>
<item name="pagerTabIndicatorColor">@color/retroThemeColorPrimary</item> <item name="pagerTabIndicatorColor">@color/retroThemeColorPrimary</item>
<item name="android:actionOverflowButtonStyle">@style/customOverflowButtonStyle</item>
<item name="actionOverflowMenuStyle">@style/customOverflowMenuStyle</item>
</style> </style>
<!-- Retro theme --> <!-- Retro theme -->

View File

@ -579,7 +579,7 @@
<string name="sharePr">Share Pull Request</string> <string name="sharePr">Share Pull Request</string>
<string name="shareRepository">Share Repository</string> <string name="shareRepository">Share Repository</string>
<string name="createRepository">Create 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="commitCommittedBy">Committed by %1$s</string>
<string name="viewCommits">View Commits</string> <string name="viewCommits">View Commits</string>
<string name="changelogTitle" translatable="false">Changelog</string> <string name="changelogTitle" translatable="false">Changelog</string>

View File

@ -33,6 +33,8 @@
<item name="fabColor">@color/darkGreen</item> <item name="fabColor">@color/darkGreen</item>
<item name="iconsColor">@color/darkGreen</item> <item name="iconsColor">@color/darkGreen</item>
<item name="pagerTabIndicatorColor">@color/darkGreen</item> <item name="pagerTabIndicatorColor">@color/darkGreen</item>
<item name="android:actionOverflowButtonStyle">@style/customOverflowButtonStyle</item>
<item name="actionOverflowMenuStyle">@style/customOverflowMenuStyle</item>
</style> </style>
<!-- Dark theme - default --> <!-- Dark theme - default -->
@ -68,6 +70,8 @@
<item name="fabColor">@color/darkGreen</item> <item name="fabColor">@color/darkGreen</item>
<item name="iconsColor">@color/darkGreen</item> <item name="iconsColor">@color/darkGreen</item>
<item name="pagerTabIndicatorColor">@color/darkGreen</item> <item name="pagerTabIndicatorColor">@color/darkGreen</item>
<item name="android:actionOverflowButtonStyle">@style/customOverflowButtonStyle</item>
<item name="actionOverflowMenuStyle">@style/customOverflowMenuStyle</item>
</style> </style>
<!-- Light theme --> <!-- Light theme -->
@ -103,9 +107,21 @@
<item name="fabColor">@color/retroThemeColorPrimary</item> <item name="fabColor">@color/retroThemeColorPrimary</item>
<item name="iconsColor">@color/retroThemeColorPrimary</item> <item name="iconsColor">@color/retroThemeColorPrimary</item>
<item name="pagerTabIndicatorColor">@color/retroThemeColorPrimary</item> <item name="pagerTabIndicatorColor">@color/retroThemeColorPrimary</item>
<item name="android:actionOverflowButtonStyle">@style/customOverflowButtonStyle</item>
<item name="actionOverflowMenuStyle">@style/customOverflowMenuStyle</item>
</style> </style>
<!-- Retro theme --> <!-- 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"> <style name="AppSearchViewStyle" parent="Widget.AppCompat.SearchView">
<item name="searchHintIcon">@drawable/ic_search</item> <item name="searchHintIcon">@drawable/ic_search</item>
<item name="searchIcon">@null</item> <item name="searchIcon">@null</item>