Browse Source

hide inbox FAB and quote and delete PM overflow menu actions

pms
Thodoris Tyrovouzis 5 years ago
parent
commit
17f94657d8
  1. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/inbox/InboxAdapter.java
  2. 2
      app/src/main/res/layout/activity_inbox.xml

2
app/src/main/java/gr/thmmy/mthmmy/activities/inbox/InboxAdapter.java

@ -224,6 +224,7 @@ public class InboxAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
popUp.setFocusable(true); popUp.setFocusable(true);
TextView quoteButton = popupContent.findViewById(R.id.pm_quote_button); TextView quoteButton = popupContent.findViewById(R.id.pm_quote_button);
quoteButton.setVisibility(View.GONE); // TODO
Drawable quoteDrawable = AppCompatResources.getDrawable(context, R.drawable.ic_format_quote); Drawable quoteDrawable = AppCompatResources.getDrawable(context, R.drawable.ic_format_quote);
quoteButton.setCompoundDrawablesRelativeWithIntrinsicBounds(quoteDrawable, null, null, null); quoteButton.setCompoundDrawablesRelativeWithIntrinsicBounds(quoteDrawable, null, null, null);
quoteButton.setOnClickListener(v -> { quoteButton.setOnClickListener(v -> {
@ -245,6 +246,7 @@ public class InboxAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
TextView deletePostButton = popupContent.findViewById(R.id.delete_post); TextView deletePostButton = popupContent.findViewById(R.id.delete_post);
Drawable deleteStartDrawable = AppCompatResources.getDrawable(context, R.drawable.ic_delete_white_24dp); Drawable deleteStartDrawable = AppCompatResources.getDrawable(context, R.drawable.ic_delete_white_24dp);
deletePostButton.setVisibility(View.GONE); //TODO
deletePostButton.setCompoundDrawablesRelativeWithIntrinsicBounds(deleteStartDrawable, null, null, null); deletePostButton.setCompoundDrawablesRelativeWithIntrinsicBounds(deleteStartDrawable, null, null, null);
popupContent.findViewById(R.id.delete_post).setOnClickListener(v -> { popupContent.findViewById(R.id.delete_post).setOnClickListener(v -> {
new AlertDialog.Builder(holder.overflowButton.getContext()) new AlertDialog.Builder(holder.overflowButton.getContext())

2
app/src/main/res/layout/activity_inbox.xml

@ -57,6 +57,7 @@
app:elevation="8dp" app:elevation="8dp"
app:layout_behavior="gr.thmmy.mthmmy.utils.ScrollAwareLinearBehavior"/> app:layout_behavior="gr.thmmy.mthmmy.utils.ScrollAwareLinearBehavior"/>
<!--
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/send_pm_fab" android:id="@+id/send_pm_fab"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -66,4 +67,5 @@
android:layout_marginEnd="@dimen/fab_margins" android:layout_marginEnd="@dimen/fab_margins"
app:layout_behavior="gr.thmmy.mthmmy.utils.ScrollAwareFABBehavior" app:layout_behavior="gr.thmmy.mthmmy.utils.ScrollAwareFABBehavior"
app:srcCompat="@drawable/ic_message_white_24dp" /> app:srcCompat="@drawable/ic_message_white_24dp" />
-->
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
Loading…
Cancel
Save