Added favicon info button

pull/215/head
M66B 6 months ago
parent c8c74e9e0a
commit 0ba7583140

@ -127,6 +127,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
private TextView tvFaviconsHint; private TextView tvFaviconsHint;
private SwitchCompat swFaviconsPartial; private SwitchCompat swFaviconsPartial;
private SwitchCompat swFaviconsManifest; private SwitchCompat swFaviconsManifest;
private ImageButton ibFavicons;
private SwitchCompat swDdg; private SwitchCompat swDdg;
private TextView tvDdgPrivacy; private TextView tvDdgPrivacy;
private SwitchCompat swFaviconsDmarc; private SwitchCompat swFaviconsDmarc;
@ -309,6 +310,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
tvFaviconsHint = view.findViewById(R.id.tvFaviconsHint); tvFaviconsHint = view.findViewById(R.id.tvFaviconsHint);
swFaviconsPartial = view.findViewById(R.id.swFaviconsPartial); swFaviconsPartial = view.findViewById(R.id.swFaviconsPartial);
swFaviconsManifest = view.findViewById(R.id.swFaviconsManifest); swFaviconsManifest = view.findViewById(R.id.swFaviconsManifest);
ibFavicons = view.findViewById(R.id.ibFavicons);
swDdg = view.findViewById(R.id.swDdg); swDdg = view.findViewById(R.id.swDdg);
tvDdgPrivacy = view.findViewById(R.id.tvDdgPrivacy); tvDdgPrivacy = view.findViewById(R.id.tvDdgPrivacy);
swFaviconsDmarc = view.findViewById(R.id.swFaviconsDmarc); swFaviconsDmarc = view.findViewById(R.id.swFaviconsDmarc);
@ -922,6 +924,13 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
} }
}); });
ibFavicons.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Helper.viewFAQ(view.getContext(), 154);
}
});
swDdg.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { swDdg.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {

@ -1142,6 +1142,19 @@
app:layout_constraintTop_toBottomOf="@id/swFaviconsPartial" app:layout_constraintTop_toBottomOf="@id/swFaviconsPartial"
app:switchPadding="12dp" /> app:switchPadding="12dp" />
<ImageButton
android:id="@+id/ibFavicons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="6dp"
android:contentDescription="@string/title_info"
android:tag="nosuggest"
android:tooltipText="@string/title_info"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/swFaviconsManifest"
app:srcCompat="@drawable/twotone_info_24" />
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/swDdg" android:id="@+id/swDdg"
android:layout_width="0dp" android:layout_width="0dp"
@ -1151,7 +1164,7 @@
android:text="@string/title_advanced_ddg" android:text="@string/title_advanced_ddg"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swFaviconsManifest" app:layout_constraintTop_toBottomOf="@id/ibFavicons"
app:switchPadding="12dp" /> app:switchPadding="12dp" />
<TextView <TextView

Loading…
Cancel
Save