summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/graphics/SilkFX/res/layout/activity_background_blur.xml277
-rw-r--r--tests/graphics/SilkFX/res/layout/activity_glass.xml3
-rw-r--r--tests/graphics/SilkFX/res/layout/color_mode_controls.xml3
-rw-r--r--tests/graphics/SilkFX/res/layout/common_base.xml3
-rw-r--r--tests/graphics/SilkFX/res/layout/hdr_glows.xml3
-rw-r--r--tests/graphics/SilkFX/res/values/style.xml2
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/Main.kt1
7 files changed, 152 insertions, 140 deletions
diff --git a/tests/graphics/SilkFX/res/layout/activity_background_blur.xml b/tests/graphics/SilkFX/res/layout/activity_background_blur.xml
index f13c0883cb01..27eca82dcb23 100644
--- a/tests/graphics/SilkFX/res/layout/activity_background_blur.xml
+++ b/tests/graphics/SilkFX/res/layout/activity_background_blur.xml
@@ -13,161 +13,168 @@
~ 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"
+-->
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/background"
- android:layout_width="390dp"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:padding="15dp"
- android:orientation="vertical"
+ android:fitsSystemWindows="true"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
tools:context=".materials.BackgroundBlurActivity">
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center_horizontal"
- android:padding="10dp"
- android:textColor="#ffffffff"
- android:text="Hello blurry world!"/>
-
<LinearLayout
- android:layout_width="match_parent"
+ android:id="@+id/background"
+ android:layout_width="390dp"
android:layout_height="wrap_content"
- android:orientation="horizontal">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:textColor="#ffffffff"
- android:text="Background blur"/>
+ android:layout_gravity="center"
+ android:padding="15dp"
+ android:orientation="vertical">
- <SeekBar
- android:id="@+id/set_background_blur"
- android:min="0"
- android:max="300"
- android:layout_width="160dp"
- android:layout_height="wrap_content"/>
- <TextView
- android:id="@+id/background_blur_radius"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="#ffffffff"
- android:ems="3"
- android:gravity="center"
- android:paddingLeft="10dp"
- android:paddingRight="10dp"
- android:text="TODO"/>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
<TextView
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
+ android:gravity="center_horizontal"
+ android:padding="10dp"
android:textColor="#ffffffff"
- android:text="Background alpha"/>
+ android:text="Hello blurry world!"/>
- <SeekBar
- android:id="@+id/set_background_alpha"
- android:min="0"
- android:max="100"
- android:layout_width="160dp"
- android:layout_height="wrap_content" />
- <TextView
- android:id="@+id/background_alpha"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="#ffffffff"
- android:ems="3"
- android:gravity="center"
- android:paddingLeft="10dp"
- android:paddingRight="10dp"
- android:text="TODO"/>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
- <TextView
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:textColor="#ffffffff"
- android:text="Blur behind"/>
+ android:orientation="horizontal">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:textColor="#ffffffff"
+ android:text="Background blur"/>
- <SeekBar
- android:id="@+id/set_blur_behind"
- android:min="0"
- android:max="300"
- android:layout_width="160dp"
- android:layout_height="wrap_content" />
- <TextView
- android:id="@+id/blur_behind_radius"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:textColor="#ffffffff"
- android:paddingLeft="10dp"
- android:paddingRight="10dp"
- android:ems="3"
- android:text="TODO"/>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
- <TextView
- android:layout_width="wrap_content"
+ <SeekBar
+ android:id="@+id/set_background_blur"
+ android:min="0"
+ android:max="300"
+ android:layout_width="160dp"
+ android:layout_height="wrap_content"/>
+ <TextView
+ android:id="@+id/background_blur_radius"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="#ffffffff"
+ android:ems="3"
+ android:gravity="center"
+ android:paddingLeft="10dp"
+ android:paddingRight="10dp"
+ android:text="TODO"/>
+ </LinearLayout>
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:textColor="#ffffffff"
- android:text="Dim amount"/>
+ android:orientation="horizontal">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:textColor="#ffffffff"
+ android:text="Background alpha"/>
- <SeekBar
- android:id="@+id/set_dim_amount"
- android:min="0"
- android:max="100"
- android:layout_width="160dp"
- android:layout_height="wrap_content" />
- <TextView
- android:id="@+id/dim_amount"
- android:layout_width="wrap_content"
+ <SeekBar
+ android:id="@+id/set_background_alpha"
+ android:min="0"
+ android:max="100"
+ android:layout_width="160dp"
+ android:layout_height="wrap_content" />
+ <TextView
+ android:id="@+id/background_alpha"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="#ffffffff"
+ android:ems="3"
+ android:gravity="center"
+ android:paddingLeft="10dp"
+ android:paddingRight="10dp"
+ android:text="TODO"/>
+ </LinearLayout>
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:gravity="center"
- android:textColor="#ffffffff"
- android:paddingLeft="10dp"
- android:paddingRight="10dp"
- android:ems="3"
- android:text="TODO"/>
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:layout_marginTop="5dp"
- android:orientation="vertical"
- android:gravity="center">
+ android:orientation="horizontal">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:textColor="#ffffffff"
+ android:text="Blur behind"/>
- <Button
- android:id="@+id/toggle_blur_enabled"
+ <SeekBar
+ android:id="@+id/set_blur_behind"
+ android:min="0"
+ android:max="300"
+ android:layout_width="160dp"
+ android:layout_height="wrap_content" />
+ <TextView
+ android:id="@+id/blur_behind_radius"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:textColor="#ffffffff"
+ android:paddingLeft="10dp"
+ android:paddingRight="10dp"
+ android:ems="3"
+ android:text="TODO"/>
+ </LinearLayout>
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="Disable blur"
- android:onClick="toggleForceBlurDisabled"/>
+ android:orientation="horizontal">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:textColor="#ffffffff"
+ android:text="Dim amount"/>
- <Button
- android:id="@+id/toggle_battery_saving_mode"
+ <SeekBar
+ android:id="@+id/set_dim_amount"
+ android:min="0"
+ android:max="100"
+ android:layout_width="160dp"
+ android:layout_height="wrap_content" />
+ <TextView
+ android:id="@+id/dim_amount"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:textColor="#ffffffff"
+ android:paddingLeft="10dp"
+ android:paddingRight="10dp"
+ android:ems="3"
+ android:text="TODO"/>
+ </LinearLayout>
+
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="TODO"
- android:onClick="toggleBatterySavingMode"/>
- </LinearLayout>
- <requestFocus/>
+ android:layout_gravity="center"
+ android:layout_marginTop="5dp"
+ android:orientation="vertical"
+ android:gravity="center">
+
+ <Button
+ android:id="@+id/toggle_blur_enabled"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="Disable blur"
+ android:onClick="toggleForceBlurDisabled"/>
-</LinearLayout>
+ <Button
+ android:id="@+id/toggle_battery_saving_mode"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="TODO"
+ android:onClick="toggleBatterySavingMode"/>
+ </LinearLayout>
+ <requestFocus/>
+
+ </LinearLayout>
+</FrameLayout>
diff --git a/tests/graphics/SilkFX/res/layout/activity_glass.xml b/tests/graphics/SilkFX/res/layout/activity_glass.xml
index aa09f276d5c8..d591fc4606b0 100644
--- a/tests/graphics/SilkFX/res/layout/activity_glass.xml
+++ b/tests/graphics/SilkFX/res/layout/activity_glass.xml
@@ -19,6 +19,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:fitsSystemWindows="true"
tools:context=".MainActivity">
<ImageView
@@ -300,4 +301,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>
-</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
+</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/tests/graphics/SilkFX/res/layout/color_mode_controls.xml b/tests/graphics/SilkFX/res/layout/color_mode_controls.xml
index c0c0bab8a605..9b2b0c818a8e 100644
--- a/tests/graphics/SilkFX/res/layout/color_mode_controls.xml
+++ b/tests/graphics/SilkFX/res/layout/color_mode_controls.xml
@@ -19,6 +19,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_margin="8dp"
android:orientation="vertical">
<TextView
@@ -61,4 +62,4 @@
</LinearLayout>
-</com.android.test.silkfx.common.ColorModeControls> \ No newline at end of file
+</com.android.test.silkfx.common.ColorModeControls>
diff --git a/tests/graphics/SilkFX/res/layout/common_base.xml b/tests/graphics/SilkFX/res/layout/common_base.xml
index c0eaf9bc1476..ce6d850af1bc 100644
--- a/tests/graphics/SilkFX/res/layout/common_base.xml
+++ b/tests/graphics/SilkFX/res/layout/common_base.xml
@@ -18,6 +18,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:fitsSystemWindows="true"
android:orientation="vertical">
<include layout="@layout/color_mode_controls" />
@@ -26,4 +27,4 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/tests/graphics/SilkFX/res/layout/hdr_glows.xml b/tests/graphics/SilkFX/res/layout/hdr_glows.xml
index b6050645866a..f1e553a3df23 100644
--- a/tests/graphics/SilkFX/res/layout/hdr_glows.xml
+++ b/tests/graphics/SilkFX/res/layout/hdr_glows.xml
@@ -18,6 +18,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:fitsSystemWindows="true"
android:orientation="vertical">
<include layout="@layout/color_mode_controls" />
@@ -48,4 +49,4 @@
android:layout_height="50dp"
android:layout_margin="8dp" />
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/tests/graphics/SilkFX/res/values/style.xml b/tests/graphics/SilkFX/res/values/style.xml
index 66edbb5c9382..75506978024b 100644
--- a/tests/graphics/SilkFX/res/values/style.xml
+++ b/tests/graphics/SilkFX/res/values/style.xml
@@ -16,7 +16,7 @@
-->
<!-- Styles for immersive actions UI. -->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="Theme.BackgroundBlurTheme" parent= "Theme.AppCompat.Dialog">
+ <style name="Theme.BackgroundBlurTheme" parent="Theme.AppCompat.Dialog">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBlurBehindEnabled">true</item>
<item name="android:backgroundDimEnabled">false</item>
diff --git a/tests/graphics/SilkFX/src/com/android/test/silkfx/Main.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/Main.kt
index 59a6078376cf..4baa7401e6b9 100644
--- a/tests/graphics/SilkFX/src/com/android/test/silkfx/Main.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/Main.kt
@@ -71,6 +71,7 @@ class Main : Activity() {
super.onCreate(savedInstanceState)
val list = ExpandableListView(this)
+ list.setFitsSystemWindows(true)
setContentView(list)