mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2024-12-26 16:04:07 +08:00
implemented sub dir view
This commit is contained in:
parent
7fe376fa44
commit
d7b1a226d0
@ -83,5 +83,6 @@ Open source libraries
|
|||||||
- Abumoallim/android-multi-select-dialog
|
- Abumoallim/android-multi-select-dialog
|
||||||
- Pes/materialcolorpicker
|
- Pes/materialcolorpicker
|
||||||
- Hendraanggrian/socialview
|
- Hendraanggrian/socialview
|
||||||
|
- Fython/BreadcrumbsView
|
||||||
|
|
||||||
[Follow me on Fediverse - mastodon.social/@mmarif](https://mastodon.social/@mmarif)
|
[Follow me on Fediverse - mastodon.social/@mmarif](https://mastodon.social/@mmarif)
|
||||||
|
@ -68,4 +68,6 @@ dependencies {
|
|||||||
|
|
||||||
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
|
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
|
||||||
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
|
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
|
||||||
|
|
||||||
|
implementation "com.github.HamidrezaAmz:BreadcrumbsView:0.2.9"
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package org.mian.gitnex.activities;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.method.ScrollingMovementMethod;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
@ -58,6 +59,7 @@ public class FileViewActivity extends AppCompatActivity {
|
|||||||
String singleFileName = getIntent().getStringExtra("singleFileName");
|
String singleFileName = getIntent().getStringExtra("singleFileName");
|
||||||
|
|
||||||
TextView toolbar_title = findViewById(R.id.toolbar_title);
|
TextView toolbar_title = findViewById(R.id.toolbar_title);
|
||||||
|
toolbar_title.setMovementMethod(new ScrollingMovementMethod());
|
||||||
toolbar_title.setText(singleFileName);
|
toolbar_title.setText(singleFileName);
|
||||||
|
|
||||||
initCloseListener();
|
initCloseListener();
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.mian.gitnex.adapters;
|
package org.mian.gitnex.adapters;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -12,10 +11,8 @@ import android.widget.TextView;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.activities.FileViewActivity;
|
|
||||||
import org.mian.gitnex.helpers.Toasty;
|
import org.mian.gitnex.helpers.Toasty;
|
||||||
import org.mian.gitnex.models.Files;
|
import org.mian.gitnex.models.Files;
|
||||||
import org.mian.gitnex.util.TinyDB;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -29,6 +26,13 @@ public class FilesAdapter extends RecyclerView.Adapter<FilesAdapter.FilesViewHol
|
|||||||
private Context mCtx;
|
private Context mCtx;
|
||||||
private List<Files> filesListFull;
|
private List<Files> filesListFull;
|
||||||
|
|
||||||
|
private FilesAdapterListener filesListener;
|
||||||
|
|
||||||
|
public interface FilesAdapterListener {
|
||||||
|
void onClickDir(String str);
|
||||||
|
void onClickFile(String str);
|
||||||
|
}
|
||||||
|
|
||||||
class FilesViewHolder extends RecyclerView.ViewHolder {
|
class FilesViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
private ImageView fileTypeImage;
|
private ImageView fileTypeImage;
|
||||||
@ -49,16 +53,12 @@ public class FilesAdapter extends RecyclerView.Adapter<FilesAdapter.FilesViewHol
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|
||||||
Context context = v.getContext();
|
Context context = v.getContext();
|
||||||
TinyDB tinyDb = new TinyDB(context);
|
|
||||||
|
|
||||||
if(fileType.getText().toString().equals("file")) {
|
if(fileType.getText().toString().equals("file")) {
|
||||||
Intent intent = new Intent(context, FileViewActivity.class);
|
filesListener.onClickFile(fileName.getText().toString());
|
||||||
intent.putExtra("singleFileName", fileName.getText().toString());
|
|
||||||
context.startActivity(intent);
|
|
||||||
}
|
}
|
||||||
else if(fileType.getText().toString().equals("dir")) {
|
else if(fileType.getText().toString().equals("dir")) {
|
||||||
//tinyDb.putString("filesDir", fileName.getText().toString());
|
filesListener.onClickDir(fileName.getText().toString());
|
||||||
Toasty.info(context, context.getString(R.string.filesDirNotSupportedYet));
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Toasty.info(context, context.getString(R.string.filesGenericError));
|
Toasty.info(context, context.getString(R.string.filesGenericError));
|
||||||
@ -134,10 +134,11 @@ public class FilesAdapter extends RecyclerView.Adapter<FilesAdapter.FilesViewHol
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public FilesAdapter(Context mCtx, List<Files> filesListMain) {
|
public FilesAdapter(Context mCtx, List<Files> filesListMain, FilesAdapterListener filesListener) {
|
||||||
this.mCtx = mCtx;
|
this.mCtx = mCtx;
|
||||||
this.filesList = filesListMain;
|
this.filesList = filesListMain;
|
||||||
filesListFull = new ArrayList<>(filesList);
|
filesListFull = new ArrayList<>(filesList);
|
||||||
|
this.filesListener = filesListener;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package org.mian.gitnex.fragments;
|
package org.mian.gitnex.fragments;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@ -10,8 +11,6 @@ import androidx.lifecycle.ViewModelProvider;
|
|||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
|
||||||
import android.os.Handler;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
@ -23,29 +22,36 @@ import android.widget.LinearLayout;
|
|||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
|
import org.mian.gitnex.activities.FileViewActivity;
|
||||||
import org.mian.gitnex.adapters.FilesAdapter;
|
import org.mian.gitnex.adapters.FilesAdapter;
|
||||||
import org.mian.gitnex.helpers.Authorization;
|
import org.mian.gitnex.helpers.Authorization;
|
||||||
import org.mian.gitnex.models.Files;
|
import org.mian.gitnex.models.Files;
|
||||||
import org.mian.gitnex.util.AppUtil;
|
import org.mian.gitnex.util.AppUtil;
|
||||||
import org.mian.gitnex.util.TinyDB;
|
import org.mian.gitnex.util.TinyDB;
|
||||||
import org.mian.gitnex.viewmodels.FilesViewModel;
|
import org.mian.gitnex.viewmodels.FilesViewModel;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import moe.feng.common.view.breadcrumbs.BreadcrumbsView;
|
||||||
|
import moe.feng.common.view.breadcrumbs.DefaultBreadcrumbsCallback;
|
||||||
|
import moe.feng.common.view.breadcrumbs.model.BreadcrumbItem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Author M M Arif
|
* Author M M Arif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class FilesFragment extends Fragment {
|
public class FilesFragment extends Fragment implements FilesAdapter.FilesAdapterListener {
|
||||||
|
|
||||||
private ProgressBar mProgressBar;
|
private ProgressBar mProgressBar;
|
||||||
private FilesAdapter adapter;
|
private FilesAdapter adapter;
|
||||||
private RecyclerView mRecyclerView;
|
private RecyclerView mRecyclerView;
|
||||||
private TextView noDataFiles;
|
private TextView noDataFiles;
|
||||||
private LinearLayout filesFrame;
|
private LinearLayout filesFrame;
|
||||||
|
private TextView fileStructure;
|
||||||
private static String repoNameF = "param2";
|
private static String repoNameF = "param2";
|
||||||
private static String repoOwnerF = "param1";
|
private static String repoOwnerF = "param1";
|
||||||
private boolean initialLoad = true;
|
private BreadcrumbsView mBreadcrumbsView;
|
||||||
|
|
||||||
private String repoName;
|
private String repoName;
|
||||||
private String repoOwner;
|
private String repoOwner;
|
||||||
@ -88,53 +94,118 @@ public class FilesFragment extends Fragment {
|
|||||||
noDataFiles = v.findViewById(R.id.noDataFiles);
|
noDataFiles = v.findViewById(R.id.noDataFiles);
|
||||||
filesFrame = v.findViewById(R.id.filesFrame);
|
filesFrame = v.findViewById(R.id.filesFrame);
|
||||||
|
|
||||||
final SwipeRefreshLayout swipeRefresh = v.findViewById(R.id.pullToRefresh);
|
fileStructure = v.findViewById(R.id.fileStructure);
|
||||||
|
|
||||||
mRecyclerView = v.findViewById(R.id.recyclerView);
|
mRecyclerView = v.findViewById(R.id.recyclerView);
|
||||||
mRecyclerView.setHasFixedSize(true);
|
mRecyclerView.setHasFixedSize(true);
|
||||||
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||||
|
|
||||||
String filesDirDB = tinyDb.getString("filesDir");
|
|
||||||
|
|
||||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mRecyclerView.getContext(),
|
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mRecyclerView.getContext(),
|
||||||
DividerItemDecoration.VERTICAL);
|
DividerItemDecoration.VERTICAL);
|
||||||
mRecyclerView.addItemDecoration(dividerItemDecoration);
|
mRecyclerView.addItemDecoration(dividerItemDecoration);
|
||||||
|
|
||||||
mProgressBar = v.findViewById(R.id.progress_bar);
|
mProgressBar = v.findViewById(R.id.progress_bar);
|
||||||
|
|
||||||
swipeRefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
|
mBreadcrumbsView = v.findViewById(R.id.breadcrumbs_view);
|
||||||
@Override
|
mBreadcrumbsView.setItems(new ArrayList<>(Arrays.asList(
|
||||||
public void onRefresh() {
|
BreadcrumbItem.createSimpleItem(getResources().getString(R.string.filesBreadcrumbRoot))
|
||||||
new Handler().postDelayed(new Runnable() {
|
)));
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
swipeRefresh.setRefreshing(false);
|
|
||||||
FilesViewModel.loadFilesList(instanceUrl, Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName);
|
|
||||||
}
|
|
||||||
}, 200);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
fetchDataAsync(instanceUrl, Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName);
|
fetchDataAsync(instanceUrl, Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName);
|
||||||
|
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static BreadcrumbItem createItem(String title) {
|
||||||
|
List<String> list = new ArrayList<>();
|
||||||
|
list.add(title);
|
||||||
|
return new BreadcrumbItem(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClickDir(String dirName) {
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
StringBuilder breadcrumbBuilder = new StringBuilder();
|
||||||
|
|
||||||
|
breadcrumbBuilder.append(fileStructure.getText().toString()).append("/").append(dirName);
|
||||||
|
|
||||||
|
fileStructure.setText(breadcrumbBuilder);
|
||||||
|
|
||||||
|
mBreadcrumbsView.addItem(createItem(dirName));
|
||||||
|
mBreadcrumbsView.setCallback(new DefaultBreadcrumbsCallback<BreadcrumbItem>() {
|
||||||
|
@Override
|
||||||
|
public void onNavigateBack(BreadcrumbItem item, int position) {
|
||||||
|
|
||||||
|
if(position == 0) {
|
||||||
|
fetchDataAsync(instanceUrl, Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName);
|
||||||
|
fileStructure.setText("");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String filterDir = fileStructure.getText().toString();
|
||||||
|
String result = filterDir.substring(0, filterDir.indexOf(item.getSelectedItem()));
|
||||||
|
fileStructure.setText(result + item.getSelectedItem());
|
||||||
|
fetchDataAsyncSub(instanceUrl, Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, fileStructure.getText().toString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNavigateNewLocation(BreadcrumbItem newItem, int changedPosition) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
fetchDataAsyncSub(instanceUrl, Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, fileStructure.getText().toString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClickFile(String fileName) {
|
||||||
|
|
||||||
|
Intent intent = new Intent(getContext(), FileViewActivity.class);
|
||||||
|
|
||||||
|
if(!fileStructure.getText().toString().equals("Root")) {
|
||||||
|
|
||||||
|
intent.putExtra("singleFileName", fileStructure.getText().toString()+"/"+fileName);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
intent.putExtra("singleFileName", fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
Objects.requireNonNull(getContext()).startActivity(intent);
|
||||||
|
}
|
||||||
|
|
||||||
private void fetchDataAsync(String instanceUrl, String instanceToken, String owner, String repo) {
|
private void fetchDataAsync(String instanceUrl, String instanceToken, String owner, String repo) {
|
||||||
|
|
||||||
|
mRecyclerView.setVisibility(View.GONE);
|
||||||
|
mProgressBar.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
FilesViewModel filesModel = new ViewModelProvider(this).get(FilesViewModel.class);
|
FilesViewModel filesModel = new ViewModelProvider(this).get(FilesViewModel.class);
|
||||||
|
|
||||||
filesModel.getFilesList(instanceUrl, instanceToken, owner, repo).observe(this, new Observer<List<Files>>() {
|
filesModel.getFilesList(instanceUrl, instanceToken, owner, repo).observe(this, new Observer<List<Files>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onChanged(@Nullable List<Files> filesListMain) {
|
public void onChanged(@Nullable List<Files> filesListMain) {
|
||||||
adapter = new FilesAdapter(getContext(), filesListMain);
|
adapter = new FilesAdapter(getContext(), filesListMain, FilesFragment.this);
|
||||||
|
|
||||||
|
mBreadcrumbsView.removeItemAfter(1);
|
||||||
if(adapter.getItemCount() > 0) {
|
if(adapter.getItemCount() > 0) {
|
||||||
|
mRecyclerView.setVisibility(View.VISIBLE);
|
||||||
mRecyclerView.setAdapter(adapter);
|
mRecyclerView.setAdapter(adapter);
|
||||||
filesFrame.setVisibility(View.VISIBLE);
|
filesFrame.setVisibility(View.VISIBLE);
|
||||||
noDataFiles.setVisibility(View.GONE);
|
noDataFiles.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
mRecyclerView.setVisibility(View.VISIBLE);
|
||||||
adapter.notifyDataSetChanged();
|
adapter.notifyDataSetChanged();
|
||||||
mRecyclerView.setAdapter(adapter);
|
mRecyclerView.setAdapter(adapter);
|
||||||
filesFrame.setVisibility(View.VISIBLE);
|
filesFrame.setVisibility(View.VISIBLE);
|
||||||
@ -149,18 +220,23 @@ public class FilesFragment extends Fragment {
|
|||||||
|
|
||||||
private void fetchDataAsyncSub(String instanceUrl, String instanceToken, String owner, String repo, String filesDir) {
|
private void fetchDataAsyncSub(String instanceUrl, String instanceToken, String owner, String repo, String filesDir) {
|
||||||
|
|
||||||
|
mRecyclerView.setVisibility(View.GONE);
|
||||||
|
mProgressBar.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
FilesViewModel filesModel2 = new ViewModelProvider(this).get(FilesViewModel.class);
|
FilesViewModel filesModel2 = new ViewModelProvider(this).get(FilesViewModel.class);
|
||||||
|
|
||||||
filesModel2.getFilesList2(instanceUrl, instanceToken, owner, repo, filesDir).observe(this, new Observer<List<Files>>() {
|
filesModel2.getFilesList2(instanceUrl, instanceToken, owner, repo, filesDir).observe(this, new Observer<List<Files>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onChanged(@Nullable List<Files> filesListMain2) {
|
public void onChanged(@Nullable List<Files> filesListMain2) {
|
||||||
adapter = new FilesAdapter(getContext(), filesListMain2);
|
adapter = new FilesAdapter(getContext(), filesListMain2, FilesFragment.this);
|
||||||
if(adapter.getItemCount() > 0) {
|
if(adapter.getItemCount() > 0) {
|
||||||
|
mRecyclerView.setVisibility(View.VISIBLE);
|
||||||
mRecyclerView.setAdapter(adapter);
|
mRecyclerView.setAdapter(adapter);
|
||||||
filesFrame.setVisibility(View.VISIBLE);
|
filesFrame.setVisibility(View.VISIBLE);
|
||||||
noDataFiles.setVisibility(View.GONE);
|
noDataFiles.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
mRecyclerView.setVisibility(View.VISIBLE);
|
||||||
adapter.notifyDataSetChanged();
|
adapter.notifyDataSetChanged();
|
||||||
mRecyclerView.setAdapter(adapter);
|
mRecyclerView.setAdapter(adapter);
|
||||||
filesFrame.setVisibility(View.VISIBLE);
|
filesFrame.setVisibility(View.VISIBLE);
|
||||||
|
@ -86,12 +86,15 @@ public class FilesViewModel extends ViewModel {
|
|||||||
@Override
|
@Override
|
||||||
public void onResponse(@NonNull Call<List<Files>> call, @NonNull Response<List<Files>> response) {
|
public void onResponse(@NonNull Call<List<Files>> call, @NonNull Response<List<Files>> response) {
|
||||||
|
|
||||||
|
assert response.body() != null;
|
||||||
|
if(response.body().size() > 0) {
|
||||||
Collections.sort(response.body(), new Comparator<Files>() {
|
Collections.sort(response.body(), new Comparator<Files>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare(Files byType1, Files byType2) {
|
public int compare(Files byType1, Files byType2) {
|
||||||
return byType1.getType().compareTo(byType2.getType());
|
return byType1.getType().compareTo(byType2.getType());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (response.isSuccessful()) {
|
if (response.isSuccessful()) {
|
||||||
filesList.postValue(response.body());
|
filesList.postValue(response.body());
|
||||||
|
@ -35,8 +35,11 @@
|
|||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:text="@string/defaultFilename"
|
android:text="@string/defaultFilename"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:maxLines="1"
|
android:ellipsize="none"
|
||||||
android:textSize="20sp" />
|
android:scrollbars="horizontal"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.Toolbar>
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
|
||||||
@ -58,7 +61,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/colorWhite"
|
android:textColor="@color/colorWhite"
|
||||||
android:textSize="16sp"
|
android:textSize="14sp"
|
||||||
android:padding="15dp"
|
android:padding="15dp"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
android:layout_height="28dp"
|
android:layout_height="28dp"
|
||||||
android:layout_marginEnd="15dp"
|
android:layout_marginEnd="15dp"
|
||||||
android:contentDescription="@string/repoContentAvatar"
|
android:contentDescription="@string/repoContentAvatar"
|
||||||
android:src="@drawable/ic_android" />
|
android:src="@drawable/ic_file" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/infoSection"
|
android:id="@+id/infoSection"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".activities.RepoDetailActivity">
|
tools:context=".activities.RepoDetailActivity">
|
||||||
|
|
||||||
@ -16,21 +16,19 @@
|
|||||||
>
|
>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/fileBrowserBreadcrumb"
|
android:id="@+id/fileStructure"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
|
<moe.feng.common.view.breadcrumbs.BreadcrumbsView
|
||||||
|
android:id="@+id/breadcrumbs_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
app:CustomTextSize="16sp"
|
||||||
android:layout_marginTop="20dp"
|
app:SelectedTextColor="@color/colorAccent"
|
||||||
android:layout_marginBottom="10dp"
|
app:UnSelectedTextColor="@color/lightGray"
|
||||||
android:layout_marginStart="15dp"
|
android:text="@string/filesBreadcrumbRoot"/>
|
||||||
android:layout_marginEnd="15dp"
|
|
||||||
android:textColor="@color/lightGray"
|
|
||||||
android:text="@string/filesBreadcrumb" />
|
|
||||||
|
|
||||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
|
||||||
android:id="@+id/pullToRefresh"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recyclerView"
|
android:id="@+id/recyclerView"
|
||||||
@ -38,10 +36,7 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/colorPrimary"
|
android:background="@color/colorPrimary"
|
||||||
android:padding="4dp"
|
android:padding="4dp"
|
||||||
android:scrollbars="vertical"
|
android:scrollbars="vertical" />
|
||||||
/>
|
|
||||||
|
|
||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/noDataFiles"
|
android:id="@+id/noDataFiles"
|
||||||
|
@ -512,5 +512,6 @@
|
|||||||
<string name="unWatchRepository">Unwatch Repository</string>
|
<string name="unWatchRepository">Unwatch Repository</string>
|
||||||
<string name="watchRepositorySuccess">Repository added to watch list</string>
|
<string name="watchRepositorySuccess">Repository added to watch list</string>
|
||||||
<string name="unWatchRepositorySuccess">Repository removed from watch list</string>
|
<string name="unWatchRepositorySuccess">Repository removed from watch list</string>
|
||||||
|
<string name="filesBreadcrumbRoot" translatable="false">Root</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user