mirror of
https://github.com/gitnex-org/gitnex.git
synced 2026-07-15 21:25:46 -05:00
Wiki pages listing and other UI fixes
This commit is contained in:
@@ -45,6 +45,7 @@ import org.mian.gitnex.fragments.MilestonesFragment;
|
||||
import org.mian.gitnex.fragments.PullRequestsFragment;
|
||||
import org.mian.gitnex.fragments.ReleasesFragment;
|
||||
import org.mian.gitnex.fragments.RepoInfoFragment;
|
||||
import org.mian.gitnex.fragments.WikiFragment;
|
||||
import org.mian.gitnex.helpers.AppUtil;
|
||||
import org.mian.gitnex.helpers.Toasty;
|
||||
import org.mian.gitnex.helpers.contexts.RepositoryContext;
|
||||
@@ -498,14 +499,14 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetListe
|
||||
break;
|
||||
case 4: // Releases
|
||||
return ReleasesFragment.newInstance(repository);
|
||||
case 5: // Milestones
|
||||
case 5: // Wiki
|
||||
return WikiFragment.newInstance(repository);
|
||||
case 6: // Milestones
|
||||
fragment = MilestonesFragment.newInstance(repository);
|
||||
break;
|
||||
case 6: // Labels
|
||||
case 7: // Labels
|
||||
return LabelsFragment.newInstance(repository);
|
||||
case 7: // Collaborators
|
||||
return CollaboratorsFragment.newInstance(repository);
|
||||
case 8: // Wiki
|
||||
case 8: // Collaborators
|
||||
return CollaboratorsFragment.newInstance(repository);
|
||||
}
|
||||
assert fragment != null;
|
||||
@@ -575,17 +576,12 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetListe
|
||||
|
||||
viewPager.setAdapter(new ViewPagerAdapter(this));
|
||||
|
||||
String[] tabTitles = {ctx.getResources().getString(R.string.tabTextInfo), ctx.getResources().getString(R.string.tabTextFiles), ctx.getResources().getString(R.string.pageTitleIssues), ctx.getResources().getString(R.string.tabPullRequests), ctx.getResources().getString(R.string.tabTextReleases), ctx.getResources().getString(R.string.tabTextMl), ctx.getResources().getString(R.string.newIssueLabelsTitle), ctx.getResources().getString(R.string.tabTextCollaborators), ctx.getResources().getString(R.string.wiki)};
|
||||
String[] tabTitles = {ctx.getResources().getString(R.string.tabTextInfo), ctx.getResources().getString(R.string.tabTextFiles), ctx.getResources().getString(R.string.pageTitleIssues), ctx.getResources().getString(R.string.tabPullRequests), ctx.getResources().getString(R.string.tabTextReleases), ctx.getResources().getString(R.string.wiki), ctx.getResources().getString(R.string.tabTextMl), ctx.getResources().getString(R.string.newIssueLabelsTitle), ctx.getResources().getString(R.string.tabTextCollaborators)};
|
||||
new TabLayoutMediator(tabLayout, viewPager, (tab, position) -> tab.setText(tabTitles[position])).attach();
|
||||
|
||||
ViewGroup viewGroup = (ViewGroup) tabLayout.getChildAt(0);
|
||||
int tabsCount = viewGroup.getChildCount();
|
||||
|
||||
if(getAccount().requiresVersionLess("1.16")) {
|
||||
tabsCount = tabsCount - 1;
|
||||
Objects.requireNonNull(tabLayout.getTabAt(8)).view.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
for(int j = 0; j < tabsCount; j++) {
|
||||
|
||||
ViewGroup vgTab = (ViewGroup) viewGroup.getChildAt(j);
|
||||
|
||||
132
app/src/main/java/org/mian/gitnex/adapters/WikiListAdapter.java
Normal file
132
app/src/main/java/org/mian/gitnex/adapters/WikiListAdapter.java
Normal file
@@ -0,0 +1,132 @@
|
||||
package org.mian.gitnex.adapters;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Typeface;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.text.HtmlCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.amulyakhare.textdrawable.TextDrawable;
|
||||
import com.amulyakhare.textdrawable.util.ColorGenerator;
|
||||
import org.gitnex.tea4j.v2.models.WikiPageMetaData;
|
||||
import org.mian.gitnex.R;
|
||||
import org.mian.gitnex.helpers.ClickListener;
|
||||
import org.mian.gitnex.helpers.TimeHelper;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author M M Arif
|
||||
*/
|
||||
|
||||
public class WikiListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
|
||||
private final Context ctx;
|
||||
private List<WikiPageMetaData> wikiList;
|
||||
private OnLoadMoreListener loadMoreListener;
|
||||
private boolean isLoading = false, isMoreDataAvailable = true;
|
||||
|
||||
public WikiListAdapter(List<WikiPageMetaData> wikiListMain, Context ctx) {
|
||||
this.ctx = ctx;
|
||||
this.wikiList = wikiListMain;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
LayoutInflater inflater = LayoutInflater.from(ctx);
|
||||
return new WikiListAdapter.WikisHolder(inflater.inflate(R.layout.list_wiki, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
if(position >= getItemCount() - 1 && isMoreDataAvailable && !isLoading && loadMoreListener != null) {
|
||||
isLoading = true;
|
||||
loadMoreListener.onLoadMore();
|
||||
}
|
||||
|
||||
((WikiListAdapter.WikisHolder) holder).bindData(wikiList.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return wikiList.size();
|
||||
}
|
||||
|
||||
class WikisHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
private WikiPageMetaData wikiPageMeta;
|
||||
|
||||
private final ImageView avatar;
|
||||
private final TextView pageName;
|
||||
private final TextView wikiLastUpdatedBy;
|
||||
|
||||
WikisHolder(View itemView) {
|
||||
|
||||
super(itemView);
|
||||
pageName = itemView.findViewById(R.id.page_name);
|
||||
avatar = itemView.findViewById(R.id.image_avatar);
|
||||
wikiLastUpdatedBy = itemView.findViewById(R.id.wiki_last_updated_by);
|
||||
|
||||
itemView.setOnClickListener(v -> {
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
void bindData(WikiPageMetaData wikiPageMetaData) {
|
||||
|
||||
this.wikiPageMeta = wikiPageMetaData;
|
||||
|
||||
pageName.setText(wikiPageMetaData.getTitle());
|
||||
wikiLastUpdatedBy.setText(
|
||||
HtmlCompat.fromHtml(ctx.getResources().getString(R.string.wikiAuthor, wikiPageMetaData.getLastCommit().getAuthor().getName(),
|
||||
TimeHelper.formatTime(TimeHelper.parseIso8601(wikiPageMetaData.getLastCommit().getAuthor().getDate()), ctx.getResources().getConfiguration().locale, "pretty",
|
||||
ctx)), HtmlCompat.FROM_HTML_MODE_COMPACT));
|
||||
this.wikiLastUpdatedBy.setOnClickListener(new ClickListener(TimeHelper.customDateFormatForToastDateFormat(TimeHelper.parseIso8601(wikiPageMetaData.getLastCommit().getAuthor().getDate())), ctx));
|
||||
|
||||
ColorGenerator generator = ColorGenerator.Companion.getMATERIAL();
|
||||
int color = generator.getColor(wikiPageMetaData.getTitle());
|
||||
String firstCharacter = String.valueOf(wikiPageMetaData.getTitle().charAt(0));
|
||||
|
||||
TextDrawable drawable = TextDrawable.builder().beginConfig().useFont(Typeface.DEFAULT).fontSize(18).toUpperCase().width(28).height(28).endConfig().buildRoundRect(firstCharacter, color, 3);
|
||||
avatar.setImageDrawable(drawable);
|
||||
}
|
||||
}
|
||||
|
||||
public void setMoreDataAvailable(boolean moreDataAvailable) {
|
||||
isMoreDataAvailable = moreDataAvailable;
|
||||
if(!isMoreDataAvailable) {
|
||||
loadMoreListener.onLoadFinished();
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
public void notifyDataChanged() {
|
||||
notifyDataSetChanged();
|
||||
isLoading = false;
|
||||
loadMoreListener.onLoadFinished();
|
||||
}
|
||||
|
||||
public interface OnLoadMoreListener {
|
||||
void onLoadMore();
|
||||
void onLoadFinished();
|
||||
}
|
||||
|
||||
public void setLoadMoreListener(OnLoadMoreListener loadMoreListener) {
|
||||
this.loadMoreListener = loadMoreListener;
|
||||
}
|
||||
|
||||
public void updateList(List<WikiPageMetaData> list) {
|
||||
wikiList = list;
|
||||
notifyDataChanged();
|
||||
}
|
||||
}
|
||||
@@ -10,12 +10,14 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||
import org.mian.gitnex.actions.RepositoryActions;
|
||||
import org.mian.gitnex.activities.BaseActivity;
|
||||
import org.mian.gitnex.databinding.BottomSheetRepoBinding;
|
||||
import org.mian.gitnex.helpers.contexts.AccountContext;
|
||||
import org.mian.gitnex.helpers.contexts.RepositoryContext;
|
||||
import org.mian.gitnex.structs.BottomSheetListener;
|
||||
|
||||
/**
|
||||
* Author M M Arif
|
||||
* @author M M Arif
|
||||
*/
|
||||
|
||||
public class BottomSheetRepoFragment extends BottomSheetDialogFragment {
|
||||
@@ -33,6 +35,8 @@ public class BottomSheetRepoFragment extends BottomSheetDialogFragment {
|
||||
|
||||
BottomSheetRepoBinding bottomSheetRepoBinding = BottomSheetRepoBinding.inflate(inflater, container, false);
|
||||
|
||||
AccountContext account = ((BaseActivity) requireActivity()).getAccount();
|
||||
|
||||
TextView createLabel = bottomSheetRepoBinding.createLabel;
|
||||
TextView createIssue = bottomSheetRepoBinding.createNewIssue;
|
||||
TextView createMilestone = bottomSheetRepoBinding.createNewMilestone;
|
||||
@@ -48,6 +52,7 @@ public class BottomSheetRepoFragment extends BottomSheetDialogFragment {
|
||||
TextView copyRepoUrl = bottomSheetRepoBinding.copyRepoUrl;
|
||||
TextView repoSettings = bottomSheetRepoBinding.repoSettings;
|
||||
TextView createPullRequest = bottomSheetRepoBinding.createPullRequest;
|
||||
TextView createWiki = bottomSheetRepoBinding.createWiki;
|
||||
|
||||
boolean canPush = repository.getPermissions().isPush();
|
||||
if(!canPush) {
|
||||
@@ -57,6 +62,10 @@ public class BottomSheetRepoFragment extends BottomSheetDialogFragment {
|
||||
newFile.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if(account.requiresVersionLess("1.16")) {
|
||||
createWiki.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
boolean archived = repository.getRepository().isArchived();
|
||||
if(archived) {
|
||||
createIssue.setVisibility(View.GONE);
|
||||
@@ -65,6 +74,7 @@ public class BottomSheetRepoFragment extends BottomSheetDialogFragment {
|
||||
createLabel.setVisibility(View.GONE);
|
||||
createRelease.setVisibility(View.GONE);
|
||||
newFile.setVisibility(View.GONE);
|
||||
createWiki.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
createLabel.setOnClickListener(v112 -> {
|
||||
@@ -120,11 +130,18 @@ public class BottomSheetRepoFragment extends BottomSheetDialogFragment {
|
||||
bmListener.onButtonClicked("addCollaborator");
|
||||
dismiss();
|
||||
});
|
||||
|
||||
createWiki.setOnClickListener(v1 -> {
|
||||
|
||||
bmListener.onButtonClicked("createWiki");
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
||||
addCollaborator.setVisibility(View.GONE);
|
||||
repoSettings.setVisibility(View.GONE);
|
||||
createWiki.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
createRelease.setOnClickListener(v14 -> {
|
||||
|
||||
112
app/src/main/java/org/mian/gitnex/fragments/WikiFragment.java
Normal file
112
app/src/main/java/org/mian/gitnex/fragments/WikiFragment.java
Normal file
@@ -0,0 +1,112 @@
|
||||
package org.mian.gitnex.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import org.mian.gitnex.R;
|
||||
import org.mian.gitnex.adapters.WikiListAdapter;
|
||||
import org.mian.gitnex.databinding.FragmentWikiBinding;
|
||||
import org.mian.gitnex.helpers.Constants;
|
||||
import org.mian.gitnex.helpers.DividerItemDecorator;
|
||||
import org.mian.gitnex.helpers.contexts.RepositoryContext;
|
||||
import org.mian.gitnex.viewmodels.WikiViewModel;
|
||||
|
||||
/**
|
||||
* @author M M Arif
|
||||
*/
|
||||
|
||||
public class WikiFragment extends Fragment {
|
||||
|
||||
private WikiViewModel wikiViewModel;
|
||||
private FragmentWikiBinding fragmentWikiBinding;
|
||||
private WikiListAdapter adapter;
|
||||
private int page = 1;
|
||||
private int resultLimit;
|
||||
private RepositoryContext repository;
|
||||
|
||||
public static WikiFragment newInstance(RepositoryContext repository) {
|
||||
WikiFragment fragment = new WikiFragment();
|
||||
fragment.setArguments(repository.getBundle());
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
repository = RepositoryContext.fromBundle(requireArguments());
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
|
||||
fragmentWikiBinding = FragmentWikiBinding.inflate(inflater, container, false);
|
||||
setHasOptionsMenu(true);
|
||||
|
||||
wikiViewModel = new ViewModelProvider(this).get(WikiViewModel.class);
|
||||
|
||||
resultLimit = Constants.getCurrentResultLimit(getContext());
|
||||
|
||||
fragmentWikiBinding.recyclerView.setHasFixedSize(true);
|
||||
fragmentWikiBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
|
||||
RecyclerView.ItemDecoration dividerItemDecoration = new DividerItemDecorator(ContextCompat.getDrawable(requireContext(), R.drawable.shape_list_divider));
|
||||
fragmentWikiBinding.recyclerView.addItemDecoration(dividerItemDecoration);
|
||||
|
||||
fragmentWikiBinding.pullToRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
|
||||
page = 1;
|
||||
fragmentWikiBinding.pullToRefresh.setRefreshing(false);
|
||||
fetchDataAsync(repository.getOwner(), repository.getName());
|
||||
fragmentWikiBinding.progressBar.setVisibility(View.VISIBLE);
|
||||
}, 50));
|
||||
|
||||
fetchDataAsync(repository.getOwner(), repository.getName());
|
||||
|
||||
return fragmentWikiBinding.getRoot();
|
||||
};
|
||||
|
||||
private void fetchDataAsync(String owner, String repo) {
|
||||
|
||||
wikiViewModel.getWiki(owner, repo, page, resultLimit, getContext(), fragmentWikiBinding).observe(getViewLifecycleOwner(), wikiListMain -> {
|
||||
|
||||
adapter = new WikiListAdapter(wikiListMain, getContext());
|
||||
adapter.setLoadMoreListener(new WikiListAdapter.OnLoadMoreListener() {
|
||||
|
||||
@Override
|
||||
public void onLoadMore() {
|
||||
|
||||
page += 1;
|
||||
wikiViewModel.loadMoreWiki(repository.getOwner(), repository.getName(), page, resultLimit, getContext(), fragmentWikiBinding, adapter);
|
||||
fragmentWikiBinding.progressBar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFinished() {
|
||||
|
||||
fragmentWikiBinding.progressBar.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
|
||||
if(adapter.getItemCount() > 0) {
|
||||
fragmentWikiBinding.recyclerView.setAdapter(adapter);
|
||||
fragmentWikiBinding.noData.setVisibility(View.GONE);
|
||||
}
|
||||
else {
|
||||
adapter.notifyDataChanged();
|
||||
fragmentWikiBinding.recyclerView.setAdapter(adapter);
|
||||
fragmentWikiBinding.noData.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
fragmentWikiBinding.progressBar.setVisibility(View.GONE);
|
||||
});
|
||||
}
|
||||
}
|
||||
117
app/src/main/java/org/mian/gitnex/viewmodels/WikiViewModel.java
Normal file
117
app/src/main/java/org/mian/gitnex/viewmodels/WikiViewModel.java
Normal file
@@ -0,0 +1,117 @@
|
||||
package org.mian.gitnex.viewmodels;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
import org.gitnex.tea4j.v2.models.WikiPageMetaData;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.mian.gitnex.R;
|
||||
import org.mian.gitnex.adapters.WikiListAdapter;
|
||||
import org.mian.gitnex.clients.RetrofitClient;
|
||||
import org.mian.gitnex.databinding.FragmentWikiBinding;
|
||||
import org.mian.gitnex.helpers.Toasty;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.Response;
|
||||
|
||||
/**
|
||||
* @author M M Arif
|
||||
*/
|
||||
|
||||
public class WikiViewModel extends ViewModel {
|
||||
|
||||
private MutableLiveData<List<WikiPageMetaData>> wikiList;
|
||||
|
||||
public LiveData<List<WikiPageMetaData>> getWiki(String owner, String repo, int page, int resultLimit, Context ctx, FragmentWikiBinding fragmentWikiBinding) {
|
||||
|
||||
wikiList = new MutableLiveData<>();
|
||||
loadWikiList(owner, repo, page, resultLimit, ctx, fragmentWikiBinding);
|
||||
|
||||
return wikiList;
|
||||
}
|
||||
|
||||
public void loadWikiList(String owner, String repo, int page, int resultLimit, Context ctx, FragmentWikiBinding fragmentWikiBinding) {
|
||||
|
||||
Call<List<WikiPageMetaData>> call;
|
||||
call = RetrofitClient.getApiInterface(ctx).repoGetWikiPages(owner, repo, page, resultLimit);
|
||||
|
||||
call.enqueue(new Callback<>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(@NonNull Call<List<WikiPageMetaData>> call, @NonNull Response<List<WikiPageMetaData>> response) {
|
||||
|
||||
if(response.isSuccessful()) {
|
||||
if(response.code() == 200) {
|
||||
wikiList.postValue(response.body());
|
||||
}
|
||||
}
|
||||
else if(response.code() == 404) {
|
||||
fragmentWikiBinding.progressBar.setVisibility(View.GONE);
|
||||
fragmentWikiBinding.noData.setVisibility(View.VISIBLE);
|
||||
fragmentWikiBinding.recyclerView.setVisibility(View.GONE);
|
||||
}
|
||||
else {
|
||||
Toasty.error(ctx, ctx.getString(R.string.genericError));
|
||||
}
|
||||
|
||||
try {
|
||||
if(response.errorBody() != null) {
|
||||
new JSONObject(response.errorBody().string());
|
||||
}
|
||||
}
|
||||
catch(IOException | JSONException e) {
|
||||
fragmentWikiBinding.noData.setText(ctx.getResources().getString(R.string.apiNotFound));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(@NonNull Call<List<WikiPageMetaData>> call, @NonNull Throwable t) {
|
||||
|
||||
Toasty.error(ctx, ctx.getString(R.string.genericServerResponseError));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void loadMoreWiki(String owner, String repo, int page, int resultLimit, Context ctx, FragmentWikiBinding fragmentWikiBinding, WikiListAdapter adapter) {
|
||||
|
||||
Call<List<WikiPageMetaData>> call;
|
||||
call = RetrofitClient.getApiInterface(ctx).repoGetWikiPages(owner, repo, page, resultLimit);
|
||||
|
||||
call.enqueue(new Callback<>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(@NonNull Call<List<WikiPageMetaData>> call, @NonNull Response<List<WikiPageMetaData>> response) {
|
||||
|
||||
if(response.isSuccessful()) {
|
||||
List<WikiPageMetaData> list = wikiList.getValue();
|
||||
assert list != null;
|
||||
assert response.body() != null;
|
||||
|
||||
if(response.body().size() != 0) {
|
||||
list.addAll(response.body());
|
||||
adapter.updateList(list);
|
||||
}
|
||||
else {
|
||||
adapter.setMoreDataAvailable(false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Toasty.error(ctx, ctx.getString(R.string.genericError));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(@NonNull Call<List<WikiPageMetaData>> call, @NonNull Throwable t) {
|
||||
|
||||
Toasty.error(ctx, ctx.getString(R.string.genericServerResponseError));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/createNewUser"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/deleteAllDrafts"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/editFile"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -62,7 +62,7 @@
|
||||
android:id="@+id/deleteFile"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -75,7 +75,7 @@
|
||||
android:id="@+id/downloadFile"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
android:id="@+id/commentMenuEdit"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -77,7 +77,7 @@
|
||||
android:id="@+id/commentMenuDelete"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -90,7 +90,7 @@
|
||||
android:id="@+id/commentMenuQuote"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -103,7 +103,7 @@
|
||||
android:id="@+id/commentMenuCopy"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -134,7 +134,7 @@
|
||||
android:id="@+id/issueCommentCopyUrl"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -147,7 +147,7 @@
|
||||
android:id="@+id/issueCommentShare"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -160,7 +160,7 @@
|
||||
android:id="@+id/open"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/filterByMilestone"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -62,7 +62,7 @@
|
||||
android:id="@+id/openIssues"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -75,7 +75,7 @@
|
||||
android:id="@+id/closedIssues"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/labelMenuEdit"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -62,7 +62,7 @@
|
||||
android:id="@+id/labelMenuDelete"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/openMilestone"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -62,7 +62,7 @@
|
||||
android:id="@+id/closedMilestone"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/closeMilestone"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -62,7 +62,7 @@
|
||||
android:id="@+id/openMilestone"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/openMyIssues"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -62,7 +62,7 @@
|
||||
android:id="@+id/closedMyIssues"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
@@ -75,7 +75,7 @@
|
||||
android:id="@+id/assignedToMe"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
android:id="@+id/markPinned"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -61,7 +61,7 @@
|
||||
android:id="@+id/markRead"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -74,7 +74,7 @@
|
||||
android:id="@+id/markUnread"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/unreadNotifications"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -62,7 +62,7 @@
|
||||
android:id="@+id/readNotifications"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/createRepository"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -62,7 +62,7 @@
|
||||
android:id="@+id/createTeam"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
@@ -75,7 +75,7 @@
|
||||
android:id="@+id/createLabel"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/addRepo"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -62,7 +62,7 @@
|
||||
android:id="@+id/addNewMember"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/addNewEmailAddress"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/openPr"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -62,7 +62,7 @@
|
||||
android:id="@+id/closedPr"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/deleteRelease"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/releases"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -62,7 +62,7 @@
|
||||
android:id="@+id/tags"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/newFile"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -62,7 +62,7 @@
|
||||
android:id="@+id/createNewIssue"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
@@ -75,7 +75,7 @@
|
||||
android:id="@+id/createLabel"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
@@ -88,7 +88,7 @@
|
||||
android:id="@+id/createNewMilestone"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
@@ -101,7 +101,7 @@
|
||||
android:id="@+id/createRelease"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
@@ -114,7 +114,7 @@
|
||||
android:id="@+id/createPullRequest"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
@@ -127,7 +127,7 @@
|
||||
android:id="@+id/addCollaborator"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
@@ -140,7 +140,7 @@
|
||||
android:id="@+id/create_wiki"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
@@ -189,7 +189,7 @@
|
||||
android:id="@+id/starRepository"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
@@ -202,7 +202,7 @@
|
||||
android:id="@+id/unStarRepository"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
@@ -215,7 +215,7 @@
|
||||
android:id="@+id/watchRepository"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
@@ -228,7 +228,7 @@
|
||||
android:id="@+id/unWatchRepository"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
@@ -241,7 +241,7 @@
|
||||
android:id="@+id/copyRepoUrl"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
@@ -254,7 +254,7 @@
|
||||
android:id="@+id/shareRepository"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
@@ -267,7 +267,7 @@
|
||||
android:id="@+id/openWebRepo"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
@@ -280,7 +280,7 @@
|
||||
android:id="@+id/repoSettings"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_alignSelf="flex_start"
|
||||
android:gravity="center"
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
android:id="@+id/openFilesDiff"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -78,7 +78,7 @@
|
||||
android:id="@+id/mergePullRequest"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -92,7 +92,7 @@
|
||||
android:id="@+id/updatePullRequest"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -106,7 +106,7 @@
|
||||
android:id="@+id/deletePrHeadBranch"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -119,7 +119,7 @@
|
||||
android:id="@+id/editIssue"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -132,7 +132,7 @@
|
||||
android:id="@+id/addRemoveAssignees"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -145,7 +145,7 @@
|
||||
android:id="@+id/editLabels"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -158,7 +158,7 @@
|
||||
android:id="@+id/subscribeIssue"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -171,7 +171,7 @@
|
||||
android:id="@+id/unsubscribeIssue"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -185,7 +185,7 @@
|
||||
android:id="@+id/closeIssue"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -216,7 +216,7 @@
|
||||
android:id="@+id/copyIssueUrl"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -229,7 +229,7 @@
|
||||
android:id="@+id/shareIssue"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -242,7 +242,7 @@
|
||||
android:id="@+id/open"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/tagMenuDelete"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:id="@+id/followUser"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
@@ -62,7 +62,7 @@
|
||||
android:id="@+id/unfollowUser"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="100dp"
|
||||
android:padding="8dp"
|
||||
android:padding="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
app:layout_alignSelf="flex_start"
|
||||
|
||||
42
app/src/main/res/layout/fragment_wiki.xml
Normal file
42
app/src/main/res/layout/fragment_wiki.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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/pull_to_refresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:scrollbars="vertical" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progress_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
||||
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_data"
|
||||
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="18sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
84
app/src/main/res/layout/list_wiki.xml
Normal file
84
app/src/main/res/layout/list_wiki.xml
Normal file
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/wiki_info_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
tools:ignore="UseCompoundDrawables">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_avatar"
|
||||
android:layout_width="@dimen/list_avatar_size"
|
||||
android:layout_height="@dimen/list_avatar_size"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:contentDescription="@string/wiki"
|
||||
android:src="@drawable/ic_android" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/page_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="16sp"
|
||||
android:text="@string/wiki" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/spacerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/wiki_detail_info_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/wiki_last_updated_by"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/hintColor"
|
||||
android:textSize="13sp"
|
||||
android:text="@string/wikiAuthor" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/wiki_menu_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:gravity="center_vertical|end"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/wiki_menu"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:contentDescription="@string/generalImgContentText"
|
||||
app:srcCompat="@drawable/ic_dotted_menu_horizontal"
|
||||
app:tint="?attr/iconsColor" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -769,4 +769,5 @@
|
||||
|
||||
<!-- wiki -->
|
||||
<string name="wiki">Wiki</string>
|
||||
<string name="wikiAuthor"><![CDATA[<b>%1$s</b> updated %2$s]]></string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user