New reply/comment UI
This commit is contained in:
parent
a33b470a50
commit
601bc80bc5
|
@ -11,6 +11,8 @@ import android.os.Build;
|
|||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -18,6 +20,8 @@ import android.view.Menu;
|
|||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ScrollView;
|
||||
|
@ -57,7 +61,9 @@ import org.gitnex.tea4j.v2.models.Repository;
|
|||
import org.gitnex.tea4j.v2.models.User;
|
||||
import org.gitnex.tea4j.v2.models.WatchInfo;
|
||||
import org.mian.gitnex.R;
|
||||
import org.mian.gitnex.actions.ActionResult;
|
||||
import org.mian.gitnex.actions.AssigneesActions;
|
||||
import org.mian.gitnex.actions.IssueActions;
|
||||
import org.mian.gitnex.actions.LabelsActions;
|
||||
import org.mian.gitnex.adapters.AssigneesListAdapter;
|
||||
import org.mian.gitnex.adapters.IssueCommentsAdapter;
|
||||
|
@ -82,6 +88,7 @@ import org.mian.gitnex.helpers.LabelWidthCalculator;
|
|||
import org.mian.gitnex.helpers.Markdown;
|
||||
import org.mian.gitnex.helpers.RoundedTransformation;
|
||||
import org.mian.gitnex.helpers.TimeHelper;
|
||||
import org.mian.gitnex.helpers.TinyDB;
|
||||
import org.mian.gitnex.helpers.Toasty;
|
||||
import org.mian.gitnex.helpers.contexts.IssueContext;
|
||||
import org.mian.gitnex.notifications.Notifications;
|
||||
|
@ -105,7 +112,7 @@ public class IssueDetailActivity extends BaseActivity
|
|||
public static boolean commentPosted = false;
|
||||
private final List<Label> labelsList = new ArrayList<>();
|
||||
private final List<User> assigneesList = new ArrayList<>();
|
||||
public boolean commentEdited = false;
|
||||
public static boolean commentEdited = false;
|
||||
private IssueCommentsAdapter adapter;
|
||||
private String repoOwner;
|
||||
private String repoName;
|
||||
|
@ -131,6 +138,13 @@ public class IssueDetailActivity extends BaseActivity
|
|||
private String instanceUrlOnly;
|
||||
private String token;
|
||||
private int page = 1;
|
||||
private TinyDB tinyDB;
|
||||
private Mode mode = Mode.SEND;
|
||||
|
||||
private enum Mode {
|
||||
EDIT,
|
||||
SEND
|
||||
}
|
||||
|
||||
public ActivityResultLauncher<Intent> editIssueLauncher =
|
||||
registerForActivityResult(
|
||||
|
@ -275,10 +289,15 @@ public class IssueDetailActivity extends BaseActivity
|
|||
repoName = issue.getRepository().getName();
|
||||
issueIndex = issue.getIssueIndex();
|
||||
|
||||
tinyDB = TinyDB.getInstance(ctx);
|
||||
|
||||
setSupportActionBar(viewBinding.toolbar);
|
||||
Objects.requireNonNull(getSupportActionBar()).setTitle(repoName);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
InputMethodManager imm =
|
||||
(InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE);
|
||||
|
||||
String instanceUrl = ((BaseActivity) ctx).getAccount().getAccount().getInstanceUrl();
|
||||
instanceUrlOnly = instanceUrl.substring(0, instanceUrl.lastIndexOf("api/v1/"));
|
||||
|
||||
|
@ -293,33 +312,11 @@ public class IssueDetailActivity extends BaseActivity
|
|||
viewBinding.recyclerView.setNestedScrollingEnabled(false);
|
||||
viewBinding.recyclerView.setLayoutManager(new LinearLayoutManager(ctx));
|
||||
|
||||
new Handler()
|
||||
.postDelayed(
|
||||
() -> {
|
||||
if (issue.getIssue() != null) {
|
||||
if (issue.getIssue().isIsLocked() != null) {
|
||||
if (issue.getIssue().isIsLocked()) {
|
||||
if (issue.getRepository().getPermissions() != null
|
||||
&& issue.getRepository().getPermissions().isAdmin()
|
||||
!= null) {
|
||||
if (issue.getRepository().getPermissions().isAdmin()) {
|
||||
viewBinding.send.setAlpha(.9F);
|
||||
// viewBinding.addNewComment.setVisibility(
|
||||
// View.GONE);
|
||||
} else {
|
||||
viewBinding.send.setAlpha(.3F);
|
||||
}
|
||||
} else {
|
||||
viewBinding.send.setAlpha(.3F);
|
||||
}
|
||||
} else {
|
||||
viewBinding.send.setAlpha(.9F);
|
||||
// viewBinding.addNewComment.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
50);
|
||||
float buttonAlphaStatDisabled = .5F;
|
||||
float buttonAlphaStatEnabled = 1F;
|
||||
|
||||
viewBinding.send.setAlpha(buttonAlphaStatDisabled);
|
||||
viewBinding.send.setEnabled(false);
|
||||
|
||||
viewBinding.addNewComment.setOnClickListener(
|
||||
v -> {
|
||||
|
@ -362,6 +359,166 @@ public class IssueDetailActivity extends BaseActivity
|
|||
&& Objects.equals(getIntent().getStringExtra("openPrDiff"), "true")) {
|
||||
startActivity(issue.getIntent(ctx, DiffActivity.class));
|
||||
}
|
||||
|
||||
viewBinding.commentReply.addTextChangedListener(
|
||||
new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence chr, int i, int i1, int i2) {}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence chr, int i, int i1, int i2) {
|
||||
if (chr.length() > 0) {
|
||||
viewBinding.commentReply.requestFocus();
|
||||
getWindow()
|
||||
.setSoftInputMode(
|
||||
WindowManager.LayoutParams
|
||||
.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
viewBinding.commentReply.setSelection(
|
||||
viewBinding.commentReply.length());
|
||||
viewBinding.send.setAlpha(buttonAlphaStatEnabled);
|
||||
viewBinding.send.setEnabled(true);
|
||||
} else {
|
||||
viewBinding.send.setAlpha(buttonAlphaStatDisabled);
|
||||
viewBinding.send.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable editable) {
|
||||
|
||||
if (editable.length() > 0) {
|
||||
new Handler()
|
||||
.postDelayed(
|
||||
() -> {
|
||||
if (issue.getIssue() != null) {
|
||||
if (issue.getIssue().isIsLocked() != null) {
|
||||
if (issue.getIssue().isIsLocked()) {
|
||||
if (issue.getRepository()
|
||||
.getPermissions()
|
||||
!= null
|
||||
&& issue.getRepository()
|
||||
.getPermissions()
|
||||
.isAdmin()
|
||||
!= null) {
|
||||
if (issue.getRepository()
|
||||
.getPermissions()
|
||||
.isAdmin()) {
|
||||
viewBinding.send.setEnabled(
|
||||
true);
|
||||
viewBinding.send.setAlpha(
|
||||
buttonAlphaStatEnabled);
|
||||
} else {
|
||||
viewBinding.send.setAlpha(
|
||||
buttonAlphaStatDisabled);
|
||||
viewBinding.send.setEnabled(
|
||||
false);
|
||||
}
|
||||
} else {
|
||||
viewBinding.send.setAlpha(
|
||||
buttonAlphaStatDisabled);
|
||||
viewBinding.send.setEnabled(false);
|
||||
}
|
||||
} else {
|
||||
viewBinding.send.setEnabled(true);
|
||||
viewBinding.send.setAlpha(
|
||||
buttonAlphaStatEnabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
50);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
viewBinding.send.setOnClickListener(
|
||||
v -> {
|
||||
if (Objects.requireNonNull(tinyDB.getString("commentAction"))
|
||||
.equalsIgnoreCase("edit")) {
|
||||
mode = Mode.EDIT;
|
||||
} else {
|
||||
mode = Mode.SEND;
|
||||
}
|
||||
|
||||
if (mode == Mode.SEND) {
|
||||
|
||||
IssueActions.reply(
|
||||
ctx, viewBinding.commentReply.getText().toString(), issue)
|
||||
.accept(
|
||||
(status, result) -> {
|
||||
if (status == ActionResult.Status.SUCCESS) {
|
||||
|
||||
viewBinding.scrollViewComments.post(
|
||||
() ->
|
||||
issueCommentsModel
|
||||
.loadIssueComments(
|
||||
repoOwner,
|
||||
repoName,
|
||||
issueIndex,
|
||||
ctx,
|
||||
() ->
|
||||
viewBinding
|
||||
.scrollViewComments
|
||||
.fullScroll(
|
||||
ScrollView
|
||||
.FOCUS_DOWN)));
|
||||
|
||||
Toasty.success(
|
||||
ctx, getString(R.string.commentSuccess));
|
||||
|
||||
viewBinding.send.setAlpha(buttonAlphaStatDisabled);
|
||||
viewBinding.send.setEnabled(false);
|
||||
viewBinding.commentReply.setText(null);
|
||||
viewBinding.commentReply.clearFocus();
|
||||
imm.toggleSoftInput(
|
||||
InputMethodManager.HIDE_IMPLICIT_ONLY, 0);
|
||||
} else {
|
||||
|
||||
Toasty.error(ctx, getString(R.string.genericError));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
IssueActions.edit(
|
||||
ctx,
|
||||
viewBinding.commentReply.getText().toString(),
|
||||
tinyDB.getInt("commentId"),
|
||||
issue)
|
||||
.accept(
|
||||
(status, result) -> {
|
||||
if (status == ActionResult.Status.SUCCESS) {
|
||||
|
||||
tinyDB.remove("commentId");
|
||||
tinyDB.remove("commentAction");
|
||||
|
||||
viewBinding.scrollViewComments.post(
|
||||
() ->
|
||||
issueCommentsModel
|
||||
.loadIssueComments(
|
||||
repoOwner,
|
||||
repoName,
|
||||
issueIndex,
|
||||
ctx,
|
||||
null));
|
||||
|
||||
Toasty.success(
|
||||
ctx,
|
||||
getString(R.string.editCommentUpdatedText));
|
||||
|
||||
mode = Mode.SEND;
|
||||
viewBinding.send.setAlpha(buttonAlphaStatDisabled);
|
||||
viewBinding.send.setEnabled(false);
|
||||
viewBinding.commentReply.setText(null);
|
||||
viewBinding.commentReply.clearFocus();
|
||||
imm.toggleSoftInput(
|
||||
InputMethodManager.HIDE_IMPLICIT_ONLY, 0);
|
||||
} else {
|
||||
|
||||
Toasty.error(ctx, getString(R.string.genericError));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -710,6 +867,10 @@ public class IssueDetailActivity extends BaseActivity
|
|||
},
|
||||
500);
|
||||
}
|
||||
|
||||
tinyDB.remove("commentId");
|
||||
tinyDB.remove("commentAction");
|
||||
mode = Mode.SEND;
|
||||
}
|
||||
|
||||
private void fetchDataAsync(String owner, String repo, int index) {
|
||||
|
@ -726,12 +887,7 @@ public class IssueDetailActivity extends BaseActivity
|
|||
|
||||
adapter =
|
||||
new IssueCommentsAdapter(
|
||||
ctx,
|
||||
bundle,
|
||||
issueCommentsMain,
|
||||
getSupportFragmentManager(),
|
||||
this::onResume,
|
||||
issue);
|
||||
ctx, bundle, issueCommentsMain, this::onResume, issue);
|
||||
adapter.setLoadMoreListener(
|
||||
new IssueCommentsAdapter.OnLoadMoreListener() {
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ import android.view.Gravity;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
|
@ -27,7 +28,6 @@ import androidx.annotation.NonNull;
|
|||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.core.text.HtmlCompat;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.amulyakhare.textdrawable.TextDrawable;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
|
@ -52,7 +52,6 @@ import org.mian.gitnex.activities.ProfileActivity;
|
|||
import org.mian.gitnex.clients.PicassoService;
|
||||
import org.mian.gitnex.clients.RetrofitClient;
|
||||
import org.mian.gitnex.databinding.CustomImageViewDialogBinding;
|
||||
import org.mian.gitnex.fragments.BottomSheetReplyFragment;
|
||||
import org.mian.gitnex.fragments.IssuesFragment;
|
||||
import org.mian.gitnex.helpers.AlertDialogs;
|
||||
import org.mian.gitnex.helpers.AppDatabaseSettings;
|
||||
|
@ -79,7 +78,6 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
private final Context context;
|
||||
private final TinyDB tinyDB;
|
||||
private final Bundle bundle;
|
||||
private final FragmentManager fragmentManager;
|
||||
private final Runnable onInteractedListener;
|
||||
private final Locale locale;
|
||||
private final IssueContext issue;
|
||||
|
@ -92,14 +90,12 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
Context ctx,
|
||||
Bundle bundle,
|
||||
List<TimelineComment> issuesCommentsMain,
|
||||
FragmentManager fragmentManager,
|
||||
Runnable onInteractedListener,
|
||||
IssueContext issue) {
|
||||
|
||||
this.context = ctx;
|
||||
this.bundle = bundle;
|
||||
this.issuesComments = issuesCommentsMain;
|
||||
this.fragmentManager = fragmentManager;
|
||||
this.onInteractedListener = onInteractedListener;
|
||||
tinyDB = TinyDB.getInstance(ctx);
|
||||
locale = ctx.getResources().getConfiguration().locale;
|
||||
|
@ -266,11 +262,7 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
|
||||
if (issueComment != null) {
|
||||
new Handler()
|
||||
.postDelayed(
|
||||
() -> {
|
||||
getAttachments(issueComment.getId(), view, token);
|
||||
},
|
||||
250);
|
||||
.postDelayed(() -> getAttachments(issueComment.getId(), view, token), 250);
|
||||
}
|
||||
|
||||
menu.setOnClickListener(
|
||||
|
@ -343,18 +335,14 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
|
||||
commentMenuEdit.setOnClickListener(
|
||||
v1 -> {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt(
|
||||
"commentId", Math.toIntExact(issueComment.getId()));
|
||||
bundle.putString("commentAction", "edit");
|
||||
bundle.putString("commentBody", issueComment.getBody());
|
||||
IssueDetailActivity parentActivity =
|
||||
(IssueDetailActivity) context;
|
||||
EditText text = parentActivity.findViewById(R.id.comment_reply);
|
||||
text.append(issueComment.getBody());
|
||||
|
||||
BottomSheetReplyFragment bottomSheetReplyFragment =
|
||||
BottomSheetReplyFragment.newInstance(bundle, issue);
|
||||
bottomSheetReplyFragment.setOnInteractedListener(
|
||||
onInteractedListener);
|
||||
bottomSheetReplyFragment.show(
|
||||
fragmentManager, "replyBottomSheet");
|
||||
tinyDB.putString("commentAction", "edit");
|
||||
tinyDB.putInt(
|
||||
"commentId", Math.toIntExact(issueComment.getId()));
|
||||
|
||||
dialog.dismiss();
|
||||
});
|
||||
|
@ -402,15 +390,14 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
stringBuilder.append(">").append(line).append("\n");
|
||||
}
|
||||
|
||||
stringBuilder.append("\n");
|
||||
String comment = String.valueOf(stringBuilder.append("\n"));
|
||||
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("commentBody", stringBuilder.toString());
|
||||
bundle.putBoolean("cursorToEnd", true);
|
||||
IssueDetailActivity parentActivity =
|
||||
(IssueDetailActivity) context;
|
||||
EditText text = parentActivity.findViewById(R.id.comment_reply);
|
||||
text.setText(comment);
|
||||
|
||||
dialog.dismiss();
|
||||
BottomSheetReplyFragment.newInstance(bundle, issue)
|
||||
.show(fragmentManager, "replyBottomSheet");
|
||||
});
|
||||
|
||||
commentMenuCopy.setOnClickListener(
|
||||
|
@ -1489,7 +1476,7 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
attachmentView.setLayoutParams(paramsAttachment);
|
||||
materialCardView.addView(attachmentView);
|
||||
|
||||
int finalI = i;
|
||||
// int finalI = i;
|
||||
materialCardView.setOnClickListener(
|
||||
v1 -> {
|
||||
// filesize = attachment.get(finalI).getSize();
|
||||
|
|
|
@ -42,7 +42,7 @@ public class NotesAdapter extends RecyclerView.Adapter<NotesAdapter.NotesViewHol
|
|||
noteIntent = new Intent(ctx, CreateNoteActivity.class);
|
||||
}
|
||||
|
||||
class NotesViewHolder extends RecyclerView.ViewHolder {
|
||||
public class NotesViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
private Notes notes;
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ import org.mian.gitnex.database.api.DraftsApi;
|
|||
import org.mian.gitnex.databinding.BottomSheetReplyLayoutBinding;
|
||||
import org.mian.gitnex.helpers.AppDatabaseSettings;
|
||||
import org.mian.gitnex.helpers.Constants;
|
||||
import org.mian.gitnex.helpers.TinyDB;
|
||||
import org.mian.gitnex.helpers.Toasty;
|
||||
import org.mian.gitnex.helpers.contexts.IssueContext;
|
||||
|
||||
|
@ -43,7 +42,6 @@ import org.mian.gitnex.helpers.contexts.IssueContext;
|
|||
public class BottomSheetReplyFragment extends BottomSheetDialogFragment {
|
||||
|
||||
private Mode mode = Mode.SEND;
|
||||
private TinyDB tinyDB;
|
||||
private DraftsApi draftsApi;
|
||||
private int currentActiveAccountId;
|
||||
private IssueContext issue;
|
||||
|
@ -65,7 +63,6 @@ public class BottomSheetReplyFragment extends BottomSheetDialogFragment {
|
|||
|
||||
super.onAttach(context);
|
||||
|
||||
tinyDB = TinyDB.getInstance(context);
|
||||
draftsApi = BaseApi.getInstance(context, DraftsApi.class);
|
||||
|
||||
currentActiveAccountId =
|
||||
|
@ -103,7 +100,7 @@ public class BottomSheetReplyFragment extends BottomSheetDialogFragment {
|
|||
|
||||
if (arguments.getString("draftId") != null) {
|
||||
|
||||
draftId = Long.parseLong(arguments.getString("draftId"));
|
||||
draftId = Long.parseLong(Objects.requireNonNull(arguments.getString("draftId")));
|
||||
}
|
||||
|
||||
if (issue.getIssue() != null && !issue.getIssue().getTitle().isEmpty()) {
|
||||
|
@ -235,8 +232,7 @@ public class BottomSheetReplyFragment extends BottomSheetDialogFragment {
|
|||
(status, result) -> {
|
||||
FragmentActivity activity = requireActivity();
|
||||
if (activity instanceof IssueDetailActivity) {
|
||||
((IssueDetailActivity) activity).commentEdited =
|
||||
true;
|
||||
IssueDetailActivity.commentEdited = true;
|
||||
}
|
||||
|
||||
if (status == ActionResult.Status.SUCCESS) {
|
||||
|
@ -271,6 +267,7 @@ public class BottomSheetReplyFragment extends BottomSheetDialogFragment {
|
|||
|
||||
private void saveDraft(String text, boolean remove) {
|
||||
|
||||
@SuppressLint("Recycle")
|
||||
ValueAnimator valueAnimator = ValueAnimator.ofFloat(0f, 1f);
|
||||
valueAnimator.setDuration(500);
|
||||
valueAnimator.addUpdateListener(
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</solid>
|
||||
|
||||
<corners
|
||||
android:radius="8dp">
|
||||
android:radius="32dp">
|
||||
</corners>
|
||||
|
||||
<padding
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
android:paddingStart="@dimen/dimen8dp"
|
||||
android:paddingTop="@dimen/dimen2dp"
|
||||
android:paddingEnd="@dimen/dimen8dp"
|
||||
android:paddingBottom="@dimen/dimen96dp">
|
||||
android:paddingBottom="@dimen/dimen104dp">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/titleCard"
|
||||
|
@ -392,30 +392,44 @@
|
|||
android:padding="@dimen/dimen8dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/comment"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/comment_reply"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:autofillHints="@string/commentButtonText"
|
||||
android:background="@drawable/shape_inputs"
|
||||
android:inputType="textMultiLine|textImeMultiLine|textCapSentences"
|
||||
android:labelFor="@+id/comment"
|
||||
android:layout_weight=".90"
|
||||
android:maxLines="3"
|
||||
android:padding="@dimen/dimen8dp"
|
||||
android:scrollbars="vertical"
|
||||
android:labelFor="@+id/comment_reply"
|
||||
android:layout_weight="1"
|
||||
android:maxLines="4"
|
||||
android:paddingStart="@dimen/dimen16dp"
|
||||
android:paddingEnd="@dimen/dimen16dp"
|
||||
android:paddingTop="@dimen/dimen8dp"
|
||||
android:paddingBottom="@dimen/dimen8dp"
|
||||
android:textColor="?attr/inputTextColor"
|
||||
android:layout_marginEnd="@dimen/dimen12dp"
|
||||
android:textSize="@dimen/dimen14sp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/send"
|
||||
android:layout_width="@dimen/dimen32dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
android:layout_marginStart="@dimen/dimen12dp"
|
||||
android:layout_weight=".10"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:contentDescription="@string/close"
|
||||
android:src="@drawable/ic_send" />
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:id="@+id/send_button"
|
||||
android:layout_width="@dimen/dimen40dp"
|
||||
android:layout_height="@dimen/dimen40dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:backgroundTint="?attr/fabColor"
|
||||
app:cardCornerRadius="@dimen/dimen36dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/send"
|
||||
android:layout_width="@dimen/dimen28dp"
|
||||
android:layout_height="@dimen/dimen28dp"
|
||||
android:layout_gravity="center_vertical|center_horizontal"
|
||||
android:contentDescription="@string/generalImgContentText"
|
||||
app:tint="?attr/materialCardBackgroundColor"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/ic_send"
|
||||
android:focusable="true" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
android:layout_marginBottom="8dp"
|
||||
android:hint="@string/title"
|
||||
android:textColorHint="?attr/hintColor"
|
||||
app:boxBackgroundColor="?attr/inputBackgroundColor"
|
||||
app:boxStrokeErrorColor="@color/darkRed"
|
||||
app:hintTextColor="?attr/hintColor">
|
||||
|
||||
|
@ -51,7 +50,6 @@
|
|||
android:layout_marginBottom="8dp"
|
||||
android:hint="@string/sshKey"
|
||||
android:textColorHint="?attr/hintColor"
|
||||
app:boxBackgroundColor="?attr/inputBackgroundColor"
|
||||
app:boxStrokeErrorColor="@color/darkRed"
|
||||
app:hintTextColor="?attr/hintColor">
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
|
||||
<item android:id="@+id/nav_comments_draft"
|
||||
android:icon="@drawable/ic_drafts"
|
||||
android:visible="false"
|
||||
android:title="@string/titleDrafts"/>
|
||||
|
||||
<item android:id="@+id/nav_profile"
|
||||
|
|
Loading…
Reference in New Issue