Update illustrations in Private Space setup & settings
This inlcudes the changes to use latest private space icon and update the illustrations in private space setup and settings. Change made to update illustrations dynamically between light and dark theme. Recordings link: b/332867167#comment3 Bug: 332867167 Test: Manual Change-Id: I6387c9991ec9bb419f446431926f99843f92c859
This commit is contained in:
@@ -17,10 +17,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M5,3H19C20.1,3 21,3.9 21,5V19C21,20.1 20.1,21 19,21H5C3.9,21 3,20.1 3,19V5C3,3.9 3.9,3 5,3ZM13.5,15.501L12.93,12.271C13.57,11.941 14,11.271 14,10.501C14,9.401 13.1,8.501 12,8.501C10.9,8.501 10,9.401 10,10.501C10,11.271 10.43,11.941 11.07,12.271L10.5,15.501H13.5Z"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960"
|
||||
android:tint="?android:attr/colorAccent">
|
||||
<path
|
||||
android:fillColor="?android:attr/colorAccent"
|
||||
android:fillType="evenOdd"/>
|
||||
android:pathData="M480,440Q455,440 437.5,422.5Q420,405 420,380Q420,355 437.5,337.5Q455,320 480,320Q505,320 522.5,337.5Q540,355 540,380Q540,405 522.5,422.5Q505,440 480,440ZM480,880Q341,845 250.5,720.5Q160,596 160,444L160,200L480,80L800,200L800,444Q800,596 709.5,720.5Q619,845 480,880ZM440,720L520,720L520,680L600,680L600,600L520,600L520,514Q564,501 592,464.5Q620,428 620,380Q620,322 579,281Q538,240 480,240Q422,240 381,281Q340,322 340,380Q340,428 368,464.5Q396,501 440,514L440,720Z"/>
|
||||
</vector>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@
|
||||
android:title="@string/private_space_hide_page_title">
|
||||
|
||||
<com.android.settingslib.widget.IllustrationPreference
|
||||
android:key="privatespace_hide_video"
|
||||
android:key="private_space_hide_illustration"
|
||||
settings:searchable="false"
|
||||
settings:lottie_rawRes="@raw/private_space_hide_when_locked_illustration"/>
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
settings:searchable="false">
|
||||
|
||||
<com.android.settingslib.widget.IllustrationPreference
|
||||
android:key="private_space_settings"
|
||||
android:key="private_space_illustration"
|
||||
settings:searchable="false"
|
||||
settings:lottie_rawRes="@raw/private_space_illustration"/>
|
||||
|
||||
|
@@ -21,9 +21,12 @@ import android.os.Bundle;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settingslib.widget.IllustrationPreference;
|
||||
|
||||
public class HidePrivateSpaceSettings extends DashboardFragment{
|
||||
public class HidePrivateSpaceSettings extends DashboardFragment {
|
||||
private static final String TAG = "HidePrivateSpaceSettings";
|
||||
private static final String PRIVATE_SPACE_HIDE_ILLUSTRATION_KEY =
|
||||
"private_space_hide_illustration";
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
@@ -41,6 +44,14 @@ public class HidePrivateSpaceSettings extends DashboardFragment{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
final IllustrationPreference illustrationPreference =
|
||||
getPreferenceScreen().findPreference(PRIVATE_SPACE_HIDE_ILLUSTRATION_KEY);
|
||||
illustrationPreference.applyDynamicColor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return SettingsEnums.PRIVATE_SPACE_SETTINGS;
|
||||
|
@@ -26,10 +26,12 @@ import android.widget.Toast;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settingslib.widget.IllustrationPreference;
|
||||
|
||||
/** Fragment representing the Private Space dashboard in Settings. */
|
||||
public class PrivateSpaceDashboardFragment extends DashboardFragment {
|
||||
private static final String TAG = "PSDashboardFragment";
|
||||
private static final String PRIVATE_SPACE_ILLUSTRATION_KEY = "private_space_illustration";
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
@@ -60,6 +62,14 @@ public class PrivateSpaceDashboardFragment extends DashboardFragment {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
final IllustrationPreference illustrationPreference =
|
||||
getPreferenceScreen().findPreference(PRIVATE_SPACE_ILLUSTRATION_KEY);
|
||||
illustrationPreference.applyDynamicColor();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getPreferenceScreenResId() {
|
||||
return R.xml.private_space_settings;
|
||||
|
@@ -31,7 +31,9 @@ import androidx.navigation.fragment.NavHostFragment;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.InstrumentedFragment;
|
||||
import com.android.settingslib.widget.LottieColorUtils;
|
||||
|
||||
import com.airbnb.lottie.LottieAnimationView;
|
||||
import com.google.android.setupcompat.template.FooterBarMixin;
|
||||
import com.google.android.setupcompat.template.FooterButton;
|
||||
import com.google.android.setupdesign.GlifLayout;
|
||||
@@ -69,6 +71,8 @@ public class PrivateSpaceEducation extends InstrumentedFragment {
|
||||
.setButtonType(FooterButton.ButtonType.CANCEL)
|
||||
.setTheme(com.google.android.setupdesign.R.style.SudGlifButton_Secondary)
|
||||
.build());
|
||||
LottieAnimationView lottieAnimationView = rootView.findViewById(R.id.lottie_animation);
|
||||
LottieColorUtils.applyDynamicColors(getContext(), lottieAnimationView);
|
||||
|
||||
TextView infoTextView = rootView.findViewById(R.id.learn_more);
|
||||
Pattern pattern = Pattern.compile(infoTextView.getText().toString());
|
||||
|
@@ -34,7 +34,9 @@ import androidx.navigation.fragment.NavHostFragment;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.InstrumentedFragment;
|
||||
import com.android.settingslib.widget.LottieColorUtils;
|
||||
|
||||
import com.airbnb.lottie.LottieAnimationView;
|
||||
import com.google.android.setupcompat.template.FooterBarMixin;
|
||||
import com.google.android.setupcompat.template.FooterButton;
|
||||
import com.google.android.setupdesign.GlifLayout;
|
||||
@@ -82,6 +84,8 @@ public class PrivateSpaceSetLockFragment extends InstrumentedFragment {
|
||||
}
|
||||
};
|
||||
requireActivity().getOnBackPressedDispatcher().addCallback(this, callback);
|
||||
LottieAnimationView lottieAnimationView = rootView.findViewById(R.id.lottie_animation);
|
||||
LottieColorUtils.applyDynamicColors(getContext(), lottieAnimationView);
|
||||
|
||||
return rootView;
|
||||
}
|
||||
|
@@ -34,7 +34,9 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.InstrumentedFragment;
|
||||
import com.android.settingslib.widget.LottieColorUtils;
|
||||
|
||||
import com.airbnb.lottie.LottieAnimationView;
|
||||
import com.google.android.setupcompat.template.FooterBarMixin;
|
||||
import com.google.android.setupcompat.template.FooterButton;
|
||||
import com.google.android.setupdesign.GlifLayout;
|
||||
@@ -72,6 +74,8 @@ public class SetupSuccessFragment extends InstrumentedFragment {
|
||||
}
|
||||
};
|
||||
requireActivity().getOnBackPressedDispatcher().addCallback(this, callback);
|
||||
LottieAnimationView lottieAnimationView = rootView.findViewById(R.id.lottie_animation);
|
||||
LottieColorUtils.applyDynamicColors(getContext(), lottieAnimationView);
|
||||
|
||||
return rootView;
|
||||
}
|
||||
|
Reference in New Issue
Block a user