Added info button

This commit is contained in:
M66B 2021-04-05 12:58:26 +02:00
parent 873ce19f42
commit e040bf2be8
2 changed files with 20 additions and 1 deletions

View File

@ -58,6 +58,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
private ImageView ivChannelDefault;
private Button btnManageService;
private ImageView ivChannelService;
private ImageButton ibWhy;
private SwitchCompat swNewestFirst;
private SwitchCompat swBackground;
@ -129,6 +130,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
ivChannelDefault = view.findViewById(R.id.ivChannelDefault);
btnManageService = view.findViewById(R.id.btnManageService);
ivChannelService = view.findViewById(R.id.ivChannelService);
ibWhy = view.findViewById(R.id.ibWhy);
swNewestFirst = view.findViewById(R.id.swNewestFirst);
swBackground = view.findViewById(R.id.swBackground);
@ -218,6 +220,13 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
ivChannelService.setVisibility(View.GONE);
ibWhy.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.viewFAQ(v.getContext(), 2);
}
});
swNewestFirst.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {

View File

@ -130,6 +130,16 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnManageService" />
<ImageButton
android:id="@+id/ibWhy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/title_info"
android:tooltipText="@string/title_info"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvManageServiceHint"
app:srcCompat="@drawable/twotone_info_24" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swNewestFirst"
android:layout_width="0dp"
@ -138,7 +148,7 @@
android:text="@string/title_advanced_notifications_newest_first"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvManageServiceHint"
app:layout_constraintTop_toBottomOf="@id/ibWhy"
app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat