Remove commits tab, moved under branch. Commits are under branches now.
Fixes search ui along the way
This commit is contained in:
parent
21aae88e62
commit
6842ba1410
@ -73,6 +73,7 @@
|
||||
<activity android:name=".activities.CreateOrganizationActivity" />
|
||||
<activity android:name=".activities.OpenRepoInBrowserActivity" />
|
||||
<activity android:name=".activities.FileDiffActivity" />
|
||||
<activity android:name=".activities.CommitsActivity" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -1,20 +1,20 @@
|
||||
package org.mian.gitnex.fragments;
|
||||
package org.mian.gitnex.activities;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.method.ScrollingMovementMethod;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.recyclerview.widget.DefaultItemAnimator;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@ -32,6 +32,7 @@ import org.mian.gitnex.models.Commits;
|
||||
import org.mian.gitnex.util.TinyDB;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.Response;
|
||||
@ -41,12 +42,13 @@ import static com.mikepenz.fastadapter.adapters.ItemAdapter.items;
|
||||
* Author M M Arif
|
||||
*/
|
||||
|
||||
public class CommitsFragment extends Fragment implements ItemFilterListener<CommitsItems> {
|
||||
public class CommitsActivity extends BaseActivity implements ItemFilterListener<CommitsItems> {
|
||||
|
||||
private View.OnClickListener onClickListener;
|
||||
private TextView noData;
|
||||
private ProgressBar progressBar;
|
||||
private SwipeRefreshLayout swipeRefreshLayout;
|
||||
private String TAG = "CommitsFragment - ";
|
||||
private String TAG = "CommitsActivity - ";
|
||||
private int resultLimit = 50;
|
||||
private boolean loadNextFlag = false;
|
||||
|
||||
@ -55,14 +57,19 @@ public class CommitsFragment extends Fragment implements ItemFilterListener<Comm
|
||||
private ItemAdapter footerAdapter;
|
||||
private EndlessRecyclerOnScrollListener endlessRecyclerOnScrollListener;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
protected int getLayoutResourceId(){
|
||||
return R.layout.activity_commits;
|
||||
}
|
||||
|
||||
final View v = inflater.inflate(R.layout.fragment_commits, container, false);
|
||||
setHasOptionsMenu(true);
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
|
||||
TinyDB tinyDb = new TinyDB(getContext());
|
||||
super.onCreate(savedInstanceState);
|
||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
TinyDB tinyDb = new TinyDB(getApplicationContext());
|
||||
final String instanceUrl = tinyDb.getString("instanceUrl");
|
||||
final String loginUid = tinyDb.getString("loginUid");
|
||||
final String instanceToken = "token " + tinyDb.getString(loginUid + "-token");
|
||||
@ -71,14 +78,24 @@ public class CommitsFragment extends Fragment implements ItemFilterListener<Comm
|
||||
final String repoOwner = parts[0];
|
||||
final String repoName = parts[1];
|
||||
|
||||
noData = v.findViewById(R.id.noDataCommits);
|
||||
progressBar = v.findViewById(R.id.progress_bar);
|
||||
swipeRefreshLayout = v.findViewById(R.id.pullToRefresh);
|
||||
String branchName = getIntent().getStringExtra("branchName");
|
||||
|
||||
RecyclerView recyclerView = v.findViewById(R.id.recyclerView);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
TextView toolbar_title = findViewById(R.id.toolbar_title);
|
||||
toolbar_title.setMovementMethod(new ScrollingMovementMethod());
|
||||
toolbar_title.setText(branchName);
|
||||
|
||||
ImageView closeActivity = findViewById(R.id.close);
|
||||
noData = findViewById(R.id.noDataCommits);
|
||||
progressBar = findViewById(R.id.progress_bar);
|
||||
swipeRefreshLayout = findViewById(R.id.pullToRefresh);
|
||||
|
||||
RecyclerView recyclerView = findViewById(R.id.recyclerView);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
||||
recyclerView.setHasFixedSize(true);
|
||||
|
||||
initCloseListener();
|
||||
closeActivity.setOnClickListener(onClickListener);
|
||||
|
||||
fastItemAdapter = new FastItemAdapter<>();
|
||||
fastItemAdapter.withSelectable(true);
|
||||
|
||||
@ -86,20 +103,11 @@ public class CommitsFragment extends Fragment implements ItemFilterListener<Comm
|
||||
//noinspection unchecked
|
||||
fastItemAdapter.addAdapter(1, footerAdapter);
|
||||
|
||||
fastItemAdapter.getItemFilter().withFilterPredicate(new IItemAdapter.Predicate<CommitsItems>() {
|
||||
|
||||
@Override
|
||||
public boolean filter(@NonNull CommitsItems item, CharSequence constraint) {
|
||||
|
||||
return item.getCommitTitle().toString().toLowerCase().contains(constraint.toString().toLowerCase());
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
fastItemAdapter.getItemFilter().withFilterPredicate((IItemAdapter.Predicate<CommitsItems>) (item, constraint) -> item.getCommitTitle().toLowerCase().contains(Objects.requireNonNull(constraint).toString().toLowerCase()));
|
||||
|
||||
fastItemAdapter.getItemFilter().withItemFilterListener(this);
|
||||
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
||||
recyclerView.setItemAnimator(new DefaultItemAnimator());
|
||||
recyclerView.setAdapter(fastItemAdapter);
|
||||
|
||||
@ -108,7 +116,7 @@ public class CommitsFragment extends Fragment implements ItemFilterListener<Comm
|
||||
@Override
|
||||
public void onLoadMore(final int currentPage) {
|
||||
|
||||
loadNext(instanceUrl, instanceToken, repoOwner, repoName, currentPage);
|
||||
loadNext(instanceUrl, instanceToken, repoOwner, repoName, currentPage, branchName);
|
||||
|
||||
}
|
||||
|
||||
@ -125,21 +133,19 @@ public class CommitsFragment extends Fragment implements ItemFilterListener<Comm
|
||||
|
||||
recyclerView.addOnScrollListener(endlessRecyclerOnScrollListener);
|
||||
|
||||
loadInitial(instanceUrl, instanceToken, repoOwner, repoName);
|
||||
loadInitial(instanceUrl, instanceToken, repoOwner, repoName, branchName);
|
||||
|
||||
assert savedInstanceState != null;
|
||||
fastItemAdapter.withSavedInstanceState(savedInstanceState);
|
||||
|
||||
return v;
|
||||
|
||||
}
|
||||
|
||||
private void loadInitial(String instanceUrl, String token, String repoOwner, String repoName) {
|
||||
private void loadInitial(String instanceUrl, String token, String repoOwner, String repoName, String branchName) {
|
||||
|
||||
Call<List<Commits>> call = RetrofitClient
|
||||
.getInstance(instanceUrl, getContext())
|
||||
.getInstance(instanceUrl, getApplicationContext())
|
||||
.getApiInterface()
|
||||
.getRepositoryCommits(token, repoOwner, repoName, 1);
|
||||
.getRepositoryCommits(token, repoOwner, repoName, 1, branchName);
|
||||
|
||||
call.enqueue(new Callback<List<Commits>>() {
|
||||
|
||||
@ -158,7 +164,7 @@ public class CommitsFragment extends Fragment implements ItemFilterListener<Comm
|
||||
|
||||
for (int i = 0; i < response.body().size(); i++) {
|
||||
|
||||
items.add(new CommitsItems(getContext()).withNewItems(response.body().get(i).getCommit().getMessage(), response.body().get(i).getHtml_url(),
|
||||
items.add(new CommitsItems(getApplicationContext()).withNewItems(response.body().get(i).getCommit().getMessage(), response.body().get(i).getHtml_url(),
|
||||
response.body().get(i).getCommit().getCommitter().getName(), response.body().get(i).getCommit().getCommitter().getDate()));
|
||||
|
||||
}
|
||||
@ -194,73 +200,68 @@ public class CommitsFragment extends Fragment implements ItemFilterListener<Comm
|
||||
|
||||
}
|
||||
|
||||
private void loadNext(String instanceUrl, String token, String repoOwner, String repoName, final int currentPage) {
|
||||
private void loadNext(String instanceUrl, String token, String repoOwner, String repoName, final int currentPage, String branchName) {
|
||||
|
||||
footerAdapter.clear();
|
||||
//noinspection unchecked
|
||||
footerAdapter.add(new ProgressItem().withEnabled(false));
|
||||
Handler handler = new Handler();
|
||||
|
||||
handler.postDelayed(new Runnable() {
|
||||
handler.postDelayed(() -> {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Call<List<Commits>> call = RetrofitClient
|
||||
.getInstance(instanceUrl, getApplicationContext())
|
||||
.getApiInterface()
|
||||
.getRepositoryCommits(token, repoOwner, repoName, currentPage + 1, branchName);
|
||||
|
||||
Call<List<Commits>> call = RetrofitClient
|
||||
.getInstance(instanceUrl, getContext())
|
||||
.getApiInterface()
|
||||
.getRepositoryCommits(token, repoOwner, repoName, currentPage + 1);
|
||||
call.enqueue(new Callback<List<Commits>>() {
|
||||
|
||||
call.enqueue(new Callback<List<Commits>>() {
|
||||
@Override
|
||||
public void onResponse(@NonNull Call<List<Commits>> call, @NonNull Response<List<Commits>> response) {
|
||||
|
||||
@Override
|
||||
public void onResponse(@NonNull Call<List<Commits>> call, @NonNull Response<List<Commits>> response) {
|
||||
if (response.isSuccessful()) {
|
||||
|
||||
if (response.isSuccessful()) {
|
||||
assert response.body() != null;
|
||||
|
||||
assert response.body() != null;
|
||||
if (response.body().size() > 0) {
|
||||
|
||||
if (response.body().size() > 0) {
|
||||
loadNextFlag = response.body().size() == resultLimit;
|
||||
|
||||
loadNextFlag = response.body().size() == resultLimit;
|
||||
for (int i = 0; i < response.body().size(); i++) {
|
||||
|
||||
for (int i = 0; i < response.body().size(); i++) {
|
||||
|
||||
fastItemAdapter.add(fastItemAdapter.getAdapterItemCount(), new CommitsItems(getContext()).withNewItems(response.body().get(i).getCommit().getMessage(),
|
||||
response.body().get(i).getHtml_url(), response.body().get(i).getCommit().getCommitter().getName(),
|
||||
response.body().get(i).getCommit().getCommitter().getDate()));
|
||||
|
||||
}
|
||||
|
||||
footerAdapter.clear();
|
||||
fastItemAdapter.add(fastItemAdapter.getAdapterItemCount(), new CommitsItems(getApplicationContext()).withNewItems(response.body().get(i).getCommit().getMessage(),
|
||||
response.body().get(i).getHtml_url(), response.body().get(i).getCommit().getCommitter().getName(),
|
||||
response.body().get(i).getCommit().getCommitter().getDate()));
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
footerAdapter.clear();
|
||||
}
|
||||
|
||||
progressBar.setVisibility(View.GONE);
|
||||
footerAdapter.clear();
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Log.e(TAG, String.valueOf(response.code()));
|
||||
|
||||
footerAdapter.clear();
|
||||
}
|
||||
|
||||
progressBar.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
@Override
|
||||
public void onFailure(@NonNull Call<List<Commits>> call, @NonNull Throwable t) {
|
||||
|
||||
Log.e(TAG, t.toString());
|
||||
Log.e(TAG, String.valueOf(response.code()));
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onFailure(@NonNull Call<List<Commits>> call, @NonNull Throwable t) {
|
||||
|
||||
Log.e(TAG, t.toString());
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}, 1000);
|
||||
|
||||
@ -273,10 +274,10 @@ public class CommitsFragment extends Fragment implements ItemFilterListener<Comm
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) {
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.search_menu, menu);
|
||||
super.onCreateOptionsMenu(menu, inflater);
|
||||
|
||||
MenuItem searchItem = menu.findItem(R.id.action_search);
|
||||
androidx.appcompat.widget.SearchView searchView = (androidx.appcompat.widget.SearchView) searchItem.getActionView();
|
||||
@ -298,6 +299,7 @@ public class CommitsFragment extends Fragment implements ItemFilterListener<Comm
|
||||
});
|
||||
|
||||
endlessRecyclerOnScrollListener.enable();
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
|
||||
}
|
||||
|
||||
@ -311,4 +313,13 @@ public class CommitsFragment extends Fragment implements ItemFilterListener<Comm
|
||||
endlessRecyclerOnScrollListener.enable();
|
||||
}
|
||||
|
||||
private void initCloseListener() {
|
||||
onClickListener = view -> {
|
||||
getIntent().removeExtra("branchName");
|
||||
finish();
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,6 @@ import org.mian.gitnex.R;
|
||||
import org.mian.gitnex.clients.RetrofitClient;
|
||||
import org.mian.gitnex.fragments.BottomSheetRepoFragment;
|
||||
import org.mian.gitnex.fragments.BranchesFragment;
|
||||
import org.mian.gitnex.fragments.CommitsFragment;
|
||||
import org.mian.gitnex.fragments.IssuesClosedFragment;
|
||||
import org.mian.gitnex.fragments.CollaboratorsFragment;
|
||||
import org.mian.gitnex.fragments.FilesFragment;
|
||||
|
@ -1,16 +1,17 @@
|
||||
package org.mian.gitnex.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.Html;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.content.Intent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
import org.mian.gitnex.R;
|
||||
import org.mian.gitnex.activities.CommitsActivity;
|
||||
import org.mian.gitnex.models.Branches;
|
||||
import org.mian.gitnex.util.TinyDB;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
@ -27,14 +28,23 @@ public class BranchesAdapter extends RecyclerView.Adapter<BranchesAdapter.Branch
|
||||
|
||||
private TextView branchNameTv;
|
||||
private TextView branchCommitAuthor;
|
||||
private TextView branchCommitHash;
|
||||
|
||||
private BranchesViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
|
||||
branchNameTv = itemView.findViewById(R.id.branchName);
|
||||
branchCommitAuthor = itemView.findViewById(R.id.branchCommitAuthor);
|
||||
branchCommitHash = itemView.findViewById(R.id.branchCommitHash);
|
||||
TextView 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);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@ -67,10 +77,6 @@ public class BranchesAdapter extends RecyclerView.Adapter<BranchesAdapter.Branch
|
||||
holder.branchCommitAuthor.setText(mCtx.getResources().getString(R.string.commitAuthor, currentItem.getCommit().getAuthor().getUsername()));
|
||||
}
|
||||
|
||||
holder.branchCommitHash.setText(
|
||||
Html.fromHtml("<a href='" + currentItem.getCommit().getUrl() + "'>" + mCtx.getResources().getString(R.string.commitLinkBranchesTab) + "</a> "));
|
||||
holder.branchCommitHash.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -262,5 +262,5 @@ public interface ApiInterface {
|
||||
Call<ResponseBody> mergePullRequest(@Header("Authorization") String token, @Path("owner") String ownerName, @Path("repo") String repoName, @Path("index") int index, @Body MergePullRequest jsonStr);
|
||||
|
||||
@GET("repos/{owner}/{repo}/commits") // get all commits
|
||||
Call<List<Commits>> getRepositoryCommits(@Header("Authorization") String token, @Path("owner") String owner, @Path("repo") String repo, @Query("page") int page);
|
||||
Call<List<Commits>> getRepositoryCommits(@Header("Authorization") String token, @Path("owner") String owner, @Path("repo") String repo, @Query("page") int page, @Query("sha") String branchName);
|
||||
}
|
||||
|
@ -6,8 +6,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
@ -8,8 +8,10 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
86
app/src/main/res/layout/activity_commits.xml
Normal file
86
app/src/main/res/layout/activity_commits.xml
Normal file
@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
android:contentDescription="@string/close"
|
||||
android:src="@drawable/ic_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolbar_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@string/commitTitle"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:ellipsize="none"
|
||||
android:scrollbars="horizontal"
|
||||
android:singleLine="true"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/pullToRefresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="50dp"
|
||||
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:padding="4dp"
|
||||
android:scrollbars="vertical" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noDataCommits"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="15dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/noDataFound"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="20sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
style="@style/Base.Widget.AppCompat.ProgressBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:indeterminate="true"
|
||||
android:visibility="visible" />
|
||||
|
||||
</RelativeLayout>
|
@ -7,8 +7,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
@ -7,8 +7,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -8,8 +8,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -8,8 +8,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -7,8 +7,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -8,8 +8,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -7,8 +7,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
@ -8,8 +8,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -8,8 +8,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -8,9 +8,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay" >
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -7,8 +7,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
@ -7,8 +7,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
@ -7,8 +7,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
@ -7,8 +7,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
@ -7,8 +7,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
@ -13,7 +13,7 @@
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -7,8 +7,10 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -7,8 +7,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -7,8 +7,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
@ -13,7 +13,7 @@
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -7,8 +7,10 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -7,8 +7,10 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -8,8 +8,10 @@
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -1,44 +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"
|
||||
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:padding="4dp"
|
||||
android:scrollbars="vertical" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noDataCommits"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="15dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/noDataFound"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="20sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
style="@style/Base.Widget.AppCompat.ProgressBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:indeterminate="true"
|
||||
android:visibility="visible" />
|
||||
|
||||
</RelativeLayout>
|
@ -29,16 +29,16 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textIsSelectable="true"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="16sp" />
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/branchCommitHash"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="16sp"
|
||||
android:textColorLink="@color/lightBlue"/>
|
||||
android:textColor="@color/lightBlue"
|
||||
android:text="@string/viewCommits"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -70,4 +70,12 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_below="@id/linearLayoutFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:id="@+id/divider"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="?attr/dividerColor" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
@ -562,6 +562,7 @@
|
||||
<string name="shareRepository">Share Repository</string>
|
||||
<string name="createRepository">Create Repository</string>
|
||||
<string name="repositoryTabCommits">Commits</string>
|
||||
<string name="commitTitle">Commit Title</string>
|
||||
<string name="commitTitle">Branch Commits</string>
|
||||
<string name="commitCommittedBy">Committed by %1$s</string>
|
||||
<string name="viewCommits">View Commits</string>
|
||||
</resources>
|
||||
|
@ -6,6 +6,7 @@
|
||||
<item name="android:statusBarColor">@color/colorPrimary</item>
|
||||
<item name="android:typeface">monospace</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="android:textColorSecondary">@color/colorWhite</item>
|
||||
|
||||
<item name="primaryTextColor">@color/colorWhite</item>
|
||||
<item name="primaryBackgroundColor">@color/colorPrimary</item>
|
||||
@ -28,6 +29,7 @@
|
||||
<item name="android:statusBarColor">@color/colorPrimary</item>
|
||||
<item name="android:typeface">monospace</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="android:textColorSecondary">@color/lightThemeTextColor</item>
|
||||
|
||||
<item name="primaryTextColor">@color/lightThemeTextColor</item>
|
||||
<item name="primaryBackgroundColor">@color/lightThemeBackground</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user