From 3d59dd718be53317267ff8dcd2b7369f7949c49f Mon Sep 17 00:00:00 2001 From: Dale Hawkins <107309+dkhawk@users.noreply.github.com> Date: Tue, 18 Aug 2026 15:45:38 -0600 Subject: [PATCH] feat(snapshot): modernize SnapshotDemoActivity with Material 3 cards and Venice focal point - Redesign layout with Material 3 cards, compound drawable placeholder, and captured snapshot preview - Add vector icons ic_camera and ic_clear with 2026 Apache 2.0 license headers - Update initial focal point to Venice (45.4371, 12.3345, zoom 16f) - Support portrait and landscape orientations with optimized layouts --- .../src/main/res/drawable/ic_camera.xml | 28 +++ .../src/main/res/drawable/ic_clear.xml | 25 +++ .../main/res/layout-land/snapshot_demo.xml | 169 +++++++++++++++--- .../src/main/res/layout/snapshot_demo.xml | 140 ++++++++++++--- .../example/mapdemo/SnapshotDemoActivity.java | 37 ++-- .../kotlindemos/SnapshotDemoActivity.kt | 56 ++++-- 6 files changed, 378 insertions(+), 77 deletions(-) create mode 100644 ApiDemos/project/common-ui/src/main/res/drawable/ic_camera.xml create mode 100644 ApiDemos/project/common-ui/src/main/res/drawable/ic_clear.xml diff --git a/ApiDemos/project/common-ui/src/main/res/drawable/ic_camera.xml b/ApiDemos/project/common-ui/src/main/res/drawable/ic_camera.xml new file mode 100644 index 000000000..a16c5e068 --- /dev/null +++ b/ApiDemos/project/common-ui/src/main/res/drawable/ic_camera.xml @@ -0,0 +1,28 @@ + + + + + diff --git a/ApiDemos/project/common-ui/src/main/res/drawable/ic_clear.xml b/ApiDemos/project/common-ui/src/main/res/drawable/ic_clear.xml new file mode 100644 index 000000000..a7280e26d --- /dev/null +++ b/ApiDemos/project/common-ui/src/main/res/drawable/ic_clear.xml @@ -0,0 +1,25 @@ + + + + diff --git a/ApiDemos/project/common-ui/src/main/res/layout-land/snapshot_demo.xml b/ApiDemos/project/common-ui/src/main/res/layout-land/snapshot_demo.xml index 3f59eb7ee..1dce43bf5 100755 --- a/ApiDemos/project/common-ui/src/main/res/layout-land/snapshot_demo.xml +++ b/ApiDemos/project/common-ui/src/main/res/layout-land/snapshot_demo.xml @@ -1,6 +1,6 @@ - + android:layout_height="match_parent"> + + + android:layout_marginHorizontal="16dp" + android:layout_marginTop="8dp" + android:layout_marginBottom="4dp" + android:orientation="horizontal" + app:layout_constraintTop_toBottomOf="@id/topAppBar" + app:layout_constraintBottom_toTopOf="@id/bottom_controls" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent"> - + + android:layout_weight="1" + android:layout_marginEnd="6dp" + app:cardCornerRadius="16dp" + app:cardElevation="2dp" + app:strokeWidth="1dp" + app:strokeColor="?attr/colorOutlineVariant"> + + + + - + + + + + + android:layout_weight="1" + android:layout_marginStart="6dp" + app:cardCornerRadius="16dp" + app:cardElevation="2dp" + app:strokeWidth="1dp" + app:strokeColor="?attr/colorOutlineVariant"> + + + + + + + + + + + - + android:layout_marginHorizontal="16dp" + android:layout_marginBottom="8dp" + android:orientation="horizontal" + android:gravity="center_vertical" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent"> - + -