feat: propagate row clicks to child
This commit is contained in:
@@ -85,6 +85,9 @@ public abstract class AccountRestrictionConfirmationSheet extends BottomSheet{
|
|||||||
}
|
}
|
||||||
|
|
||||||
AutoOrientationLinearLayout layout = new AutoOrientationLinearLayout(getContext());
|
AutoOrientationLinearLayout layout = new AutoOrientationLinearLayout(getContext());
|
||||||
|
// allow complete row to trigger child click listener
|
||||||
|
if(view.hasOnClickListeners())
|
||||||
|
layout.setOnClickListener(v -> view.performClick());
|
||||||
LinearLayout.LayoutParams lp=new LinearLayout.LayoutParams(0,ViewGroup.LayoutParams.WRAP_CONTENT);
|
LinearLayout.LayoutParams lp=new LinearLayout.LayoutParams(0,ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||||
lp.gravity=Gravity.CENTER;
|
lp.gravity=Gravity.CENTER;
|
||||||
lp.weight=1f;
|
lp.weight=1f;
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ public class MuteAccountConfirmationSheet extends AccountRestrictionConfirmation
|
|||||||
m3Switch.setClickable(true);
|
m3Switch.setClickable(true);
|
||||||
m3Switch.setChecked(muteNotifications.get());
|
m3Switch.setChecked(muteNotifications.get());
|
||||||
m3Switch.setOnCheckedChangeListener((compoundButton, b) -> muteNotifications.set(b));
|
m3Switch.setOnCheckedChangeListener((compoundButton, b) -> muteNotifications.set(b));
|
||||||
|
m3Switch.setOnClickListener(view -> muteNotifications.set(m3Switch.isSelected()));
|
||||||
addRow(R.drawable.ic_fluent_alert_off_24_regular, R.string.mo_mute_notifications, m3Switch);
|
addRow(R.drawable.ic_fluent_alert_off_24_regular, R.string.mo_mute_notifications, m3Switch);
|
||||||
|
|
||||||
// add mute duration (Moshidon)
|
// add mute duration (Moshidon)
|
||||||
|
|||||||
Reference in New Issue
Block a user