Redesign doze screen of setup wizard

This commit is contained in:
Torsten Grote
2024-05-09 17:36:56 -03:00
parent f1662d7311
commit 0724bb89b2
2 changed files with 27 additions and 3 deletions

View File

@@ -23,6 +23,7 @@ import static android.view.View.VISIBLE;
import static android.widget.Toast.LENGTH_LONG; import static android.widget.Toast.LENGTH_LONG;
import static org.briarproject.android.dontkillmelib.DozeUtils.getDozeWhitelistingIntent; import static org.briarproject.android.dontkillmelib.DozeUtils.getDozeWhitelistingIntent;
import static org.briarproject.briar.android.activity.RequestCodes.REQUEST_DOZE_WHITELISTING; import static org.briarproject.briar.android.activity.RequestCodes.REQUEST_DOZE_WHITELISTING;
import static org.briarproject.briar.android.util.UiUtils.hideViewOnSmallScreen;
import static org.briarproject.briar.android.util.UiUtils.showOnboardingDialog; import static org.briarproject.briar.android.util.UiUtils.showOnboardingDialog;
@MethodsNotNullByDefault @MethodsNotNullByDefault
@@ -79,6 +80,12 @@ public class DozeFragment extends SetupFragment
return v; return v;
} }
@Override
public void onStart() {
super.onStart();
hideViewOnSmallScreen(requireView().findViewById(R.id.logo));
}
@Override @Override
public String getUniqueTag() { public String getUniqueTag() {
return TAG; return TAG;

View File

@@ -11,20 +11,36 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="@dimen/margin_activity_vertical"> android:padding="@dimen/margin_activity_vertical">
<ImageView
android:id="@+id/logo"
android:layout_width="0dp"
android:layout_height="@dimen/hero_square"
android:layout_marginBottom="@dimen/margin_xlarge"
android:importantForAccessibility="no"
android:src="@drawable/splash_screen"
app:layout_constraintBottom_toTopOf="@+id/dozeView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_default="percent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<org.briarproject.briar.android.account.DozeView <org.briarproject.briar.android.account.DozeView
android:id="@+id/dozeView" android:id="@+id/dozeView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingBottom="@dimen/margin_large" android:paddingBottom="@dimen/margin_large"
app:layout_constraintBottom_toTopOf="@+id/huaweiProtectedAppsView"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toBottomOf="@+id/logo" />
<org.briarproject.briar.android.account.HuaweiProtectedAppsView <org.briarproject.briar.android.account.HuaweiProtectedAppsView
android:id="@+id/huaweiProtectedAppsView" android:id="@+id/huaweiProtectedAppsView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingBottom="@dimen/margin_large" android:paddingBottom="@dimen/margin_large"
app:layout_constraintBottom_toTopOf="@+id/huaweiAppLaunchView"
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/dozeView" /> app:layout_constraintTop_toBottomOf="@+id/dozeView" />
@@ -34,6 +50,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingBottom="@dimen/margin_large" android:paddingBottom="@dimen/margin_large"
app:layout_constraintBottom_toTopOf="@+id/xiaomiRecentAppsView"
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/huaweiProtectedAppsView" /> app:layout_constraintTop_toBottomOf="@+id/huaweiProtectedAppsView" />
@@ -43,6 +60,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingBottom="@dimen/margin_large" android:paddingBottom="@dimen/margin_large"
app:layout_constraintBottom_toTopOf="@+id/xiaomiLockAppsView"
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/huaweiAppLaunchView" /> app:layout_constraintTop_toBottomOf="@+id/huaweiAppLaunchView" />
@@ -52,6 +70,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingBottom="@dimen/margin_large" android:paddingBottom="@dimen/margin_large"
app:layout_constraintBottom_toTopOf="@+id/next"
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/xiaomiRecentAppsView" /> app:layout_constraintTop_toBottomOf="@+id/xiaomiRecentAppsView" />
@@ -66,8 +85,6 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
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/xiaomiLockAppsView"
app:layout_constraintVertical_bias="1.0"
tools:enabled="true" /> tools:enabled="true" />
<ProgressBar <ProgressBar