Small layout improvement

This commit is contained in:
M66B 2020-07-19 11:22:46 +02:00
parent 0ff5ccc5dd
commit e34421f1ff
2 changed files with 11 additions and 10 deletions

View File

@ -42,6 +42,7 @@ import android.widget.AdapterView;
import android.widget.Button; import android.widget.Button;
import android.widget.CompoundButton; import android.widget.CompoundButton;
import android.widget.EditText; import android.widget.EditText;
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,7 +68,7 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
private SwitchCompat swDisplayHidden; private SwitchCompat swDisplayHidden;
private SwitchCompat swSecure; private SwitchCompat swSecure;
private SwitchCompat swSafeBrowsing; private SwitchCompat swSafeBrowsing;
private Button btnSafeBrowsing; private ImageButton ibSafeBrowsing;
private Group grpSafeBrowsing; private Group grpSafeBrowsing;
@ -101,7 +102,7 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
swDisplayHidden = view.findViewById(R.id.swDisplayHidden); swDisplayHidden = view.findViewById(R.id.swDisplayHidden);
swSecure = view.findViewById(R.id.swSecure); swSecure = view.findViewById(R.id.swSecure);
swSafeBrowsing = view.findViewById(R.id.swSafeBrowsing); swSafeBrowsing = view.findViewById(R.id.swSafeBrowsing);
btnSafeBrowsing = view.findViewById(R.id.btnSafeBrowsing); ibSafeBrowsing = view.findViewById(R.id.ibSafeBrowsing);
grpSafeBrowsing = view.findViewById(R.id.grpSafeBrowsing); grpSafeBrowsing = view.findViewById(R.id.grpSafeBrowsing);
@ -227,7 +228,7 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
} }
}); });
btnSafeBrowsing.setOnClickListener(new View.OnClickListener() { ibSafeBrowsing.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Helper.view(getContext(), Uri.parse("https://developers.google.com/safe-browsing"), true); Helper.view(getContext(), Uri.parse("https://developers.google.com/safe-browsing"), true);

View File

@ -275,20 +275,20 @@
app:layout_constraintTop_toBottomOf="@id/tvSecureHint" app:layout_constraintTop_toBottomOf="@id/tvSecureHint"
app:switchPadding="12dp" /> app:switchPadding="12dp" />
<Button <ImageButton
android:id="@+id/btnSafeBrowsing" android:id="@+id/ibSafeBrowsing"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="6dp" android:contentDescription="@string/title_info"
android:text="@string/title_info" android:tooltipText="@string/title_info"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swSafeBrowsing" /> app:layout_constraintTop_toBottomOf="@id/swSafeBrowsing"
app:srcCompat="@drawable/baseline_info_24" />
<androidx.constraintlayout.widget.Group <androidx.constraintlayout.widget.Group
android:id="@+id/grpSafeBrowsing" android:id="@+id/grpSafeBrowsing"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
app:constraint_referenced_ids="swSafeBrowsing,btnSafeBrowsing" /> app:constraint_referenced_ids="swSafeBrowsing,ibSafeBrowsing" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</eu.faircode.email.ScrollViewEx> </eu.faircode.email.ScrollViewEx>