Added wearable info button

This commit is contained in:
M66B 2020-11-11 17:26:49 +01:00
parent 53e5753165
commit 2cbbece8a4
3 changed files with 36 additions and 1 deletions

View File

@ -39,6 +39,7 @@ import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
@ -87,6 +88,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
private SwitchCompat swNotifyPreviewAll;
private SwitchCompat swNotifyPreviewOnly;
private SwitchCompat swWearablePreview;
private ImageButton ibWearable;
private SwitchCompat swMessagingStyle;
private SwitchCompat swBiometricsNotify;
private SwitchCompat swAlertOnce;
@ -155,6 +157,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
swNotifyPreviewAll = view.findViewById(R.id.swNotifyPreviewAll);
swNotifyPreviewOnly = view.findViewById(R.id.swNotifyPreviewOnly);
swWearablePreview = view.findViewById(R.id.swWearablePreview);
ibWearable = view.findViewById(R.id.ibWearable);
swMessagingStyle = view.findViewById(R.id.swMessagingStyle);
swBiometricsNotify = view.findViewById(R.id.swBiometricsNotify);
swAlertOnce = view.findViewById(R.id.swAlertOnce);
@ -403,6 +406,13 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
}
});
ibWearable.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.viewFAQ(v.getContext(), 126);
}
});
swMessagingStyle.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {

View File

@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M14.72,4.48L14.31,2H9.7l-0.41,2.47C10.13,4.17 11.05,4 12,4c0.96,0 1.87,0.17 2.72,0.48zM9.29,19.53L9.7,22h4.61l0.41,-2.48c-0.85,0.31 -1.76,0.48 -2.72,0.48 -0.95,0 -1.87,-0.17 -2.71,-0.47z"
android:strokeAlpha="0.3"
android:fillAlpha="0.3"/>
<path
android:fillColor="@android:color/white"
android:pathData="M16.96,5.73L16,0L8,0l-0.95,5.73C5.19,7.19 4,9.45 4,12s1.19,4.81 3.05,6.27L8,24h8l0.96,-5.73C18.81,16.81 20,14.54 20,12s-1.19,-4.81 -3.04,-6.27zM9.7,2h4.61l0.41,2.48C13.87,4.17 12.96,4 12,4c-0.95,0 -1.87,0.17 -2.71,0.47L9.7,2zM14.31,22L9.7,22l-0.41,-2.47c0.84,0.3 1.76,0.47 2.71,0.47 0.96,0 1.87,-0.17 2.72,-0.48L14.31,22zM12,18c-3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6 6,2.69 6,6 -2.69,6 -6,6z"/>
</vector>

View File

@ -534,6 +534,16 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swWearablePreview" />
<ImageButton
android:id="@+id/ibWearable"
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/tvWearablePreviewHint"
app:srcCompat="@drawable/twotone_watch_24" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swMessagingStyle"
android:layout_width="0dp"
@ -542,7 +552,7 @@
android:text="@string/title_advanced_notify_messaging"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvWearablePreviewHint"
app:layout_constraintTop_toBottomOf="@id/ibWearable"
app:switchPadding="12dp" />
<eu.faircode.email.FixedTextView