SUW: use Gliflayout descriptions
Set description via getGlifLayout().setDescriptionText instead of writing it in layout to display it properly in two columns when in landscape. No visual change in portrait. Change-Id: I7465a7fbc5819d429bb886a5582fb1f1d4db9a47
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2015 The CyanogenMod Project
|
||||
Copyright (C) 2017-2021 The LineageOS Project
|
||||
2017-2022 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.
|
||||
@@ -39,14 +39,6 @@
|
||||
android:layout_height="match_parent"
|
||||
style="@style/SudContentFrame">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0px"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:id="@+id/sim_missing"
|
||||
android:text="@string/sim_missing_summary"
|
||||
style="@style/SudItemTitle.GlifDescription" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sim_slot_image"
|
||||
android:layout_width="0px"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2015 The CyanogenMod Project
|
||||
Copyright (C) 2017-2021 The LineageOS Project
|
||||
2017-2022 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.
|
||||
@@ -28,30 +28,10 @@
|
||||
android:layout_height="match_parent"
|
||||
style="@style/SudContentFrame">
|
||||
|
||||
<FrameLayout android:id="@+id/page"
|
||||
<View android:id="@+id/page"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ScrollView android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/intro_restore_subtitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/intro_restore_subtitle"
|
||||
style="@style/SudItemTitle.GlifDescription" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</FrameLayout>
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<org.lineageos.setupwizard.NavigationLayout
|
||||
android:id="@+id/navigation_bar"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2013 The CyanogenMod Project
|
||||
Copyright (C) 2017-2021 The LineageOS Project
|
||||
2017-2022 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.
|
||||
@@ -44,12 +44,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/date_time_summary"
|
||||
style="@style/SudItemTitle.GlifDescription" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/timezone_list"
|
||||
android:layout_width="match_parent"
|
||||
|
@@ -44,21 +44,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- The caption about privacy policy -->
|
||||
<TextView
|
||||
android:id="@+id/privacy_policy"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/SudItemTitle.GlifDescription"
|
||||
android:text="@string/services_pp_explanation" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/find_privacy_policy"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/SudItemTitle.GlifDescription"
|
||||
android:text="@string/services_find_privacy_policy" />
|
||||
|
||||
<!-- Whether or not to enable metrics -->
|
||||
<LinearLayout
|
||||
android:id="@+id/metrics"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2015 The CyanogenMod Project
|
||||
Copyright (C) 2017-2021 The LineageOS Project
|
||||
2017-2022 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.
|
||||
@@ -28,31 +28,10 @@
|
||||
android:layout_height="match_parent"
|
||||
style="@style/SudContentFrame">
|
||||
|
||||
<FrameLayout android:id="@+id/page"
|
||||
<View android:id="@+id/page"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ScrollView android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/content_margin_left"
|
||||
android:paddingEnd="@dimen/content_margin_left">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lockscreen_setup_summary"
|
||||
style="@style/SudItemTitle.GlifDescription" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</FrameLayout>
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<org.lineageos.setupwizard.NavigationLayout
|
||||
android:id="@+id/navigation_bar"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2015 The CyanogenMod Project
|
||||
Copyright (C) 2017-2021 The LineageOS Project
|
||||
2017-2022 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.
|
||||
@@ -39,13 +39,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/sim_missing"
|
||||
android:text="@string/sim_missing_summary"
|
||||
style="@style/SudItemTitle.GlifDescription" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sim_slot_image"
|
||||
android:layout_width="match_parent"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2015 The CyanogenMod Project
|
||||
Copyright (C) 2017-2021 The LineageOS Project
|
||||
2017-2022 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.
|
||||
@@ -44,18 +44,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/SudItemTitle.GlifDescription"
|
||||
android:text="@string/update_recovery_description" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/SudItemTitle.GlifDescription"
|
||||
android:text="@string/update_recovery_warning" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/update_recovery_checkbox_view"
|
||||
android:orientation="horizontal"
|
||||
|
@@ -70,6 +70,7 @@
|
||||
<string name="services_help_improve_cm">Help improve <xliff:g id="name" example="LineageOS">%s</xliff:g></string>
|
||||
<string name="services_metrics_label"><xliff:g id="name" example="Help improve LineageOS">%1$s</xliff:g> by automatically sending diagnostic and usage data to <xliff:g id="name" example="LineageOS">%2$s</xliff:g>. This information can’t be used to identify you and lends a hand to teams working on things like battery life, app performance, and new <xliff:g id="name" example="LineageOS">%3$s</xliff:g> features.</string>
|
||||
<string name="services_os_nav_keys_label"><b>Use on screen navigation keys</b> instead of hardware keys.</string>
|
||||
<string name="services_full_description"><xliff:g id="pp_explanation">%1$s</xliff:g>\n<xliff:g id="pp_find">%2$s</xliff:g></string>
|
||||
|
||||
<!-- Biometric setup -->
|
||||
<string name="settings_biometric_setup_title">Select backup screen lock type</string>
|
||||
@@ -103,4 +104,5 @@
|
||||
<string name="update_recovery_description">Updates Lineage Recovery on first boot subsequent to every update.</string>
|
||||
<string name="update_recovery_warning">Recovery will be updated as soon as you finish the setup. If you wish to keep it intact, disable this feature.</string>
|
||||
<string name="update_recovery_setting">Update Lineage Recovery alongside the OS</string>
|
||||
<string name="update_recovery_full_description"><xliff:g id="recovery_update_description">%1$s</xliff:g>\n<xliff:g id="recovery_update_warning">%2$s</xliff:g></string>
|
||||
</resources>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2016 The CyanogenMod Project
|
||||
* Copyright (C) 2017-2018,2020 The LineageOS Project
|
||||
* 2017-2018,2020,2022 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.
|
||||
@@ -78,6 +78,7 @@ public class DateTimeActivity extends BaseSetupWizardActivity implements
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setNextText(R.string.next);
|
||||
getGlifLayout().setDescriptionText(getString(R.string.date_time_summary));
|
||||
|
||||
final Spinner spinner = (Spinner) findViewById(R.id.timezone_list);
|
||||
final SimpleAdapter adapter = constructTimezoneAdapter(this);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2016 The CyanogenMod Project
|
||||
* Copyright (C) 2017-2020 The LineageOS Project
|
||||
* 2017-2020,2022 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.
|
||||
@@ -76,9 +76,9 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity {
|
||||
String os_name = getString(R.string.os_name);
|
||||
String privacyPolicy = getString(R.string.services_pp_explanation, os_name);
|
||||
String policySummary = getString(R.string.services_find_privacy_policy, PRIVACY_POLICY_URI);
|
||||
|
||||
((TextView) findViewById(R.id.privacy_policy)).setText(privacyPolicy);
|
||||
((TextView) findViewById(R.id.find_privacy_policy)).setText(policySummary);
|
||||
String servicesFullDescription = getString(R.string.services_full_description,
|
||||
privacyPolicy, policySummary);
|
||||
getGlifLayout().setDescriptionText(servicesFullDescription);
|
||||
|
||||
View metricsRow = findViewById(R.id.metrics);
|
||||
metricsRow.setOnClickListener(mMetricsClickListener);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2016 The CyanogenMod Project
|
||||
* Copyright (C) 2017-2021 The LineageOS Project
|
||||
* 2017-2022 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.
|
||||
@@ -47,6 +47,7 @@ public class ScreenLockActivity extends SubBaseActivity {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
getGlifLayout().setDescriptionText(getString(R.string.lockscreen_setup_summary));
|
||||
setNextAllowed(true);
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2016 The CyanogenMod Project
|
||||
* Copyright (C) 2017-2021 The LineageOS Project
|
||||
* 2017-2022 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,7 @@ public class SimMissingActivity extends BaseSetupWizardActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getGlifLayout().setDescriptionText(getString(R.string.sim_missing_summary));
|
||||
mPhoneMonitor = PhoneMonitor.getInstance();
|
||||
if (!mPhoneMonitor.simMissing()) {
|
||||
finishAction(RESULT_OK);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 The LineageOS Project
|
||||
* Copyright (C) 2020-2022 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.
|
||||
@@ -41,6 +41,9 @@ public class UpdateRecoveryActivity extends BaseSetupWizardActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
mSetupWizardApp = (SetupWizardApp) getApplication();
|
||||
getGlifLayout().setDescriptionText(getString(R.string.update_recovery_full_description,
|
||||
getString(R.string.update_recovery_description),
|
||||
getString(R.string.update_recovery_warning)));
|
||||
|
||||
if (!SetupWizardUtils.hasRecoveryUpdater(this)) {
|
||||
Log.v(TAG, "No recovery updater, skipping UpdateRecoveryActivity");
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2020 The Calyx Institute
|
||||
* Copyright (C) 2020-2021 The LineageOS Project
|
||||
* 2020-2022 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,8 +37,7 @@ public class RestoreIntroActivity extends SubBaseActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
final TextView restoreSubtitle = (TextView) findViewById(R.id.intro_restore_subtitle);
|
||||
restoreSubtitle.setText(getString(R.string.intro_restore_subtitle,
|
||||
getGlifLayout().setDescriptionText(getString(R.string.intro_restore_subtitle,
|
||||
getString(R.string.os_name)));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user