mirror of https://github.com/M66B/FairEmail.git
Added info button to encryption options
This commit is contained in:
parent
3a6718b515
commit
edc7059570
|
@ -40,6 +40,7 @@ import android.widget.AdapterView;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
|
import android.widget.ImageButton;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
@ -67,6 +68,7 @@ import java.util.Enumeration;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class FragmentOptionsEncryption extends FragmentBase implements SharedPreferences.OnSharedPreferenceChangeListener {
|
public class FragmentOptionsEncryption extends FragmentBase implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||||
|
private ImageButton ibInfo;
|
||||||
private SwitchCompat swSign;
|
private SwitchCompat swSign;
|
||||||
private SwitchCompat swEncrypt;
|
private SwitchCompat swEncrypt;
|
||||||
private SwitchCompat swAutoDecrypt;
|
private SwitchCompat swAutoDecrypt;
|
||||||
|
@ -102,7 +104,7 @@ public class FragmentOptionsEncryption extends FragmentBase implements SharedPre
|
||||||
View view = inflater.inflate(R.layout.fragment_options_encryption, container, false);
|
View view = inflater.inflate(R.layout.fragment_options_encryption, container, false);
|
||||||
|
|
||||||
// Get controls
|
// Get controls
|
||||||
|
ibInfo = view.findViewById(R.id.ibInfo);
|
||||||
swSign = view.findViewById(R.id.swSign);
|
swSign = view.findViewById(R.id.swSign);
|
||||||
swEncrypt = view.findViewById(R.id.swEncrypt);
|
swEncrypt = view.findViewById(R.id.swEncrypt);
|
||||||
swAutoDecrypt = view.findViewById(R.id.swAutoDecrypt);
|
swAutoDecrypt = view.findViewById(R.id.swAutoDecrypt);
|
||||||
|
@ -137,6 +139,13 @@ public class FragmentOptionsEncryption extends FragmentBase implements SharedPre
|
||||||
|
|
||||||
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||||
|
|
||||||
|
ibInfo.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Helper.viewFAQ(getContext(), 12);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
swSign.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
swSign.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||||
|
|
|
@ -29,6 +29,18 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/ibInfo"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:contentDescription="@string/title_info"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:tooltipText="@string/title_info"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvCaptionGeneral"
|
||||||
|
app:srcCompat="@drawable/baseline_info_24" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
android:id="@+id/swSign"
|
android:id="@+id/swSign"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -37,7 +49,7 @@
|
||||||
android:text="@string/title_advanced_sign_default"
|
android:text="@string/title_advanced_sign_default"
|
||||||
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/tvCaptionGeneral"
|
app:layout_constraintTop_toBottomOf="@id/ibInfo"
|
||||||
app:switchPadding="12dp" />
|
app:switchPadding="12dp" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
|
Loading…
Reference in New Issue