mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-06-01 19:00:05 +03:00
Increase touch area of reply, menu buttons (Issue #741)
This commit is contained in:
parent
1d5d874415
commit
f7ac237d6c
2 changed files with 31 additions and 24 deletions
|
@ -2227,11 +2227,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
|
|
||||||
// Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate(() -> holder.binding.statusContent.invalidate(), 0, 100, TimeUnit.MILLISECONDS);
|
// Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate(() -> holder.binding.statusContent.invalidate(), 0, 100, TimeUnit.MILLISECONDS);
|
||||||
if (remote) {
|
if (remote) {
|
||||||
holder.binding.actionButtonMore.setVisibility(View.GONE);
|
holder.binding.actionButtonMoreContainer.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
holder.binding.actionButtonMore.setVisibility(View.VISIBLE);
|
holder.binding.actionButtonMoreContainer.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
holder.binding.actionButtonMore.setOnClickListener(v -> {
|
holder.binding.actionButtonMoreContainer.setOnClickListener(v -> {
|
||||||
boolean isOwner = statusToDeal.account.id.compareTo(BaseMainActivity.currentUserID) == 0;
|
boolean isOwner = statusToDeal.account.id.compareTo(BaseMainActivity.currentUserID) == 0;
|
||||||
PopupMenu popup = new PopupMenu(context, holder.binding.actionButtonMore);
|
PopupMenu popup = new PopupMenu(context, holder.binding.actionButtonMore);
|
||||||
popup.getMenuInflater()
|
popup.getMenuInflater()
|
||||||
|
@ -2608,7 +2608,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
popup.show();
|
popup.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
holder.binding.actionButtonReply.setOnLongClickListener(v -> {
|
holder.binding.actionButtonReplyContainer.setOnLongClickListener(v -> {
|
||||||
CrossActionHelper.doCrossAction(context, CrossActionHelper.TypeOfCrossAction.REPLY_ACTION, null, statusToDeal);
|
CrossActionHelper.doCrossAction(context, CrossActionHelper.TypeOfCrossAction.REPLY_ACTION, null, statusToDeal);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
@ -2623,7 +2623,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
holder.binding.actionButtonReply.setOnClickListener(v -> {
|
holder.binding.actionButtonReplyContainer.setOnClickListener(v -> {
|
||||||
if (remote) {
|
if (remote) {
|
||||||
Toasty.info(context, context.getString(R.string.retrieve_remote_status), Toasty.LENGTH_SHORT).show();
|
Toasty.info(context, context.getString(R.string.retrieve_remote_status), Toasty.LENGTH_SHORT).show();
|
||||||
searchVM.search(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, statusToDeal.uri, null, "statuses", false, true, false, 0, null, null, 1)
|
searchVM.search(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, statusToDeal.uri, null, "statuses", false, true, false, 0, null, null, 1)
|
||||||
|
|
|
@ -653,10 +653,13 @@
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false">
|
android:clipToPadding="false">
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<RelativeLayout
|
||||||
android:id="@+id/action_button_reply_container"
|
android:id="@+id/action_button_reply_container"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:contentDescription="@string/reply"
|
||||||
|
android:focusable="true"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
@ -667,26 +670,24 @@
|
||||||
android:id="@+id/action_button_reply"
|
android:id="@+id/action_button_reply"
|
||||||
android:layout_width="28dp"
|
android:layout_width="28dp"
|
||||||
android:layout_height="28dp"
|
android:layout_height="28dp"
|
||||||
android:layout_gravity="center"
|
android:layout_centerInParent="true"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:background="@color/transparent"
|
|
||||||
android:clickable="true"
|
|
||||||
android:contentDescription="@string/reply"
|
|
||||||
android:focusable="true"
|
|
||||||
app:srcCompat="@drawable/ic_round_reply_24" />
|
app:srcCompat="@drawable/ic_round_reply_24" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/reply_count"
|
android:id="@+id/reply_count"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
android:text="+"
|
android:text="+"
|
||||||
android:textColor="?colorControlNormal"
|
android:textColor="?colorControlNormal"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:ignore="HardcodedText"
|
tools:ignore="HardcodedText"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
@ -864,25 +865,31 @@
|
||||||
android:src="@drawable/ic_baseline_add_reaction_24"
|
android:src="@drawable/ic_baseline_add_reaction_24"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/action_button_more"
|
app:layout_constraintEnd_toStartOf="@+id/action_button_more_container"
|
||||||
app:layout_constraintStart_toEndOf="@+id/status_add_custom_emoji"
|
app:layout_constraintStart_toEndOf="@+id/status_add_custom_emoji"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<RelativeLayout
|
||||||
android:id="@+id/action_button_more"
|
android:id="@+id/action_button_more_container"
|
||||||
android:layout_width="28dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="28dp"
|
android:layout_height="48dp"
|
||||||
android:layout_gravity="center|end"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:background="@color/transparent"
|
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:contentDescription="@string/display_options"
|
android:contentDescription="@string/display_options"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
app:srcCompat="@drawable/ic_round_more_horiz_24" />
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/action_button_more"
|
||||||
|
android:layout_width="28dp"
|
||||||
|
android:layout_height="28dp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
app:srcCompat="@drawable/ic_round_more_horiz_24" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue