Adapt hotspot buttons to latest design and add a nullability annotation

This commit is contained in:
Torsten Grote
2021-05-26 10:33:33 -03:00
committed by Sebastian Kürten
parent d6f985174a
commit cbdbd10cb3
4 changed files with 8 additions and 7 deletions

View File

@@ -10,6 +10,7 @@ import org.briarproject.briar.R;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultLauncher;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.FragmentActivity;
@@ -106,7 +107,7 @@ class ConditionManager {
return false;
}
void onRequestPermissionResult(Boolean granted) {
void onRequestPermissionResult(@Nullable Boolean granted) {
if (granted != null && granted) {
locationPermission = Permission.GRANTED;
} else if (shouldShowRequestPermissionRationale(ctx,

View File

@@ -134,7 +134,7 @@
<Button
android:id="@+id/fallbackButton"
style="@style/BriarButton"
style="@style/BriarButtonFlat.Positive"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="16dp"

View File

@@ -76,15 +76,15 @@
<Button
android:id="@+id/stopButton"
style="@style/BriarButton"
android:layout_width="0dp"
style="@style/BriarButtonFlat.Negative"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:drawablePadding="8dp"
android:text="@string/hotspot_button_stop_sharing"
app:backgroundTint="@color/briar_red_500"
app:drawableLeftCompat="@drawable/ic_portable_wifi_off"
app:drawableStartCompat="@drawable/ic_portable_wifi_off"
app:drawableTint="@color/button_text"
app:drawableTint="@color/briar_red_500"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View File

@@ -700,7 +700,7 @@
<string name="hotspot_progress_text_start">Setting up hotspot…</string>
<string name="hotspot_notification_channel_title">Wi-Fi hotspot</string>
<string name="hotspot_notification_title">Sharing Briar offline</string>
<string name="hotspot_button_connected">Confirm connection</string>
<string name="hotspot_button_connected">Start app sharing</string>
<string name="permission_hotspot_location_request_body">To create a Wi-Fi hotspot, Briar needs permission to access your location.\n\nBriar does not store your location or share it with anyone.</string>
<string name="permission_hotspot_location_denied_body">You have denied access to your location, but Briar needs this permission to create a Wi-Fi hotspot.\n\nPlease consider granting access.</string>