Replacing bottom sheet item by floating action button. (#360)

Merge branch 'fab-button-issues' of https://gitea.com/opyale/GitNex into fab-button-issues

Merge remote-tracking branch 'remotes/main/master' into fab-button-issues

Merge branch 'master' into fab-button-issues

Adding onScrollListener.

Reply icon

Generalizing padding of floating action button.

Merge branch 'master' into fab-button-issues

Improving proportions.

Replacing bottom sheet item by floating action button and cleaning up code.

Co-authored-by: opyale <example@example.com>
Co-authored-by: anonTree1417 <example@example.com>
Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/360
Reviewed-by: M M Arif <mmarif@swatian.com>
This commit is contained in:
opyale
2020-04-07 20:06:39 +00:00
committed by M M Arif
parent 9bca299107
commit 7387c29077
11 changed files with 71 additions and 48 deletions

View File

@@ -43,7 +43,6 @@ public class BottomSheetSingleIssueFragment extends BottomSheetDialogFragment {
final Context ctx = getContext();
final TinyDB tinyDB = new TinyDB(ctx);
TextView replyToIssue = v.findViewById(R.id.replyToIssue);
TextView editIssue = v.findViewById(R.id.editIssue);
TextView editLabels = v.findViewById(R.id.editLabels);
TextView closeIssue = v.findViewById(R.id.closeIssue);
@@ -56,16 +55,6 @@ public class BottomSheetSingleIssueFragment extends BottomSheetDialogFragment {
TextView subscribeIssue = v.findViewById(R.id.subscribeIssue);
TextView unsubscribeIssue = v.findViewById(R.id.unsubscribeIssue);
replyToIssue.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(ctx, ReplyToIssueActivity.class));
dismiss();
}
});
if(tinyDB.getString("issueType").equals("pr")) {
editIssue.setText(R.string.editPrText);

View File

@@ -100,18 +100,18 @@ public class MyRepositoriesFragment extends Fragment {
mRecyclerView.setHasFixedSize(true);
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mRecyclerView.getContext(),
DividerItemDecoration.VERTICAL);
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mRecyclerView.getContext(), DividerItemDecoration.VERTICAL);
mRecyclerView.addItemDecoration(dividerItemDecoration);
createNewRepo = v.findViewById(R.id.addNewRepo);
createNewRepo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(view.getContext(), CreateRepoActivity.class);
startActivity(intent);
}
});
@@ -119,12 +119,13 @@ public class MyRepositoriesFragment extends Fragment {
mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
if (dy > 0 && createNewRepo.isShown()) {
createNewRepo.setVisibility(View.GONE);
} else if (dy < 0 ) {
} else if (dy < 0) {
createNewRepo.setVisibility(View.VISIBLE);
}
}
@Override