SUW: rearrange welcome activity
Hide navigation bar and relocate buttons Change-Id: I0202c18dbcf08bac31707b7b43f10b59d88be7f2
This commit is contained in:
26
res/drawable/ic_dialer.xml
Normal file
26
res/drawable/ic_dialer.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (c) 2021 The LineageOS Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="@color/black"
|
||||
android:pathData="M20,15.5C18.8,15.5 17.5,15.3 16.4,14.9C16.3,14.9 16.2,14.9 16.1,14.9C15.8,14.9 15.6,15 15.4,15.2L13.2,17.4C10.4,15.9 8,13.6 6.6,10.8L8.8,8.6C9.1,8.3 9.2,7.9 9,7.6C8.7,6.5 8.5,5.2 8.5,4C8.5,3.5 8,3 7.5,3H4C3.5,3 3,3.5 3,4C3,13.4 10.6,21 20,21C20.5,21 21,20.5 21,20V16.5C21,16 20.5,15.5 20,15.5M5,5H6.5C6.6,5.9 6.8,6.8 7,7.6L5.8,8.8C5.4,7.6 5.1,6.3 5,5M19,19C17.7,18.9 16.4,18.6 15.2,18.2L16.4,17C17.2,17.2 18.1,17.4 19,17.4V19Z" />
|
||||
</vector>
|
@@ -28,21 +28,41 @@
|
||||
android:layout_height="match_parent"
|
||||
style="@style/SudContentFrame">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/brand_logo"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0px"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/logo"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/content_margin_left" />
|
||||
|
||||
<org.lineageos.setupwizard.NavigationLayout
|
||||
android:id="@+id/navigation_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/brand_logo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/logo"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/content_margin_left" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/start"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/start"
|
||||
style="@style/SudGlifButton.Primary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/emerg_dialer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:drawableTop="@drawable/ic_dialer"
|
||||
android:text="@string/emergency_call"
|
||||
style="@style/SudGlifButton.Secondary" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.setupdesign.GlifLayout>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2016 The CyanogenMod Project
|
||||
* Copyright (C) 2017-2018,2020 The LineageOS Project
|
||||
* Copyright (C) 2017-2021 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,6 +37,8 @@ import android.widget.Toast;
|
||||
import com.android.internal.telephony.TelephonyIntents;
|
||||
import com.android.internal.telephony.util.LocaleUtils;
|
||||
|
||||
import com.google.android.setupcompat.util.SystemBarHelper;
|
||||
|
||||
import org.lineageos.setupwizard.R;
|
||||
import org.lineageos.setupwizard.widget.LocalePicker;
|
||||
|
||||
@@ -78,6 +80,7 @@ public class LocaleActivity extends BaseSetupWizardActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
SystemBarHelper.setBackButtonVisible(getWindow(), true);
|
||||
setNextText(R.string.next);
|
||||
mLanguagePicker = (LocalePicker) findViewById(R.id.locale_list);
|
||||
loadLanguages();
|
||||
|
@@ -21,6 +21,8 @@ import android.os.Bundle;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
import com.google.android.setupcompat.util.SystemBarHelper;
|
||||
|
||||
import org.lineageos.setupwizard.util.EnableAccessibilityController;
|
||||
|
||||
public class WelcomeActivity extends BaseSetupWizardActivity {
|
||||
@@ -33,9 +35,13 @@ public class WelcomeActivity extends BaseSetupWizardActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
SystemBarHelper.setBackButtonVisible(getWindow(), false);
|
||||
mRootView = findViewById(R.id.setup_wizard_layout);
|
||||
setNextText(R.string.next);
|
||||
setNextText(R.string.start);
|
||||
setSkipText(R.string.emergency_call);
|
||||
findViewById(R.id.start).setOnClickListener(view -> onNextPressed());
|
||||
findViewById(R.id.emerg_dialer)
|
||||
.setOnClickListener(view -> startEmergencyDialer());
|
||||
mEnableAccessibilityController =
|
||||
EnableAccessibilityController.getInstance(getApplicationContext());
|
||||
mRootView.setOnTouchListener((v, event) ->
|
||||
@@ -46,16 +52,6 @@ public class WelcomeActivity extends BaseSetupWizardActivity {
|
||||
@Override
|
||||
public void onBackPressed() {}
|
||||
|
||||
@Override
|
||||
public void onSkip() {
|
||||
startEmergencyDialer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateBack() {
|
||||
startEmergencyDialer();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutResId() {
|
||||
return R.layout.welcome_activity;
|
||||
|
Reference in New Issue
Block a user