mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
Migrate app to Material Design 3
without dynamic colors, trying to look as before
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.briarproject.briar.android.account;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.KeyguardManager;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Intent;
|
||||
@@ -113,6 +114,7 @@ public class UnlockActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressLint("MissingSuperCall")
|
||||
public void onBackPressed() {
|
||||
moveTaskToBack(true);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.briarproject.briar.android.login;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -74,6 +75,7 @@ public class StartupActivity extends BaseActivity implements
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressLint("MissingSuperCall")
|
||||
public void onBackPressed() {
|
||||
// Move task and activity to the background instead of showing another
|
||||
// password prompt.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.briarproject.briar.android.reporting;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
@@ -87,6 +88,7 @@ public class CrashReportActivity extends BaseActivity
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressLint("MissingSuperCall")
|
||||
public void onBackPressed() {
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -8,12 +8,13 @@ import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
|
||||
import org.briarproject.briar.R;
|
||||
import org.briarproject.nullsafety.NotNullByDefault;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.view.ContextThemeWrapper;
|
||||
import androidx.appcompat.widget.AppCompatButton;
|
||||
|
||||
import static android.content.Context.LAYOUT_INFLATER_SERVICE;
|
||||
import static androidx.transition.TransitionManager.beginDelayedTransition;
|
||||
@@ -47,8 +48,8 @@ public class BriarButton extends FrameLayout {
|
||||
attributes.recycle();
|
||||
|
||||
ContextThemeWrapper wrapper = new ContextThemeWrapper(context, style);
|
||||
button = isInEditMode() ? new AppCompatButton(context) :
|
||||
new AppCompatButton(wrapper, null, style);
|
||||
button = isInEditMode() ? new MaterialButton(context) :
|
||||
new MaterialButton(wrapper);
|
||||
button.setText(text);
|
||||
addView(button);
|
||||
progressBar = findViewById(R.id.briar_button_progress_bar);
|
||||
|
||||
Reference in New Issue
Block a user