[automerger skipped] Import translations. DO NOT MERGE am: 5a7d32accf -s ours
am skip reason: subject contains skip directive
Change-Id: Iaf369bc9fc03ef53915ac1bb24cba9fb65b30dd9
diff --git a/Android.mk b/Android.mk
index 81a2976..a0d05cb 100644
--- a/Android.mk
+++ b/Android.mk
@@ -26,7 +26,7 @@
LOCAL_MODULE_TAGS := optional
LOCAL_STATIC_ANDROID_LIBRARIES := WallpaperPicker2CommonDepsLib
-LOCAL_STATIC_JAVA_LIBRARIES := styleprotosnano
+LOCAL_STATIC_JAVA_LIBRARIES := styleprotosnano SystemUI-statsd SystemUISharedLib
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_SDK_VERSION := system_current
diff --git a/res/anim/major_a_b_dot_01_animation.xml b/res/anim/major_a_b_dot_01_animation.xml
deleted file mode 100644
index 89fc4c7..0000000
--- a/res/anim/major_a_b_dot_01_animation.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<set
- xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="250"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:pathData="M 3.25,4.0 c 0.79167,0.0 3.95833,0.0 4.75,0.0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
diff --git a/res/anim/major_a_b_dot_animation.xml b/res/anim/major_a_b_dot_animation.xml
deleted file mode 100644
index f24534f..0000000
--- a/res/anim/major_a_b_dot_animation.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<set
- xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="250"
- android:propertyName="pathData"
- android:valueFrom="M 0.0,-2.75 l 0.0,0.0 c 1.51878306195,0.0 2.75,1.23121693805 2.75,2.75 l 0.0,0.0 c 0.0,1.51878306195 -1.23121693805,2.75 -2.75,2.75 l 0.0,0.0 c -1.51878306195,0.0 -2.75,-1.23121693805 -2.75,-2.75 l 0.0,0.0 c 0.0,-1.51878306195 1.23121693805,-2.75 2.75,-2.75 Z"
- android:valueTo="M -4.75,-2.75 l 9.5,0.0 c 1.51878306195,0.0 2.75,1.23121693805 2.75,2.75 l 0.0,0.0 c 0.0,1.51878306195 -1.23121693805,2.75 -2.75,2.75 l -9.5,0.0 c -1.51878306195,0.0 -2.75,-1.23121693805 -2.75,-2.75 l 0.0,0.0 c 0.0,-1.51878306195 1.23121693805,-2.75 2.75,-2.75 Z"
- android:valueType="pathType"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
diff --git a/res/anim/major_b_a_dot_01_animation.xml b/res/anim/major_b_a_dot_01_animation.xml
deleted file mode 100644
index a53ad37..0000000
--- a/res/anim/major_b_a_dot_01_animation.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<set
- xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="250"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:pathData="M 8.0,4.0 c -0.79167,0.0 -3.95833,0.0 -4.75,0.0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
diff --git a/res/anim/major_b_a_dot_animation.xml b/res/anim/major_b_a_dot_animation.xml
deleted file mode 100644
index d89512e..0000000
--- a/res/anim/major_b_a_dot_animation.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<set
- xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="250"
- android:propertyName="pathData"
- android:valueFrom="M -4.75,-2.75 l 9.5,0.0 c 1.51878306195,0.0 2.75,1.23121693805 2.75,2.75 l 0.0,0.0 c 0.0,1.51878306195 -1.23121693805,2.75 -2.75,2.75 l -9.5,0.0 c -1.51878306195,0.0 -2.75,-1.23121693805 -2.75,-2.75 l 0.0,0.0 c 0.0,-1.51878306195 1.23121693805,-2.75 2.75,-2.75 Z"
- android:valueTo="M 0.0,-2.75 l 0.0,0.0 c 1.51878306195,0.0 2.75,1.23121693805 2.75,2.75 l 0.0,0.0 c 0.0,1.51878306195 -1.23121693805,2.75 -2.75,2.75 l 0.0,0.0 c -1.51878306195,0.0 -2.75,-1.23121693805 -2.75,-2.75 l 0.0,0.0 c 0.0,-1.51878306195 1.23121693805,-2.75 2.75,-2.75 Z"
- android:valueType="pathType"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
diff --git a/res/anim/major_b_c_dot_01_animation.xml b/res/anim/major_b_c_dot_01_animation.xml
deleted file mode 100644
index e84994f..0000000
--- a/res/anim/major_b_c_dot_01_animation.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<set
- xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="250"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:pathData="M 8.0,4.0 c 0.79167,0.0 3.95833,0.0 4.75,0.0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
diff --git a/res/anim/major_b_c_dot_animation.xml b/res/anim/major_b_c_dot_animation.xml
deleted file mode 100644
index d89512e..0000000
--- a/res/anim/major_b_c_dot_animation.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<set
- xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="250"
- android:propertyName="pathData"
- android:valueFrom="M -4.75,-2.75 l 9.5,0.0 c 1.51878306195,0.0 2.75,1.23121693805 2.75,2.75 l 0.0,0.0 c 0.0,1.51878306195 -1.23121693805,2.75 -2.75,2.75 l -9.5,0.0 c -1.51878306195,0.0 -2.75,-1.23121693805 -2.75,-2.75 l 0.0,0.0 c 0.0,-1.51878306195 1.23121693805,-2.75 2.75,-2.75 Z"
- android:valueTo="M 0.0,-2.75 l 0.0,0.0 c 1.51878306195,0.0 2.75,1.23121693805 2.75,2.75 l 0.0,0.0 c 0.0,1.51878306195 -1.23121693805,2.75 -2.75,2.75 l 0.0,0.0 c -1.51878306195,0.0 -2.75,-1.23121693805 -2.75,-2.75 l 0.0,0.0 c 0.0,-1.51878306195 1.23121693805,-2.75 2.75,-2.75 Z"
- android:valueType="pathType"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
diff --git a/res/anim/major_c_b_dot_01_animation.xml b/res/anim/major_c_b_dot_01_animation.xml
deleted file mode 100644
index 9df1f01..0000000
--- a/res/anim/major_c_b_dot_01_animation.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<set
- xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="250"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:pathData="M 12.75,4.0 c -0.79167,0.0 -3.95833,0.0 -4.75,0.0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
diff --git a/res/anim/major_c_b_dot_animation.xml b/res/anim/major_c_b_dot_animation.xml
deleted file mode 100644
index f24534f..0000000
--- a/res/anim/major_c_b_dot_animation.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<set
- xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="250"
- android:propertyName="pathData"
- android:valueFrom="M 0.0,-2.75 l 0.0,0.0 c 1.51878306195,0.0 2.75,1.23121693805 2.75,2.75 l 0.0,0.0 c 0.0,1.51878306195 -1.23121693805,2.75 -2.75,2.75 l 0.0,0.0 c -1.51878306195,0.0 -2.75,-1.23121693805 -2.75,-2.75 l 0.0,0.0 c 0.0,-1.51878306195 1.23121693805,-2.75 2.75,-2.75 Z"
- android:valueTo="M -4.75,-2.75 l 9.5,0.0 c 1.51878306195,0.0 2.75,1.23121693805 2.75,2.75 l 0.0,0.0 c 0.0,1.51878306195 -1.23121693805,2.75 -2.75,2.75 l -9.5,0.0 c -1.51878306195,0.0 -2.75,-1.23121693805 -2.75,-2.75 l 0.0,0.0 c 0.0,-1.51878306195 1.23121693805,-2.75 2.75,-2.75 Z"
- android:valueType="pathType"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
diff --git a/res/anim/minor_a_b_dot_02_animation.xml b/res/anim/minor_a_b_dot_02_animation.xml
deleted file mode 100644
index 89fc4c7..0000000
--- a/res/anim/minor_a_b_dot_02_animation.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<set
- xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="250"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:pathData="M 3.25,4.0 c 0.79167,0.0 3.95833,0.0 4.75,0.0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
diff --git a/res/anim/minor_b_a_dot_02_animation.xml b/res/anim/minor_b_a_dot_02_animation.xml
deleted file mode 100644
index a53ad37..0000000
--- a/res/anim/minor_b_a_dot_02_animation.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<set
- xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="250"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:pathData="M 8.0,4.0 c -0.79167,0.0 -3.95833,0.0 -4.75,0.0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
diff --git a/res/anim/minor_b_c_dot_02_animation.xml b/res/anim/minor_b_c_dot_02_animation.xml
deleted file mode 100644
index e84994f..0000000
--- a/res/anim/minor_b_c_dot_02_animation.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<set
- xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="250"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:pathData="M 8.0,4.0 c 0.79167,0.0 3.95833,0.0 4.75,0.0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
diff --git a/res/anim/minor_c_b_dot_02_animation.xml b/res/anim/minor_c_b_dot_02_animation.xml
deleted file mode 100644
index 9df1f01..0000000
--- a/res/anim/minor_c_b_dot_02_animation.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<set
- xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="250"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:pathData="M 12.75,4.0 c -0.79167,0.0 -3.95833,0.0 -4.75,0.0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
diff --git a/res/color/indicator_arrow_color.xml b/res/color/indicator_arrow_color.xml
deleted file mode 100644
index 198d002..0000000
--- a/res/color/indicator_arrow_color.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2019 The Android Open Source 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.
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item
- android:state_enabled="false"
- android:color="@color/preview_pager_arrow_disabled" />
- <item
- android:state_enabled="true"
- android:color="?android:attr/colorAccent" />
-</selector>
diff --git a/res/color/option_border_color.xml b/res/color/option_border_color.xml
deleted file mode 100644
index ec5ab97..0000000
--- a/res/color/option_border_color.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2019 The Android Open Source 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.
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item
- android:state_activated="true"
- android:color="?android:colorAccent" />
- <item
- android:state_activated="false"
- android:alpha="0.24"
- android:color="?android:colorAccent" />
- <item
- android:alpha="0.05"
- android:color="@color/option_border_default"/>
-</selector>
diff --git a/res/color/option_title_color.xml b/res/color/option_title_color.xml
deleted file mode 100644
index 2809247..0000000
--- a/res/color/option_title_color.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2019 The Android Open Source 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.
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item
- android:state_activated="true"
- android:color="?android:colorAccent" />
- <item
- android:state_activated="false"
- android:alpha="0.54"
- android:color="?android:colorForeground" />
- <item
- android:color="?android:colorForeground"/>
-</selector>
diff --git a/res/drawable/ic_arrow_back_24px.xml b/res/drawable/ic_arrow_back_24px.xml
deleted file mode 100644
index 3eb00c7..0000000
--- a/res/drawable/ic_arrow_back_24px.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- Copyright (C) 2018 The Android Open Source 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.0"
- android:viewportHeight="24.0">
- <path
- android:fillColor="?android:attr/colorForeground"
- android:pathData="M16.41,5.41l-1.41,-1.41l-8,8l8,8l1.41,-1.41l-6.58,-6.59"/>
-</vector>
diff --git a/res/drawable/ic_arrow_forward_24px.xml b/res/drawable/ic_arrow_forward_24px.xml
deleted file mode 100644
index a7284b2..0000000
--- a/res/drawable/ic_arrow_forward_24px.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- Copyright (C) 2018 The Android Open Source 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.0"
- android:viewportHeight="24.0">
- <path
- android:fillColor="?android:attr/colorForeground"
- android:pathData="M7.59,18.59l1.41,1.41l8,-8l-8,-8l-1.41,1.41l6.58,6.59"/>
-</vector>
diff --git a/res/drawable/ic_check_circle_filled_24px.xml b/res/drawable/ic_check_circle_filled_24px.xml
index cacf1d8..01d2091 100644
--- a/res/drawable/ic_check_circle_filled_24px.xml
+++ b/res/drawable/ic_check_circle_filled_24px.xml
@@ -19,7 +19,7 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
- android:fillColor="@color/selected_check_background_color"
+ android:fillColor="@color/accent_color"
android:pathData="M12,2C6.5,2 2,6.5 2,12s4.5,10 10,10s10,-4.5 10,-10S17.5,2 12,2zM10,17l-4,-4l1.4,-1.4l2.6,2.6l6.6,-6.6L18,9L10,17z"/>
<path
android:pathData="m8.0085,14.9866 l-1.9939,-1.994 0.6892,-0.6889 0.6892,-0.6889 1.2925,1.2926c0.7109,0.711 1.3035,1.2926 1.3169,1.2926 0.0134,0 1.5034,-1.4789 3.3111,-3.2865l3.2866,-3.2865 0.689,0.689 0.689,0.689 -3.9878,3.9878 -3.9878,3.9878z"
diff --git a/res/drawable/major_a_b.xml b/res/drawable/major_a_b.xml
deleted file mode 100644
index 3878fbd..0000000
--- a/res/drawable/major_a_b.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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:name="major_a_b"
- android:width="16dp"
- android:viewportWidth="16"
- android:height="8dp"
- android:viewportHeight="8"
- android:tint="?android:attr/colorControlNormal">
- <group
- android:name="dot_01"
- android:translateX="3.25"
- android:translateY="4" >
- <group
- android:name="dot_group" >
- <path
- android:name="dot"
- android:fillColor="#FFFFFFFF"
- android:pathData="M 0.0,-2.75 l 0.0,0.0 c 1.51878306195,0.0 2.75,1.23121693805 2.75,2.75 l 0.0,0.0 c 0.0,1.51878306195 -1.23121693805,2.75 -2.75,2.75 l 0.0,0.0 c -1.51878306195,0.0 -2.75,-1.23121693805 -2.75,-2.75 l 0.0,0.0 c 0.0,-1.51878306195 1.23121693805,-2.75 2.75,-2.75 Z" />
- </group>
- </group>
-</vector>
diff --git a/res/drawable/major_a_b_animation.xml b/res/drawable/major_a_b_animation.xml
deleted file mode 100644
index d9f0c80..0000000
--- a/res/drawable/major_a_b_animation.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<animated-vector
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:drawable="@drawable/major_a_b" >
- <target
- android:name="dot_01"
- android:animation="@anim/major_a_b_dot_01_animation" />
- <target
- android:name="dot"
- android:animation="@anim/major_a_b_dot_animation" />
-</animated-vector>
diff --git a/res/drawable/major_b_a.xml b/res/drawable/major_b_a.xml
deleted file mode 100644
index 6fc80ad..0000000
--- a/res/drawable/major_b_a.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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:name="major_b_a"
- android:width="16dp"
- android:viewportWidth="16"
- android:height="8dp"
- android:viewportHeight="8"
- android:tint="?android:attr/colorControlNormal" >
- <group
- android:name="dot_01"
- android:translateX="8"
- android:translateY="4" >
- <group
- android:name="dot_group" >
- <path
- android:name="dot"
- android:fillColor="#FFFFFFFF"
- android:pathData="M -4.75,-2.75 l 9.5,0.0 c 1.51878306195,0.0 2.75,1.23121693805 2.75,2.75 l 0.0,0.0 c 0.0,1.51878306195 -1.23121693805,2.75 -2.75,2.75 l -9.5,0.0 c -1.51878306195,0.0 -2.75,-1.23121693805 -2.75,-2.75 l 0.0,0.0 c 0.0,-1.51878306195 1.23121693805,-2.75 2.75,-2.75 Z" />
- </group>
- </group>
-</vector>
diff --git a/res/drawable/major_b_a_animation.xml b/res/drawable/major_b_a_animation.xml
deleted file mode 100644
index 2e0900a..0000000
--- a/res/drawable/major_b_a_animation.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<animated-vector
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:drawable="@drawable/major_b_a" >
- <target
- android:name="dot_01"
- android:animation="@anim/major_b_a_dot_01_animation" />
- <target
- android:name="dot"
- android:animation="@anim/major_b_a_dot_animation" />
-</animated-vector>
diff --git a/res/drawable/major_b_c.xml b/res/drawable/major_b_c.xml
deleted file mode 100644
index 8d51e20..0000000
--- a/res/drawable/major_b_c.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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:name="major_b_c"
- android:width="16dp"
- android:viewportWidth="16"
- android:height="8dp"
- android:viewportHeight="8"
- android:tint="?android:attr/colorControlNormal" >
- <group
- android:name="dot_01"
- android:translateX="8"
- android:translateY="4" >
- <group
- android:name="dot_group" >
- <path
- android:name="dot"
- android:fillColor="#FFFFFFFF"
- android:pathData="M -4.75,-2.75 l 9.5,0.0 c 1.51878306195,0.0 2.75,1.23121693805 2.75,2.75 l 0.0,0.0 c 0.0,1.51878306195 -1.23121693805,2.75 -2.75,2.75 l -9.5,0.0 c -1.51878306195,0.0 -2.75,-1.23121693805 -2.75,-2.75 l 0.0,0.0 c 0.0,-1.51878306195 1.23121693805,-2.75 2.75,-2.75 Z" />
- </group>
- </group>
-</vector>
diff --git a/res/drawable/major_b_c_animation.xml b/res/drawable/major_b_c_animation.xml
deleted file mode 100644
index ccf1608..0000000
--- a/res/drawable/major_b_c_animation.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<animated-vector
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:drawable="@drawable/major_b_c" >
- <target
- android:name="dot_01"
- android:animation="@anim/major_b_c_dot_01_animation" />
- <target
- android:name="dot"
- android:animation="@anim/major_b_c_dot_animation" />
-</animated-vector>
diff --git a/res/drawable/major_c_b.xml b/res/drawable/major_c_b.xml
deleted file mode 100644
index 9930187..0000000
--- a/res/drawable/major_c_b.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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:name="major_c_b"
- android:width="16dp"
- android:viewportWidth="16"
- android:height="8dp"
- android:viewportHeight="8"
- android:tint="?android:attr/colorControlNormal" >
- <group
- android:name="dot_01"
- android:translateX="12.75"
- android:translateY="4" >
- <group
- android:name="dot_group" >
- <path
- android:name="dot"
- android:fillColor="#FFFFFFFF"
- android:pathData="M 0.0,-2.75 l 0.0,0.0 c 1.51878306195,0.0 2.75,1.23121693805 2.75,2.75 l 0.0,0.0 c 0.0,1.51878306195 -1.23121693805,2.75 -2.75,2.75 l 0.0,0.0 c -1.51878306195,0.0 -2.75,-1.23121693805 -2.75,-2.75 l 0.0,0.0 c 0.0,-1.51878306195 1.23121693805,-2.75 2.75,-2.75 Z" />
- </group>
- </group>
-</vector>
diff --git a/res/drawable/major_c_b_animation.xml b/res/drawable/major_c_b_animation.xml
deleted file mode 100644
index 21ea528..0000000
--- a/res/drawable/major_c_b_animation.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<animated-vector
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:drawable="@drawable/major_c_b" >
- <target
- android:name="dot_01"
- android:animation="@anim/major_c_b_dot_01_animation" />
- <target
- android:name="dot"
- android:animation="@anim/major_c_b_dot_animation" />
-</animated-vector>
diff --git a/res/drawable/minor_a_b.xml b/res/drawable/minor_a_b.xml
deleted file mode 100644
index 522d2e9..0000000
--- a/res/drawable/minor_a_b.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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:name="minor_a_b"
- android:width="16dp"
- android:viewportWidth="16"
- android:height="8dp"
- android:viewportHeight="8" >
- <group
- android:name="dot_02"
- android:translateX="3.25"
- android:translateY="4" >
- <group
- android:name="dot_group" >
- <path
- android:name="dot"
- android:fillColor="#FFFFFFFF"
- android:pathData="M 0.0,-2.75 l 0.0,0.0 c 1.51878306195,0.0 2.75,1.23121693805 2.75,2.75 l 0.0,0.0 c 0.0,1.51878306195 -1.23121693805,2.75 -2.75,2.75 l 0.0,0.0 c -1.51878306195,0.0 -2.75,-1.23121693805 -2.75,-2.75 l 0.0,0.0 c 0.0,-1.51878306195 1.23121693805,-2.75 2.75,-2.75 Z" />
- </group>
- </group>
-</vector>
diff --git a/res/drawable/minor_a_b_animation.xml b/res/drawable/minor_a_b_animation.xml
deleted file mode 100644
index 9784b84..0000000
--- a/res/drawable/minor_a_b_animation.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<animated-vector
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:drawable="@drawable/minor_a_b" >
- <target
- android:name="dot_02"
- android:animation="@anim/minor_a_b_dot_02_animation" />
-</animated-vector>
diff --git a/res/drawable/minor_b_a.xml b/res/drawable/minor_b_a.xml
deleted file mode 100644
index 4f3029a..0000000
--- a/res/drawable/minor_b_a.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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:name="minor_b_a"
- android:width="16dp"
- android:viewportWidth="16"
- android:height="8dp"
- android:viewportHeight="8" >
- <group
- android:name="dot_02"
- android:translateX="8"
- android:translateY="4" >
- <group
- android:name="dot_group" >
- <path
- android:name="dot"
- android:fillColor="#FFFFFFFF"
- android:pathData="M 0.0,-2.75 l 0.0,0.0 c 1.51878306195,0.0 2.75,1.23121693805 2.75,2.75 l 0.0,0.0 c 0.0,1.51878306195 -1.23121693805,2.75 -2.75,2.75 l 0.0,0.0 c -1.51878306195,0.0 -2.75,-1.23121693805 -2.75,-2.75 l 0.0,0.0 c 0.0,-1.51878306195 1.23121693805,-2.75 2.75,-2.75 Z" />
- </group>
- </group>
-</vector>
diff --git a/res/drawable/minor_b_a_animation.xml b/res/drawable/minor_b_a_animation.xml
deleted file mode 100644
index 4cb26c1..0000000
--- a/res/drawable/minor_b_a_animation.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<animated-vector
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:drawable="@drawable/minor_b_a" >
- <target
- android:name="dot_02"
- android:animation="@anim/minor_b_a_dot_02_animation" />
-</animated-vector>
diff --git a/res/drawable/minor_b_c.xml b/res/drawable/minor_b_c.xml
deleted file mode 100644
index 0757071..0000000
--- a/res/drawable/minor_b_c.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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:name="minor_b_c"
- android:width="16dp"
- android:viewportWidth="16"
- android:height="8dp"
- android:viewportHeight="8" >
- <group
- android:name="dot_02"
- android:translateX="8"
- android:translateY="4" >
- <group
- android:name="dot_group" >
- <path
- android:name="dot"
- android:fillColor="#FFFFFFFF"
- android:pathData="M 0.0,-2.75 l 0.0,0.0 c 1.51878306195,0.0 2.75,1.23121693805 2.75,2.75 l 0.0,0.0 c 0.0,1.51878306195 -1.23121693805,2.75 -2.75,2.75 l 0.0,0.0 c -1.51878306195,0.0 -2.75,-1.23121693805 -2.75,-2.75 l 0.0,0.0 c 0.0,-1.51878306195 1.23121693805,-2.75 2.75,-2.75 Z" />
- </group>
- </group>
-</vector>
diff --git a/res/drawable/minor_b_c_animation.xml b/res/drawable/minor_b_c_animation.xml
deleted file mode 100644
index c2aa8b7..0000000
--- a/res/drawable/minor_b_c_animation.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<animated-vector
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:drawable="@drawable/minor_b_c" >
- <target
- android:name="dot_02"
- android:animation="@anim/minor_b_c_dot_02_animation" />
-</animated-vector>
diff --git a/res/drawable/minor_c_b.xml b/res/drawable/minor_c_b.xml
deleted file mode 100644
index ba056fb..0000000
--- a/res/drawable/minor_c_b.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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:name="minor_c_b"
- android:width="16dp"
- android:viewportWidth="16"
- android:height="8dp"
- android:viewportHeight="8" >
- <group
- android:name="dot_02"
- android:translateX="12.75"
- android:translateY="4" >
- <group
- android:name="dot_group" >
- <path
- android:name="dot"
- android:fillColor="#FFFFFFFF"
- android:pathData="M 0.0,-2.75 l 0.0,0.0 c 1.51878306195,0.0 2.75,1.23121693805 2.75,2.75 l 0.0,0.0 c 0.0,1.51878306195 -1.23121693805,2.75 -2.75,2.75 l 0.0,0.0 c -1.51878306195,0.0 -2.75,-1.23121693805 -2.75,-2.75 l 0.0,0.0 c 0.0,-1.51878306195 1.23121693805,-2.75 2.75,-2.75 Z" />
- </group>
- </group>
-</vector>
diff --git a/res/drawable/minor_c_b_animation.xml b/res/drawable/minor_c_b_animation.xml
deleted file mode 100644
index 9c9a8cc..0000000
--- a/res/drawable/minor_c_b_animation.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
--->
-<animated-vector
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:drawable="@drawable/minor_c_b" >
- <target
- android:name="dot_02"
- android:animation="@anim/minor_c_b_dot_02_animation" />
-</animated-vector>
diff --git a/res/drawable/option_border.xml b/res/drawable/option_border.xml
deleted file mode 100644
index 6ce76c7..0000000
--- a/res/drawable/option_border.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!--
- Copyright (C) 2019 The Android Open Source 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.
--->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
- android:color="?android:attr/colorControlHighlight">
- <item android:id="@android:id/mask">
- <shape android:shape="rectangle">
- <solid android:color="@android:color/white"/>
- <corners android:radius="4dp" />
- </shape>
- </item>
- <item android:drawable="@drawable/option_border_edge" />
-</ripple>
diff --git a/res/drawable/option_border_edge.xml b/res/drawable/option_border_edge.xml
deleted file mode 100644
index 943920e..0000000
--- a/res/drawable/option_border_edge.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2019 The Android Open Source 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.
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_activated="true">
- <shape android:shape="rectangle">
- <stroke
- android:color="@color/option_border_color"
- android:width="@dimen/option_selected_border_width" />
- <corners android:radius="4dp" />
- </shape>
- </item>
- <item android:state_activated="false">
- <shape android:shape="rectangle">
- <stroke
- android:color="@color/option_border_color"
- android:width="@dimen/option_border_width" />
- <corners android:radius="4dp" />
- </shape>
- </item>
-</selector>
diff --git a/res/layout-land/fragment_clock_picker.xml b/res/layout-land/fragment_clock_picker.xml
index b5044b7..e2c5d34 100644
--- a/res/layout-land/fragment_clock_picker.xml
+++ b/res/layout-land/fragment_clock_picker.xml
@@ -33,7 +33,7 @@
android:layout_height="match_parent"
android:orientation="horizontal">
- <com.android.customization.widget.PreviewPager
+ <com.android.wallpaper.widget.PreviewPager
android:id="@+id/clock_preview_pager"
android:layout_width="0dp"
android:layout_height="match_parent"
@@ -86,7 +86,7 @@
android:visibility="gone">
<TextView
android:id="@+id/error_message"
- style="@style/HeaderTextAppearance"
+ style="@style/TitleTextAppearance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
diff --git a/res/layout-land/fragment_custom_theme_component.xml b/res/layout-land/fragment_custom_theme_component.xml
index cc834e3..6883d63 100644
--- a/res/layout-land/fragment_custom_theme_component.xml
+++ b/res/layout-land/fragment_custom_theme_component.xml
@@ -62,7 +62,7 @@
android:layout_gravity="center"
android:layout_margin="10dp"
android:textAlignment="center"
- android:textAppearance="@style/HeaderTextAppearance"/>
+ android:textAppearance="@style/TitleTextAppearance"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/options_container"
diff --git a/res/layout-land/fragment_custom_theme_name.xml b/res/layout-land/fragment_custom_theme_name.xml
index 0f190a8..3c85f35 100644
--- a/res/layout-land/fragment_custom_theme_name.xml
+++ b/res/layout-land/fragment_custom_theme_name.xml
@@ -59,7 +59,7 @@
android:layout_gravity="center"
android:layout_margin="10dp"
android:textAlignment="center"
- android:textAppearance="@style/HeaderTextAppearance"/>
+ android:textAppearance="@style/TitleTextAppearance"/>
<FrameLayout
android:layout_width="match_parent"
diff --git a/res/layout-land/fragment_grid_picker.xml b/res/layout-land/fragment_grid_picker.xml
index 6fc5933..6c2d8c5 100644
--- a/res/layout-land/fragment_grid_picker.xml
+++ b/res/layout-land/fragment_grid_picker.xml
@@ -31,7 +31,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
- <com.android.customization.widget.PreviewPager
+ <com.android.wallpaper.widget.PreviewPager
android:id="@+id/grid_preview_pager"
android:layout_width="0dp"
android:layout_height="match_parent"
@@ -39,34 +39,18 @@
android:background="@color/secondary_color"
app:card_style="screen_aspect_ratio"/>
- <LinearLayout
+ <FrameLayout
android:id="@+id/options_section"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
- android:paddingVertical="10dp"
- android:orientation="vertical">
+ android:paddingVertical="10dp">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/options_container"
android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"/>
-
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingHorizontal="10dp">
- <Button
- android:id="@+id/apply_button"
- style="@style/ActionPrimaryButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentEnd="true"
- android:text="@string/apply_btn"/>
- </RelativeLayout>
-
- </LinearLayout>
+ android:layout_height="match_parent"/>
+ </FrameLayout>
</LinearLayout>
<androidx.core.widget.ContentLoadingProgressBar
android:id="@+id/loading_indicator"
@@ -84,7 +68,7 @@
android:visibility="gone">
<TextView
android:id="@+id/error_message"
- style="@style/HeaderTextAppearance"
+ style="@style/TitleTextAppearance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
diff --git a/res/layout-land/fragment_theme_picker.xml b/res/layout-land/fragment_theme_picker.xml
index cd3cdbd..dc30232 100644
--- a/res/layout-land/fragment_theme_picker.xml
+++ b/res/layout-land/fragment_theme_picker.xml
@@ -31,7 +31,7 @@
android:layout_height="match_parent"
android:orientation="horizontal">
- <com.android.customization.widget.PreviewPager
+ <com.android.wallpaper.widget.PreviewPager
android:id="@+id/theme_preview_pager"
android:layout_width="0dp"
android:layout_height="match_parent"
@@ -55,30 +55,14 @@
android:layout_height="0dp"
android:layout_weight="1"/>
- <RelativeLayout
- android:layout_width="match_parent"
+ <Button
+ android:id="@+id/apply_button"
+ style="@style/ActionPrimaryButton"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:background="@null"
- android:paddingHorizontal="10dp">
- <CheckBox
- android:id="@+id/use_my_wallpaper"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentStart="true"
- android:layout_centerVertical="true"
- android:layout_toStartOf="@+id/apply_button"
- android:ellipsize="end"
- android:paddingLeft="4dp"
- android:minHeight="@dimen/min_taptarget_height"
- android:text="@string/keep_my_wallpaper"/>
- <Button
- android:id="@+id/apply_button"
- style="@style/ActionPrimaryButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentEnd="true"
- android:text="@string/apply_theme_btn"/>
- </RelativeLayout>
+ android:layout_gravity="end"
+ android:paddingHorizontal="10dp"
+ android:text="@string/apply_theme_btn"/>
</LinearLayout>
</LinearLayout>
@@ -98,7 +82,7 @@
android:visibility="gone">
<TextView
android:id="@+id/error_message"
- style="@style/HeaderTextAppearance"
+ style="@style/TitleTextAppearance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
diff --git a/res/layout/activity_customization_picker_main.xml b/res/layout/activity_customization_picker_main.xml
index 5910ab6..40af303 100755
--- a/res/layout/activity_customization_picker_main.xml
+++ b/res/layout/activity_customization_picker_main.xml
@@ -36,4 +36,6 @@
app:labelVisibilityMode="labeled"
app:menu="@menu/bottom_navigation_menu"/>
+ <include layout="@layout/bottom_action_bar" />
+
</FrameLayout>
diff --git a/res/layout/fragment_clock_picker.xml b/res/layout/fragment_clock_picker.xml
index e7530f3..6b9f94c 100644
--- a/res/layout/fragment_clock_picker.xml
+++ b/res/layout/fragment_clock_picker.xml
@@ -32,7 +32,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <com.android.customization.widget.PreviewPager
+ <com.android.wallpaper.widget.PreviewPager
android:id="@+id/clock_preview_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -100,7 +100,7 @@
android:visibility="gone">
<TextView
android:id="@+id/error_message"
- style="@style/HeaderTextAppearance"
+ style="@style/TitleTextAppearance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
diff --git a/res/layout/fragment_custom_theme_component.xml b/res/layout/fragment_custom_theme_component.xml
index fb9c36c..cf80192 100644
--- a/res/layout/fragment_custom_theme_component.xml
+++ b/res/layout/fragment_custom_theme_component.xml
@@ -76,7 +76,7 @@
android:layout_marginEnd="10dp"
android:layout_marginBottom="10dp"
android:textAlignment="center"
- android:textAppearance="@style/HeaderTextAppearance"
+ android:textAppearance="@style/TitleTextAppearance"
android:textSize="@dimen/component_options_title_size"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
diff --git a/res/layout/fragment_custom_theme_name.xml b/res/layout/fragment_custom_theme_name.xml
index 6a3d1ba..0a18aab 100644
--- a/res/layout/fragment_custom_theme_name.xml
+++ b/res/layout/fragment_custom_theme_name.xml
@@ -67,7 +67,7 @@
android:layout_marginEnd="10dp"
android:layout_marginBottom="10dp"
android:textAlignment="center"
- android:textAppearance="@style/HeaderTextAppearance"
+ android:textAppearance="@style/TitleTextAppearance"
android:textSize="@dimen/component_options_title_size"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
diff --git a/res/layout/fragment_grid_picker.xml b/res/layout/fragment_grid_picker.xml
index 182d795..5bf96e1 100644
--- a/res/layout/fragment_grid_picker.xml
+++ b/res/layout/fragment_grid_picker.xml
@@ -32,56 +32,46 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <com.android.customization.widget.PreviewPager
+ <com.android.wallpaper.widget.PreviewPager
android:id="@+id/grid_preview_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/preview_pager_background"
app:card_style="screen_aspect_ratio"
app:layout_constrainedHeight="true"
- app:layout_constraintBottom_toTopOf="@id/options_container"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/options_title"
+ app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_max="@dimen/preview_pager_max_height"
app:layout_constraintHeight_min="@dimen/preview_pager_min_height"
app:layout_constraintVertical_bias="0.0"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="spread_inside"/>
+ <TextView
+ android:id="@+id/options_title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:paddingVertical="18dp"
+ android:lineHeight="24dp"
+ android:singleLine="true"
+ android:text="@string/grid_options_title"
+ android:textAppearance="@style/TitleTextAppearance"
+ app:layout_constraintTop_toBottomOf="@id/grid_preview_pager"
+ app:layout_constraintBottom_toTopOf="@id/options_container"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/options_container"
android:layout_width="match_parent"
android:layout_height="@dimen/options_container_height"
android:layout_gravity="center_horizontal"
- android:layout_marginTop="10dp"
- app:layout_constraintBottom_toTopOf="@id/placeholder"
+ app:layout_constraintTop_toBottomOf="@+id/options_title"
+ app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/grid_preview_pager"
app:layout_constraintVertical_bias="1.0"/>
-
- <Space
- android:id="@+id/placeholder"
- android:layout_width="match_parent"
- android:layout_height="@dimen/min_taptarget_height"
- app:layout_constraintBottom_toTopOf="@id/apply_button"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@id/options_container"
- app:layout_constraintVertical_bias="1.0"/>
-
- <Button
- android:id="@+id/apply_button"
- style="@style/ActionPrimaryButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="end"
- android:layout_marginEnd="10dp"
- android:layout_marginVertical="10dp"
- android:layout_weight="1"
- android:text="@string/apply_theme_btn"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"/>
-
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.core.widget.ContentLoadingProgressBar
@@ -99,7 +89,7 @@
android:visibility="gone">
<TextView
android:id="@+id/error_message"
- style="@style/HeaderTextAppearance"
+ style="@style/TitleTextAppearance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
diff --git a/res/layout/fragment_theme_picker.xml b/res/layout/fragment_theme_picker.xml
index 8272bde..d15d93f 100644
--- a/res/layout/fragment_theme_picker.xml
+++ b/res/layout/fragment_theme_picker.xml
@@ -32,7 +32,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <com.android.customization.widget.PreviewPager
+ <com.android.wallpaper.widget.PreviewPager
android:id="@+id/theme_preview_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -53,29 +53,11 @@
android:layout_gravity="bottom|center_horizontal"
android:layout_marginTop="10dp"
android:layout_weight="1"
- app:layout_constraintBottom_toTopOf="@id/use_my_wallpaper"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/theme_preview_pager"
app:layout_constraintVertical_bias="1.0"/>
- <CheckBox
- android:id="@+id/use_my_wallpaper"
- android:layout_width="wrap_content"
- android:layout_height="@dimen/min_taptarget_height"
- android:layout_marginStart="10dp"
- android:ellipsize="end"
- android:gravity="start|center_vertical"
- android:paddingLeft="4dp"
- android:text="@string/keep_my_wallpaper"
- app:layout_constraintBottom_toTopOf="@id/apply_button"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHeight_min="@dimen/min_taptarget_height"
- app:layout_constraintHorizontal_bias="0.0"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@id/options_container"
- app:layout_constraintVertical_bias="1.0"/>
-
<Button
android:id="@+id/apply_button"
style="@style/ActionPrimaryButton"
@@ -105,7 +87,7 @@
android:visibility="gone">
<TextView
android:id="@+id/error_message"
- style="@style/HeaderTextAppearance"
+ style="@style/TitleTextAppearance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
diff --git a/res/layout/grid_preview_card.xml b/res/layout/grid_preview_card.xml
index ae66b83..90b5578 100644
--- a/res/layout/grid_preview_card.xml
+++ b/res/layout/grid_preview_card.xml
@@ -24,6 +24,12 @@
android:id="@+id/grid_preview_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/primary_color"/>
+ android:background="@color/primary_color" />
+
+ <SurfaceView
+ android:id="@+id/grid_preview_surface"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@color/primary_color" />
</androidx.cardview.widget.CardView>
\ No newline at end of file
diff --git a/res/layout/preview_card_wallpaper_content.xml b/res/layout/preview_card_wallpaper_content.xml
deleted file mode 100644
index 0b43c2f..0000000
--- a/res/layout/preview_card_wallpaper_content.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2019 The Android Open Source 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.
--->
-<FrameLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/preview_static_image"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom"
- tools:showIn="@layout/theme_preview_card">
- <TextView
- style="@style/CardTitleTextAppearance"
- android:id="@+id/wallpaper_description"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center_horizontal|bottom"/>
-</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/preview_pager.xml b/res/layout/preview_pager.xml
deleted file mode 100644
index 43f8fb6..0000000
--- a/res/layout/preview_pager.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- Copyright (C) 2018 The Android Open Source 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.
--->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <androidx.viewpager.widget.ViewPager
- android:id="@+id/preview_viewpager"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"/>
-
- <FrameLayout
- android:id="@+id/indicator_container"
- android:layout_width="match_parent"
- android:layout_height="@dimen/indicator_container_height"
- android:layout_gravity="bottom">
-
- <com.android.customization.widget.PageIndicator
- android:id="@+id/page_indicator"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center" />
-
- <FrameLayout
- android:id="@+id/arrow_previous"
- android:layout_width="@dimen/indicator_arrow_touch_area_size"
- android:layout_height="@dimen/indicator_arrow_touch_area_size"
- android:layout_gravity="center_vertical|left"
- android:layout_marginStart="@dimen/indicator_arrow_container_margin_horizontal"
- android:background="?android:attr/selectableItemBackgroundBorderless"
- android:contentDescription="@string/previous_page_content_description"
- android:visibility="gone"
- tools:ignore="RtlHardcoded">
-
- <ImageView
- android:layout_width="@dimen/indicator_arrow_size"
- android:layout_height="@dimen/indicator_arrow_size"
- android:layout_gravity="center"
- android:contentDescription="@null"
- android:tint="@color/indicator_arrow_color"
- android:src="@drawable/ic_arrow_back_24px" />
- </FrameLayout>
-
- <FrameLayout
- android:id="@+id/arrow_next"
- android:layout_width="@dimen/indicator_arrow_touch_area_size"
- android:layout_height="@dimen/indicator_arrow_touch_area_size"
- android:layout_gravity="center_vertical|right"
- android:layout_marginEnd="@dimen/indicator_arrow_container_margin_horizontal"
- android:background="?android:attr/selectableItemBackgroundBorderless"
- android:contentDescription="@string/next_page_content_description"
- android:visibility="gone"
- tools:ignore="RtlHardcoded">
-
- <ImageView
- android:layout_width="@dimen/indicator_arrow_size"
- android:layout_height="@dimen/indicator_arrow_size"
- android:layout_gravity="center"
- android:contentDescription="@null"
- android:tint="@color/indicator_arrow_color"
- android:src="@drawable/ic_arrow_forward_24px" />
- </FrameLayout>
- </FrameLayout>
-</LinearLayout>
\ No newline at end of file
diff --git a/res/menu/bottom_navigation_menu.xml b/res/menu/bottom_navigation_menu.xml
index d477aaf..b64bf8d 100644
--- a/res/menu/bottom_navigation_menu.xml
+++ b/res/menu/bottom_navigation_menu.xml
@@ -17,19 +17,19 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<!-- TODO (santie): replace icons with real ones when available -->
<item
+ android:id="@+id/nav_wallpaper"
+ android:title="@string/wallpaper_title"
+ android:icon="@drawable/ic_nav_wallpaper" />
+ <item
android:id="@+id/nav_theme"
android:title="@string/theme_title"
android:icon="@drawable/ic_nav_theme" />
<item
- android:id="@+id/nav_clock"
- android:title="@string/clock_title"
- android:icon="@drawable/ic_nav_clock" />
- <item
android:id="@+id/nav_grid"
android:title="@string/grid_title"
android:icon="@drawable/ic_nav_grid" />
<item
- android:id="@+id/nav_wallpaper"
- android:title="@string/wallpaper_title"
- android:icon="@drawable/ic_nav_wallpaper" />
+ android:id="@+id/nav_clock"
+ android:title="@string/clock_title"
+ android:icon="@drawable/ic_nav_clock" />
</menu>
\ No newline at end of file
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index d0e0226..39173b0 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -47,7 +47,7 @@
<string name="apply_theme_error_msg" msgid="791364062636538317">"حدثت مشكلة أثناء تطبيق النمط."</string>
<string name="custom_theme_next" msgid="6235420097213197301">"التالي"</string>
<string name="custom_theme_previous" msgid="4941132112640503022">"الخطوة السابقة"</string>
- <string name="custom_theme_title" msgid="2192300350332693631">"مخصّص <xliff:g id="ID_1">%1$d</xliff:g>"</string>
+ <string name="custom_theme_title" msgid="2192300350332693631">"<xliff:g id="ID_1">%1$d</xliff:g> مخصّصة"</string>
<string name="custom_theme_fragment_title" msgid="6615547284702040280">"النمط المخصّص"</string>
<string name="custom_theme_delete" msgid="4744494663184126202">"حذف"</string>
<string name="font_component_title" msgid="8800340833695292049">"اختيار الخط"</string>
diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml
index 1e8c4e1..a1b4262 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -24,7 +24,7 @@
<string name="wallpaper_title" msgid="6952635398953194544">"Шпалеры"</string>
<string name="apply_theme_btn" msgid="6293081192321303991">"Ужыць"</string>
<string name="edit_custom_theme_lbl" msgid="5211377705710775224">"Дакраніцеся, каб рэдагаваць"</string>
- <string name="keep_my_wallpaper" msgid="8012385376769568517">"Захаваць бягучыя шпалеры"</string>
+ <string name="keep_my_wallpaper" msgid="8012385376769568517">"Захаваць цяперашнія шпалеры"</string>
<string name="apply_btn" msgid="7965877231041987336">"Ужыць"</string>
<string name="accessibility_preview_pager" msgid="3548503287402185430">"Старонка <xliff:g id="ID_1">%1$d</xliff:g> з <xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="next_page_content_description" msgid="5290226604542300962">"Далей"</string>
diff --git a/res/values-bs/strings.xml b/res/values-bs/strings.xml
index 45ab40e..c09fdef 100644
--- a/res/values-bs/strings.xml
+++ b/res/values-bs/strings.xml
@@ -23,7 +23,7 @@
<string name="grid_title" msgid="2825094404523390773">"Mreža"</string>
<string name="wallpaper_title" msgid="6952635398953194544">"Pozadinska slika"</string>
<string name="apply_theme_btn" msgid="6293081192321303991">"Primijeni"</string>
- <string name="edit_custom_theme_lbl" msgid="5211377705710775224">"Dodirnite da uredite"</string>
+ <string name="edit_custom_theme_lbl" msgid="5211377705710775224">"Dodirnite da izmijenite"</string>
<string name="keep_my_wallpaper" msgid="8012385376769568517">"Zadrži trenutnu pozadinsku sliku"</string>
<string name="apply_btn" msgid="7965877231041987336">"Primijeni"</string>
<string name="accessibility_preview_pager" msgid="3548503287402185430">"Stranica <xliff:g id="ID_1">%1$d</xliff:g> od <xliff:g id="ID_2">%2$d</xliff:g>"</string>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index deb9625..fae57a5 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -17,8 +17,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_name" msgid="6995669566699638946">"Στιλ και ταπετσαρίες"</string>
- <string name="theme_title" msgid="2144932106319405101">"Στιλ"</string>
+ <string name="app_name" msgid="6995669566699638946">"Στυλ και ταπετσαρίες"</string>
+ <string name="theme_title" msgid="2144932106319405101">"Στυλ"</string>
<string name="clock_title" msgid="2126046720254613991">"Ρολόι"</string>
<string name="grid_title" msgid="2825094404523390773">"Πλέγμα"</string>
<string name="wallpaper_title" msgid="6952635398953194544">"Ταπετσαρία"</string>
@@ -42,13 +42,13 @@
<string name="font_card_title" msgid="2343292653502548685">"ΑΒΓ • αβγ • 123"</string>
<string name="font_card_body" msgid="6790525594503904468">"Προσθέστε τις αγαπημένες σας γραμματοσειρές σε κάθε οθόνη"</string>
<string name="grid_title_pattern" msgid="9188866567612607806">"<xliff:g id="ID_1">%1$d</xliff:g>x<xliff:g id="ID_2">%2$d</xliff:g>"</string>
- <string name="applied_theme_msg" msgid="7348498271552054431">"Εφαρμόστηκε στιλ"</string>
+ <string name="applied_theme_msg" msgid="7348498271552054431">"Εφαρμόστηκε στυλ"</string>
<string name="applied_clock_msg" msgid="1938218786265793285">"Το ρολόι εφαρμόστηκε"</string>
- <string name="apply_theme_error_msg" msgid="791364062636538317">"Παρουσιάστηκε ένα πρόβλημα με την εφαρμογή του στιλ"</string>
+ <string name="apply_theme_error_msg" msgid="791364062636538317">"Παρουσιάστηκε ένα πρόβλημα με την εφαρμογή του στυλ"</string>
<string name="custom_theme_next" msgid="6235420097213197301">"Επόμενο"</string>
<string name="custom_theme_previous" msgid="4941132112640503022">"Προηγούμενο"</string>
<string name="custom_theme_title" msgid="2192300350332693631">"Προσαρμοσμένο <xliff:g id="ID_1">%1$d</xliff:g>"</string>
- <string name="custom_theme_fragment_title" msgid="6615547284702040280">"Προσαρμοσμένο στιλ"</string>
+ <string name="custom_theme_fragment_title" msgid="6615547284702040280">"Προσαρμοσμένο στυλ"</string>
<string name="custom_theme_delete" msgid="4744494663184126202">"Διαγραφή"</string>
<string name="font_component_title" msgid="8800340833695292049">"Επιλέξτε γραμματοσειρά"</string>
<string name="icon_component_title" msgid="5779787138399083903">"Επιλογή εικονιδίων"</string>
@@ -61,7 +61,7 @@
<string name="cancel" msgid="4651030493668562067">"Ακύρωση"</string>
<string name="set_theme_wallpaper_dialog_message" msgid="2179661027350908003">"Ορισμός φόντου στιλ"</string>
<string name="use_style_instead_title" msgid="1578754995763917502">"Χρήση <xliff:g id="ID_1">%1$s</xliff:g> εναλλακτικά;"</string>
- <string name="use_style_instead_body" msgid="3051937045807471496">"Τα στοιχεία που επιλέγετε αντιστοιχούν στο στιλ <xliff:g id="ID_1">%1$s</xliff:g>. Θέλετε να χρησιμοποιήσετε εναλλακτικά το στιλ <xliff:g id="ID_2">%1$s</xliff:g>;"</string>
+ <string name="use_style_instead_body" msgid="3051937045807471496">"Τα στοιχεία που επιλέγετε αντιστοιχούν στο στυλ <xliff:g id="ID_1">%1$s</xliff:g>. Θέλετε να χρησιμοποιήσετε εναλλακτικά το στυλ <xliff:g id="ID_2">%1$s</xliff:g>;"</string>
<string name="use_style_button" msgid="1754493078383627019">"Χρήση <xliff:g id="ID_1">%1$s</xliff:g>"</string>
<string name="no_thanks" msgid="7286616980115687627">"Όχι, ευχαριστώ"</string>
<string name="clock_preview_content_description" msgid="5460561185905717460">"Προεπισκόπηση ρολογιού <xliff:g id="ID_1">%1$s</xliff:g>"</string>
diff --git a/res/values-en-rCA/strings.xml b/res/values-en-rCA/strings.xml
deleted file mode 100644
index 756ad00..0000000
--- a/res/values-en-rCA/strings.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_name" msgid="6995669566699638946">"Styles & wallpapers"</string>
- <string name="theme_title" msgid="2144932106319405101">"Style"</string>
- <string name="clock_title" msgid="2126046720254613991">"Clock"</string>
- <string name="grid_title" msgid="2825094404523390773">"Grid"</string>
- <string name="wallpaper_title" msgid="6952635398953194544">"Wallpaper"</string>
- <string name="apply_theme_btn" msgid="6293081192321303991">"Apply"</string>
- <string name="edit_custom_theme_lbl" msgid="5211377705710775224">"Tap to edit"</string>
- <string name="keep_my_wallpaper" msgid="8012385376769568517">"Keep current wallpaper"</string>
- <string name="apply_btn" msgid="7965877231041987336">"Apply"</string>
- <string name="accessibility_preview_pager" msgid="3548503287402185430">"Page <xliff:g id="ID_1">%1$d</xliff:g> of <xliff:g id="ID_2">%2$d</xliff:g>"</string>
- <string name="next_page_content_description" msgid="5290226604542300962">"Next"</string>
- <string name="previous_page_content_description" msgid="6025726405430262788">"Previous"</string>
- <string name="option_applied_description" msgid="5022305212078053534">"<xliff:g id="ID_1">%1$s</xliff:g>, currently applied"</string>
- <string name="option_applied_previewed_description" msgid="5269654286638446858">"<xliff:g id="ID_1">%1$s</xliff:g>, currently applied and previewed"</string>
- <string name="option_previewed_description" msgid="3467217598865047661">"<xliff:g id="ID_1">%1$s</xliff:g>, currently previewed"</string>
- <string name="theme_description" msgid="3697012391785254635">"Font: <xliff:g id="ID_1">%1$s</xliff:g>, icons: <xliff:g id="ID_2">%2$s</xliff:g>, shape: <xliff:g id="ID_3">%3$s</xliff:g>, colour: <xliff:g id="ID_4">%4$s</xliff:g>"</string>
- <string name="default_theme_title" msgid="2555741736622366797">"Default"</string>
- <string name="preview_name_font" msgid="4465423899630037038">"Font"</string>
- <string name="preview_name_icon" msgid="6818927315316316440">"Icon"</string>
- <string name="preview_name_color" msgid="8776203144994416172">"Colour"</string>
- <string name="preview_name_shape" msgid="5676971146080968721">"Shape"</string>
- <string name="preview_name_wallpaper" msgid="1738652462949531828">"Wallpaper"</string>
- <string name="font_card_title" msgid="2343292653502548685">"ABC • abc • 123"</string>
- <string name="font_card_body" msgid="6790525594503904468">"Add your favourite fonts to every screen"</string>
- <string name="grid_title_pattern" msgid="9188866567612607806">"<xliff:g id="ID_1">%1$d</xliff:g>x<xliff:g id="ID_2">%2$d</xliff:g>"</string>
- <string name="applied_theme_msg" msgid="7348498271552054431">"Style applied"</string>
- <string name="applied_clock_msg" msgid="1938218786265793285">"Clock applied"</string>
- <string name="apply_theme_error_msg" msgid="791364062636538317">"There was a problem applying the style"</string>
- <string name="custom_theme_next" msgid="6235420097213197301">"Next"</string>
- <string name="custom_theme_previous" msgid="4941132112640503022">"Previous"</string>
- <string name="custom_theme_title" msgid="2192300350332693631">"Custom <xliff:g id="ID_1">%1$d</xliff:g>"</string>
- <string name="custom_theme_fragment_title" msgid="6615547284702040280">"Custom Style"</string>
- <string name="custom_theme_delete" msgid="4744494663184126202">"Delete"</string>
- <string name="font_component_title" msgid="8800340833695292049">"Choose font"</string>
- <string name="icon_component_title" msgid="5779787138399083903">"Choose icons"</string>
- <string name="color_component_title" msgid="1194089273921078816">"Choose colour"</string>
- <string name="shape_component_title" msgid="8366847436022025538">"Choose shape"</string>
- <string name="name_component_title" msgid="532425087968663437">"Name your style"</string>
- <string name="icon_component_label" msgid="2625784884001407944">"Icons <xliff:g id="ID_1">%1$d</xliff:g>"</string>
- <string name="delete_custom_theme_confirmation" msgid="4452137183628769394">"Delete Custom style?"</string>
- <string name="delete_custom_theme_button" msgid="5102462988130208824">"Delete"</string>
- <string name="cancel" msgid="4651030493668562067">"Cancel"</string>
- <string name="set_theme_wallpaper_dialog_message" msgid="2179661027350908003">"Set style wallpaper"</string>
- <string name="use_style_instead_title" msgid="1578754995763917502">"Use <xliff:g id="ID_1">%1$s</xliff:g> instead?"</string>
- <string name="use_style_instead_body" msgid="3051937045807471496">"The components you chose match the <xliff:g id="ID_1">%1$s</xliff:g> style. Do you want to use <xliff:g id="ID_2">%1$s</xliff:g> instead?"</string>
- <string name="use_style_button" msgid="1754493078383627019">"Use <xliff:g id="ID_1">%1$s</xliff:g>"</string>
- <string name="no_thanks" msgid="7286616980115687627">"No thanks"</string>
- <string name="clock_preview_content_description" msgid="5460561185905717460">"<xliff:g id="ID_1">%1$s</xliff:g> clock preview"</string>
- <string name="something_went_wrong" msgid="529840112449799117">"Oops! Something went wrong."</string>
-</resources>
diff --git a/res/values-en-rXC/strings.xml b/res/values-en-rXC/strings.xml
deleted file mode 100644
index c92902f..0000000
--- a/res/values-en-rXC/strings.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_name" msgid="6995669566699638946">"Styles & wallpapers"</string>
- <string name="theme_title" msgid="2144932106319405101">"Style"</string>
- <string name="clock_title" msgid="2126046720254613991">"Clock"</string>
- <string name="grid_title" msgid="2825094404523390773">"Grid"</string>
- <string name="wallpaper_title" msgid="6952635398953194544">"Wallpaper"</string>
- <string name="apply_theme_btn" msgid="6293081192321303991">"Apply"</string>
- <string name="edit_custom_theme_lbl" msgid="5211377705710775224">"Tap to edit"</string>
- <string name="keep_my_wallpaper" msgid="8012385376769568517">"Keep current wallpaper"</string>
- <string name="apply_btn" msgid="7965877231041987336">"Apply"</string>
- <string name="accessibility_preview_pager" msgid="3548503287402185430">"Page <xliff:g id="ID_1">%1$d</xliff:g> of <xliff:g id="ID_2">%2$d</xliff:g>"</string>
- <string name="next_page_content_description" msgid="5290226604542300962">"Next"</string>
- <string name="previous_page_content_description" msgid="6025726405430262788">"Previous"</string>
- <string name="option_applied_description" msgid="5022305212078053534">"<xliff:g id="ID_1">%1$s</xliff:g>, currently applied"</string>
- <string name="option_applied_previewed_description" msgid="5269654286638446858">"<xliff:g id="ID_1">%1$s</xliff:g>, currently applied and previewed"</string>
- <string name="option_previewed_description" msgid="3467217598865047661">"<xliff:g id="ID_1">%1$s</xliff:g>, currently previewed"</string>
- <string name="theme_description" msgid="3697012391785254635">"Font: <xliff:g id="ID_1">%1$s</xliff:g>, icons: <xliff:g id="ID_2">%2$s</xliff:g>, shape: <xliff:g id="ID_3">%3$s</xliff:g>, color: <xliff:g id="ID_4">%4$s</xliff:g>"</string>
- <string name="default_theme_title" msgid="2555741736622366797">"Default"</string>
- <string name="preview_name_font" msgid="4465423899630037038">"Font"</string>
- <string name="preview_name_icon" msgid="6818927315316316440">"Icon"</string>
- <string name="preview_name_color" msgid="8776203144994416172">"Color"</string>
- <string name="preview_name_shape" msgid="5676971146080968721">"Shape"</string>
- <string name="preview_name_wallpaper" msgid="1738652462949531828">"Wallpaper"</string>
- <string name="font_card_title" msgid="2343292653502548685">"ABC • abc • 123"</string>
- <string name="font_card_body" msgid="6790525594503904468">"Add your favorite fonts to every screen"</string>
- <string name="grid_title_pattern" msgid="9188866567612607806">"<xliff:g id="ID_1">%1$d</xliff:g>x<xliff:g id="ID_2">%2$d</xliff:g>"</string>
- <string name="applied_theme_msg" msgid="7348498271552054431">"Style applied"</string>
- <string name="applied_clock_msg" msgid="1938218786265793285">"Clock applied"</string>
- <string name="apply_theme_error_msg" msgid="791364062636538317">"There was a problem applying the style"</string>
- <string name="custom_theme_next" msgid="6235420097213197301">"Next"</string>
- <string name="custom_theme_previous" msgid="4941132112640503022">"Previous"</string>
- <string name="custom_theme_title" msgid="2192300350332693631">"Custom <xliff:g id="ID_1">%1$d</xliff:g>"</string>
- <string name="custom_theme_fragment_title" msgid="6615547284702040280">"Custom Style"</string>
- <string name="custom_theme_delete" msgid="4744494663184126202">"Delete"</string>
- <string name="font_component_title" msgid="8800340833695292049">"Choose font"</string>
- <string name="icon_component_title" msgid="5779787138399083903">"Choose icons"</string>
- <string name="color_component_title" msgid="1194089273921078816">"Choose color"</string>
- <string name="shape_component_title" msgid="8366847436022025538">"Choose shape"</string>
- <string name="name_component_title" msgid="532425087968663437">"Name your style"</string>
- <string name="icon_component_label" msgid="2625784884001407944">"Icons <xliff:g id="ID_1">%1$d</xliff:g>"</string>
- <string name="delete_custom_theme_confirmation" msgid="4452137183628769394">"Delete Custom style?"</string>
- <string name="delete_custom_theme_button" msgid="5102462988130208824">"Delete"</string>
- <string name="cancel" msgid="4651030493668562067">"Cancel"</string>
- <string name="set_theme_wallpaper_dialog_message" msgid="2179661027350908003">"Set style wallpaper"</string>
- <string name="use_style_instead_title" msgid="1578754995763917502">"Use <xliff:g id="ID_1">%1$s</xliff:g> instead?"</string>
- <string name="use_style_instead_body" msgid="3051937045807471496">"The components you chose match the <xliff:g id="ID_1">%1$s</xliff:g> style. Do you want to use <xliff:g id="ID_2">%1$s</xliff:g> instead?"</string>
- <string name="use_style_button" msgid="1754493078383627019">"Use <xliff:g id="ID_1">%1$s</xliff:g>"</string>
- <string name="no_thanks" msgid="7286616980115687627">"No, thanks"</string>
- <string name="clock_preview_content_description" msgid="5460561185905717460">"<xliff:g id="ID_1">%1$s</xliff:g> clock preview"</string>
- <string name="something_went_wrong" msgid="529840112449799117">"Oops! Something went wrong."</string>
-</resources>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 830a67b..7c372ae 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -33,7 +33,7 @@
<string name="option_applied_previewed_description" msgid="5269654286638446858">"<xliff:g id="ID_1">%1$s</xliff:g> (opción aplicada y vista previa en curso)"</string>
<string name="option_previewed_description" msgid="3467217598865047661">"<xliff:g id="ID_1">%1$s</xliff:g> (vista previa en curso)"</string>
<string name="theme_description" msgid="3697012391785254635">"Fuente: <xliff:g id="ID_1">%1$s</xliff:g>, íconos: <xliff:g id="ID_2">%2$s</xliff:g>, forma: <xliff:g id="ID_3">%3$s</xliff:g>, color: <xliff:g id="ID_4">%4$s</xliff:g>"</string>
- <string name="default_theme_title" msgid="2555741736622366797">"Predet."</string>
+ <string name="default_theme_title" msgid="2555741736622366797">"Predeter."</string>
<string name="preview_name_font" msgid="4465423899630037038">"Fuente"</string>
<string name="preview_name_icon" msgid="6818927315316316440">"Ícono"</string>
<string name="preview_name_color" msgid="8776203144994416172">"Color"</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 0843232..47b3b8b 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -21,7 +21,7 @@
<string name="theme_title" msgid="2144932106319405101">"Estilo"</string>
<string name="clock_title" msgid="2126046720254613991">"Reloj"</string>
<string name="grid_title" msgid="2825094404523390773">"Cuadrícula"</string>
- <string name="wallpaper_title" msgid="6952635398953194544">"Fondo de pantalla"</string>
+ <string name="wallpaper_title" msgid="6952635398953194544">"Fondo pantalla"</string>
<string name="apply_theme_btn" msgid="6293081192321303991">"Aplicar"</string>
<string name="edit_custom_theme_lbl" msgid="5211377705710775224">"Toca para editar"</string>
<string name="keep_my_wallpaper" msgid="8012385376769568517">"Mantener fondo de pantalla actual"</string>
diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml
index 951ce0e..e461865 100644
--- a/res/values-eu/strings.xml
+++ b/res/values-eu/strings.xml
@@ -32,15 +32,15 @@
<string name="option_applied_description" msgid="5022305212078053534">"<xliff:g id="ID_1">%1$s</xliff:g> (aplikatuta dago)"</string>
<string name="option_applied_previewed_description" msgid="5269654286638446858">"<xliff:g id="ID_1">%1$s</xliff:g> (aplikatuta eta aurrebista gisa ikusgai)"</string>
<string name="option_previewed_description" msgid="3467217598865047661">"<xliff:g id="ID_1">%1$s</xliff:g> (aurrebista gisa ikusgai)"</string>
- <string name="theme_description" msgid="3697012391785254635">"Letra: <xliff:g id="ID_1">%1$s</xliff:g>, ikonoak: <xliff:g id="ID_2">%2$s</xliff:g>, forma: <xliff:g id="ID_3">%3$s</xliff:g>, kolorea: <xliff:g id="ID_4">%4$s</xliff:g>"</string>
+ <string name="theme_description" msgid="3697012391785254635">"Letra-tipoa: <xliff:g id="ID_1">%1$s</xliff:g>, ikonoak: <xliff:g id="ID_2">%2$s</xliff:g>, forma: <xliff:g id="ID_3">%3$s</xliff:g>, kolorea: <xliff:g id="ID_4">%4$s</xliff:g>"</string>
<string name="default_theme_title" msgid="2555741736622366797">"Lehenetsia"</string>
- <string name="preview_name_font" msgid="4465423899630037038">"Letra"</string>
+ <string name="preview_name_font" msgid="4465423899630037038">"Letra-tipoa"</string>
<string name="preview_name_icon" msgid="6818927315316316440">"Ikonoa"</string>
<string name="preview_name_color" msgid="8776203144994416172">"Kolorea"</string>
<string name="preview_name_shape" msgid="5676971146080968721">"Forma"</string>
<string name="preview_name_wallpaper" msgid="1738652462949531828">"Horma-papera"</string>
<string name="font_card_title" msgid="2343292653502548685">"ABC • abc • 123"</string>
- <string name="font_card_body" msgid="6790525594503904468">"Gehitu gogoko dituzun letrak pantaila guztietan"</string>
+ <string name="font_card_body" msgid="6790525594503904468">"Gehitu gogoko dituzun letra-tipoak pantaila guztietan"</string>
<string name="grid_title_pattern" msgid="9188866567612607806">"<xliff:g id="ID_1">%1$d</xliff:g>x<xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="applied_theme_msg" msgid="7348498271552054431">"Aplikatu da estiloa"</string>
<string name="applied_clock_msg" msgid="1938218786265793285">"Aplikatu da erlojua"</string>
@@ -50,7 +50,7 @@
<string name="custom_theme_title" msgid="2192300350332693631">"<xliff:g id="ID_1">%1$d</xliff:g> pertsonalizat."</string>
<string name="custom_theme_fragment_title" msgid="6615547284702040280">"Pertsonalizatu estiloa"</string>
<string name="custom_theme_delete" msgid="4744494663184126202">"Ezabatu"</string>
- <string name="font_component_title" msgid="8800340833695292049">"Aukeratu letra"</string>
+ <string name="font_component_title" msgid="8800340833695292049">"Aukeratu letra-tipoa"</string>
<string name="icon_component_title" msgid="5779787138399083903">"Aukeratu ikonoak"</string>
<string name="color_component_title" msgid="1194089273921078816">"Aukeratu kolorea"</string>
<string name="shape_component_title" msgid="8366847436022025538">"Aukeratu forma"</string>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index 88a85ae..696b5d3 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -32,9 +32,9 @@
<string name="option_applied_description" msgid="5022305212078053534">"<xliff:g id="ID_1">%1$s</xliff:g>, käytössä tällä hetkellä"</string>
<string name="option_applied_previewed_description" msgid="5269654286638446858">"<xliff:g id="ID_1">%1$s</xliff:g>, käytössä ja esikatselussa tällä hetkellä"</string>
<string name="option_previewed_description" msgid="3467217598865047661">"<xliff:g id="ID_1">%1$s</xliff:g>, esikatselussa tällä hetkellä"</string>
- <string name="theme_description" msgid="3697012391785254635">"Fontti: <xliff:g id="ID_1">%1$s</xliff:g>, kuvakkeet: <xliff:g id="ID_2">%2$s</xliff:g>, muoto: <xliff:g id="ID_3">%3$s</xliff:g>, väri: <xliff:g id="ID_4">%4$s</xliff:g>"</string>
+ <string name="theme_description" msgid="3697012391785254635">"Kirjasin: <xliff:g id="ID_1">%1$s</xliff:g>, kuvakkeet: <xliff:g id="ID_2">%2$s</xliff:g>, muoto: <xliff:g id="ID_3">%3$s</xliff:g>, väri: <xliff:g id="ID_4">%4$s</xliff:g>"</string>
<string name="default_theme_title" msgid="2555741736622366797">"Oletus"</string>
- <string name="preview_name_font" msgid="4465423899630037038">"Fontti"</string>
+ <string name="preview_name_font" msgid="4465423899630037038">"Kirjasin"</string>
<string name="preview_name_icon" msgid="6818927315316316440">"Kuvake"</string>
<string name="preview_name_color" msgid="8776203144994416172">"Väri"</string>
<string name="preview_name_shape" msgid="5676971146080968721">"Muoto"</string>
@@ -50,7 +50,7 @@
<string name="custom_theme_title" msgid="2192300350332693631">"Oma <xliff:g id="ID_1">%1$d</xliff:g>"</string>
<string name="custom_theme_fragment_title" msgid="6615547284702040280">"Oma tyyli"</string>
<string name="custom_theme_delete" msgid="4744494663184126202">"Poista"</string>
- <string name="font_component_title" msgid="8800340833695292049">"Valitse fontti"</string>
+ <string name="font_component_title" msgid="8800340833695292049">"Valitse kirjasin"</string>
<string name="icon_component_title" msgid="5779787138399083903">"Valitse kuvakkeet"</string>
<string name="color_component_title" msgid="1194089273921078816">"Valitse väri"</string>
<string name="shape_component_title" msgid="8366847436022025538">"Valitse muoto"</string>
@@ -65,5 +65,5 @@
<string name="use_style_button" msgid="1754493078383627019">"Valitse <xliff:g id="ID_1">%1$s</xliff:g>"</string>
<string name="no_thanks" msgid="7286616980115687627">"Ei kiitos"</string>
<string name="clock_preview_content_description" msgid="5460561185905717460">"Kellon esikatselu: <xliff:g id="ID_1">%1$s</xliff:g>"</string>
- <string name="something_went_wrong" msgid="529840112449799117">"Hups! Jotain meni pieleen.."</string>
+ <string name="something_went_wrong" msgid="529840112449799117">"Hups! Jokin meni vikaan."</string>
</resources>
diff --git a/res/values-gl/strings.xml b/res/values-gl/strings.xml
index e0b66f2..2cdb267 100644
--- a/res/values-gl/strings.xml
+++ b/res/values-gl/strings.xml
@@ -21,7 +21,7 @@
<string name="theme_title" msgid="2144932106319405101">"Estilo"</string>
<string name="clock_title" msgid="2126046720254613991">"Reloxo"</string>
<string name="grid_title" msgid="2825094404523390773">"Grade"</string>
- <string name="wallpaper_title" msgid="6952635398953194544">"Fondo de pantalla"</string>
+ <string name="wallpaper_title" msgid="6952635398953194544">"Fondo pantalla"</string>
<string name="apply_theme_btn" msgid="6293081192321303991">"Aplicar"</string>
<string name="edit_custom_theme_lbl" msgid="5211377705710775224">"Toca para editar"</string>
<string name="keep_my_wallpaper" msgid="8012385376769568517">"Conservar fondo de pantalla actual"</string>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index 7721a18..b3166b1 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -52,7 +52,7 @@
<string name="custom_theme_delete" msgid="4744494663184126202">"Izbriši"</string>
<string name="font_component_title" msgid="8800340833695292049">"Odaberite font"</string>
<string name="icon_component_title" msgid="5779787138399083903">"Odaberite ikone"</string>
- <string name="color_component_title" msgid="1194089273921078816">"Odaberite boju"</string>
+ <string name="color_component_title" msgid="1194089273921078816">"Izbor boje"</string>
<string name="shape_component_title" msgid="8366847436022025538">"Odaberite oblik"</string>
<string name="name_component_title" msgid="532425087968663437">"Unesite naziv svojeg stila"</string>
<string name="icon_component_label" msgid="2625784884001407944">"Ikone <xliff:g id="ID_1">%1$d</xliff:g>"</string>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index 78f505e..ee4df61 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -53,7 +53,7 @@
<string name="font_component_title" msgid="8800340833695292049">"Betűtípus kiválasztása"</string>
<string name="icon_component_title" msgid="5779787138399083903">"Ikonok kiválasztása"</string>
<string name="color_component_title" msgid="1194089273921078816">"Színválasztás"</string>
- <string name="shape_component_title" msgid="8366847436022025538">"Alak kiválasztása"</string>
+ <string name="shape_component_title" msgid="8366847436022025538">"Forma kiválasztása"</string>
<string name="name_component_title" msgid="532425087968663437">"Nevezze el a stílust"</string>
<string name="icon_component_label" msgid="2625784884001407944">"Ikonok <xliff:g id="ID_1">%1$d</xliff:g>"</string>
<string name="delete_custom_theme_confirmation" msgid="4452137183628769394">"Törli az egyéni stílust?"</string>
diff --git a/res/values-hy/strings.xml b/res/values-hy/strings.xml
index 3a4ff22..94f4d1c 100644
--- a/res/values-hy/strings.xml
+++ b/res/values-hy/strings.xml
@@ -53,7 +53,7 @@
<string name="font_component_title" msgid="8800340833695292049">"Ընտրեք տառատեսակ"</string>
<string name="icon_component_title" msgid="5779787138399083903">"Ընտրեք պատկերակներ"</string>
<string name="color_component_title" msgid="1194089273921078816">"Ընտրեք գույնը"</string>
- <string name="shape_component_title" msgid="8366847436022025538">"Ընտրեք ձւապատկեր"</string>
+ <string name="shape_component_title" msgid="8366847436022025538">"Ընտրեք ձև"</string>
<string name="name_component_title" msgid="532425087968663437">"Անվանեք ձեր թեման"</string>
<string name="icon_component_label" msgid="2625784884001407944">"Պատկերակներ <xliff:g id="ID_1">%1$d</xliff:g>"</string>
<string name="delete_custom_theme_confirmation" msgid="4452137183628769394">"Ջնջե՞լ հատուկ ոճը"</string>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index ea503ff..67721f8 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -47,7 +47,7 @@
<string name="apply_theme_error_msg" msgid="791364062636538317">"Terjadi masalah saat menerapkan gaya"</string>
<string name="custom_theme_next" msgid="6235420097213197301">"Berikutnya"</string>
<string name="custom_theme_previous" msgid="4941132112640503022">"Sebelumnya"</string>
- <string name="custom_theme_title" msgid="2192300350332693631">"Khusus <xliff:g id="ID_1">%1$d</xliff:g>"</string>
+ <string name="custom_theme_title" msgid="2192300350332693631">"<xliff:g id="ID_1">%1$d</xliff:g> khusus"</string>
<string name="custom_theme_fragment_title" msgid="6615547284702040280">"Gaya Kustom"</string>
<string name="custom_theme_delete" msgid="4744494663184126202">"Hapus"</string>
<string name="font_component_title" msgid="8800340833695292049">"Pilih font"</string>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index 43e1b80..f8d444b 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -40,7 +40,7 @@
<string name="preview_name_shape" msgid="5676971146080968721">"צורה"</string>
<string name="preview_name_wallpaper" msgid="1738652462949531828">"טפט"</string>
<string name="font_card_title" msgid="2343292653502548685">"אבג • 123"</string>
- <string name="font_card_body" msgid="6790525594503904468">"אפשר להוסיף את הגופנים המועדפים לכל מסך"</string>
+ <string name="font_card_body" msgid="6790525594503904468">"אפשר להוסיף את הפונטים המועדפים לכל מסך"</string>
<string name="grid_title_pattern" msgid="9188866567612607806">"<xliff:g id="ID_1">%1$d</xliff:g>x<xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="applied_theme_msg" msgid="7348498271552054431">"הסגנון הוחל"</string>
<string name="applied_clock_msg" msgid="1938218786265793285">"השעון הותקן"</string>
diff --git a/res/values-kk/strings.xml b/res/values-kk/strings.xml
index b009ad7..c8aa174 100644
--- a/res/values-kk/strings.xml
+++ b/res/values-kk/strings.xml
@@ -40,14 +40,14 @@
<string name="preview_name_shape" msgid="5676971146080968721">"Пішін"</string>
<string name="preview_name_wallpaper" msgid="1738652462949531828">"Тұсқағаз"</string>
<string name="font_card_title" msgid="2343292653502548685">"ABC • abc • 123"</string>
- <string name="font_card_body" msgid="6790525594503904468">"Әр экранға ұнайтын қаріпті қоя аласыз."</string>
+ <string name="font_card_body" msgid="6790525594503904468">"Әрбір экранға ұнайтын қаріптерді қосыңыз."</string>
<string name="grid_title_pattern" msgid="9188866567612607806">"<xliff:g id="ID_1">%1$d</xliff:g>x<xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="applied_theme_msg" msgid="7348498271552054431">"Стиль қолданылды."</string>
<string name="applied_clock_msg" msgid="1938218786265793285">"Сағат қолданылды."</string>
<string name="apply_theme_error_msg" msgid="791364062636538317">"Стильді қолдану кезінде қате шықты."</string>
<string name="custom_theme_next" msgid="6235420097213197301">"Келесі"</string>
<string name="custom_theme_previous" msgid="4941132112640503022">"Алдыңғы"</string>
- <string name="custom_theme_title" msgid="2192300350332693631">"Басқа <xliff:g id="ID_1">%1$d</xliff:g>"</string>
+ <string name="custom_theme_title" msgid="2192300350332693631">"Арнаулы <xliff:g id="ID_1">%1$d</xliff:g>"</string>
<string name="custom_theme_fragment_title" msgid="6615547284702040280">"Арнаулы стиль"</string>
<string name="custom_theme_delete" msgid="4744494663184126202">"Жою"</string>
<string name="font_component_title" msgid="8800340833695292049">"Қаріп таңдау"</string>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 6b30392..2cdd6a8 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -53,7 +53,7 @@
<string name="font_component_title" msgid="8800340833695292049">"글꼴 선택"</string>
<string name="icon_component_title" msgid="5779787138399083903">"아이콘 선택"</string>
<string name="color_component_title" msgid="1194089273921078816">"색상 선택"</string>
- <string name="shape_component_title" msgid="8366847436022025538">"도형 선택"</string>
+ <string name="shape_component_title" msgid="8366847436022025538">"모양 선택"</string>
<string name="name_component_title" msgid="532425087968663437">"스타일 이름 지정"</string>
<string name="icon_component_label" msgid="2625784884001407944">"아이콘 <xliff:g id="ID_1">%1$d</xliff:g>개"</string>
<string name="delete_custom_theme_confirmation" msgid="4452137183628769394">"맞춤 스타일을 삭제하시겠습니까?"</string>
diff --git a/res/values-ky/strings.xml b/res/values-ky/strings.xml
index 9c4aac1..bcd7cea 100644
--- a/res/values-ky/strings.xml
+++ b/res/values-ky/strings.xml
@@ -23,7 +23,7 @@
<string name="grid_title" msgid="2825094404523390773">"Торчо"</string>
<string name="wallpaper_title" msgid="6952635398953194544">"Тушкагаз"</string>
<string name="apply_theme_btn" msgid="6293081192321303991">"Колдонуу"</string>
- <string name="edit_custom_theme_lbl" msgid="5211377705710775224">"Өзгөртүү үчүн таптап коюңуз"</string>
+ <string name="edit_custom_theme_lbl" msgid="5211377705710775224">"Түзөтүү үчүн таптап коюңуз"</string>
<string name="keep_my_wallpaper" msgid="8012385376769568517">"Учурдагы тушкагаз калсын"</string>
<string name="apply_btn" msgid="7965877231041987336">"Колдонуу"</string>
<string name="accessibility_preview_pager" msgid="3548503287402185430">"<xliff:g id="ID_2">%2$d</xliff:g> ичинен <xliff:g id="ID_1">%1$d</xliff:g>-барак"</string>
diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
index 985987f..bd37bae 100644
--- a/res/values-land/dimens.xml
+++ b/res/values-land/dimens.xml
@@ -20,10 +20,7 @@
<dimen name="card_cover_title_text_size">14sp</dimen>
<dimen name="card_header_icon_size">24dp</dimen>
<dimen name="card_header_top_margin">6dp</dimen>
- <dimen name="preview_card_padding">8dp</dimen>
<dimen name="preview_card_top_padding">6dp</dimen>
- <dimen name="preview_page_gap">60dp</dimen>
- <dimen name="preview_page_horizontal_margin">92dp</dimen>
<dimen name="preview_theme_content_margin">8dp</dimen>
<dimen name="preview_theme_content_max_height">140dp</dimen>
<dimen name="preview_theme_content_min_height">100dp</dimen>
diff --git a/res/values-lo/strings.xml b/res/values-lo/strings.xml
index 4ceeccf..3b9dd17 100644
--- a/res/values-lo/strings.xml
+++ b/res/values-lo/strings.xml
@@ -47,7 +47,7 @@
<string name="apply_theme_error_msg" msgid="791364062636538317">"ເກີດບັນຫາໃນການນຳໃຊ້ຮູບແບບ"</string>
<string name="custom_theme_next" msgid="6235420097213197301">"ຖັດໄປ"</string>
<string name="custom_theme_previous" msgid="4941132112640503022">"ຜ່ານມາ"</string>
- <string name="custom_theme_title" msgid="2192300350332693631">"ແບບກຳນົດເອງ <xliff:g id="ID_1">%1$d</xliff:g>"</string>
+ <string name="custom_theme_title" msgid="2192300350332693631">"<xliff:g id="ID_1">%1$d</xliff:g> ແບບກຳນົດເອງ"</string>
<string name="custom_theme_fragment_title" msgid="6615547284702040280">"ຮູບແບບກຳນົດເອງ"</string>
<string name="custom_theme_delete" msgid="4744494663184126202">"ລຶບ"</string>
<string name="font_component_title" msgid="8800340833695292049">"ເລືອກຟອນ"</string>
diff --git a/res/values-mk/strings.xml b/res/values-mk/strings.xml
index 241101f..cf58de7 100644
--- a/res/values-mk/strings.xml
+++ b/res/values-mk/strings.xml
@@ -53,7 +53,7 @@
<string name="font_component_title" msgid="8800340833695292049">"Изберете фонт"</string>
<string name="icon_component_title" msgid="5779787138399083903">"Изберете икони"</string>
<string name="color_component_title" msgid="1194089273921078816">"Изберете боја"</string>
- <string name="shape_component_title" msgid="8366847436022025538">"Изберете облик"</string>
+ <string name="shape_component_title" msgid="8366847436022025538">"Изберете форма"</string>
<string name="name_component_title" msgid="532425087968663437">"Именувајте го вашиот стил"</string>
<string name="icon_component_label" msgid="2625784884001407944">"Икони <xliff:g id="ID_1">%1$d</xliff:g>"</string>
<string name="delete_custom_theme_confirmation" msgid="4452137183628769394">"Да се избрише приспособениот стил?"</string>
diff --git a/res/values-ne/strings.xml b/res/values-ne/strings.xml
index e3dd82d..5b3c636 100644
--- a/res/values-ne/strings.xml
+++ b/res/values-ne/strings.xml
@@ -24,7 +24,7 @@
<string name="wallpaper_title" msgid="6952635398953194544">"वालपेपर"</string>
<string name="apply_theme_btn" msgid="6293081192321303991">"लागू गर्नुहोस्"</string>
<string name="edit_custom_theme_lbl" msgid="5211377705710775224">"सम्पादन गर्न ट्याप गर्नुहोस्"</string>
- <string name="keep_my_wallpaper" msgid="8012385376769568517">"अहिले कै वालपेपर राख्नुहोस्"</string>
+ <string name="keep_my_wallpaper" msgid="8012385376769568517">"हालको वालपेपर राख्नुहोस्"</string>
<string name="apply_btn" msgid="7965877231041987336">"लागू गर्नुहोस्"</string>
<string name="accessibility_preview_pager" msgid="3548503287402185430">"<xliff:g id="ID_1">%1$d</xliff:g> मध्ये <xliff:g id="ID_2">%2$d</xliff:g> पृष्ठ"</string>
<string name="next_page_content_description" msgid="5290226604542300962">"अर्को"</string>
@@ -32,11 +32,11 @@
<string name="option_applied_description" msgid="5022305212078053534">"<xliff:g id="ID_1">%1$s</xliff:g>, हालसालै लागू गरिएको"</string>
<string name="option_applied_previewed_description" msgid="5269654286638446858">"<xliff:g id="ID_1">%1$s</xliff:g>, हालसालै लागू तथा पूर्वावलोकन गरिएको"</string>
<string name="option_previewed_description" msgid="3467217598865047661">"<xliff:g id="ID_1">%1$s</xliff:g>, हालसालै पूर्वलोकन गरिएको"</string>
- <string name="theme_description" msgid="3697012391785254635">"फन्ट: <xliff:g id="ID_1">%1$s</xliff:g>, आइकनहरू: <xliff:g id="ID_2">%2$s</xliff:g>, आकार: <xliff:g id="ID_3">%3$s</xliff:g>, रङ्ग: <xliff:g id="ID_4">%4$s</xliff:g>"</string>
+ <string name="theme_description" msgid="3697012391785254635">"फन्ट: <xliff:g id="ID_1">%1$s</xliff:g>, आइकनहरू: <xliff:g id="ID_2">%2$s</xliff:g>, आकार: <xliff:g id="ID_3">%3$s</xliff:g>, रङ: <xliff:g id="ID_4">%4$s</xliff:g>"</string>
<string name="default_theme_title" msgid="2555741736622366797">"पूर्वनिर्धारित"</string>
<string name="preview_name_font" msgid="4465423899630037038">"फन्ट"</string>
<string name="preview_name_icon" msgid="6818927315316316440">"आइकन"</string>
- <string name="preview_name_color" msgid="8776203144994416172">"रङ्ग"</string>
+ <string name="preview_name_color" msgid="8776203144994416172">"रङ"</string>
<string name="preview_name_shape" msgid="5676971146080968721">"आकार"</string>
<string name="preview_name_wallpaper" msgid="1738652462949531828">"वालपेपर"</string>
<string name="font_card_title" msgid="2343292653502548685">"ABC • abc • १२३"</string>
@@ -52,7 +52,7 @@
<string name="custom_theme_delete" msgid="4744494663184126202">"मेट्नुहोस्"</string>
<string name="font_component_title" msgid="8800340833695292049">"फन्ट छनौट गर्नुहोस्"</string>
<string name="icon_component_title" msgid="5779787138399083903">"आइकनहरू छनौट गर्नुहोस्"</string>
- <string name="color_component_title" msgid="1194089273921078816">"रङ्ग छनौट गर्नुहोस्"</string>
+ <string name="color_component_title" msgid="1194089273921078816">"रङ छनौट गर्नुहोस्"</string>
<string name="shape_component_title" msgid="8366847436022025538">"आकार छनौट गर्नुहोस्"</string>
<string name="name_component_title" msgid="532425087968663437">"आफ्नो शैलीको नाम राख्नुहोस्"</string>
<string name="icon_component_label" msgid="2625784884001407944">"आइकनहरू <xliff:g id="ID_1">%1$d</xliff:g>"</string>
diff --git a/res/values-night/colors.xml b/res/values-night/colors.xml
index b567d0d..c6b2a3f 100644
--- a/res/values-night/colors.xml
+++ b/res/values-night/colors.xml
@@ -40,9 +40,5 @@
<color name="divider_color">@color/white_14_alpha</color>
- <color name="edit_background_base">@color/material_white_100</color>
-
<color name="cover_title_color">@color/white_88_alpha</color>
-
- <color name="preview_pager_background">@color/google_grey900</color>
</resources>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 48ca2a5..71f7f24 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -35,7 +35,7 @@
<string name="theme_description" msgid="3697012391785254635">"Lettertype: <xliff:g id="ID_1">%1$s</xliff:g>, pictogrammen: <xliff:g id="ID_2">%2$s</xliff:g>, vorm: <xliff:g id="ID_3">%3$s</xliff:g>, kleur: <xliff:g id="ID_4">%4$s</xliff:g>"</string>
<string name="default_theme_title" msgid="2555741736622366797">"Standaard"</string>
<string name="preview_name_font" msgid="4465423899630037038">"Lettertype"</string>
- <string name="preview_name_icon" msgid="6818927315316316440">"Icoon"</string>
+ <string name="preview_name_icon" msgid="6818927315316316440">"Pictogram"</string>
<string name="preview_name_color" msgid="8776203144994416172">"Kleur"</string>
<string name="preview_name_shape" msgid="5676971146080968721">"Vorm"</string>
<string name="preview_name_wallpaper" msgid="1738652462949531828">"Achtergrond"</string>
@@ -47,11 +47,11 @@
<string name="apply_theme_error_msg" msgid="791364062636538317">"Er is een probleem opgetreden bij het toepassen van de stijl"</string>
<string name="custom_theme_next" msgid="6235420097213197301">"Volgende"</string>
<string name="custom_theme_previous" msgid="4941132112640503022">"Vorige"</string>
- <string name="custom_theme_title" msgid="2192300350332693631">"Aangepast <xliff:g id="ID_1">%1$d</xliff:g>"</string>
+ <string name="custom_theme_title" msgid="2192300350332693631">"Custom <xliff:g id="ID_1">%1$d</xliff:g>"</string>
<string name="custom_theme_fragment_title" msgid="6615547284702040280">"Aangepaste stijl"</string>
<string name="custom_theme_delete" msgid="4744494663184126202">"Verwijderen"</string>
<string name="font_component_title" msgid="8800340833695292049">"Lettertype kiezen"</string>
- <string name="icon_component_title" msgid="5779787138399083903">"Iconen kiezen"</string>
+ <string name="icon_component_title" msgid="5779787138399083903">"Pictogrammen kiezen"</string>
<string name="color_component_title" msgid="1194089273921078816">"Kleur kiezen"</string>
<string name="shape_component_title" msgid="8366847436022025538">"Vorm kiezen"</string>
<string name="name_component_title" msgid="532425087968663437">"Je stijl een naam geven"</string>
diff --git a/res/values-or/strings.xml b/res/values-or/strings.xml
index 968f216..071664a 100644
--- a/res/values-or/strings.xml
+++ b/res/values-or/strings.xml
@@ -17,14 +17,14 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_name" msgid="6995669566699638946">"ଷ୍ଟାଇଲ୍ ଏବଂ ୱାଲପେପର୍"</string>
- <string name="theme_title" msgid="2144932106319405101">"ଷ୍ଟାଇଲ୍"</string>
+ <string name="app_name" msgid="6995669566699638946">"ଶୈଳୀ ଏବଂ ୱାଲ୍ପେପର୍"</string>
+ <string name="theme_title" msgid="2144932106319405101">"ଶୈଳୀ"</string>
<string name="clock_title" msgid="2126046720254613991">"ଘଣ୍ଟା"</string>
<string name="grid_title" msgid="2825094404523390773">"ଗ୍ରିଡ୍"</string>
<string name="wallpaper_title" msgid="6952635398953194544">"ୱାଲ୍ପେପର୍"</string>
<string name="apply_theme_btn" msgid="6293081192321303991">"ପ୍ରୟୋଗ କରନ୍ତୁ"</string>
<string name="edit_custom_theme_lbl" msgid="5211377705710775224">"ଏଡିଟ୍ କରିବା ପାଇଁ ଟାପ୍ କରନ୍ତୁ"</string>
- <string name="keep_my_wallpaper" msgid="8012385376769568517">"ବର୍ତ୍ତମାନର ୱାଲ୍ପେପର୍କୁ ରଖନ୍ତୁ"</string>
+ <string name="keep_my_wallpaper" msgid="8012385376769568517">"ବର୍ତ୍ତମାନ ଥିବା ୱାଲ୍ପେପର୍କୁ ରଖନ୍ତୁ"</string>
<string name="apply_btn" msgid="7965877231041987336">"ପ୍ରୟୋଗ କରନ୍ତୁ"</string>
<string name="accessibility_preview_pager" msgid="3548503287402185430">"ମୋଟ <xliff:g id="ID_2">%2$d</xliff:g>ର <xliff:g id="ID_1">%1$d</xliff:g> ପୃଷ୍ଠା"</string>
<string name="next_page_content_description" msgid="5290226604542300962">"ପରବର୍ତ୍ତୀ"</string>
@@ -48,7 +48,7 @@
<string name="custom_theme_next" msgid="6235420097213197301">"ପରବର୍ତ୍ତୀ"</string>
<string name="custom_theme_previous" msgid="4941132112640503022">"ପୂର୍ବବର୍ତ୍ତୀ"</string>
<string name="custom_theme_title" msgid="2192300350332693631">"କଷ୍ଟମ୍ <xliff:g id="ID_1">%1$d</xliff:g>"</string>
- <string name="custom_theme_fragment_title" msgid="6615547284702040280">"କଷ୍ଟମ୍ ଷ୍ଟାଇଲ୍"</string>
+ <string name="custom_theme_fragment_title" msgid="6615547284702040280">"କଷ୍ଟମ୍ ଶୈଳୀ"</string>
<string name="custom_theme_delete" msgid="4744494663184126202">"ଡିଲିଟ୍ କରନ୍ତୁ"</string>
<string name="font_component_title" msgid="8800340833695292049">"ଫଣ୍ଟ ଚୟନ କରନ୍ତୁ"</string>
<string name="icon_component_title" msgid="5779787138399083903">"ଆଇକନ୍ ଚୟନ କରନ୍ତୁ"</string>
diff --git a/res/values-pa/strings.xml b/res/values-pa/strings.xml
index cc32cd2..61d89a0 100644
--- a/res/values-pa/strings.xml
+++ b/res/values-pa/strings.xml
@@ -40,7 +40,7 @@
<string name="preview_name_shape" msgid="5676971146080968721">"ਆਕ੍ਰਿਤੀ"</string>
<string name="preview_name_wallpaper" msgid="1738652462949531828">"ਵਾਲਪੇਪਰ"</string>
<string name="font_card_title" msgid="2343292653502548685">"ABC • abc • 123"</string>
- <string name="font_card_body" msgid="6790525594503904468">"ਹਰ ਸਕ੍ਰੀਨ \'ਤੇ ਆਪਣੇ ਮਨਪਸੰਦ ਫੌਂਟ ਸ਼ਾਮਲ ਕਰੋ"</string>
+ <string name="font_card_body" msgid="6790525594503904468">"ਹਰ ਸਕ੍ਰੀਨ \'ਤੇ ਆਪਣਾ ਮਨਪਸੰਦ ਫੌਂਟ ਸ਼ਾਮਲ ਕਰੋ"</string>
<string name="grid_title_pattern" msgid="9188866567612607806">"<xliff:g id="ID_1">%1$d</xliff:g>x<xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="applied_theme_msg" msgid="7348498271552054431">"ਸ਼ੈਲੀ ਲਾਗੂ ਕੀਤੀ ਗਈ"</string>
<string name="applied_clock_msg" msgid="1938218786265793285">"ਘੜੀ ਲਾਗੂ ਕੀਤੀ ਗਈ"</string>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index d593d27..db157ae 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -63,7 +63,7 @@
<string name="use_style_instead_title" msgid="1578754995763917502">"Je, utatumia <xliff:g id="ID_1">%1$s</xliff:g> badala yake?"</string>
<string name="use_style_instead_body" msgid="3051937045807471496">"Vijenzi ulivyochagua vinalingana na mtindo wa <xliff:g id="ID_1">%1$s</xliff:g>. Ungependa kutumia <xliff:g id="ID_2">%1$s</xliff:g> badala yake?"</string>
<string name="use_style_button" msgid="1754493078383627019">"Tumia <xliff:g id="ID_1">%1$s</xliff:g>"</string>
- <string name="no_thanks" msgid="7286616980115687627">"Hapana"</string>
+ <string name="no_thanks" msgid="7286616980115687627">"Hapana, asante"</string>
<string name="clock_preview_content_description" msgid="5460561185905717460">"Onyesho la kukagua saa ya <xliff:g id="ID_1">%1$s</xliff:g>"</string>
<string name="something_went_wrong" msgid="529840112449799117">"Lo! Hitilafu imetokea."</string>
</resources>
diff --git a/res/values-ta/strings.xml b/res/values-ta/strings.xml
index de2a5bf..a539944 100644
--- a/res/values-ta/strings.xml
+++ b/res/values-ta/strings.xml
@@ -47,7 +47,7 @@
<string name="apply_theme_error_msg" msgid="791364062636538317">"இந்த ஸ்டைலைப் பயன்படுத்துவதில் சிக்கல் உள்ளது"</string>
<string name="custom_theme_next" msgid="6235420097213197301">"அடுத்து"</string>
<string name="custom_theme_previous" msgid="4941132112640503022">"முந்தையது"</string>
- <string name="custom_theme_title" msgid="2192300350332693631">"பிரத்தியேக <xliff:g id="ID_1">%1$d</xliff:g>"</string>
+ <string name="custom_theme_title" msgid="2192300350332693631">"தனிப்பயன் <xliff:g id="ID_1">%1$d</xliff:g>"</string>
<string name="custom_theme_fragment_title" msgid="6615547284702040280">"பிரத்தியேக ஸ்டைல்"</string>
<string name="custom_theme_delete" msgid="4744494663184126202">"நீக்கு"</string>
<string name="font_component_title" msgid="8800340833695292049">"எழுத்துருவைத் தேர்ந்தெடுத்தல்"</string>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index 9baf33c..d061f5e 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -54,7 +54,7 @@
<string name="icon_component_title" msgid="5779787138399083903">"เลือกไอคอน"</string>
<string name="color_component_title" msgid="1194089273921078816">"เลือกสี"</string>
<string name="shape_component_title" msgid="8366847436022025538">"เลือกรูปร่าง"</string>
- <string name="name_component_title" msgid="532425087968663437">"ตั้งชื่อรูปแบบของคุณ"</string>
+ <string name="name_component_title" msgid="532425087968663437">"ตั้งชื่อสไตล์ของคุณ"</string>
<string name="icon_component_label" msgid="2625784884001407944">"ไอคอน <xliff:g id="ID_1">%1$d</xliff:g>"</string>
<string name="delete_custom_theme_confirmation" msgid="4452137183628769394">"ลบรูปแบบที่กำหนดเองใช่ไหม"</string>
<string name="delete_custom_theme_button" msgid="5102462988130208824">"ลบ"</string>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 0777e24..9e04c90 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -53,7 +53,7 @@
<string name="font_component_title" msgid="8800340833695292049">"Виберіть шрифт"</string>
<string name="icon_component_title" msgid="5779787138399083903">"Виберіть значки"</string>
<string name="color_component_title" msgid="1194089273921078816">"Виберіть колір"</string>
- <string name="shape_component_title" msgid="8366847436022025538">"Виберіть форму"</string>
+ <string name="shape_component_title" msgid="8366847436022025538">"Вибрати форму"</string>
<string name="name_component_title" msgid="532425087968663437">"Введіть назву стилю"</string>
<string name="icon_component_label" msgid="2625784884001407944">"Значки <xliff:g id="ID_1">%1$d</xliff:g>"</string>
<string name="delete_custom_theme_confirmation" msgid="4452137183628769394">"Видалити власний стиль?"</string>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 85c6d16..f688d90 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -47,7 +47,7 @@
<string name="apply_theme_error_msg" msgid="791364062636538317">"Đã xảy ra sự cố khi áp dụng kiểu"</string>
<string name="custom_theme_next" msgid="6235420097213197301">"Tiếp theo"</string>
<string name="custom_theme_previous" msgid="4941132112640503022">"Trước"</string>
- <string name="custom_theme_title" msgid="2192300350332693631">"Tùy chỉnh <xliff:g id="ID_1">%1$d</xliff:g>"</string>
+ <string name="custom_theme_title" msgid="2192300350332693631">"<xliff:g id="ID_1">%1$d</xliff:g> tùy chỉnh"</string>
<string name="custom_theme_fragment_title" msgid="6615547284702040280">"Kiểu tùy chỉnh"</string>
<string name="custom_theme_delete" msgid="4744494663184126202">"Xóa"</string>
<string name="font_component_title" msgid="8800340833695292049">"Chọn phông chữ"</string>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index 2d3ad40..91ed965 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -40,7 +40,7 @@
<string name="preview_name_shape" msgid="5676971146080968721">"形狀"</string>
<string name="preview_name_wallpaper" msgid="1738652462949531828">"桌布"</string>
<string name="font_card_title" msgid="2343292653502548685">"ABC • abc • 123"</string>
- <string name="font_card_body" msgid="6790525594503904468">"讓每個畫面顯示您喜愛的字型"</string>
+ <string name="font_card_body" msgid="6790525594503904468">"將您喜愛的字型放進每個畫面"</string>
<string name="grid_title_pattern" msgid="9188866567612607806">"<xliff:g id="ID_1">%1$d</xliff:g> x <xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="applied_theme_msg" msgid="7348498271552054431">"已套用樣式"</string>
<string name="applied_clock_msg" msgid="1938218786265793285">"已套用時鐘"</string>
@@ -54,7 +54,7 @@
<string name="icon_component_title" msgid="5779787138399083903">"選擇圖示"</string>
<string name="color_component_title" msgid="1194089273921078816">"選擇顏色"</string>
<string name="shape_component_title" msgid="8366847436022025538">"選擇形狀"</string>
- <string name="name_component_title" msgid="532425087968663437">"為樣式命名"</string>
+ <string name="name_component_title" msgid="532425087968663437">"為您的風格命名"</string>
<string name="icon_component_label" msgid="2625784884001407944">"圖示 <xliff:g id="ID_1">%1$d</xliff:g>"</string>
<string name="delete_custom_theme_confirmation" msgid="4452137183628769394">"要刪除自訂樣式嗎?"</string>
<string name="delete_custom_theme_button" msgid="5102462988130208824">"刪除"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 1a917a2..de8381a 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -40,7 +40,7 @@
<string name="preview_name_shape" msgid="5676971146080968721">"形狀"</string>
<string name="preview_name_wallpaper" msgid="1738652462949531828">"桌布"</string>
<string name="font_card_title" msgid="2343292653502548685">"ABC • abc • 123"</string>
- <string name="font_card_body" msgid="6790525594503904468">"將你喜愛的字型套用到每個畫面"</string>
+ <string name="font_card_body" msgid="6790525594503904468">"將你喜愛的字型套用到每個畫面上的文字"</string>
<string name="grid_title_pattern" msgid="9188866567612607806">"<xliff:g id="ID_1">%1$d</xliff:g> x <xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="applied_theme_msg" msgid="7348498271552054431">"已套用樣式"</string>
<string name="applied_clock_msg" msgid="1938218786265793285">"已套用時鐘"</string>
@@ -54,7 +54,7 @@
<string name="icon_component_title" msgid="5779787138399083903">"選擇圖示"</string>
<string name="color_component_title" msgid="1194089273921078816">"選擇顏色"</string>
<string name="shape_component_title" msgid="8366847436022025538">"選擇形狀"</string>
- <string name="name_component_title" msgid="532425087968663437">"樣式命名"</string>
+ <string name="name_component_title" msgid="532425087968663437">"為樣式命名"</string>
<string name="icon_component_label" msgid="2625784884001407944">"圖示 <xliff:g id="ID_1">%1$d</xliff:g>"</string>
<string name="delete_custom_theme_confirmation" msgid="4452137183628769394">"要刪除自訂樣式嗎?"</string>
<string name="delete_custom_theme_button" msgid="5102462988130208824">"刪除"</string>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
deleted file mode 100644
index ce995cc..0000000
--- a/res/values/attrs.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- Copyright (C) 2019 The Android Open Source 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <!-- PreviewPager specific attributes. -->
- <declare-styleable name="PreviewPager">
- <attr name="card_style" format="integer">
- <!-- The cards are sized so that a small part of the next card in the pager can be seen
- peeking from the side. -->
- <enum name="peeking" value="0" />
- <!-- Cards are sized to match the screen's aspect ratio (based on available height) -->
- <enum name="screen_aspect_ratio" value="1" />
- </attr>
- </declare-styleable>
-</resources>
\ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 3d646f9..437e4ea 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -19,8 +19,6 @@
<color name="icon_background">#FF4285f4</color>
<color name="black_14_alpha">#24000000</color>
<color name="white_14_alpha">#24FFFFFF</color>
- <color name="google_grey700">#5f6368</color>
- <color name="google_grey900">#202124</color>
<color name="status_bar_color">#ffffffff</color>
@@ -30,14 +28,10 @@
<color name="shape_thumbnail_color">#b2b2b2</color>
<color name="icon_thumbnail_color">@color/black_87_alpha</color>
- <color name="option_border_default">@color/edit_background_base</color>
-
<color name="clockface_preview_background">@android:color/black</color>
<color name="theme_preview_icon_color">@color/google_grey700</color>
- <color name="preview_pager_arrow_disabled">@android:color/darker_gray</color>
-
<color name="text_color_dark">#2d2d2d</color>
<color name="text_color_light">@color/material_white_text</color>
@@ -61,9 +55,5 @@
<color name="divider_color">@color/black_14_alpha</color>
- <color name="edit_background_base">@color/google_grey700</color>
-
<color name="cover_title_color">@color/black_87_alpha</color>
-
- <color name="preview_pager_background">@color/secondary_color</color>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index f7d435c..3c78967 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -16,32 +16,20 @@
limitations under the License.
-->
<resources>
- <dimen name="bottom_navbar_height">56dp</dimen>
<dimen name="bottom_navbar_font_text_size">12sp</dimen>
<dimen name="tip_dot_size">8dp</dimen>
<dimen name="tip_dot_line_width">2dp</dimen>
- <dimen name="check_size">20dp</dimen>
- <dimen name="check_offset">-4dp</dimen>
+ <dimen name="check_size">16dp</dimen>
+ <dimen name="check_offset">4dp</dimen>
- <dimen name="preview_indicator_width">16dp</dimen>
- <dimen name="preview_indicator_height">8dp</dimen>
- <dimen name="indicator_container_height">48dp</dimen>
- <dimen name="indicator_arrow_size">24dp</dimen>
- <dimen name="indicator_arrow_touch_area_size">48dp</dimen>
-
- <dimen name="indicator_arrow_container_margin_horizontal">4dp</dimen>
- <dimen name="preview_page_gap">16dp</dimen>
- <dimen name="preview_page_horizontal_margin">56dp</dimen>
- <dimen name="preview_page_top_margin">16dp</dimen>
- <dimen name="preview_page_bottom_margin">2dp</dimen>
<dimen name="component_preview_page_bottom_margin">16dp</dimen>
<!-- Dimensions for the customization option tiles -->
- <dimen name="options_container_height">104dp</dimen>
+ <dimen name="options_container_height">120dp</dimen>
<dimen name="options_container_width">0dp</dimen>
- <dimen name="option_tile_width">72dp</dimen>
+ <dimen name="option_tile_width">88dp</dimen>
<dimen name="theme_option_icon_sample_height">18dp</dimen>
<dimen name="theme_option_icon_sample_width">18dp</dimen>
<dimen name="theme_option_shape_sample_height">16dp</dimen>
@@ -50,27 +38,23 @@
<dimen name="theme_option_font_sample_width">52dp</dimen>
<dimen name="theme_option_sample_padding">5dp</dimen>
<!-- Note, using dp instead of sp as this is just the "+" symbol, not text -->
- <dimen name="option_tile_padding_vertical">12dp</dimen>
- <dimen name="option_tile_padding_horizontal">10dp</dimen>
+ <dimen name="option_tile_padding_vertical">16dp</dimen>
+ <dimen name="option_tile_padding_horizontal">16dp</dimen>
<dimen name="option_bottom_margin">8dp</dimen>
<!-- Note, using dp instead of sp as this text is more like a "snapshot" of the font -->
<dimen name="theme_option_font_text_size">16dp</dimen>
<dimen name="theme_option_font_min_text_size">15dp</dimen>
- <dimen name="theme_option_title_font_text_size">12sp</dimen>
<dimen name="option_tile_margin_horizontal">6dp</dimen>
<dimen name="theme_option_label_margin">4dp</dimen>
- <dimen name="preview_card_padding">20dp</dimen>
<dimen name="preview_card_top_padding">@dimen/preview_card_padding</dimen>
<dimen name="card_title_text_size">16sp</dimen>
<dimen name="card_cover_title_text_size">24sp</dimen>
<dimen name="card_header_icon_size">32dp</dimen>
<dimen name="card_header_top_margin">0dp</dimen>
- <dimen name="preview_pager_max_height">450dp</dimen>
- <dimen name="preview_pager_min_height">350dp</dimen>
<dimen name="preview_theme_max_height">400dp</dimen>
<dimen name="preview_theme_min_height">180dp</dimen>
<dimen name="theme_preview_header_drawable_padding">8dp</dimen>
@@ -100,8 +84,6 @@
<dimen name="component_color_chip_container_size">33dp</dimen>
<dimen name="component_shape_thumb_size">72dp</dimen>
- <dimen name="option_border_width">2dp</dimen>
- <dimen name="option_selected_border_width">3dp</dimen>
<dimen name="component_options_title_size">18sp</dimen>
<!-- For a corner radius of this size or larger, we'll preview a rounded qsb widget. -->
diff --git a/res/values/override.xml b/res/values/override.xml
index a01507e..a070dbe 100644
--- a/res/values/override.xml
+++ b/res/values/override.xml
@@ -17,14 +17,10 @@
-->
<resources>
<string name="themes_stub_package" translatable="false"/>
+ <string name="clocks_stub_package" translatable="false"/>
<!-- Authority of a provider in System UI that will provide preview info for available clockfaces. -->
<string name="clocks_provider_authority" translatable="false">com.android.keyguard.clock</string>
- <!--Name of metadata in the main launcher Activity which values contains the authority
- corresponding to a ContentProvider in launcher to provide available grids and
- allow for changing them -->
- <string name="grid_control_metadata_name" translatable="false">com.android.launcher3.grid.control</string>
-
<string name="launcher_overlayable_package" translatable="false">com.android.launcher3</string>
<!-- List of packages whose icons are used to preview the icon shape for a theme. These are
diff --git a/res/values/strings.xml b/res/values/strings.xml
index f571b6b..c0aef7a 100755
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -50,13 +50,6 @@
[CHAR LIMIT=20] -->
<string name="apply_btn">Apply</string>
- <!-- Accessibility label for paging indicator in theme picker preview [CHAR LIMIT=NONE] -->
- <string name="accessibility_preview_pager">Page <xliff:g name="current_page" example="1">%1$d</xliff:g> of <xliff:g name="num_pages" example="2">%2$d</xliff:g></string>
- <!-- Content description of the next button to bring user to the next preview page.[CHAR LIMIT=NONE] -->
- <string name="next_page_content_description">Next</string>
- <!-- Content description of the previous button to bring user to the previous preview page. [CHAR LIMIT=NONE] -->
- <string name="previous_page_content_description">Previous</string>
-
<!-- Content description indicating that the selected option is currently applied to the device. [CHAR_LIMIT=NONE] -->
<string name="option_applied_description"><xliff:g name="style_name">%1$s</xliff:g>, currently applied</string>
@@ -74,7 +67,7 @@
<!-- Plus sign used to indicate that the user can add a custom theme -->
- <!-- Name for the Android Theme that comes preset with the device [CHAR LIMIT=10]-->
+ <!-- Name for the Android Theme (Style/Wallpaper/Grid/Clock...) that comes preset with the device [CHAR LIMIT=10]-->
<string name="default_theme_title">Default</string>
<!-- Title of a page that shows the user the preview of a font selection [CHAR_LIMIT=20] -->
@@ -99,14 +92,20 @@
<!-- Body text for previewing a font [CHAR LIMIT=160] -->
<string name="font_card_body">Add your favorite fonts to every screen</string>
+ <!--Title for grid options [CHAR LIMIT=NONE] -->
+ <string name="grid_options_title">Choose a grid size</string>
+
<!--Title for a grid option, describing the number of columns and rows, eg: 4x4 [CHAR LIMIT=10] -->
<string name="grid_title_pattern"><xliff:g name="num_cols" example="1">%1$d</xliff:g>x<xliff:g name="num_rows" example="1">%2$d</xliff:g></string>
<!-- Message shown when a theme has been applied successfully in the system [CHAR LIMIT=NONE] -->
- <string name="applied_theme_msg">Style applied</string>
+ <string name="applied_theme_msg">Style set successfully</string>
<!-- Message shown when a clock has been applied successfully in the system [CHAR LIMIT=NONE] -->
- <string name="applied_clock_msg">Clock applied</string>
+ <string name="applied_clock_msg">Clock set successfully</string>
+
+ <!-- Message shown when a grid has been applied successfully in the system [CHAR LIMIT=NONE] -->
+ <string name="applied_grid_msg">Grid set successfully</string>
<!-- Message shown when a theme couldn't be applied in the system because of an error
[CHAR LIMIT=NONE] -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 1289a87..0b61fe4 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -38,6 +38,10 @@
<item name="android:windowNoTitle">true</item>
<item name="android:fitsSystemWindows">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
+
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowDisablePreview">true</item>
</style>
<!-- Bottom nav -->
@@ -50,7 +54,7 @@
<item name="android:background">?android:colorPrimary</item>
</style>
- <style name="BottomNavTextAppearance" parent="HeaderTextAppearance">
+ <style name="BottomNavTextAppearance" parent="TitleTextAppearance">
<item name="android:textSize">@dimen/bottom_navbar_font_text_size</item>
</style>
@@ -59,34 +63,13 @@
</style>
<!-- Common components and widgets -->
- <style name="HeaderTextAppearance" parent="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title"/>
+ <style name="TitleTextAppearance" parent="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title"/>
<style name="ActionPrimaryButton" parent="android:Widget.DeviceDefault.Button.Colored"/>
<style name="ActionSecondaryButton" parent="android:Widget.DeviceDefault.Button.Borderless.Colored"/>
- <!-- Option tiles -->
- <style name="OptionTitleTextAppearance" parent="HeaderTextAppearance">
- <item name="android:textColor">@color/option_title_color</item>
- <item name="android:textAlignment">center</item>
- <item name="android:textSize">@dimen/theme_option_title_font_text_size</item>
- </style>
-
- <!-- Preview cards -->
- <style name="PreviewCard" parent="CardView">
- <item name="cardCornerRadius">?android:dialogCornerRadius</item>
- <item name="android:clipChildren">true</item>
- <item name="contentPadding">@dimen/preview_card_padding</item>
- <item name="cardBackgroundColor">?android:colorPrimary</item>
- </style>
-
- <style name="FullContentPreviewCard" parent="PreviewCard">
- <item name="android:clipChildren">true</item>
- <item name="contentPadding">0dp</item>
- <item name="cardBackgroundColor">?android:colorPrimary</item>
- </style>
-
- <style name="CardTitleTextAppearance" parent="HeaderTextAppearance">
+ <style name="CardTitleTextAppearance" parent="TitleTextAppearance">
<item name="android:textStyle">bold</item>
<item name="android:textSize">@dimen/card_title_text_size</item>
</style>
@@ -96,7 +79,7 @@
<item name="android:textColor">@color/cover_title_color</item>
</style>
- <style name="FontCardTitleStyle" parent="HeaderTextAppearance">
+ <style name="FontCardTitleStyle" parent="TitleTextAppearance">
<item name="android:textAlignment">center</item>
</style>
diff --git a/robolectric_tests/Android.mk b/robolectric_tests/Android.mk
index 3037a47..b879418 100644
--- a/robolectric_tests/Android.mk
+++ b/robolectric_tests/Android.mk
@@ -48,7 +48,7 @@
LOCAL_TEST_PACKAGE := ThemePicker
-LOCAL_INSTRUMENT_SOURCE_DIRS := $(dir $(LOCAL_PATH))../src \
+LOCAL_INSTRUMENT_SOURCE_DIRS := packages/apps/ThemePicker/src \
LOCAL_ROBOTEST_TIMEOUT := 36000
diff --git a/robolectric_tests/src/com/android/customization/model/clock/ClockManagerTest.java b/robolectric_tests/src/com/android/customization/model/clock/ClockManagerTest.java
index d2ab43f..f431006 100644
--- a/robolectric_tests/src/com/android/customization/model/clock/ClockManagerTest.java
+++ b/robolectric_tests/src/com/android/customization/model/clock/ClockManagerTest.java
@@ -19,14 +19,18 @@
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
import android.content.ContentResolver;
import android.provider.Settings.Secure;
+
import androidx.annotation.Nullable;
import com.android.customization.model.CustomizationManager.Callback;
-
import com.android.customization.module.ThemesUserEventLogger;
+
+import org.json.JSONException;
+import org.json.JSONObject;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -39,11 +43,15 @@
public class ClockManagerTest {
private static final String CLOCK_ID = "id";
+ private static final String CLOCK_FIELD = "clock";
+ private static final String CLOCK_FACE_SETTING = "fake_clock_face_setting";
@Mock ClockProvider mProvider;
@Mock ThemesUserEventLogger mLogger;
private ContentResolver mContentResolver;
private ClockManager mManager;
+ @Mock private Clockface mMockClockface;
+ @Mock private Callback mMockCallback;
@Before
public void setUp() {
@@ -53,7 +61,7 @@
}
@Test
- public void testApply() {
+ public void testApply() throws JSONException {
Clockface clock = new Clockface.Builder().setId(CLOCK_ID).build();
mManager.apply(clock, new Callback() {
@@ -69,16 +77,56 @@
});
// THEN the clock id is written to secure settings.
- assertEquals(CLOCK_ID, Secure.getString(mContentResolver, ClockManager.CLOCK_FACE_SETTING));
+ JSONObject json =
+ new JSONObject(Secure.getString(mContentResolver, ClockManager.CLOCK_FACE_SETTING));
+ assertEquals(CLOCK_ID, json.getString(CLOCK_FIELD));
// AND the event is logged
verify(mLogger).logClockApplied(clock);
}
@Test
- public void testGetCurrentClock() {
- // GIVEN that secure settings contains a clock id
- Secure.putString(mContentResolver, ClockManager.CLOCK_FACE_SETTING, CLOCK_ID);
- // THEN the current clock is that id
+ public void testApply_whenJSONExceptionOccurs_callsOnError() {
+ when(mMockClockface.getId()).thenThrow(JSONException.class);
+
+ mManager.apply(mMockClockface, mMockCallback);
+
+ verify(mMockCallback).onError(null);
+ }
+
+ @Test
+ public void testGetCurrentClock_returnsClockId() throws JSONException {
+ // Secure settings contains a clock id
+ JSONObject json = new JSONObject().put(CLOCK_FIELD, CLOCK_ID);
+ Secure.putString(mContentResolver, ClockManager.CLOCK_FACE_SETTING, json.toString());
+
+ // The current clock is that id
assertEquals(CLOCK_ID, mManager.getCurrentClock());
}
+
+ @Test
+ public void testGetCurrentClock_whenJSONExceptionOccurs_returnsClockFaceSetting() {
+ // Secure settings contains a clock face setting with invalid format to cause JSONException.
+ Secure.putString(mContentResolver, ClockManager.CLOCK_FACE_SETTING, CLOCK_FACE_SETTING);
+
+ // The current clock is the clock face setting which is saved in secure settings.
+ assertEquals(CLOCK_FACE_SETTING, mManager.getCurrentClock());
+ }
+
+ @Test
+ public void testGetCurrentClock_withNullIdInSecureSettings_returnsNullId() {
+ // Secure settings contains a null clock id
+ Secure.putString(mContentResolver, ClockManager.CLOCK_FACE_SETTING, /* value= */ null);
+
+ // The current clock is null
+ assertEquals(null, mManager.getCurrentClock());
+ }
+
+ @Test
+ public void testGetCurrentClock_withEmptyIdInSecureSettings_returnsEmptyId() {
+ // Secure settings contains an empty clock id
+ Secure.putString(mContentResolver, ClockManager.CLOCK_FACE_SETTING, /* value= */ "");
+
+ // The current clock is empty
+ assertEquals("", mManager.getCurrentClock());
+ }
}
diff --git a/robolectric_tests/src/com/android/customization/model/theme/ThemeManagerTest.java b/robolectric_tests/src/com/android/customization/model/theme/ThemeManagerTest.java
index 0a17b5b..cfb8a33 100644
--- a/robolectric_tests/src/com/android/customization/model/theme/ThemeManagerTest.java
+++ b/robolectric_tests/src/com/android/customization/model/theme/ThemeManagerTest.java
@@ -26,13 +26,14 @@
import static com.android.customization.model.ResourceConstants.SYSUI_PACKAGE;
import static com.android.customization.model.ResourceConstants.THEME_SETTING;
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
import static junit.framework.TestCase.assertEquals;
-import static junit.framework.TestCase.assertTrue;
-import static org.junit.Assert.assertFalse;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
import android.provider.Settings;
@@ -40,11 +41,12 @@
import androidx.fragment.app.FragmentActivity;
import com.android.customization.model.CustomizationManager.Callback;
+import com.android.customization.model.CustomizationManager.OptionsFetchedListener;
+import com.android.customization.model.theme.custom.CustomTheme;
import com.android.customization.module.ThemesUserEventLogger;
import com.android.customization.testutils.OverlayManagerMocks;
-import com.android.customization.testutils.Wait;
-import com.android.wallpaper.module.WallpaperSetter;
+import org.json.JSONObject;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -58,8 +60,8 @@
public class ThemeManagerTest {
@Mock OverlayManagerCompat mMockOm;
- @Mock WallpaperSetter mMockWallpaperSetter;
@Mock ThemesUserEventLogger mThemesUserEventLogger;
+ @Mock ThemeBundleProvider mThemeBundleProvider;
private OverlayManagerMocks mMockOmHelper;
private ThemeManager mThemeManager;
private FragmentActivity mActivity;
@@ -71,9 +73,8 @@
mActivity = spy(activity);
mMockOmHelper = new OverlayManagerMocks();
mMockOmHelper.setUpMock(mMockOm);
- ThemeBundleProvider provider = mock(ThemeBundleProvider.class);
- mThemeManager = new ThemeManager(
- provider, activity, mMockWallpaperSetter, mMockOm, mThemesUserEventLogger);
+ mThemeManager = new ThemeManager(mThemeBundleProvider, activity,
+ mMockOm, mThemesUserEventLogger);
}
@After
@@ -82,7 +83,7 @@
}
@Test
- public void testApply_DefaultTheme() {
+ public void apply_WithDefaultTheme_StoresEmptyJsonString() {
mMockOmHelper.addOverlay("test.package.name_color", ANDROID_PACKAGE,
OVERLAY_CATEGORY_COLOR, true, 0);
mMockOmHelper.addOverlay("test.package.name_font", ANDROID_PACKAGE,
@@ -102,13 +103,94 @@
applyTheme(defaultTheme);
- assertEquals("Secure Setting should be emtpy after applying default theme",
- "",
+ assertEquals("Secure Setting should be empty JSON string after applying default theme",
+ new JSONObject().toString(),
Settings.Secure.getString(mActivity.getContentResolver(), THEME_SETTING));
}
@Test
- public void testApply_NonDefault() {
+ public void apply_WithOverlayTheme_StoresSerializedPackagesWithTimestamp() {
+ ThemeBundle theme = getOverlayTheme();
+ final String serializedPackagesWithTimestamp = theme.getSerializedPackagesWithTimestamp();
+
+ theme = spy(theme);
+ // Makes it return the fixed serializedPackagesWithTimestamp to test. Since we will get
+ // fresh time every time, it's hard to compare for testing.
+ when(theme.getSerializedPackagesWithTimestamp())
+ .thenReturn(serializedPackagesWithTimestamp);
+
+ applyTheme(theme);
+
+ assertEquals("Secure Setting should be the overlay packages after applying theme",
+ serializedPackagesWithTimestamp,
+ Settings.Secure.getString(mActivity.getContentResolver(), THEME_SETTING));
+ }
+
+ @Test
+ public void isAvailable_ThemeBundleProviderAndOverlayManagerAreAvailable_ReturnsTrue() {
+ when(mThemeBundleProvider.isAvailable()).thenReturn(true);
+ when(mMockOm.isAvailable()).thenReturn(true);
+
+ assertTrue(mThemeManager.isAvailable());
+ }
+
+ @Test
+ public void isAvailable_ThemeBundleProviderOrOverlayManagerIsAvailable_ReturnsFalse() {
+ when(mThemeBundleProvider.isAvailable()).thenReturn(false);
+ when(mMockOm.isAvailable()).thenReturn(true);
+ assertFalse(mThemeManager.isAvailable());
+
+ when(mThemeBundleProvider.isAvailable()).thenReturn(true);
+ when(mMockOm.isAvailable()).thenReturn(false);
+ assertFalse(mThemeManager.isAvailable());
+ }
+
+ @Test
+ public void fetchOptions_ThemeBundleProviderFetches() {
+ OptionsFetchedListener listener = mock(OptionsFetchedListener.class);
+
+ mThemeManager.fetchOptions(listener, false);
+
+ verify(mThemeBundleProvider).fetch(listener, false);
+ }
+
+ @Test
+ public void removeCustomTheme_ThemeBundleProviderRemovesCustomTheme() {
+ CustomTheme customTheme = mock(CustomTheme.class);
+ mThemeManager.removeCustomTheme(customTheme);
+
+ verify(mThemeBundleProvider).removeCustomTheme(customTheme);
+ }
+
+ @Test
+ public void findThemeByPackages_ThemeBundleProviderFindsEquivalent() {
+ CustomTheme theme = mock(CustomTheme.class);
+ mThemeManager.findThemeByPackages(theme);
+
+ verify(mThemeBundleProvider).findEquivalent(theme);
+ }
+
+ @Test
+ public void storeEmptyTheme_SettingsSecureStoresEmptyTheme() {
+ mThemeManager.storeEmptyTheme();
+
+ assertEquals(
+ new JSONObject().toString(),
+ Settings.Secure.getString(mActivity.getContentResolver(), THEME_SETTING));
+ }
+
+ @Test
+ public void getStoredOverlays_GetsFromSettingsSecureWithExpectedName() {
+ ThemeBundle theme = getOverlayTheme();
+
+ applyTheme(theme);
+
+ assertEquals(
+ Settings.Secure.getString(mActivity.getContentResolver(), THEME_SETTING),
+ mThemeManager.getStoredOverlays());
+ }
+
+ private ThemeBundle getOverlayTheme() {
final String bundleColorPackage = "test.package.name_color";
final String bundleFontPackage = "test.package.name_font";
final String otherPackage = "other.package.name_font";
@@ -120,16 +202,10 @@
mMockOmHelper.addOverlay(otherPackage, ANDROID_PACKAGE,
OVERLAY_CATEGORY_FONT, false, 0);
- ThemeBundle theme = new ThemeBundle.Builder()
+ return new ThemeBundle.Builder()
.addOverlayPackage(OVERLAY_CATEGORY_COLOR, bundleColorPackage)
.addOverlayPackage(OVERLAY_CATEGORY_FONT, bundleFontPackage)
.build(mActivity);
-
- applyTheme(theme);
-
- assertEquals("Secure Setting was not properly set after applying theme",
- theme.getSerializedPackages(),
- Settings.Secure.getString(mActivity.getContentResolver(), THEME_SETTING));
}
private void applyTheme(ThemeBundle theme) {
diff --git a/src/com/android/customization/model/clock/ContentProviderClockProvider.java b/src/com/android/customization/model/clock/ContentProviderClockProvider.java
index ad60ddc..8f4c031 100644
--- a/src/com/android/customization/model/clock/ContentProviderClockProvider.java
+++ b/src/com/android/customization/model/clock/ContentProviderClockProvider.java
@@ -2,7 +2,9 @@
import android.content.ContentResolver;
import android.content.Context;
+import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ProviderInfo;
import android.database.Cursor;
import android.net.Uri;
@@ -25,6 +27,7 @@
private final Context mContext;
private final ProviderInfo mProviderInfo;
private List<Clockface> mClocks;
+ private boolean mClockContentAvailable;
public ContentProviderClockProvider(Context context) {
mContext = context;
@@ -33,11 +36,25 @@
mProviderInfo = TextUtils.isEmpty(providerAuthority) ? null
: mContext.getPackageManager().resolveContentProvider(providerAuthority,
PackageManager.MATCH_SYSTEM_ONLY);
+
+ if (TextUtils.isEmpty(mContext.getString(R.string.clocks_stub_package))) {
+ mClockContentAvailable = false;
+ } else {
+ try {
+ ApplicationInfo applicationInfo = mContext.getPackageManager().getApplicationInfo(
+ mContext.getString(R.string.clocks_stub_package),
+ PackageManager.MATCH_SYSTEM_ONLY);
+ mClockContentAvailable = applicationInfo != null;
+ } catch (NameNotFoundException e) {
+ mClockContentAvailable = false;
+ }
+ }
}
@Override
public boolean isAvailable() {
- return mProviderInfo != null && (mClocks == null || !mClocks.isEmpty());
+ return mProviderInfo != null && mClockContentAvailable
+ && (mClocks == null || !mClocks.isEmpty());
}
@Override
diff --git a/src/com/android/customization/model/grid/GridOptionsManager.java b/src/com/android/customization/model/grid/GridOptionsManager.java
index 1599dde..84f5373 100644
--- a/src/com/android/customization/model/grid/GridOptionsManager.java
+++ b/src/com/android/customization/model/grid/GridOptionsManager.java
@@ -16,6 +16,8 @@
package com.android.customization.model.grid;
import android.os.AsyncTask;
+import android.os.Bundle;
+import android.util.Pair;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -23,7 +25,6 @@
import com.android.customization.model.CustomizationManager;
import com.android.customization.module.ThemesUserEventLogger;
-import java.util.Collections;
import java.util.List;
/**
@@ -57,29 +58,42 @@
@Override
public void fetchOptions(OptionsFetchedListener<GridOption> callback, boolean reload) {
- new FetchTask(mProvider, callback).execute();
+ new FetchTask(mProvider, callback, reload).execute();
}
- private static class FetchTask extends AsyncTask<Void, Void, List<GridOption>> {
+ /** See if using surface view to render grid options */
+ public boolean usesSurfaceView() {
+ return mProvider.usesSurfaceView();
+ }
+
+ /** Call through content provider API to render preview */
+ public Bundle renderPreview(Bundle bundle, String gridName) {
+ return mProvider.renderPreview(gridName, bundle);
+ }
+
+ private static class FetchTask extends AsyncTask<Void, Void, Pair<List<GridOption>, String>> {
private final LauncherGridOptionsProvider mProvider;
@Nullable private final OptionsFetchedListener<GridOption> mCallback;
+ private final boolean mReload;
private FetchTask(@NonNull LauncherGridOptionsProvider provider,
- @Nullable OptionsFetchedListener<GridOption> callback) {
+ @Nullable OptionsFetchedListener<GridOption> callback, boolean reload) {
mCallback = callback;
mProvider = provider;
+ mReload = reload;
}
@Override
- protected List<GridOption> doInBackground(Void[] params) {
- return mProvider.fetch(false);
+ protected Pair<List<GridOption>, String> doInBackground(Void[] params) {
+ return mProvider.fetch(mReload);
}
@Override
- protected void onPostExecute(List<GridOption> gridOptions) {
+ protected void onPostExecute(Pair<List<GridOption>, String> gridOptionsResult) {
if (mCallback != null) {
- if (gridOptions != null && !gridOptions.isEmpty()) {
- mCallback.onOptionsLoaded(gridOptions);
+ if (gridOptionsResult != null && gridOptionsResult.first != null
+ && !gridOptionsResult.first.isEmpty()) {
+ mCallback.onOptionsLoaded(gridOptionsResult.first);
} else {
mCallback.onError(null);
}
diff --git a/src/com/android/customization/model/grid/LauncherGridOptionsProvider.java b/src/com/android/customization/model/grid/LauncherGridOptionsProvider.java
index 7c7f8d4..6a47f95 100644
--- a/src/com/android/customization/model/grid/LauncherGridOptionsProvider.java
+++ b/src/com/android/customization/model/grid/LauncherGridOptionsProvider.java
@@ -18,20 +18,19 @@
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.content.pm.ProviderInfo;
-import android.content.pm.ResolveInfo;
import android.content.res.Resources;
import android.database.Cursor;
-import android.net.Uri;
+import android.os.Bundle;
import android.text.TextUtils;
+import android.util.Pair;
+import android.view.SurfaceView;
import androidx.annotation.Nullable;
import androidx.annotation.WorkerThread;
import com.android.customization.model.ResourceConstants;
import com.android.wallpaper.R;
+import com.android.wallpaper.util.PreviewUtils;
import com.bumptech.glide.Glide;
@@ -53,29 +52,28 @@
private static final String COL_PREVIEW_COUNT = "preview_count";
private static final String COL_IS_DEFAULT = "is_default";
+ // Normal gird size name
+ private static final String GRID_NAME_NORMAL = "normal";
+
+ private static final String METADATA_KEY_PREVIEW_VERSION = "preview_version";
+
private final Context mContext;
- private final String mGridProviderAuthority;
- private final ProviderInfo mProviderInfo;
+ private final PreviewUtils mPreviewUtils;
private List<GridOption> mOptions;
+ private String mVersion;
public LauncherGridOptionsProvider(Context context, String authorityMetadataKey) {
+ mPreviewUtils = new PreviewUtils(context, authorityMetadataKey);
mContext = context;
- Intent homeIntent = new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME);
-
- ResolveInfo info = context.getPackageManager().resolveActivity(homeIntent,
- PackageManager.MATCH_DEFAULT_ONLY | PackageManager.GET_META_DATA);
- if (info != null && info.activityInfo != null && info.activityInfo.metaData != null) {
- mGridProviderAuthority = info.activityInfo.metaData.getString(authorityMetadataKey);
- } else {
- mGridProviderAuthority = null;
- }
- // TODO: check permissions if needed
- mProviderInfo = TextUtils.isEmpty(mGridProviderAuthority) ? null
- : mContext.getPackageManager().resolveContentProvider(mGridProviderAuthority, 0);
}
boolean areGridsAvailable() {
- return mProviderInfo != null;
+ return mPreviewUtils.supportsPreview();
+ }
+
+ boolean usesSurfaceView() {
+ // If no version code is returned, fall back to V1.
+ return TextUtils.equals(mVersion, "V2");
}
/**
@@ -84,22 +82,19 @@
*/
@WorkerThread
@Nullable
- List<GridOption> fetch(boolean reload) {
+ Pair<List<GridOption>, String> fetch(boolean reload) {
if (!areGridsAvailable()) {
return null;
}
if (mOptions != null && !reload) {
- return mOptions;
+ return Pair.create(mOptions, mVersion);
}
- Uri optionsUri = new Uri.Builder()
- .scheme(ContentResolver.SCHEME_CONTENT)
- .authority(mProviderInfo.authority)
- .appendPath(LIST_OPTIONS)
- .build();
ContentResolver resolver = mContext.getContentResolver();
String iconPath = mContext.getResources().getString(Resources.getSystem().getIdentifier(
ResourceConstants.CONFIG_ICON_MASK, "string", ResourceConstants.ANDROID_PACKAGE));
- try (Cursor c = resolver.query(optionsUri, null, null, null, null)) {
+ try (Cursor c = resolver.query(mPreviewUtils.getUri(LIST_OPTIONS), null, null, null,
+ null)) {
+ mVersion = c.getExtras().getString(METADATA_KEY_PREVIEW_VERSION);
mOptions = new ArrayList<>();
while(c.moveToNext()) {
String name = c.getString(c.getColumnIndex(COL_NAME));
@@ -107,31 +102,35 @@
int cols = c.getInt(c.getColumnIndex(COL_COLS));
int previewCount = c.getInt(c.getColumnIndex(COL_PREVIEW_COUNT));
boolean isSet = Boolean.valueOf(c.getString(c.getColumnIndex(COL_IS_DEFAULT)));
- Uri preview = new Uri.Builder()
- .scheme(ContentResolver.SCHEME_CONTENT)
- .authority(mProviderInfo.authority)
- .appendPath(PREVIEW)
- .appendPath(name)
- .build();
- String title = mContext.getString(R.string.grid_title_pattern, cols, rows);
- mOptions.add(new GridOption(title, name, isSet, rows, cols, preview, previewCount,
- iconPath));
+ String title = GRID_NAME_NORMAL.equals(name)
+ ? mContext.getString(R.string.default_theme_title)
+ : mContext.getString(R.string.grid_title_pattern, cols, rows);
+ mOptions.add(new GridOption(title, name, isSet, rows, cols,
+ mPreviewUtils.getUri(PREVIEW), previewCount, iconPath));
}
Glide.get(mContext).clearDiskCache();
} catch (Exception e) {
mOptions = null;
+ mVersion = null;
}
- return mOptions;
+ return Pair.create(mOptions, mVersion);
+ }
+
+ /**
+ * Request rendering of home screen preview via Launcher to Wallpaper using SurfaceView
+ * @param name the grid option name
+ * @param bundle surface view request bundle generated from
+ * {@link com.android.wallpaper.util.SurfaceViewUtils#createSurfaceViewRequest(SurfaceView)}.
+ */
+ Bundle renderPreview(String name, Bundle bundle) {
+ bundle.putString("name", name);
+ return mPreviewUtils.renderPreview(bundle);
}
int applyGrid(String name) {
- Uri updateDefaultUri = new Uri.Builder()
- .scheme(ContentResolver.SCHEME_CONTENT)
- .authority(mProviderInfo.authority)
- .appendPath(DEFAULT_GRID)
- .build();
ContentValues values = new ContentValues();
values.put("name", name);
- return mContext.getContentResolver().update(updateDefaultUri, values, null, null);
+ return mContext.getContentResolver().update(mPreviewUtils.getUri(DEFAULT_GRID), values,
+ null, null);
}
}
diff --git a/src/com/android/customization/model/theme/DefaultThemeProvider.java b/src/com/android/customization/model/theme/DefaultThemeProvider.java
index ce12d35..7c99f9c 100644
--- a/src/com/android/customization/model/theme/DefaultThemeProvider.java
+++ b/src/com/android/customization/model/theme/DefaultThemeProvider.java
@@ -15,8 +15,6 @@
*/
package com.android.customization.model.theme;
-import static android.content.res.Resources.ID_NULL;
-
import static com.android.customization.model.ResourceConstants.ANDROID_PACKAGE;
import static com.android.customization.model.ResourceConstants.ICONS_FOR_PREVIEW;
import static com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY_COLOR;
@@ -29,14 +27,9 @@
import static com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY_SHAPE;
import static com.android.customization.model.ResourceConstants.SYSUI_PACKAGE;
-import android.content.ComponentName;
import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
-import android.content.pm.ResolveInfo;
import android.content.res.Resources.NotFoundException;
-import android.service.wallpaper.WallpaperService;
import android.text.TextUtils;
import android.util.Log;
@@ -49,7 +42,6 @@
import com.android.customization.module.CustomizationPreferences;
import com.android.wallpaper.R;
import com.android.wallpaper.asset.ResourceAsset;
-import com.android.wallpaper.model.LiveWallpaperInfo;
import com.bumptech.glide.request.RequestOptions;
import com.google.android.apps.wallpaper.asset.ThemeBundleThumbAsset;
@@ -57,9 +49,7 @@
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
-import org.xmlpull.v1.XmlPullParserException;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@@ -83,12 +73,6 @@
private static final String ICON_THEMEPICKER_PREFIX = "theme_overlay_icon_themepicker_";
private static final String ICON_SETTINGS_PREFIX = "theme_overlay_icon_settings_";
private static final String ICON_SYSUI_PREFIX = "theme_overlay_icon_sysui_";
- private static final String WALLPAPER_PREFIX = "theme_wallpaper_";
- private static final String WALLPAPER_TITLE_PREFIX = "theme_wallpaper_title_";
- private static final String WALLPAPER_ATTRIBUTION_PREFIX = "theme_wallpaper_attribution_";
- private static final String WALLPAPER_THUMB_PREFIX = "theme_wallpaper_thumbnail_";
- private static final String WALLPAPER_ACTION_PREFIX = "theme_wallpaper_action_";
- private static final String WALLPAPER_OPTIONS_PREFIX = "theme_wallpaper_options_";
private static final String DEFAULT_THEME_NAME= "default";
private static final String THEME_TITLE_FIELD = "_theme_title";
@@ -172,8 +156,6 @@
mOverlayProvider.addNoPreviewIconOverlay(builder, iconSettingsOverlayPackage);
- addWallpaper(themeName, builder);
-
mThemes.add(builder.build(mContext));
} catch (NameNotFoundException | NotFoundException e) {
Log.w(TAG, String.format("Couldn't load part of theme %s, will skip it", themeName),
@@ -184,70 +166,6 @@
addCustomThemes();
}
- private void addWallpaper(String themeName, Builder builder) {
- try {
- String wallpaperResName = WALLPAPER_PREFIX + themeName;
- int wallpaperResId = mStubApkResources.getIdentifier(wallpaperResName,
- "drawable", mStubPackageName);
- // Check in case the theme has a separate thumbnail for the wallpaper
- String wallpaperThumbnailResName = WALLPAPER_THUMB_PREFIX + themeName;
- int wallpaperThumbnailResId = mStubApkResources.getIdentifier(wallpaperThumbnailResName,
- "drawable", mStubPackageName);
- if (wallpaperResId != ID_NULL) {
- builder.setWallpaperInfo(mStubPackageName, wallpaperResName,
- themeName, wallpaperResId,
- mStubApkResources.getIdentifier(WALLPAPER_TITLE_PREFIX + themeName,
- "string", mStubPackageName),
- mStubApkResources.getIdentifier(
- WALLPAPER_ATTRIBUTION_PREFIX + themeName, "string",
- mStubPackageName),
- mStubApkResources.getIdentifier(WALLPAPER_ACTION_PREFIX + themeName,
- "string", mStubPackageName))
- .setWallpaperAsset(wallpaperThumbnailResId != ID_NULL ?
- getThumbAsset(WALLPAPER_THUMB_PREFIX, themeName)
- : getDrawableResourceAsset(WALLPAPER_PREFIX, themeName));
- } else {
- // Try to see if it's a live wallpaper reference
- wallpaperResId = mStubApkResources.getIdentifier(wallpaperResName,
- "string", mStubPackageName);
- if (wallpaperResId != ID_NULL) {
- String wpComponent = mStubApkResources.getString(wallpaperResId);
-
- int wallpaperOptionsResId = mStubApkResources.getIdentifier(
- WALLPAPER_OPTIONS_PREFIX + themeName, "string", mStubPackageName);
- String wallpaperOptions = wallpaperOptionsResId != ID_NULL
- ? mStubApkResources.getString(wallpaperOptionsResId) : null;
-
- String[] componentParts = wpComponent.split("/");
- Intent liveWpIntent = new Intent(WallpaperService.SERVICE_INTERFACE);
- liveWpIntent.setComponent(
- new ComponentName(componentParts[0], componentParts[1]));
-
- Context appContext = mContext.getApplicationContext();
- PackageManager pm = appContext.getPackageManager();
- ResolveInfo resolveInfo =
- pm.resolveService(liveWpIntent, PackageManager.GET_META_DATA);
- if (resolveInfo != null) {
- android.app.WallpaperInfo wallpaperInfo;
- try {
- wallpaperInfo = new android.app.WallpaperInfo(appContext, resolveInfo);
- LiveWallpaperInfo liveInfo = new LiveWallpaperInfo(wallpaperInfo);
- builder.setLiveWallpaperInfo(liveInfo).setWallpaperAsset(
- wallpaperThumbnailResId != ID_NULL ?
- getThumbAsset(WALLPAPER_THUMB_PREFIX, themeName)
- : liveInfo.getThumbAsset(mContext))
- .setWallpaperOptions(wallpaperOptions);
- } catch (XmlPullParserException | IOException e) {
- Log.w(TAG, "Skipping wallpaper " + resolveInfo.serviceInfo, e);
- }
- }
- }
- }
- } catch (NotFoundException e) {
- // Nothing to do here, if there's no wallpaper we'll just omit wallpaper
- }
- }
-
/**
* Default theme requires different treatment: if there are overlay packages specified in the
* stub apk, we'll use those, otherwise we'll get the System default values. But we cannot skip
@@ -318,8 +236,6 @@
mOverlayProvider.addSystemDefaultIcons(builder, SYSUI_PACKAGE, ICONS_FOR_PREVIEW);
}
- addWallpaper(DEFAULT_THEME_NAME, builder);
-
mThemes.add(builder.build(mContext));
}
diff --git a/src/com/android/customization/model/theme/ThemeBundle.java b/src/com/android/customization/model/theme/ThemeBundle.java
index e83e852..14b2dcd 100644
--- a/src/com/android/customization/model/theme/ThemeBundle.java
+++ b/src/com/android/customization/model/theme/ThemeBundle.java
@@ -31,7 +31,6 @@
import android.graphics.drawable.Drawable;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.PathShape;
-import android.icu.text.SimpleDateFormat;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
@@ -40,9 +39,7 @@
import androidx.annotation.ColorInt;
import androidx.annotation.Dimension;
-import androidx.annotation.DrawableRes;
import androidx.annotation.Nullable;
-import androidx.annotation.StringRes;
import androidx.core.graphics.PathParser;
import com.android.customization.model.CustomizationManager;
@@ -51,7 +48,6 @@
import com.android.wallpaper.R;
import com.android.wallpaper.asset.Asset;
import com.android.wallpaper.asset.BitmapCachingAsset;
-import com.android.wallpaper.model.LiveWallpaperInfo;
import com.android.wallpaper.model.WallpaperInfo;
import org.json.JSONException;
@@ -59,12 +55,10 @@
import java.util.ArrayList;
import java.util.Collections;
-import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
-import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -83,20 +77,15 @@
private final PreviewInfo mPreviewInfo;
private final boolean mIsDefault;
protected final Map<String, String> mPackagesByCategory;
- @Nullable private final WallpaperInfo mWallpaperInfo;
- @Nullable private final String mWallpaperOptions;
private WallpaperInfo mOverrideWallpaper;
private Asset mOverrideWallpaperAsset;
private CharSequence mContentDescription;
protected ThemeBundle(String title, Map<String, String> overlayPackages,
- boolean isDefault, @Nullable WallpaperInfo wallpaperInfo,
- @Nullable String wallpaperOptions, PreviewInfo previewInfo) {
+ boolean isDefault, PreviewInfo previewInfo) {
mTitle = title;
mIsDefault = isDefault;
mPreviewInfo = previewInfo;
- mWallpaperInfo = wallpaperInfo;
- mWallpaperOptions = wallpaperOptions;
mPackagesByCategory = Collections.unmodifiableMap(overlayPackages);
}
@@ -169,16 +158,6 @@
mOverrideWallpaperAsset = null;
}
- public boolean shouldUseThemeWallpaper() {
- return mOverrideWallpaper == null && mWallpaperInfo != null;
- }
-
- public Asset getWallpaperPreviewAsset(Context context) {
- return mOverrideWallpaper != null ?
- getOverrideWallpaperAsset(context) :
- getPreviewInfo().wallpaperAsset;
- }
-
private Asset getOverrideWallpaperAsset(Context context) {
if (mOverrideWallpaperAsset == null) {
mOverrideWallpaperAsset = new BitmapCachingAsset(context,
@@ -187,15 +166,6 @@
return mOverrideWallpaperAsset;
}
- public WallpaperInfo getWallpaperInfo() {
- return mWallpaperInfo;
- }
-
- @Nullable
- public String getWallpaperOptions() {
- return mWallpaperOptions;
- }
-
boolean isDefault() {
return mIsDefault;
}
@@ -280,14 +250,13 @@
@ColorInt public final int colorAccentDark;
public final List<Drawable> icons;
public final Drawable shapeDrawable;
- @Nullable public final Asset wallpaperAsset;
public final List<Drawable> shapeAppIcons;
@Dimension public final int bottomSheeetCornerRadius;
private PreviewInfo(Context context, Typeface bodyFontFamily, Typeface headlineFontFamily,
int colorAccentLight, int colorAccentDark, List<Drawable> icons,
Drawable shapeDrawable, @Dimension int cornerRadius,
- @Nullable Asset wallpaperAsset, List<Drawable> shapeAppIcons) {
+ List<Drawable> shapeAppIcons) {
this.bodyFontFamily = bodyFontFamily;
this.headlineFontFamily = headlineFontFamily;
this.colorAccentLight = colorAccentLight;
@@ -295,8 +264,6 @@
this.icons = icons;
this.shapeDrawable = shapeDrawable;
this.bottomSheeetCornerRadius = cornerRadius;
- this.wallpaperAsset = wallpaperAsset == null
- ? null : new BitmapCachingAsset(context, wallpaperAsset);
this.shapeAppIcons = shapeAppIcons;
}
@@ -323,15 +290,11 @@
private Path mShapePath;
private boolean mIsDefault;
@Dimension private int mCornerRadius;
- private Asset mWallpaperAsset;
- private WallpaperInfo mWallpaperInfo;
- private String mWallpaperOptions;
protected Map<String, String> mPackages = new HashMap<>();
private List<Drawable> mAppIcons = new ArrayList<>();
public ThemeBundle build(Context context) {
- return new ThemeBundle(mTitle, mPackages, mIsDefault, mWallpaperInfo, mWallpaperOptions,
- createPreviewInfo(context));
+ return new ThemeBundle(mTitle, mPackages, mIsDefault, createPreviewInfo(context));
}
public PreviewInfo createPreviewInfo(Context context) {
@@ -359,8 +322,7 @@
}
}
return new PreviewInfo(context, mBodyFontFamily, mHeadlineFontFamily, mColorAccentLight,
- mColorAccentDark, mIcons, shapeDrawable, mCornerRadius,
- mWallpaperAsset, shapeIcons);
+ mColorAccentDark, mIcons, shapeDrawable, mCornerRadius, shapeIcons);
}
public Map<String, String> getPackages() {
@@ -416,30 +378,6 @@
return this;
}
- public Builder setWallpaperInfo(String wallpaperPackageName, String wallpaperResName,
- String themeId, @DrawableRes int wallpaperResId, @StringRes int titleResId,
- @StringRes int attributionResId, @StringRes int actionUrlResId) {
- mWallpaperInfo = new ThemeBundledWallpaperInfo(wallpaperPackageName, wallpaperResName,
- themeId, wallpaperResId, titleResId, attributionResId, actionUrlResId);
- return this;
- }
-
- public Builder setLiveWallpaperInfo(LiveWallpaperInfo info) {
- mWallpaperInfo = info;
- return this;
- }
-
-
- public Builder setWallpaperAsset(Asset wallpaperAsset) {
- mWallpaperAsset = wallpaperAsset;
- return this;
- }
-
- public Builder setWallpaperOptions(String wallpaperOptions) {
- mWallpaperOptions = wallpaperOptions;
- return this;
- }
-
public Builder asDefault() {
mIsDefault = true;
return this;
diff --git a/src/com/android/customization/model/theme/ThemeManager.java b/src/com/android/customization/model/theme/ThemeManager.java
index e4981b0..533fbd0 100644
--- a/src/com/android/customization/model/theme/ThemeManager.java
+++ b/src/com/android/customization/model/theme/ThemeManager.java
@@ -23,7 +23,7 @@
import static com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY_ICON_SYSUI;
import static com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY_ICON_THEMEPICKER;
import static com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY_SHAPE;
-import android.graphics.Point;
+
import android.provider.Settings;
import android.text.TextUtils;
@@ -34,12 +34,6 @@
import com.android.customization.model.ResourceConstants;
import com.android.customization.model.theme.custom.CustomTheme;
import com.android.customization.module.ThemesUserEventLogger;
-import com.android.wallpaper.R;
-import com.android.wallpaper.asset.Asset;
-import com.android.wallpaper.model.LiveWallpaperInfo;
-import com.android.wallpaper.module.WallpaperPersister.SetWallpaperCallback;
-import com.android.wallpaper.module.WallpaperSetter;
-import com.android.wallpaper.util.WallpaperCropUtils;
import org.json.JSONObject;
@@ -59,25 +53,22 @@
THEME_CATEGORIES.add(OVERLAY_CATEGORY_ICON_SYSUI);
THEME_CATEGORIES.add(OVERLAY_CATEGORY_ICON_LAUNCHER);
THEME_CATEGORIES.add(OVERLAY_CATEGORY_ICON_THEMEPICKER);
- };
-
+ }
private final ThemeBundleProvider mProvider;
private final OverlayManagerCompat mOverlayManagerCompat;
- private final WallpaperSetter mWallpaperSetter;
protected final FragmentActivity mActivity;
private final ThemesUserEventLogger mEventLogger;
private Map<String, String> mCurrentOverlays;
public ThemeManager(ThemeBundleProvider provider, FragmentActivity activity,
- WallpaperSetter wallpaperSetter, OverlayManagerCompat overlayManagerCompat,
+ OverlayManagerCompat overlayManagerCompat,
ThemesUserEventLogger logger) {
mProvider = provider;
mActivity = activity;
mOverlayManagerCompat = overlayManagerCompat;
- mWallpaperSetter = wallpaperSetter;
mEventLogger = logger;
}
@@ -88,67 +79,7 @@
@Override
public void apply(ThemeBundle theme, Callback callback) {
- // Set wallpaper
- if (theme.shouldUseThemeWallpaper()) {
- mWallpaperSetter.requestDestination(mActivity, mActivity.getSupportFragmentManager(),
- R.string.set_theme_wallpaper_dialog_message,
- destination -> applyWallpaper(
- theme,
- destination,
- createSetWallpaperCallback(theme, callback)),
- theme.getWallpaperInfo() instanceof LiveWallpaperInfo);
-
- } else {
- applyOverlays(theme, callback);
- }
- }
-
- private SetWallpaperCallback createSetWallpaperCallback(ThemeBundle theme, Callback callback) {
- return new SetWallpaperCallback() {
- @Override
- public void onSuccess() {
- applyWallpaperOptions(theme);
- applyOverlays(theme, callback);
- }
-
- @Override
- public void onError(@Nullable Throwable throwable) {
- callback.onError(throwable);
- }
- };
- }
-
- protected void applyWallpaperOptions(ThemeBundle theme) {
- //Do nothing.
- }
-
- private void applyWallpaper(ThemeBundle theme, int destination,
- SetWallpaperCallback callback) {
- Point defaultCropSurfaceSize = WallpaperCropUtils.getDefaultCropSurfaceSize(
- mActivity.getResources(),
- mActivity.getWindowManager().getDefaultDisplay());
- Asset wallpaperAsset = theme.getWallpaperInfo().getAsset(mActivity);
- if (wallpaperAsset != null) {
- wallpaperAsset.decodeRawDimensions(mActivity,
- dimensions -> {
- float scale = 1f;
- // Calculate scale to fit the screen height
- if (dimensions != null && dimensions.y > 0) {
- scale = (float) defaultCropSurfaceSize.y / dimensions.y;
- }
- mWallpaperSetter.setCurrentWallpaper(mActivity,
- theme.getWallpaperInfo(),
- wallpaperAsset,
- destination,
- scale, null, callback);
- });
- } else {
- mWallpaperSetter.setCurrentWallpaper(mActivity,
- theme.getWallpaperInfo(),
- null,
- destination,
- 1f, null, callback);
- }
+ applyOverlays(theme, callback);
}
private void applyOverlays(ThemeBundle theme, Callback callback) {
diff --git a/src/com/android/customization/model/theme/custom/CustomTheme.java b/src/com/android/customization/model/theme/custom/CustomTheme.java
index 8a7ca05..9c14f01 100644
--- a/src/com/android/customization/model/theme/custom/CustomTheme.java
+++ b/src/com/android/customization/model/theme/custom/CustomTheme.java
@@ -41,7 +41,7 @@
public CustomTheme(@NonNull String id, String title, Map<String, String> overlayPackages,
@Nullable PreviewInfo previewInfo) {
- super(title, overlayPackages, false, null, null, previewInfo);
+ super(title, overlayPackages, false, previewInfo);
mId = id;
}
@@ -76,11 +76,6 @@
}
@Override
- public boolean shouldUseThemeWallpaper() {
- return false;
- }
-
- @Override
public boolean isActive(CustomizationManager<ThemeBundle> manager) {
return isDefined() && super.isActive(manager);
}
diff --git a/src/com/android/customization/module/CustomizationInjector.java b/src/com/android/customization/module/CustomizationInjector.java
index d25f925..85853de 100644
--- a/src/com/android/customization/module/CustomizationInjector.java
+++ b/src/com/android/customization/module/CustomizationInjector.java
@@ -23,13 +23,11 @@
import com.android.customization.model.theme.ThemeBundleProvider;
import com.android.customization.model.theme.ThemeManager;
import com.android.wallpaper.module.Injector;
-import com.android.wallpaper.module.WallpaperSetter;
public interface CustomizationInjector extends Injector {
CustomizationPreferences getCustomizationPreferences(Context context);
ThemeManager getThemeManager(ThemeBundleProvider provider, FragmentActivity activity,
- WallpaperSetter wallpaperSetter, OverlayManagerCompat overlayManagerCompat,
- ThemesUserEventLogger logger);
+ OverlayManagerCompat overlayManagerCompat, ThemesUserEventLogger logger);
}
diff --git a/src/com/android/customization/module/DefaultCustomizationInjector.java b/src/com/android/customization/module/DefaultCustomizationInjector.java
index a0d435b..7358d8f 100644
--- a/src/com/android/customization/module/DefaultCustomizationInjector.java
+++ b/src/com/android/customization/module/DefaultCustomizationInjector.java
@@ -30,7 +30,6 @@
import com.android.wallpaper.module.LoggingOptInStatusProvider;
import com.android.wallpaper.module.WallpaperPreferences;
import com.android.wallpaper.module.WallpaperRotationRefresher;
-import com.android.wallpaper.module.WallpaperSetter;
import com.android.wallpaper.monitor.PerformanceMonitor;
import com.android.wallpaper.picker.PreviewFragment;
@@ -50,7 +49,6 @@
return mPrefs;
}
-
@Override
public CustomizationPreferences getCustomizationPreferences(Context context) {
return (CustomizationPreferences) getPreferences(context);
@@ -115,9 +113,8 @@
@Override
public ThemeManager getThemeManager(ThemeBundleProvider provider, FragmentActivity activity,
- WallpaperSetter wallpaperSetter, OverlayManagerCompat overlayManagerCompat,
- ThemesUserEventLogger logger) {
- return new ThemeManager(provider, activity, wallpaperSetter, overlayManagerCompat, logger);
+ OverlayManagerCompat overlayManagerCompat, ThemesUserEventLogger logger) {
+ return new ThemeManager(provider, activity, overlayManagerCompat, logger);
}
}
diff --git a/src/com/android/customization/module/StatsLogUserEventLogger.java b/src/com/android/customization/module/StatsLogUserEventLogger.java
index a13d420..5649c5e 100644
--- a/src/com/android/customization/module/StatsLogUserEventLogger.java
+++ b/src/com/android/customization/module/StatsLogUserEventLogger.java
@@ -18,6 +18,7 @@
import static com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY_COLOR;
import static com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY_FONT;
import static com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY_SHAPE;
+import static com.android.systemui.shared.system.SysUiStatsLog.STYLE_UI_CHANGED;
import android.stats.style.nano.StyleEnums;
@@ -26,6 +27,7 @@
import com.android.customization.model.clock.Clockface;
import com.android.customization.model.grid.GridOption;
import com.android.customization.model.theme.ThemeBundle;
+import com.android.systemui.shared.system.SysUiStatsLog;
import com.android.wallpaper.module.NoOpUserEventLogger;
import java.util.Map;
@@ -39,41 +41,59 @@
public class StatsLogUserEventLogger extends NoOpUserEventLogger implements ThemesUserEventLogger {
private static final String TAG = "StatsLogUserEventLogger";
- private static final int CODE = 179;
@Override
public void logResumed(boolean provisioned, boolean wallpaper) {
- WallpaperStatsLog.write(CODE, StyleEnums.ONRESUME, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.ONRESUME, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
@Override
public void logStopped() {
- WallpaperStatsLog.write(CODE, StyleEnums.ONSTOP, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.ONSTOP, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
@Override
public void logActionClicked(String collectionId, int actionLabelResId) {
- WallpaperStatsLog.write(CODE, StyleEnums.WALLPAPER_EXPLORE, 0, 0, 0, 0, 0,
+ SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.WALLPAPER_EXPLORE, 0, 0, 0, 0, 0,
collectionId.hashCode(), 0, 0, 0);
}
@Override
public void logIndividualWallpaperSelected(String collectionId) {
- WallpaperStatsLog.write(CODE, StyleEnums.WALLPAPER_SELECT, 0, 0, 0, 0, 0, 0,
- collectionId.hashCode(), 0, 0);
+ SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.WALLPAPER_SELECT, 0, 0, 0, 0, 0,
+ collectionId.hashCode(), 0, 0, 0);
}
@Override
public void logCategorySelected(String collectionId) {
- WallpaperStatsLog.write(CODE, StyleEnums.WALLPAPER_OPEN_CATEGORY,
+ SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.WALLPAPER_OPEN_CATEGORY,
0, 0, 0, 0, 0,
collectionId.hashCode(),
0, 0, 0);
}
@Override
+ public void logLiveWallpaperInfoSelected(String collectionId, @Nullable String wallpaperId) {
+ SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.LIVE_WALLPAPER_INFO_SELECT,
+ 0, 0, 0, 0, 0,
+ collectionId.hashCode(),
+ wallpaperId != null ? wallpaperId.hashCode() : 0,
+ 0, 0);
+ }
+
+ @Override
+ public void logLiveWallpaperCustomizeSelected(String collectionId,
+ @Nullable String wallpaperId) {
+ SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.LIVE_WALLPAPER_CUSTOMIZE_SELECT,
+ 0, 0, 0, 0, 0,
+ collectionId.hashCode(),
+ wallpaperId != null ? wallpaperId.hashCode() : 0,
+ 0, 0);
+ }
+
+ @Override
public void logWallpaperSet(String collectionId, @Nullable String wallpaperId) {
- WallpaperStatsLog.write(CODE, StyleEnums.WALLPAPER_APPLIED,
+ SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.WALLPAPER_APPLIED,
0, 0, 0, 0, 0,
collectionId.hashCode(),
wallpaperId != null ? wallpaperId.hashCode() : 0,
@@ -88,7 +108,7 @@
@Override
public void logThemeSelected(ThemeBundle theme, boolean isCustomTheme) {
- WallpaperStatsLog.write(CODE, StyleEnums.PICKER_SELECT,
+ SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.PICKER_SELECT,
Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_COLOR)),
Objects.hashCode(getThemePackage(theme,OVERLAY_CATEGORY_FONT)),
Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_SHAPE)),
@@ -97,7 +117,7 @@
@Override
public void logThemeApplied(ThemeBundle theme, boolean isCustomTheme) {
- WallpaperStatsLog.write(CODE, StyleEnums.PICKER_APPLIED,
+ SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.PICKER_APPLIED,
Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_COLOR)),
Objects.hashCode(getThemePackage(theme,OVERLAY_CATEGORY_FONT)),
Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_SHAPE)),
@@ -106,7 +126,7 @@
@Override
public void logClockSelected(Clockface clock) {
- WallpaperStatsLog.write(CODE, StyleEnums.PICKER_SELECT,
+ SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.PICKER_SELECT,
0, 0, 0,
Objects.hashCode(clock.getId()),
0, 0, 0, 0, 0);
@@ -114,7 +134,7 @@
@Override
public void logClockApplied(Clockface clock) {
- WallpaperStatsLog.write(CODE, StyleEnums.PICKER_APPLIED,
+ SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.PICKER_APPLIED,
0, 0, 0,
Objects.hashCode(clock.getId()),
0, 0, 0, 0, 0);
@@ -122,7 +142,7 @@
@Override
public void logGridSelected(GridOption grid) {
- WallpaperStatsLog.write(CODE, StyleEnums.PICKER_SELECT,
+ SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.PICKER_SELECT,
0, 0, 0, 0,
grid.cols,
0, 0, 0, 0);
@@ -130,7 +150,7 @@
@Override
public void logGridApplied(GridOption grid) {
- WallpaperStatsLog.write(CODE, StyleEnums.PICKER_APPLIED,
+ SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.PICKER_APPLIED,
0, 0, 0, 0,
grid.cols,
0, 0, 0, 0);
diff --git a/src/com/android/customization/module/WallpaperStatsLog.java b/src/com/android/customization/module/WallpaperStatsLog.java
deleted file mode 100644
index 9f5761f..0000000
--- a/src/com/android/customization/module/WallpaperStatsLog.java
+++ /dev/null
@@ -1,147 +0,0 @@
-// This file is autogenerated
-
-package com.android.customization.module;
-
-import static java.nio.charset.StandardCharsets.UTF_8;
-
-import android.util.StatsLog;
-import android.os.SystemClock;
-
-import java.util.ArrayList;
-
-
-/**
- * Utility class for logging statistics events.
- */
-public class WallpaperStatsLog {
- private static final int LOGGER_ENTRY_MAX_PAYLOAD = 4068;
- private static final int MAX_EVENT_PAYLOAD = LOGGER_ENTRY_MAX_PAYLOAD - 4;
- private static final byte INT_TYPE = 0;
- private static final byte LONG_TYPE = 1;
- private static final byte STRING_TYPE = 2;
- private static final byte LIST_TYPE = 3;
- private static final byte FLOAT_TYPE = 4;
- private static final int INT_TYPE_SIZE = 5;
- private static final int FLOAT_TYPE_SIZE = 5;
- private static final int LONG_TYPE_SIZE = 9;
- private static final int STRING_TYPE_OVERHEAD = 5;
- private static final int LIST_TYPE_OVERHEAD = 2;
- // Constants for atom codes.
-
- /**
- * StyleUIChanged style_ui_changed<br>
- * Usage: StatsLog.write(StatsLog.STYLE_UI_CHANGED, int action, int color_package_hash, int font_package_hash, int shape_package_hash, int clock_package_hash, int launcher_grid, int wallpaper_category_hash, int wallpaper_id_hash, int color_preference, int location_preference);<br>
- */
- public static final int STYLE_UI_CHANGED = 179;
-
- // Constants for enum values.
-
- // Values for StyleUIChanged.action
- public static final int STYLE_UICHANGED__ACTION__DEFAULT_ACTION = 0;
- public static final int STYLE_UICHANGED__ACTION__ONRESUME = 1;
- public static final int STYLE_UICHANGED__ACTION__ONSTOP = 2;
- public static final int STYLE_UICHANGED__ACTION__PICKER_SELECT = 3;
- public static final int STYLE_UICHANGED__ACTION__PICKER_APPLIED = 4;
- public static final int STYLE_UICHANGED__ACTION__WALLPAPER_OPEN_CATEGORY = 5;
- public static final int STYLE_UICHANGED__ACTION__WALLPAPER_SELECT = 6;
- public static final int STYLE_UICHANGED__ACTION__WALLPAPER_APPLIED = 7;
- public static final int STYLE_UICHANGED__ACTION__WALLPAPER_EXPLORE = 8;
- public static final int STYLE_UICHANGED__ACTION__WALLPAPER_DOWNLOAD = 9;
- public static final int STYLE_UICHANGED__ACTION__WALLPAPER_REMOVE = 10;
- public static final int STYLE_UICHANGED__ACTION__LIVE_WALLPAPER_DOWNLOAD_SUCCESS = 11;
- public static final int STYLE_UICHANGED__ACTION__LIVE_WALLPAPER_DOWNLOAD_FAILED = 12;
- public static final int STYLE_UICHANGED__ACTION__LIVE_WALLPAPER_DOWNLOAD_CANCELLED = 13;
- public static final int STYLE_UICHANGED__ACTION__LIVE_WALLPAPER_DELETE_SUCCESS = 14;
- public static final int STYLE_UICHANGED__ACTION__LIVE_WALLPAPER_DELETE_FAILED = 15;
- public static final int STYLE_UICHANGED__ACTION__LIVE_WALLPAPER_APPLIED = 16;
-
- // Values for StyleUIChanged.location_preference
- public static final int STYLE_UICHANGED__LOCATION_PREFERENCE__LOCATION_PREFERENCE_UNSPECIFIED = 0;
- public static final int STYLE_UICHANGED__LOCATION_PREFERENCE__LOCATION_UNAVAILABLE = 1;
- public static final int STYLE_UICHANGED__LOCATION_PREFERENCE__LOCATION_CURRENT = 2;
- public static final int STYLE_UICHANGED__LOCATION_PREFERENCE__LOCATION_MANUAL = 3;
-
- // Write methods
- public static void write(int code, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10) {
- // Initial overhead of the list, timestamp, and atom tag.
- int needed = LIST_TYPE_OVERHEAD + LONG_TYPE_SIZE + INT_TYPE_SIZE;
- needed += INT_TYPE_SIZE;
- needed += INT_TYPE_SIZE;
- needed += INT_TYPE_SIZE;
- needed += INT_TYPE_SIZE;
- needed += INT_TYPE_SIZE;
- needed += INT_TYPE_SIZE;
- needed += INT_TYPE_SIZE;
- needed += INT_TYPE_SIZE;
- needed += INT_TYPE_SIZE;
- needed += INT_TYPE_SIZE;
- if (needed > MAX_EVENT_PAYLOAD) {
- return;
- }
- byte[] buff = new byte[needed];
- int pos = 0;
- buff[pos] = LIST_TYPE;
- buff[pos + 1] = 12;
- pos += LIST_TYPE_OVERHEAD;
- long elapsedRealtime = SystemClock.elapsedRealtimeNanos();
- buff[pos] = LONG_TYPE;
- copyLong(buff, pos + 1, elapsedRealtime);
- pos += LONG_TYPE_SIZE;
- buff[pos] = INT_TYPE;
- copyInt(buff, pos + 1, code);
- pos += INT_TYPE_SIZE;
- buff[pos] = INT_TYPE;
- copyInt(buff, pos + 1, arg1);
- pos += INT_TYPE_SIZE;
- buff[pos] = INT_TYPE;
- copyInt(buff, pos + 1, arg2);
- pos += INT_TYPE_SIZE;
- buff[pos] = INT_TYPE;
- copyInt(buff, pos + 1, arg3);
- pos += INT_TYPE_SIZE;
- buff[pos] = INT_TYPE;
- copyInt(buff, pos + 1, arg4);
- pos += INT_TYPE_SIZE;
- buff[pos] = INT_TYPE;
- copyInt(buff, pos + 1, arg5);
- pos += INT_TYPE_SIZE;
- buff[pos] = INT_TYPE;
- copyInt(buff, pos + 1, arg6);
- pos += INT_TYPE_SIZE;
- buff[pos] = INT_TYPE;
- copyInt(buff, pos + 1, arg7);
- pos += INT_TYPE_SIZE;
- buff[pos] = INT_TYPE;
- copyInt(buff, pos + 1, arg8);
- pos += INT_TYPE_SIZE;
- buff[pos] = INT_TYPE;
- copyInt(buff, pos + 1, arg9);
- pos += INT_TYPE_SIZE;
- buff[pos] = INT_TYPE;
- copyInt(buff, pos + 1, arg10);
- pos += INT_TYPE_SIZE;
- StatsLog.writeRaw(buff, pos);
- }
-
- // Helper methods for copying primitives
- private static void copyInt(byte[] buff, int pos, int val) {
- buff[pos] = (byte) (val);
- buff[pos + 1] = (byte) (val >> 8);
- buff[pos + 2] = (byte) (val >> 16);
- buff[pos + 3] = (byte) (val >> 24);
- return;
- }
-
- private static void copyLong(byte[] buff, int pos, long val) {
- buff[pos] = (byte) (val);
- buff[pos + 1] = (byte) (val >> 8);
- buff[pos + 2] = (byte) (val >> 16);
- buff[pos + 3] = (byte) (val >> 24);
- buff[pos + 4] = (byte) (val >> 32);
- buff[pos + 5] = (byte) (val >> 40);
- buff[pos + 6] = (byte) (val >> 48);
- buff[pos + 7] = (byte) (val >> 56);
- return;
- }
-
-}
diff --git a/src/com/android/customization/picker/BasePreviewAdapter.java b/src/com/android/customization/picker/BasePreviewAdapter.java
index 53f750a..a02cb7e 100644
--- a/src/com/android/customization/picker/BasePreviewAdapter.java
+++ b/src/com/android/customization/picker/BasePreviewAdapter.java
@@ -17,6 +17,7 @@
import static androidx.core.view.ViewCompat.LAYOUT_DIRECTION_RTL;
+import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
@@ -29,7 +30,8 @@
import androidx.viewpager.widget.PagerAdapter;
import com.android.customization.picker.BasePreviewAdapter.PreviewPage;
-import com.android.customization.widget.PreviewPager;
+import com.android.wallpaper.util.TileSizeCalculator;
+import com.android.wallpaper.widget.PreviewPager;
import java.util.ArrayList;
import java.util.List;
@@ -103,11 +105,24 @@
protected final String title;
protected CardView card;
- protected PreviewPage(String title) {
+ private Activity mActivity;
+
+ protected PreviewPage(String title, Activity activity) {
this.title = title;
+ mActivity = activity;
}
public void setCard(CardView card) {
+ card.addOnLayoutChangeListener(
+ new View.OnLayoutChangeListener() {
+ @Override
+ public void onLayoutChange(View v, int left, int top, int right, int bottom,
+ int oldLeft, int oldTop, int oldRight, int oldBottom) {
+ card.setRadius(TileSizeCalculator.getPreviewCornerRadius(
+ mActivity, card.getMeasuredWidth()));
+ card.removeOnLayoutChangeListener(this);
+ }
+ });
this.card = card;
}
diff --git a/src/com/android/customization/picker/CustomizationPickerActivity.java b/src/com/android/customization/picker/CustomizationPickerActivity.java
index 80cd7d9..ac456be 100644
--- a/src/com/android/customization/picker/CustomizationPickerActivity.java
+++ b/src/com/android/customization/picker/CustomizationPickerActivity.java
@@ -25,10 +25,12 @@
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
+import android.view.View;
import androidx.annotation.IdRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import androidx.annotation.VisibleForTesting;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
@@ -64,7 +66,7 @@
import com.android.wallpaper.module.Injector;
import com.android.wallpaper.module.InjectorProvider;
import com.android.wallpaper.module.UserEventLogger;
-import com.android.wallpaper.module.WallpaperSetter;
+import com.android.wallpaper.picker.BottomActionBarFragment;
import com.android.wallpaper.picker.CategoryFragment;
import com.android.wallpaper.picker.CategoryFragment.CategoryFragmentHost;
import com.android.wallpaper.picker.MyPhotosStarter;
@@ -72,6 +74,8 @@
import com.android.wallpaper.picker.TopLevelPickerActivity;
import com.android.wallpaper.picker.WallpaperPickerDelegate;
import com.android.wallpaper.picker.WallpapersUiContainer;
+import com.android.wallpaper.widget.BottomActionBar;
+import com.android.wallpaper.widget.BottomActionBar.BottomActionBarHost;
import com.google.android.material.bottomnavigation.BottomNavigationView;
@@ -83,12 +87,14 @@
* Fragments providing customization options.
*/
public class CustomizationPickerActivity extends FragmentActivity implements WallpapersUiContainer,
- CategoryFragmentHost, ThemeFragmentHost, GridFragmentHost, ClockFragmentHost {
+ CategoryFragmentHost, ThemeFragmentHost, GridFragmentHost, ClockFragmentHost,
+ BottomActionBarHost {
private static final String TAG = "CustomizationPickerActivity";
- private static final String WALLPAPER_FLAVOR_EXTRA = "com.android.launcher3.WALLPAPER_FLAVOR";
- private static final String WALLPAPER_FOCUS = "focus_wallpaper";
- private static final String WALLPAPER_ONLY = "wallpaper_only";
+ @VisibleForTesting static final String WALLPAPER_FLAVOR_EXTRA =
+ "com.android.launcher3.WALLPAPER_FLAVOR";
+ @VisibleForTesting static final String WALLPAPER_FOCUS = "focus_wallpaper";
+ @VisibleForTesting static final String WALLPAPER_ONLY = "wallpaper_only";
private WallpaperPickerDelegate mDelegate;
private UserEventLogger mUserEventLogger;
@@ -96,7 +102,7 @@
private static final Map<Integer, CustomizationSection> mSections = new HashMap<>();
private CategoryFragment mWallpaperCategoryFragment;
- private WallpaperSetter mWallpaperSetter;
+ private BottomActionBar mBottomActionBar;
private boolean mWallpaperCategoryInitialized;
@@ -114,26 +120,35 @@
if (!supportsCustomization()) {
Log.w(TAG, "Themes not supported, reverting to Wallpaper Picker");
skipToWallpaperPicker();
- } else {
- setContentView(R.layout.activity_customization_picker_main);
- setUpBottomNavView();
-
- FragmentManager fm = getSupportFragmentManager();
- Fragment fragment = fm.findFragmentById(R.id.fragment_container);
-
- if (fragment == null) {
- // App launch specific logic: log the "app launched" event and set up daily logging.
- mUserEventLogger.logAppLaunched();
- DailyLoggingAlarmScheduler.setAlarm(getApplicationContext());
-
- // Navigate to the Wallpaper tab if we started directly from launcher, otherwise
- // start at the Styles tab
- int section = WALLPAPER_FOCUS.equals(getIntent()
- .getStringExtra(WALLPAPER_FLAVOR_EXTRA))
- ? mBottomNav.getMenu().size() - 1 : 0;
- navigateToSection(mBottomNav.getMenu().getItem(section).getItemId());
- }
+ return;
}
+
+ setContentView(R.layout.activity_customization_picker_main);
+ setUpBottomNavView();
+
+ FragmentManager fm = getSupportFragmentManager();
+ Fragment fragment = fm.findFragmentById(R.id.fragment_container);
+
+ if (fragment == null) {
+ // App launch specific logic: log the "app launched" event and set up daily logging.
+ mUserEventLogger.logAppLaunched();
+ DailyLoggingAlarmScheduler.setAlarm(getApplicationContext());
+
+ // Navigate to the Wallpaper tab if we started directly from launcher, otherwise
+ // start at the Styles tab
+ navigateToSection(
+ WALLPAPER_FOCUS.equals(getIntent().getStringExtra(WALLPAPER_FLAVOR_EXTRA))
+ ? R.id.nav_wallpaper : R.id.nav_theme);
+ }
+
+ mBottomActionBar = findViewById(R.id.bottom_actionbar);
+ mBottomActionBar.getViewTreeObserver().addOnGlobalLayoutListener(() -> {
+ // Only update the visibility of mBottomNav when mBottomActionBar visibility changes.
+ // Since the listener will be triggered by mBottomActionBar and its child views.
+ if (mBottomActionBar.getVisibility() == mBottomNav.getVisibility()) {
+ mBottomNav.setVisibility(mBottomActionBar.isVisible() ? View.GONE : View.VISIBLE);
+ }
+ });
}
@Override
@@ -193,14 +208,11 @@
}
//Theme
CustomizationInjector injector = (CustomizationInjector) InjectorProvider.getInjector();
- mWallpaperSetter = new WallpaperSetter(injector.getWallpaperPersister(this),
- injector.getPreferences(this), mUserEventLogger, false);
ThemesUserEventLogger eventLogger = (ThemesUserEventLogger) injector.getUserEventLogger(
this);
ThemeManager themeManager = injector.getThemeManager(
new DefaultThemeProvider(this, injector.getCustomizationPreferences(this)),
- this,
- mWallpaperSetter, new OverlayManagerCompat(this), eventLogger);
+ this, new OverlayManagerCompat(this), eventLogger);
if (themeManager.isAvailable()) {
mSections.put(R.id.nav_theme, new ThemeSection(R.id.nav_theme, themeManager));
} else {
@@ -291,6 +303,17 @@
@Override
public void onBackPressed() {
+ Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragment_container);
+ if (fragment instanceof BottomActionBarFragment
+ && ((BottomActionBarFragment) fragment).onBackPressed()) {
+ return;
+ }
+
+ // For wallpaper tab, since it had child fragment.
+ if (mWallpaperCategoryFragment != null && mWallpaperCategoryFragment.popChildFragment()) {
+ return;
+ }
+
if (getSupportFragmentManager().popBackStackImmediate()) {
return;
}
@@ -301,6 +324,11 @@
}
private void navigateToSection(@IdRes int id) {
+ // Navigate to the first section if the targeted section doesn't exist.
+ if (!mSections.containsKey(id)) {
+ id = mBottomNav.getMenu().getItem(0).getItemId();
+ }
+
mBottomNav.setSelectedItemId(id);
}
@@ -330,14 +358,6 @@
mDelegate.showViewOnlyPreview(wallpaperInfo);
}
- /**
- * Shows the picker activity for the given category.
- */
- @Override
- public void show(String collectionId) {
- mDelegate.show(collectionId);
- }
-
@Override
public void onWallpapersReady() {
@@ -390,14 +410,6 @@
}
@Override
- protected void onDestroy() {
- super.onDestroy();
- if (mWallpaperSetter != null) {
- mWallpaperSetter.cleanUp();
- }
- }
-
- @Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (mDelegate.handleActivityResult(requestCode, resultCode, data)) {
@@ -411,6 +423,11 @@
finish();
}
+ @Override
+ public BottomActionBar getBottomActionBar() {
+ return mBottomActionBar;
+ }
+
/**
* Represents a section of the Picker (eg "ThemeBundle", "Clock", etc).
* There should be a concrete subclass per available section, providing the corresponding
diff --git a/src/com/android/customization/picker/clock/ClockFragment.java b/src/com/android/customization/picker/clock/ClockFragment.java
index 14dbc16..bc02ae3 100644
--- a/src/com/android/customization/picker/clock/ClockFragment.java
+++ b/src/com/android/customization/picker/clock/ClockFragment.java
@@ -15,6 +15,7 @@
*/
package com.android.customization.picker.clock;
+import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.os.Bundle;
@@ -38,18 +39,18 @@
import com.android.customization.picker.BasePreviewAdapter;
import com.android.customization.picker.BasePreviewAdapter.PreviewPage;
import com.android.customization.widget.OptionSelectorController;
-import com.android.customization.widget.PreviewPager;
import com.android.wallpaper.R;
import com.android.wallpaper.asset.Asset;
import com.android.wallpaper.module.InjectorProvider;
-import com.android.wallpaper.picker.ToolbarFragment;
+import com.android.wallpaper.picker.AppbarFragment;
+import com.android.wallpaper.widget.PreviewPager;
import java.util.List;
/**
* Fragment that contains the main UI for selecting and applying a Clockface.
*/
-public class ClockFragment extends ToolbarFragment {
+public class ClockFragment extends AppbarFragment {
private static final String TAG = "ClockFragment";
@@ -62,7 +63,7 @@
public static ClockFragment newInstance(CharSequence title) {
ClockFragment fragment = new ClockFragment();
- fragment.setArguments(ToolbarFragment.createArguments(title));
+ fragment.setArguments(AppbarFragment.createArguments(title));
return fragment;
}
@@ -120,7 +121,7 @@
}
private void createAdapter() {
- mPreviewPager.setAdapter(new ClockPreviewAdapter(getContext(), mSelectedOption));
+ mPreviewPager.setAdapter(new ClockPreviewAdapter(getActivity(), mSelectedOption));
}
private void setUpOptions() {
@@ -174,8 +175,8 @@
private final Asset mPreviewAsset;
- public ClockfacePreviewPage(String title, Asset previewAsset) {
- super(title);
+ public ClockfacePreviewPage(String title, Activity activity, Asset previewAsset) {
+ super(title, activity);
mPreviewAsset = previewAsset;
}
@@ -199,9 +200,10 @@
* we don't want to just scroll)
*/
private static class ClockPreviewAdapter extends BasePreviewAdapter<ClockfacePreviewPage> {
- ClockPreviewAdapter(Context context, Clockface clockface) {
- super(context, R.layout.clock_preview_card);
- addPage(new ClockfacePreviewPage(clockface.getTitle(), clockface.getPreviewAsset()));
+ ClockPreviewAdapter(Activity activity, Clockface clockface) {
+ super(activity, R.layout.clock_preview_card);
+ addPage(new ClockfacePreviewPage(
+ clockface.getTitle(), activity , clockface.getPreviewAsset()));
}
}
}
diff --git a/src/com/android/customization/picker/grid/GridFragment.java b/src/com/android/customization/picker/grid/GridFragment.java
index 3c395a1..4bf29f8 100644
--- a/src/com/android/customization/picker/grid/GridFragment.java
+++ b/src/com/android/customization/picker/grid/GridFragment.java
@@ -15,19 +15,27 @@
*/
package com.android.customization.picker.grid;
+import static com.android.wallpaper.widget.BottomActionBar.BottomAction.APPLY;
+
import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.BitmapDrawable;
import android.net.Uri;
import android.os.Bundle;
+import android.os.Message;
+import android.os.RemoteException;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.LayoutInflater;
+import android.view.Surface;
+import android.view.SurfaceHolder;
+import android.view.SurfaceView;
import android.view.View;
import android.view.View.OnLayoutChangeListener;
import android.view.ViewGroup;
import android.widget.ImageView;
+import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -43,15 +51,18 @@
import com.android.customization.picker.BasePreviewAdapter;
import com.android.customization.picker.BasePreviewAdapter.PreviewPage;
import com.android.customization.widget.OptionSelectorController;
-import com.android.customization.widget.PreviewPager;
import com.android.wallpaper.R;
import com.android.wallpaper.asset.Asset;
import com.android.wallpaper.asset.ContentUriAsset;
import com.android.wallpaper.model.WallpaperInfo;
import com.android.wallpaper.module.CurrentWallpaperInfoFactory;
import com.android.wallpaper.module.InjectorProvider;
-import com.android.wallpaper.picker.ToolbarFragment;
+import com.android.wallpaper.picker.AppbarFragment;
+import com.android.wallpaper.util.SurfaceViewUtils;
+import com.android.wallpaper.widget.BottomActionBar;
+import com.android.wallpaper.widget.PreviewPager;
+import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import java.util.List;
@@ -59,7 +70,7 @@
/**
* Fragment that contains the UI for selecting and applying a GridOption.
*/
-public class GridFragment extends ToolbarFragment {
+public class GridFragment extends AppbarFragment {
private static final int PREVIEW_FADE_DURATION_MS = 100;
@@ -74,7 +85,7 @@
public static GridFragment newInstance(CharSequence title) {
GridFragment fragment = new GridFragment();
- fragment.setArguments(ToolbarFragment.createArguments(title));
+ fragment.setArguments(AppbarFragment.createArguments(title));
return fragment;
}
@@ -92,7 +103,43 @@
private ContentLoadingProgressBar mLoading;
private View mContent;
private View mError;
+ private BottomActionBar mBottomActionBar;
private ThemesUserEventLogger mEventLogger;
+ private boolean mReloadOptionsAfterApplying;
+
+ private final Callback mApplyGridCallback = new Callback() {
+ @Override
+ public void onSuccess() {
+ mGridManager.fetchOptions(new OptionsFetchedListener<GridOption>() {
+ @Override
+ public void onOptionsLoaded(List<GridOption> options) {
+ mOptionsController.resetOptions(options);
+ mSelectedOption = getSelectedOption(options);
+ mReloadOptionsAfterApplying = true;
+ // It will trigger OptionSelectedListener#onOptionSelected.
+ mOptionsController.setSelectedOption(mSelectedOption);
+ Toast.makeText(getContext(), R.string.applied_grid_msg, Toast.LENGTH_SHORT)
+ .show();
+ // Since we disabled it when clicked apply button.
+ mBottomActionBar.enableActions();
+ mBottomActionBar.hide();
+ }
+
+ @Override
+ public void onError(@Nullable Throwable throwable) {
+ if (throwable != null) {
+ Log.e(TAG, "Error loading grid options", throwable);
+ }
+ showError();
+ }
+ }, true);
+ }
+
+ @Override
+ public void onError(@Nullable Throwable throwable) {
+ //TODO(chihhangchuang): handle
+ }
+ };
@Override
public void onAttach(Context context) {
@@ -117,21 +164,11 @@
final Resources res = getResources();
DisplayMetrics dm = res.getDisplayMetrics();
mScreenAspectRatio = (float) dm.heightPixels / dm.widthPixels;
+
+ // Clear memory cache whenever grid fragment view is being loaded.
+ Glide.get(getContext()).clearMemory();
setUpOptions();
- view.findViewById(R.id.apply_button).setOnClickListener(v -> {
- mGridManager.apply(mSelectedOption, new Callback() {
- @Override
- public void onSuccess() {
- getActivity().finish();
- }
- @Override
- public void onError(@Nullable Throwable throwable) {
- //TODO(santie): handle
- }
- });
-
- });
CurrentWallpaperInfoFactory factory = InjectorProvider.getInjector()
.getCurrentWallpaperFactory(getContext().getApplicationContext());
@@ -154,6 +191,16 @@
return view;
}
+ @Override
+ protected void onBottomActionBarReady(BottomActionBar bottomActionBar) {
+ mBottomActionBar = bottomActionBar;
+ mBottomActionBar.showActionsOnly(APPLY);
+ mBottomActionBar.setActionClickListener(APPLY, unused -> {
+ mBottomActionBar.disableActions();
+ mGridManager.apply(mSelectedOption, mApplyGridCallback);
+ });
+ }
+
private void loadWallpaperBackground() {
if (mHomeWallpaper != null && mCardHeight > 0 && mCardWidth > 0) {
mHomeWallpaper.getThumbAsset(getContext()).decodeBitmap(mCardWidth,
@@ -184,19 +231,16 @@
mOptionsController.addListener(selected -> {
mSelectedOption = (GridOption) selected;
+ if (mReloadOptionsAfterApplying) {
+ mReloadOptionsAfterApplying = false;
+ return;
+ }
+ mBottomActionBar.show();
mEventLogger.logGridSelected(mSelectedOption);
createAdapter();
});
mOptionsController.initOptions(mGridManager);
- for (GridOption option : options) {
- if (option.isActive(mGridManager)) {
- mSelectedOption = option;
- }
- }
- // For development only, as there should always be a grid set.
- if (mSelectedOption == null) {
- mSelectedOption = options.get(0);
- }
+ mSelectedOption = getSelectedOption(options);
createAdapter();
}
@@ -210,6 +254,14 @@
}, false);
}
+ private GridOption getSelectedOption(List<GridOption> options) {
+ return options.stream()
+ .filter(option -> option.isActive(mGridManager))
+ .findAny()
+ // For development only, as there should always be a grid set.
+ .orElse(options.get(0));
+ }
+
private void hideError() {
mContent.setVisibility(View.VISIBLE);
mError.setVisibility(View.GONE);
@@ -228,13 +280,55 @@
private final int mRows;
private final Activity mActivity;
- private ImageView mPreview;
+ private final String mName;
- private GridPreviewPage(Activity activity, int id, Uri previewUri, int rows, int cols) {
- super(null);
+ private ImageView mPreview;
+ private SurfaceView mPreviewSurface;
+
+ private final SurfaceHolder.Callback mSurfaceCallback = new SurfaceHolder.Callback() {
+
+ private Surface mLastSurface;
+ private Message mCallback;
+
+ @Override
+ public void surfaceCreated(SurfaceHolder holder) {
+ if (mLastSurface != holder.getSurface()) {
+ mLastSurface = holder.getSurface();
+ Bundle result = mGridManager.renderPreview(
+ SurfaceViewUtils.createSurfaceViewRequest(mPreviewSurface), mName);
+ if (result != null) {
+ mPreviewSurface.setChildSurfacePackage(
+ SurfaceViewUtils.getSurfacePackage(result));
+ mCallback = SurfaceViewUtils.getCallback(result);
+ }
+ }
+ }
+
+ @Override
+ public void surfaceChanged(SurfaceHolder holder, int format, int width,
+ int height) {}
+
+ @Override
+ public void surfaceDestroyed(SurfaceHolder holder) {
+ if (mCallback != null) {
+ try {
+ mCallback.replyTo.send(mCallback);
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ } finally {
+ mCallback = null;
+ }
+ }
+ }
+ };
+
+ private GridPreviewPage(Activity activity, int id, Uri previewUri, String name, int rows,
+ int cols) {
+ super(null, activity);
mPageId = id;
mPreviewAsset = new ContentUriAsset(activity, previewUri,
RequestOptions.fitCenterTransform());
+ mName = name;
mRows = rows;
mCols = cols;
mActivity = activity;
@@ -242,23 +336,34 @@
@Override
public void setCard(CardView card) {
- super.setCard(card);
- mPreview = card.findViewById(R.id.grid_preview_image);
+ super.setCard(card);
+ mPreview = card.findViewById(R.id.grid_preview_image);
+ mPreviewSurface = card.findViewById(R.id.grid_preview_surface);
}
public void bindPreviewContent() {
Resources resources = card.getResources();
bindWallpaperIfAvailable();
- mPreviewAsset.loadDrawableWithTransition(mActivity,
- mPreview /* imageView */,
- PREVIEW_FADE_DURATION_MS /* duration */,
- null /* drawableLoadedListener */,
- resources.getColor(android.R.color.transparent, null) /* placeHolderColorJ */);
+ final boolean usesSurfaceViewForPreview = mGridManager.usesSurfaceView();
+ mPreview.setVisibility(usesSurfaceViewForPreview ? View.GONE : View.VISIBLE);
+ mPreviewSurface.setVisibility(usesSurfaceViewForPreview ? View.VISIBLE : View.GONE);
+ if (usesSurfaceViewForPreview) {
+ mPreviewSurface.setZOrderOnTop(true);
+ mPreviewSurface.getHolder().addCallback(mSurfaceCallback);
+ } else {
+ mPreviewAsset.loadDrawableWithTransition(mActivity,
+ mPreview /* imageView */,
+ PREVIEW_FADE_DURATION_MS /* duration */,
+ null /* drawableLoadedListener */,
+ resources.getColor(android.R.color.transparent,
+ null) /* placeHolderColorJ */);
+ }
}
void bindWallpaperIfAvailable() {
if (card != null && mCardBackground != null) {
mPreview.setBackground(mCardBackground);
+ mPreviewSurface.setBackground(mCardBackground);
}
}
}
@@ -274,7 +379,7 @@
for (int i = 0; i < gridOption.previewPagesCount; i++) {
addPage(new GridPreviewPage(getActivity(), i,
gridOption.previewImageUri.buildUpon().appendPath("" + i).build(),
- gridOption.rows, gridOption.cols));
+ gridOption.name, gridOption.rows, gridOption.cols));
}
}
diff --git a/src/com/android/customization/picker/theme/CustomThemeActivity.java b/src/com/android/customization/picker/theme/CustomThemeActivity.java
index fe537ba..6173b3d 100644
--- a/src/com/android/customization/picker/theme/CustomThemeActivity.java
+++ b/src/com/android/customization/picker/theme/CustomThemeActivity.java
@@ -53,7 +53,6 @@
import com.android.customization.picker.theme.CustomThemeStepFragment.CustomThemeComponentStepHost;
import com.android.wallpaper.R;
import com.android.wallpaper.module.InjectorProvider;
-import com.android.wallpaper.module.WallpaperSetter;
import org.json.JSONException;
@@ -106,8 +105,6 @@
mThemeManager = injector.getThemeManager(
new DefaultThemeProvider(this, injector.getCustomizationPreferences(this)),
this,
- new WallpaperSetter(injector.getWallpaperPersister(this),
- injector.getPreferences(this), mUserEventLogger, false),
new OverlayManagerCompat(this),
mUserEventLogger);
mThemeManager.fetchOptions(null, false);
diff --git a/src/com/android/customization/picker/theme/CustomThemeComponentFragment.java b/src/com/android/customization/picker/theme/CustomThemeComponentFragment.java
index f6471f0..b2217aa 100644
--- a/src/com/android/customization/picker/theme/CustomThemeComponentFragment.java
+++ b/src/com/android/customization/picker/theme/CustomThemeComponentFragment.java
@@ -15,27 +15,20 @@
*/
package com.android.customization.picker.theme;
-import android.app.AlertDialog;
-import android.content.Context;
-import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.LayoutInflater;
-import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-import androidx.annotation.StringRes;
import androidx.recyclerview.widget.RecyclerView;
-import com.android.customization.model.theme.custom.CustomThemeManager;
import com.android.customization.model.theme.custom.ThemeComponentOption;
import com.android.customization.model.theme.custom.ThemeComponentOptionProvider;
import com.android.customization.widget.OptionSelectorController;
import com.android.wallpaper.R;
-import com.android.wallpaper.picker.ToolbarFragment;
+import com.android.wallpaper.picker.AppbarFragment;
public class CustomThemeComponentFragment extends CustomThemeStepFragment {
private static final String ARG_USE_GRID_LAYOUT = "CustomThemeComponentFragment.use_grid";;
@@ -48,7 +41,7 @@
public static CustomThemeComponentFragment newInstance(CharSequence toolbarTitle, int position,
int titleResId, boolean allowGridLayout) {
CustomThemeComponentFragment fragment = new CustomThemeComponentFragment();
- Bundle arguments = ToolbarFragment.createArguments(toolbarTitle);
+ Bundle arguments = AppbarFragment.createArguments(toolbarTitle);
arguments.putInt(ARG_KEY_POSITION, position);
arguments.putInt(ARG_KEY_TITLE_RES_ID, titleResId);
arguments.putBoolean(ARG_USE_GRID_LAYOUT, allowGridLayout);
diff --git a/src/com/android/customization/picker/theme/CustomThemeNameFragment.java b/src/com/android/customization/picker/theme/CustomThemeNameFragment.java
index e21fc80..45e4324 100644
--- a/src/com/android/customization/picker/theme/CustomThemeNameFragment.java
+++ b/src/com/android/customization/picker/theme/CustomThemeNameFragment.java
@@ -42,14 +42,14 @@
import com.android.wallpaper.asset.BitmapCachingAsset;
import com.android.wallpaper.module.CurrentWallpaperInfoFactory;
import com.android.wallpaper.module.InjectorProvider;
-import com.android.wallpaper.picker.ToolbarFragment;
+import com.android.wallpaper.picker.AppbarFragment;
public class CustomThemeNameFragment extends CustomThemeStepFragment {
public static CustomThemeNameFragment newInstance(CharSequence toolbarTitle, int position,
int titleResId) {
CustomThemeNameFragment fragment = new CustomThemeNameFragment();
- Bundle arguments = ToolbarFragment.createArguments(toolbarTitle);
+ Bundle arguments = AppbarFragment.createArguments(toolbarTitle);
arguments.putInt(ARG_KEY_POSITION, position);
arguments.putInt(ARG_KEY_TITLE_RES_ID, titleResId);
fragment.setArguments(arguments);
@@ -104,7 +104,6 @@
mNameEditor = view.findViewById(R.id.custom_theme_name);
mNameEditor.setText(mCustomThemeManager.getOriginalTheme().getTitle());
bindCover(view.findViewById(R.id.component_preview_content));
-
return view;
}
@@ -132,7 +131,7 @@
private void bindCover(CardView card) {
Context context = getContext();
PreviewInfo previewInfo = mCustomThemeManager.buildCustomThemePreviewInfo(context);
- mCoverPage = new ThemeCoverPage(context, getThemeName(),
+ mCoverPage = new ThemeCoverPage(getActivity(), getThemeName(),
previewInfo.resolveAccentColor(getResources()), previewInfo.icons,
previewInfo.headlineFontFamily, previewInfo.bottomSheeetCornerRadius,
previewInfo.shapeDrawable, previewInfo.shapeAppIcons, null,
diff --git a/src/com/android/customization/picker/theme/CustomThemeStepFragment.java b/src/com/android/customization/picker/theme/CustomThemeStepFragment.java
index ebf55e3..b05ebc4 100644
--- a/src/com/android/customization/picker/theme/CustomThemeStepFragment.java
+++ b/src/com/android/customization/picker/theme/CustomThemeStepFragment.java
@@ -18,9 +18,9 @@
import com.android.customization.model.theme.custom.ThemeComponentOption;
import com.android.customization.model.theme.custom.ThemeComponentOptionProvider;
import com.android.wallpaper.R;
-import com.android.wallpaper.picker.ToolbarFragment;
+import com.android.wallpaper.picker.AppbarFragment;
-abstract class CustomThemeStepFragment extends ToolbarFragment {
+abstract class CustomThemeStepFragment extends AppbarFragment {
protected static final String ARG_KEY_POSITION = "CustomThemeStepFragment.position";
protected static final String ARG_KEY_TITLE_RES_ID = "CustomThemeStepFragment.title_res";
protected CustomThemeComponentStepHost mHost;
diff --git a/src/com/android/customization/picker/theme/ThemeFragment.java b/src/com/android/customization/picker/theme/ThemeFragment.java
index 641d3e1..e04d8d2 100644
--- a/src/com/android/customization/picker/theme/ThemeFragment.java
+++ b/src/com/android/customization/picker/theme/ThemeFragment.java
@@ -33,7 +33,6 @@
import android.view.View.OnClickListener;
import android.view.View.OnLayoutChangeListener;
import android.view.ViewGroup;
-import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.SeekBar;
@@ -58,21 +57,22 @@
import com.android.customization.picker.theme.ThemePreviewPage.ThemeCoverPage;
import com.android.customization.picker.theme.ThemePreviewPage.TimeContainer;
import com.android.customization.widget.OptionSelectorController;
-import com.android.customization.widget.PreviewPager;
import com.android.wallpaper.R;
import com.android.wallpaper.asset.Asset;
import com.android.wallpaper.asset.Asset.CenterCropBitmapTask;
+import com.android.wallpaper.asset.BitmapCachingAsset;
import com.android.wallpaper.model.WallpaperInfo;
import com.android.wallpaper.module.CurrentWallpaperInfoFactory;
import com.android.wallpaper.module.InjectorProvider;
-import com.android.wallpaper.picker.ToolbarFragment;
+import com.android.wallpaper.picker.AppbarFragment;
+import com.android.wallpaper.widget.PreviewPager;
import java.util.List;
/**
* Fragment that contains the main UI for selecting and applying a ThemeBundle.
*/
-public class ThemeFragment extends ToolbarFragment {
+public class ThemeFragment extends AppbarFragment {
private static final String TAG = "ThemeFragment";
private static final String KEY_SELECTED_THEME = "ThemeFragment.SelectedThemeBundle";
@@ -85,12 +85,11 @@
}
public static ThemeFragment newInstance(CharSequence title) {
ThemeFragment fragment = new ThemeFragment();
- fragment.setArguments(ToolbarFragment.createArguments(title));
+ fragment.setArguments(AppbarFragment.createArguments(title));
return fragment;
}
private RecyclerView mOptionsContainer;
- private CheckBox mUseMyWallpaperButton;
private OptionSelectorController<ThemeBundle> mOptionsController;
private ThemeManager mThemeManager;
private ThemesUserEventLogger mEventLogger;
@@ -100,8 +99,9 @@
private ContentLoadingProgressBar mLoading;
private View mContent;
private View mError;
- private boolean mUseMyWallpaper;
+ private boolean mUseMyWallpaper = true;
private WallpaperInfo mCurrentHomeWallpaper;
+ private Asset mCurrentWallpaperThumbAsset;
private CurrentWallpaperInfoFactory mCurrentWallpaperFactory;
private TimeTicker mTicker;
@@ -131,8 +131,6 @@
view.findViewById(R.id.apply_button).setOnClickListener(v -> {
applyTheme();
});
- mUseMyWallpaperButton = view.findViewById(R.id.use_my_wallpaper);
- mUseMyWallpaperButton.setOnCheckedChangeListener(this::onUseMyWallpaperCheckChanged);
setUpOptions(savedInstanceState);
return view;
@@ -206,32 +204,23 @@
super.onActivityResult(requestCode, resultCode, data);
}
- private void onUseMyWallpaperCheckChanged(CompoundButton checkbox, boolean checked) {
- mUseMyWallpaper = checked;
- reloadWallpaper();
- }
-
private void reloadWallpaper() {
mCurrentWallpaperFactory.createCurrentWallpaperInfos(
(homeWallpaper, lockWallpaper, presentationMode) -> {
mCurrentHomeWallpaper = homeWallpaper;
- if (mSelectedTheme != null) {
- if (mUseMyWallpaper || (mSelectedTheme instanceof CustomTheme)) {
- mSelectedTheme.setOverrideThemeWallpaper(homeWallpaper);
- } else {
- mSelectedTheme.setOverrideThemeWallpaper(null);
- }
- if (mAdapter != null) {
- mAdapter.rebindWallpaperIfAvailable();
- }
+ mCurrentWallpaperThumbAsset = new BitmapCachingAsset(getContext(),
+ mCurrentHomeWallpaper.getThumbAsset(getContext()));
+ if (mSelectedTheme != null && mAdapter != null) {
+ mAdapter.setWallpaperAsset(mCurrentWallpaperThumbAsset);
+ mAdapter.rebindWallpaperIfAvailable();
}
}, false);
}
private void createAdapter(List<ThemeBundle> options) {
mAdapter = new ThemePreviewAdapter(getActivity(), mSelectedTheme,
- mSelectedTheme instanceof CustomTheme ? this::onEditClicked : null,
- new PreloadWallpapersLayoutListener(options));
+ mCurrentWallpaperThumbAsset,
+ mSelectedTheme instanceof CustomTheme ? this::onEditClicked : null);
mPreviewPager.setAdapter(mAdapter);
}
@@ -241,11 +230,6 @@
}
}
- private void updateButtonsVisibility() {
- mUseMyWallpaperButton.setVisibility(mSelectedTheme instanceof CustomTheme
- ? View.INVISIBLE : View.VISIBLE);
- }
-
private void hideError() {
mContent.setVisibility(View.VISIBLE);
mError.setVisibility(View.GONE);
@@ -278,7 +262,6 @@
mEventLogger.logThemeSelected(mSelectedTheme,
selected instanceof CustomTheme);
createAdapter(options);
- updateButtonsVisibility();
}
});
mOptionsController.initOptions(mThemeManager);
@@ -370,11 +353,12 @@
R.id.shape_preview_icon_0, R.id.shape_preview_icon_1, R.id.shape_preview_icon_2,
R.id.shape_preview_icon_3, R.id.shape_preview_icon_4, R.id.shape_preview_icon_5
};
+ private Asset mWallpaperAsset;
- ThemePreviewAdapter(Activity activity, ThemeBundle theme,
- @Nullable OnClickListener editClickListener,
- @Nullable OnLayoutChangeListener coverCardLayoutListener) {
+ ThemePreviewAdapter(Activity activity, ThemeBundle theme, @Nullable Asset wallpaperAsset,
+ @Nullable OnClickListener editClickListener) {
super(activity, R.layout.theme_preview_card);
+ mWallpaperAsset = wallpaperAsset;
final Resources res = activity.getResources();
final PreviewInfo previewInfo = theme.getPreviewInfo();
@@ -383,14 +367,14 @@
: null;
WallpaperPreviewLayoutListener wallpaperListener = new WallpaperPreviewLayoutListener(
- theme, previewInfo, coverScrim, true);
+ () -> mWallpaperAsset, previewInfo, coverScrim, true);
addPage(new ThemeCoverPage(activity, theme.getTitle(),
previewInfo.resolveAccentColor(res), previewInfo.icons,
previewInfo.headlineFontFamily, previewInfo.bottomSheeetCornerRadius,
previewInfo.shapeDrawable, previewInfo.shapeAppIcons, editClickListener,
mColorButtonIds, mColorTileIds, mColorTileIconIds, mShapeIconIds,
- wallpaperListener, coverCardLayoutListener));
+ wallpaperListener));
addPage(new ThemePreviewPage(activity, R.string.preview_name_font, R.drawable.ic_font,
R.layout.preview_card_font_content,
previewInfo.resolveAccentColor(res)) {
@@ -487,31 +471,6 @@
}
});
}
- if (previewInfo.wallpaperAsset != null) {
- addPage(new ThemePreviewPage(activity, R.string.preview_name_wallpaper,
- R.drawable.ic_nav_wallpaper, R.layout.preview_card_wallpaper_content,
- previewInfo.resolveAccentColor(res)) {
-
- private final WallpaperPreviewLayoutListener mListener =
- new WallpaperPreviewLayoutListener(theme, previewInfo, null, false);
-
- @Override
- protected boolean containsWallpaper() {
- return true;
- }
-
- @Override
- protected void bindBody(boolean forceRebind) {
- if (card == null) {
- return;
- }
- card.addOnLayoutChangeListener(mListener);
- if (forceRebind) {
- card.requestLayout();
- }
- }
- });
- }
}
public void rebindWallpaperIfAvailable() {
@@ -530,15 +489,23 @@
}
}
+ public void setWallpaperAsset(Asset wallpaperAsset) {
+ mWallpaperAsset = wallpaperAsset;
+ }
+
private static class WallpaperPreviewLayoutListener implements OnLayoutChangeListener {
- private final ThemeBundle mTheme;
+ interface WallpaperPreviewAssetProvider {
+ Asset getAsset();
+ }
+ private final WallpaperPreviewAssetProvider mWallpaperPreviewAssetProvider;
private final PreviewInfo mPreviewInfo;
private final Drawable mScrim;
private final boolean mIsTranslucent;
- public WallpaperPreviewLayoutListener(ThemeBundle theme, PreviewInfo previewInfo,
- Drawable scrim, boolean translucent) {
- mTheme = theme;
+ WallpaperPreviewLayoutListener(
+ WallpaperPreviewAssetProvider wallpaperPreviewAssetProvider,
+ PreviewInfo previewInfo, Drawable scrim, boolean translucent) {
+ mWallpaperPreviewAssetProvider = wallpaperPreviewAssetProvider;
mPreviewInfo = previewInfo;
mScrim = scrim;
mIsTranslucent = translucent;
@@ -550,8 +517,7 @@
int targetWidth = right - left;
int targetHeight = bottom - top;
if (targetWidth > 0 && targetHeight > 0) {
- Asset wallpaperPreviewAsset = mTheme.getWallpaperPreviewAsset(
- view.getContext());
+ Asset wallpaperPreviewAsset = mWallpaperPreviewAssetProvider.getAsset();
if (wallpaperPreviewAsset != null) {
wallpaperPreviewAsset.decodeBitmap(
targetWidth, targetHeight,
@@ -597,41 +563,4 @@
}
}
}
-
- /**
- * Runs only once after the card size is known, and requests decoding wallpaper bitmaps
- * for all the options, to warm-up the bitmap cache.
- */
- private static class PreloadWallpapersLayoutListener implements OnLayoutChangeListener {
- private static boolean alreadyRunOnce;
- private final List<ThemeBundle> mOptions;
-
- public PreloadWallpapersLayoutListener(List<ThemeBundle> options) {
- mOptions = options;
- }
-
- @Override
- public void onLayoutChange(View view, int left, int top, int right,
- int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
- if (alreadyRunOnce) {
- view.removeOnLayoutChangeListener(this);
- return;
- }
- int targetWidth = right - left;
- int targetHeight = bottom - top;
- if (targetWidth > 0 && targetHeight > 0) {
- for (ThemeBundle theme : mOptions) {
- if (theme instanceof CustomTheme && !((CustomTheme) theme).isDefined()) {
- continue;
- }
- Asset wallpaperAsset = theme.getWallpaperPreviewAsset(view.getContext());
- if (wallpaperAsset != null) {
- wallpaperAsset.decodeBitmap(targetWidth, targetHeight, bitmap -> {});
- }
- }
- view.removeOnLayoutChangeListener(this);
- alreadyRunOnce = true;
- }
- }
- }
}
diff --git a/src/com/android/customization/picker/theme/ThemePreviewPage.java b/src/com/android/customization/picker/theme/ThemePreviewPage.java
index c3af91c..b8152d9 100644
--- a/src/com/android/customization/picker/theme/ThemePreviewPage.java
+++ b/src/com/android/customization/picker/theme/ThemePreviewPage.java
@@ -1,6 +1,6 @@
package com.android.customization.picker.theme;
-import android.content.Context;
+import android.app.Activity;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.graphics.Typeface;
@@ -45,21 +45,20 @@
final int accentColor;
protected final LayoutInflater inflater;
- public ThemePreviewPage(Context context, @StringRes int titleResId,
- @DrawableRes int iconSrc, @LayoutRes int contentLayoutRes,
- @ColorInt int accentColor) {
- super(null);
+ public ThemePreviewPage(Activity activity, @StringRes int titleResId,
+ @DrawableRes int iconSrc, @LayoutRes int contentLayoutRes, @ColorInt int accentColor) {
+ super(null, activity);
this.nameResId = titleResId;
if (iconSrc != Resources.ID_NULL) {
- this.icon = context.getResources().getDrawable(iconSrc, context.getTheme());
- int size = context.getResources().getDimensionPixelSize(R.dimen.card_header_icon_size);
+ this.icon = activity.getResources().getDrawable(iconSrc, activity.getTheme());
+ int size = activity.getResources().getDimensionPixelSize(R.dimen.card_header_icon_size);
icon.setBounds(0, 0, size, size);
} else {
this.icon = null;
}
this.contentLayoutRes = contentLayoutRes;
this.accentColor = accentColor;
- this.inflater = LayoutInflater.from(context);
+ this.inflater = LayoutInflater.from(activity);
}
@Override
@@ -106,15 +105,17 @@
private final int mCornerRadius;
private final ColorStateList mTintList;
- public ThemeCoverPage(Context context, String title, int accentColor, List<Drawable> icons,
+ public ThemeCoverPage(Activity activity, String title, int accentColor,
+ List<Drawable> icons,
Typeface headlineFont, int cornerRadius,
Drawable shapeDrawable,
List<Drawable> shapeAppIcons,
OnClickListener editClickListener,
int[] colorButtonIds, int[] colorTileIds, int[][] colorTileIconIds,
int[] shapeIconIds, OnLayoutChangeListener... wallpaperListeners) {
- super(context, 0, 0, R.layout.preview_card_cover_content, accentColor);
- mRes = context.getResources();
+ super(activity, 0, 0, R.layout.preview_card_cover_content,
+ accentColor);
+ mRes = activity.getResources();
mTitle = title;
mHeadlineFont = headlineFont;
mIcons = icons;
@@ -179,7 +180,6 @@
}
// Shape preview icons:
-
for (int i = 0; i < 3 && i < mShapeAppIcons.size(); i++) {
ImageView iconView = card.findViewById(mShapeIconIds[i]);
iconView.setBackground(mShapeAppIcons.get(i));
diff --git a/src/com/android/customization/widget/PageIndicator.java b/src/com/android/customization/widget/PageIndicator.java
deleted file mode 100644
index dd636ad..0000000
--- a/src/com/android/customization/widget/PageIndicator.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source 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.
- */
-package com.android.customization.widget;
-
-import android.content.Context;
-import android.content.res.ColorStateList;
-import android.content.res.TypedArray;
-import android.graphics.drawable.Animatable2;
-import android.graphics.drawable.AnimatedVectorDrawable;
-import android.graphics.drawable.Drawable;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ImageView;
-
-import com.android.wallpaper.R;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-
-/**
- * Page indicator widget, based on QS's page indicator:
- *
- * Based on QS PageIndicator
- * Path: frameworks/base/packages/SystemUI/src/com/android/systemui/qs/PageIndicator.java
- */
-public class PageIndicator extends ViewGroup {
-
- private static final String TAG = "PageIndicator";
- private static final boolean DEBUG = false;
-
- // The size of a single dot in relation to the whole animation.
- private static final float SINGLE_SCALE = .4f;
-
- static final float MINOR_ALPHA = .42f;
-
- private final ArrayList<Integer> mQueuedPositions = new ArrayList<>();
-
- private final int mPageIndicatorWidth;
- private final int mPageIndicatorHeight;
- private final int mPageDotWidth;
-
- private int mPosition = -1;
- private boolean mAnimating;
-
- private static Method sMethodForceAnimationOnUI = null;
- private final Animatable2.AnimationCallback mAnimationCallback =
- new Animatable2.AnimationCallback() {
-
- @Override
- public void onAnimationEnd(Drawable drawable) {
- super.onAnimationEnd(drawable);
- if (drawable instanceof AnimatedVectorDrawable) {
- ((AnimatedVectorDrawable) drawable).unregisterAnimationCallback(
- mAnimationCallback);
- }
- if (DEBUG) {
- Log.d(TAG, "onAnimationEnd - queued: " + mQueuedPositions.size());
- }
- mAnimating = false;
- if (mQueuedPositions.size() != 0) {
- setPosition(mQueuedPositions.remove(0));
- }
- }
- };
-
-
- public PageIndicator(Context context, AttributeSet attrs) {
- super(context, attrs);
- mPageIndicatorWidth =
- (int) context.getResources().getDimension(R.dimen.preview_indicator_width);
- mPageIndicatorHeight =
- (int) context.getResources().getDimension(R.dimen.preview_indicator_height);
- mPageDotWidth = (int) (mPageIndicatorWidth * SINGLE_SCALE);
- }
-
- public void setNumPages(int numPages) {
- setVisibility(numPages > 1 ? View.VISIBLE : View.INVISIBLE);
- if (mAnimating) {
- Log.w(TAG, "setNumPages during animation");
- }
- while (numPages < getChildCount()) {
- removeViewAt(getChildCount() - 1);
- }
- TypedArray array = getContext().obtainStyledAttributes(
- new int[]{android.R.attr.colorControlActivated});
- int color = array.getColor(0, 0);
- array.recycle();
- while (numPages > getChildCount()) {
- ImageView v = new ImageView(getContext());
- v.setImageResource(R.drawable.minor_a_b);
- v.setImageTintList(ColorStateList.valueOf(color));
- addView(v, new LayoutParams(mPageIndicatorWidth, mPageIndicatorHeight));
- }
- // Refresh state.
- setIndex(mPosition >> 1);
- }
-
- public void setLocation(float location) {
- int index = (int) location;
- setContentDescription(getContext().getString(R.string.accessibility_preview_pager,
- (index + 1), getChildCount()));
- int position = index << 1 | ((location != index) ? 1 : 0);
- if (DEBUG) {
- Log.d(TAG, "setLocation " + location + " " + index + " " + position);
- }
-
- int lastPosition = mPosition;
- if (mQueuedPositions.size() != 0) {
- lastPosition = mQueuedPositions.get(mQueuedPositions.size() - 1);
- }
- if (DEBUG) {
- Log.d(TAG, position + " " + lastPosition);
- }
- if (position == lastPosition) return;
- if (mAnimating) {
- if (DEBUG) {
- Log.d(TAG, "Queueing transition to " + Integer.toHexString(position));
- }
- mQueuedPositions.add(position);
- return;
- }
-
- setPosition(position);
- }
-
- private void setPosition(int position) {
- if (mPosition >= 0 && Math.abs(mPosition - position) == 1) {
- animate(mPosition, position);
- } else {
- if (DEBUG) {
- Log.d(TAG, "Skipping animation " + mPosition
- + " " + position);
- }
- setIndex(position >> 1);
- }
- mPosition = position;
- }
-
- private void setIndex(int index) {
- final int N = getChildCount();
- for (int i = 0; i < N; i++) {
- ImageView v = (ImageView) getChildAt(i);
- // Clear out any animation positioning.
- v.setTranslationX(0);
- v.setImageResource(R.drawable.major_a_b);
- v.setAlpha(getAlpha(i == index));
- }
- }
-
- private void animate(int from, int to) {
- if (DEBUG) {
- Log.d(TAG, "Animating from " + Integer.toHexString(from) + " to "
- + Integer.toHexString(to));
- }
- int fromIndex = from >> 1;
- int toIndex = to >> 1;
-
- // Set the position of everything, then we will manually control the two views involved
- // in the animation.
- setIndex(fromIndex);
-
- boolean fromTransition = (from & 1) != 0;
- boolean isAState = fromTransition ? from > to : from < to;
- int firstIndex = Math.min(fromIndex, toIndex);
- int secondIndex = Math.max(fromIndex, toIndex);
- if (secondIndex == firstIndex) {
- secondIndex++;
- }
- ImageView first = (ImageView) getChildAt(firstIndex);
- ImageView second = (ImageView) getChildAt(secondIndex);
- if (first == null || second == null) {
- // may happen during reInflation or other weird cases
- return;
- }
- // Lay the two views on top of each other.
- second.setTranslationX(first.getX() - second.getX());
-
- playAnimation(first, getTransition(fromTransition, isAState, false));
- first.setAlpha(getAlpha(false));
-
- playAnimation(second, getTransition(fromTransition, isAState, true));
- second.setAlpha(getAlpha(true));
-
- mAnimating = true;
- }
-
- private float getAlpha(boolean isMajor) {
- return isMajor ? 1 : MINOR_ALPHA;
- }
-
- private void playAnimation(ImageView imageView, int res) {
- Drawable drawable = getContext().getDrawable(res);
- if (!(drawable instanceof AnimatedVectorDrawable)) {
- return;
- }
- final AnimatedVectorDrawable avd = (AnimatedVectorDrawable) drawable;
- imageView.setImageDrawable(avd);
- try {
- forceAnimationOnUI(avd);
- } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
- Log.e(TAG, "Catch an exception in playAnimation", e);
- }
- avd.registerAnimationCallback(mAnimationCallback);
- avd.start();
- }
-
- private void forceAnimationOnUI(AnimatedVectorDrawable avd)
- throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
- if (sMethodForceAnimationOnUI == null) {
- sMethodForceAnimationOnUI = AnimatedVectorDrawable.class.getMethod(
- "forceAnimationOnUI");
- }
- if (sMethodForceAnimationOnUI != null) {
- sMethodForceAnimationOnUI.invoke(avd);
- }
- }
-
- private int getTransition(boolean fromB, boolean isMajorAState, boolean isMajor) {
- if (isMajor) {
- if (fromB) {
- if (isMajorAState) {
- return R.drawable.major_b_a_animation;
- } else {
- return R.drawable.major_b_c_animation;
- }
- } else {
- if (isMajorAState) {
- return R.drawable.major_a_b_animation;
- } else {
- return R.drawable.major_c_b_animation;
- }
- }
- } else {
- if (fromB) {
- if (isMajorAState) {
- return R.drawable.minor_b_c_animation;
- } else {
- return R.drawable.minor_b_a_animation;
- }
- } else {
- if (isMajorAState) {
- return R.drawable.minor_c_b_animation;
- } else {
- return R.drawable.minor_a_b_animation;
- }
- }
- }
- }
-
- @Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- final int N = getChildCount();
- if (N == 0) {
- super.onMeasure(widthMeasureSpec, heightMeasureSpec);
- return;
- }
- final int widthChildSpec = MeasureSpec.makeMeasureSpec(mPageIndicatorWidth,
- MeasureSpec.EXACTLY);
- final int heightChildSpec = MeasureSpec.makeMeasureSpec(mPageIndicatorHeight,
- MeasureSpec.EXACTLY);
- for (int i = 0; i < N; i++) {
- getChildAt(i).measure(widthChildSpec, heightChildSpec);
- }
- int width = (mPageIndicatorWidth - mPageDotWidth) * (N - 1) + mPageDotWidth;
- setMeasuredDimension(width, mPageIndicatorHeight);
- }
-
- @Override
- protected void onLayout(boolean changed, int l, int t, int r, int b) {
- final int N = getChildCount();
- if (N == 0) {
- return;
- }
- for (int i = 0; i < N; i++) {
- int left = (mPageIndicatorWidth - mPageDotWidth) * i;
- getChildAt(i).layout(left, 0, mPageIndicatorWidth + left, mPageIndicatorHeight);
- }
- }
-}
diff --git a/src/com/android/customization/widget/PreviewPager.java b/src/com/android/customization/widget/PreviewPager.java
deleted file mode 100644
index 73a5554..0000000
--- a/src/com/android/customization/widget/PreviewPager.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source 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.
- */
-package com.android.customization.widget;
-
-import android.content.Context;
-import android.content.res.Resources;
-import android.content.res.TypedArray;
-import android.database.DataSetObserver;
-import android.util.AttributeSet;
-import android.util.DisplayMetrics;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.LinearLayout;
-
-import androidx.annotation.Nullable;
-import androidx.core.text.TextUtilsCompat;
-import androidx.core.view.ViewCompat;
-import androidx.viewpager.widget.PagerAdapter;
-import androidx.viewpager.widget.ViewPager;
-import androidx.viewpager.widget.ViewPager.OnPageChangeListener;
-
-import com.android.wallpaper.R;
-
-import java.util.Locale;
-
-/**
- * A Widget consisting of a ViewPager linked to a PageIndicator and previous/next arrows that can be
- * used to page over that ViewPager.
- * To use it, set a {@link PagerAdapter} using {@link #setAdapter(PagerAdapter)}, and optionally use
- * a {@link #setOnPageChangeListener(OnPageChangeListener)} to listen for page changes.
- */
-public class PreviewPager extends LinearLayout {
-
- private static final int STYLE_PEEKING = 0;
- private static final int STYLE_ASPECT_RATIO = 1;
-
- private final ViewPager mViewPager;
- private final PageIndicator mPageIndicator;
- private final View mPreviousArrow;
- private final View mNextArrow;
- private final ViewPager.OnPageChangeListener mPageListener;
- private int mPageStyle;
-
- private PagerAdapter mAdapter;
- private ViewPager.OnPageChangeListener mExternalPageListener;
- private float mScreenAspectRatio;
-
- public PreviewPager(Context context) {
- this(context, null);
- }
-
- public PreviewPager(Context context, AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public PreviewPager(Context context, AttributeSet attrs, int defStyleAttr) {
- super(context, attrs, defStyleAttr);
- LayoutInflater.from(context).inflate(R.layout.preview_pager, this);
- Resources res = context.getResources();
- TypedArray a = context.obtainStyledAttributes(attrs,
- R.styleable.PreviewPager, defStyleAttr, 0);
-
- mPageStyle = a.getInteger(R.styleable.PreviewPager_card_style, STYLE_PEEKING);
-
- a.recycle();
-
- mViewPager = findViewById(R.id.preview_viewpager);
- mViewPager.setPageMargin(res.getDimensionPixelOffset(R.dimen.preview_page_gap));
- mViewPager.setClipToPadding(false);
- if (mPageStyle == STYLE_PEEKING) {
- int screenWidth = mViewPager.getResources().getDisplayMetrics().widthPixels;
- int hMargin = res.getDimensionPixelOffset(R.dimen.preview_page_horizontal_margin);
- hMargin = Math.max(hMargin, screenWidth/8);
- mViewPager.setPadding(
- hMargin,
- res.getDimensionPixelOffset(R.dimen.preview_page_top_margin),
- hMargin,
- res.getDimensionPixelOffset(R.dimen.preview_page_bottom_margin));
- } else if (mPageStyle == STYLE_ASPECT_RATIO) {
- DisplayMetrics dm = res.getDisplayMetrics();
- mScreenAspectRatio = dm.heightPixels > dm.widthPixels
- ? (float) dm.heightPixels / dm.widthPixels
- : (float) dm.widthPixels / dm.heightPixels;
- mViewPager.setPadding(
- 0,
- res.getDimensionPixelOffset(R.dimen.preview_page_top_margin),
- 0,
- res.getDimensionPixelOffset(R.dimen.preview_page_bottom_margin));
- }
- mPageIndicator = findViewById(R.id.page_indicator);
- mPreviousArrow = findViewById(R.id.arrow_previous);
- mPreviousArrow.setOnClickListener(v -> {
- final int previousPos = mViewPager.getCurrentItem() - 1;
- mViewPager.setCurrentItem(previousPos, true);
- });
- mNextArrow = findViewById(R.id.arrow_next);
- mNextArrow.setOnClickListener(v -> {
- final int NextPos = mViewPager.getCurrentItem() + 1;
- mViewPager.setCurrentItem(NextPos, true);
- });
- mPageListener = createPageListener();
- mViewPager.addOnPageChangeListener(mPageListener);
- }
-
- @Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- if (mPageStyle == STYLE_ASPECT_RATIO) {
- int availableWidth = MeasureSpec.getSize(widthMeasureSpec);
- int availableHeight = MeasureSpec.getSize(heightMeasureSpec);
- int indicatorHeight = mPageIndicator.getVisibility() == VISIBLE
- ? ((View) mPageIndicator.getParent()).getLayoutParams().height
- : 0;
- int pagerHeight = availableHeight - indicatorHeight;
- if (availableWidth > 0) {
- int absoluteCardWidth = (int) ((pagerHeight - mViewPager.getPaddingBottom()
- - mViewPager.getPaddingTop())/ mScreenAspectRatio);
- int hPadding = (availableWidth / 2) - (absoluteCardWidth / 2);
- mViewPager.setPaddingRelative(
- hPadding,
- mViewPager.getPaddingTop(),
- hPadding,
- mViewPager.getPaddingBottom());
- }
- }
- super.onMeasure(widthMeasureSpec, heightMeasureSpec);
- }
-
- public void forceCardWidth(int widthPixels) {
- mViewPager.addOnLayoutChangeListener(new OnLayoutChangeListener() {
- @Override
- public void onLayoutChange(View v, int left, int top, int right, int bottom,
- int oldLeft, int oldTop, int oldRight, int oldBottom) {
- int hPadding = (mViewPager.getWidth() - widthPixels) / 2;
- mViewPager.setPadding(hPadding, mViewPager.getPaddingTop(),
- hPadding, mViewPager.getPaddingBottom());
- mViewPager.removeOnLayoutChangeListener(this);
- }
- });
- mViewPager.invalidate();
- }
-
- /**
- * Call this method to set the {@link PagerAdapter} backing the {@link ViewPager} in this
- * widget.
- */
- public void setAdapter(PagerAdapter adapter) {
- int initialPage = 0;
- if (mViewPager.getAdapter() != null) {
- initialPage = isRtl() ? mAdapter.getCount() - 1 - mViewPager.getCurrentItem()
- : mViewPager.getCurrentItem();
- }
- mAdapter = adapter;
- mViewPager.setAdapter(adapter);
- mViewPager.setCurrentItem(isRtl() ? mAdapter.getCount() - 1 - initialPage : initialPage);
- mAdapter.registerDataSetObserver(new DataSetObserver() {
- @Override
- public void onChanged() {
- initIndicator();
- }
- });
- initIndicator();
- updateIndicator(mViewPager.getCurrentItem());
- }
-
- private boolean isRtl() {
- if (ViewCompat.isLayoutDirectionResolved(mViewPager)) {
- return ViewCompat.getLayoutDirection(mViewPager) == ViewCompat.LAYOUT_DIRECTION_RTL;
- }
- return TextUtilsCompat.getLayoutDirectionFromLocale(Locale.getDefault())
- == ViewCompat.LAYOUT_DIRECTION_RTL;
- }
-
- /**
- * Set a {@link OnPageChangeListener} to be notified when the ViewPager's page state changes
- */
- public void setOnPageChangeListener(@Nullable ViewPager.OnPageChangeListener listener) {
- mExternalPageListener = listener;
- }
-
- private void initIndicator() {
- mPageIndicator.setNumPages(mAdapter.getCount());
- mPageIndicator.setLocation(mViewPager.getCurrentItem());
- }
-
- private ViewPager.OnPageChangeListener createPageListener() {
- return new ViewPager.OnPageChangeListener() {
- @Override
- public void onPageScrolled(
- int position, float positionOffset, int positionOffsetPixels) {
- // For certain sizes, positionOffset never makes it to 1, so round it as we don't
- // need that much precision
- float location = (float) Math.round((position + positionOffset) * 100) / 100;
- mPageIndicator.setLocation(location);
- if (mExternalPageListener != null) {
- mExternalPageListener.onPageScrolled(position, positionOffset,
- positionOffsetPixels);
- }
- }
-
- @Override
- public void onPageSelected(int position) {
- int adapterCount = mAdapter.getCount();
- if (position < 0 || position >= adapterCount) {
- return;
- }
-
- updateIndicator(position);
- if (mExternalPageListener != null) {
- mExternalPageListener.onPageSelected(position);
- }
- }
-
- @Override
- public void onPageScrollStateChanged(int state) {
- if (mExternalPageListener != null) {
- mExternalPageListener.onPageScrollStateChanged(state);
- }
- }
- };
- }
-
- private void updateIndicator(int position) {
- int adapterCount = mAdapter.getCount();
- if (adapterCount > 1) {
- mPreviousArrow.setVisibility(position != 0 ? View.VISIBLE : View.GONE);
- mNextArrow.setVisibility(position != (adapterCount - 1) ? View.VISIBLE : View.GONE);
- } else {
- mPageIndicator.setVisibility(View.GONE);
- mPreviousArrow.setVisibility(View.GONE);
- mNextArrow.setVisibility(View.GONE);
- }
- }
-}
diff --git a/tests/src/com/android/customization/picker/CustomizationPickerActivityTest.java b/tests/src/com/android/customization/picker/CustomizationPickerActivityTest.java
new file mode 100644
index 0000000..dd1581a
--- /dev/null
+++ b/tests/src/com/android/customization/picker/CustomizationPickerActivityTest.java
@@ -0,0 +1,160 @@
+package com.android.customization.picker;
+
+import static android.content.Intent.ACTION_SET_WALLPAPER;
+
+import static androidx.test.espresso.Espresso.onView;
+import static androidx.test.espresso.action.ViewActions.click;
+import static androidx.test.espresso.assertion.ViewAssertions.doesNotExist;
+import static androidx.test.espresso.assertion.ViewAssertions.matches;
+import static androidx.test.espresso.intent.matcher.IntentMatchers.filterEquals;
+import static androidx.test.espresso.matcher.ViewMatchers.isCompletelyDisplayed;
+import static androidx.test.espresso.matcher.ViewMatchers.isSelected;
+import static androidx.test.espresso.matcher.ViewMatchers.withId;
+
+import static com.android.customization.picker.CustomizationPickerActivity.WALLPAPER_FLAVOR_EXTRA;
+import static com.android.customization.picker.CustomizationPickerActivity.WALLPAPER_FOCUS;
+import static com.android.customization.picker.CustomizationPickerActivity.WALLPAPER_ONLY;
+
+import static org.junit.Assert.assertTrue;
+
+import android.content.Intent;
+import android.text.TextUtils;
+
+import androidx.fragment.app.Fragment;
+import androidx.test.espresso.intent.Intents;
+import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;
+import androidx.test.rule.ActivityTestRule;
+
+import com.android.customization.picker.theme.ThemeFragment;
+import com.android.customization.testing.TestCustomizationInjector;
+import com.android.customization.testing.TestThemeManager;
+import com.android.wallpaper.R;
+import com.android.wallpaper.module.InjectorProvider;
+import com.android.wallpaper.picker.CategoryFragment;
+import com.android.wallpaper.picker.TopLevelPickerActivity;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Tests for {@link CustomizationPickerActivity}.
+ */
+@RunWith(AndroidJUnit4ClassRunner.class)
+public class CustomizationPickerActivityTest {
+
+ @Rule
+ public ActivityTestRule<CustomizationPickerActivity> mActivityRule =
+ new ActivityTestRule<>(CustomizationPickerActivity.class, false, false);
+
+ @Before
+ public void setUp() {
+ Intents.init();
+ }
+
+ @After
+ public void tearDown() {
+ mActivityRule.finishActivity();
+ Intents.release();
+ }
+
+ @Test
+ public void launchActivity_doesNotSupportCustomization_launchesTopLevelPickerActivity() {
+ TestThemeManager.setAvailable(false);
+
+ launchActivity();
+
+ Intents.intended(filterEquals(new Intent(mActivityRule.getActivity(),
+ TopLevelPickerActivity.class)));
+ }
+
+ // ----------------------------------------------------------------------
+ // Tests for customization supports.
+ // ----------------------------------------------------------------------
+
+ @Test
+ public void launchActivity_themeManagerIsAvailable_NavBarShowsStyleAndWallpaperItem() {
+ TestThemeManager.setAvailable(true);
+
+ launchActivity();
+
+ onView(withId(R.id.nav_theme)).check(matches(isCompletelyDisplayed()));
+ onView(withId(R.id.nav_wallpaper)).check(matches(isCompletelyDisplayed()));
+ onView(withId(R.id.nav_clock)).check(doesNotExist());
+ onView(withId(R.id.nav_grid)).check(doesNotExist());
+ }
+
+ @Test
+ public void launchActivity_navigateToTheStyleTabByDefault() {
+ TestThemeManager.setAvailable(true);
+
+ launchActivity();
+
+ onView(withId(R.id.nav_theme)).check(matches(isSelected()));
+ assertTrue(getCurrentShowingFragment() instanceof ThemeFragment);
+ }
+
+ @Test
+ public void launchActivity_withExtraWallpaperOnly_launchesTopLevelPickerActivity() {
+ TestThemeManager.setAvailable(true);
+
+ launchActivityWithFlavorExtra(WALLPAPER_ONLY);
+
+ // While receiving WALLPAPER_ONLY extra, it should launch TopLevelPickerActivity whatever it
+ // supports customization.
+ Intents.intended(filterEquals(new Intent(mActivityRule.getActivity(),
+ TopLevelPickerActivity.class)));
+ }
+
+ @Test
+ public void clickStyleButton_showsThemeFragment() {
+ TestThemeManager.setAvailable(true);
+ launchActivity();
+
+ onView(withId(R.id.nav_theme)).perform(click());
+
+ onView(withId(R.id.nav_theme)).check(matches(isSelected()));
+ assertTrue(getCurrentShowingFragment() instanceof ThemeFragment);
+ }
+
+ @Test
+ public void clickWallpaperButton_showsCategoryFragment() {
+ TestThemeManager.setAvailable(true);
+ launchActivity();
+
+ onView(withId(R.id.nav_wallpaper)).perform(click());
+
+ onView(withId(R.id.nav_wallpaper)).check(matches(isSelected()));
+ assertTrue(getCurrentShowingFragment() instanceof CategoryFragment);
+ }
+
+ @Test
+ public void launchActivity_withExtraWallpaperFocus_navigateToTheWallpaperTab() {
+ TestThemeManager.setAvailable(true);
+
+ launchActivityWithFlavorExtra(WALLPAPER_FOCUS);
+
+ onView(withId(R.id.nav_wallpaper)).check(matches(isSelected()));
+ assertTrue(getCurrentShowingFragment() instanceof CategoryFragment);
+ }
+
+ private void launchActivity() {
+ launchActivityWithFlavorExtra("");
+ }
+
+ private void launchActivityWithFlavorExtra(String extra) {
+ InjectorProvider.setInjector(new TestCustomizationInjector());
+ Intent intent = new Intent(ACTION_SET_WALLPAPER);
+ if (!TextUtils.isEmpty(extra)) {
+ intent.putExtra(WALLPAPER_FLAVOR_EXTRA, extra);
+ }
+ mActivityRule.launchActivity(intent);
+ }
+
+ private Fragment getCurrentShowingFragment() {
+ return mActivityRule.getActivity().getSupportFragmentManager()
+ .findFragmentById(R.id.fragment_container);
+ }
+}
diff --git a/tests/src/com/android/customization/testing/TestCustomizationInjector.java b/tests/src/com/android/customization/testing/TestCustomizationInjector.java
new file mode 100644
index 0000000..dbbdb74
--- /dev/null
+++ b/tests/src/com/android/customization/testing/TestCustomizationInjector.java
@@ -0,0 +1,71 @@
+package com.android.customization.testing;
+
+import android.content.Context;
+
+import androidx.fragment.app.FragmentActivity;
+
+import com.android.customization.model.theme.OverlayManagerCompat;
+import com.android.customization.model.theme.ThemeBundleProvider;
+import com.android.customization.model.theme.ThemeManager;
+import com.android.customization.module.CustomizationInjector;
+import com.android.customization.module.CustomizationPreferences;
+import com.android.customization.module.ThemesUserEventLogger;
+import com.android.wallpaper.module.DrawableLayerResolver;
+import com.android.wallpaper.module.PackageStatusNotifier;
+import com.android.wallpaper.module.UserEventLogger;
+import com.android.wallpaper.testing.TestInjector;
+
+/**
+ * Test implementation of the dependency injector.
+ */
+public class TestCustomizationInjector extends TestInjector implements CustomizationInjector {
+ private CustomizationPreferences mCustomizationPreferences;
+ private ThemeManager mThemeManager;
+ private PackageStatusNotifier mPackageStatusNotifier;
+ private DrawableLayerResolver mDrawableLayerResolver;
+ private UserEventLogger mUserEventLogger;
+
+ @Override
+ public CustomizationPreferences getCustomizationPreferences(Context context) {
+ if (mCustomizationPreferences == null) {
+ mCustomizationPreferences = new TestDefaultCustomizationPreferences(context);
+ }
+ return mCustomizationPreferences;
+ }
+
+ @Override
+ public ThemeManager getThemeManager(
+ ThemeBundleProvider provider,
+ FragmentActivity activity,
+ OverlayManagerCompat overlayManagerCompat,
+ ThemesUserEventLogger logger) {
+ if (mThemeManager == null) {
+ mThemeManager = new TestThemeManager(provider, activity, overlayManagerCompat, logger);
+ }
+ return mThemeManager;
+ }
+
+ @Override
+ public PackageStatusNotifier getPackageStatusNotifier(Context context) {
+ if (mPackageStatusNotifier == null) {
+ mPackageStatusNotifier = new TestPackageStatusNotifier();
+ }
+ return mPackageStatusNotifier;
+ }
+
+ @Override
+ public DrawableLayerResolver getDrawableLayerResolver() {
+ if (mDrawableLayerResolver == null) {
+ mDrawableLayerResolver = new TestDrawableLayerResolver();
+ }
+ return mDrawableLayerResolver;
+ }
+
+ @Override
+ public UserEventLogger getUserEventLogger(Context unused) {
+ if (mUserEventLogger == null) {
+ mUserEventLogger = new TestThemesUserEventLogger();
+ }
+ return mUserEventLogger;
+ }
+}
diff --git a/tests/src/com/android/customization/testing/TestDefaultCustomizationPreferences.java b/tests/src/com/android/customization/testing/TestDefaultCustomizationPreferences.java
new file mode 100644
index 0000000..bcf5a5f
--- /dev/null
+++ b/tests/src/com/android/customization/testing/TestDefaultCustomizationPreferences.java
@@ -0,0 +1,41 @@
+package com.android.customization.testing;
+
+import android.content.Context;
+
+import com.android.customization.module.DefaultCustomizationPreferences;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Test implementation of {@link DefaultCustomizationPreferences}.
+ */
+public class TestDefaultCustomizationPreferences extends DefaultCustomizationPreferences {
+
+ private String mCustomThemes;
+ private final Set<String> mTabVisited = new HashSet<>();
+
+ public TestDefaultCustomizationPreferences(Context context) {
+ super(context);
+ }
+
+ @Override
+ public String getSerializedCustomThemes() {
+ return mCustomThemes;
+ }
+
+ @Override
+ public void storeCustomThemes(String serializedCustomThemes) {
+ mCustomThemes = serializedCustomThemes;
+ }
+
+ @Override
+ public boolean getTabVisited(String id) {
+ return mTabVisited.contains(id);
+ }
+
+ @Override
+ public void setTabVisited(String id) {
+ mTabVisited.add(id);
+ }
+}
diff --git a/tests/src/com/android/customization/testing/TestDrawableLayerResolver.java b/tests/src/com/android/customization/testing/TestDrawableLayerResolver.java
new file mode 100644
index 0000000..e507221
--- /dev/null
+++ b/tests/src/com/android/customization/testing/TestDrawableLayerResolver.java
@@ -0,0 +1,16 @@
+package com.android.customization.testing;
+
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.LayerDrawable;
+
+import com.android.wallpaper.module.DrawableLayerResolver;
+
+/**
+ * Test implementation of {@link DrawableLayerResolver}.
+ */
+public class TestDrawableLayerResolver implements DrawableLayerResolver {
+ @Override
+ public Drawable resolveLayer(LayerDrawable layerDrawable) {
+ return layerDrawable.getDrawable(0);
+ }
+}
diff --git a/tests/src/com/android/customization/testing/TestPackageStatusNotifier.java b/tests/src/com/android/customization/testing/TestPackageStatusNotifier.java
new file mode 100644
index 0000000..1e6a1a2
--- /dev/null
+++ b/tests/src/com/android/customization/testing/TestPackageStatusNotifier.java
@@ -0,0 +1,18 @@
+package com.android.customization.testing;
+
+import com.android.wallpaper.module.PackageStatusNotifier;
+
+/**
+ * Test implementation of {@link PackageStatusNotifier}.
+ */
+public class TestPackageStatusNotifier implements PackageStatusNotifier {
+ @Override
+ public void addListener(Listener listener, String action) {
+ // Do nothing
+ }
+
+ @Override
+ public void removeListener(Listener listener) {
+ // Do nothing
+ }
+}
diff --git a/tests/src/com/android/customization/testing/TestThemeManager.java b/tests/src/com/android/customization/testing/TestThemeManager.java
new file mode 100644
index 0000000..c4d25fb
--- /dev/null
+++ b/tests/src/com/android/customization/testing/TestThemeManager.java
@@ -0,0 +1,33 @@
+package com.android.customization.testing;
+
+import androidx.fragment.app.FragmentActivity;
+
+import com.android.customization.model.theme.OverlayManagerCompat;
+import com.android.customization.model.theme.ThemeBundleProvider;
+import com.android.customization.model.theme.ThemeManager;
+import com.android.customization.module.ThemesUserEventLogger;
+
+/**
+ * Test implementation of {@link ThemeManager}.
+ */
+public class TestThemeManager extends ThemeManager {
+
+ private static boolean sIsAvailable;
+
+ public TestThemeManager(
+ ThemeBundleProvider provider,
+ FragmentActivity activity,
+ OverlayManagerCompat overlayManagerCompat,
+ ThemesUserEventLogger logger) {
+ super(provider, activity, overlayManagerCompat, logger);
+ }
+
+ @Override
+ public boolean isAvailable() {
+ return sIsAvailable;
+ }
+
+ public static void setAvailable(boolean available) {
+ sIsAvailable = available;
+ }
+}
diff --git a/tests/src/com/android/customization/testing/TestThemesUserEventLogger.java b/tests/src/com/android/customization/testing/TestThemesUserEventLogger.java
new file mode 100644
index 0000000..3600192
--- /dev/null
+++ b/tests/src/com/android/customization/testing/TestThemesUserEventLogger.java
@@ -0,0 +1,43 @@
+package com.android.customization.testing;
+
+import com.android.customization.model.clock.Clockface;
+import com.android.customization.model.grid.GridOption;
+import com.android.customization.model.theme.ThemeBundle;
+import com.android.customization.module.ThemesUserEventLogger;
+import com.android.wallpaper.testing.TestUserEventLogger;
+
+/**
+ * Test implementation of {@link ThemesUserEventLogger}.
+ */
+public class TestThemesUserEventLogger extends TestUserEventLogger
+ implements ThemesUserEventLogger {
+ @Override
+ public void logThemeSelected(ThemeBundle theme, boolean isCustomTheme) {
+ // Do nothing.
+ }
+
+ @Override
+ public void logThemeApplied(ThemeBundle theme, boolean isCustomTheme) {
+ // Do nothing.
+ }
+
+ @Override
+ public void logClockSelected(Clockface clock) {
+ // Do nothing.
+ }
+
+ @Override
+ public void logClockApplied(Clockface clock) {
+ // Do nothing.
+ }
+
+ @Override
+ public void logGridSelected(GridOption grid) {
+ // Do nothing.
+ }
+
+ @Override
+ public void logGridApplied(GridOption grid) {
+ // Do nothing.
+ }
+}