Browse Source

edit post viewholder style changes

pull/61/merge
oogee 6 years ago
parent
commit
f6ca688660
  1. 3
      app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java
  2. 4
      app/src/main/res/layout/activity_topic_edit_row.xml

3
app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java

@ -711,6 +711,7 @@ class TopicAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
holder.editEditor.requestEditTextFocus();
emojiKeyboard.registerEmojiInputField(holder.editEditor);
holder.editEditor.setText(viewModel.getPostBeingEditedText());
holder.editEditor.getEditText().setSelection(holder.editEditor.getText().length());
holder.editEditor.setOnSubmitListener(view -> {
if (holder.editSubject.getText().toString().isEmpty()) return;
if (holder.editEditor.getText().toString().isEmpty()) {
@ -727,7 +728,7 @@ class TopicAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
});
if (backPressHidden) {
holder.editEditor.requestFocus();
holder.editEditor.requestEditTextFocus();
backPressHidden = false;
}
}

4
app/src/main/res/layout/activity_topic_edit_row.xml

@ -80,8 +80,10 @@
android:id="@+id/edit_editorview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="@color/card_background"
card_view:hint="Post message"/>
card_view:hint="Post message" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>
Loading…
Cancel
Save