@@ -27,6 +27,7 @@ import com.example.platform.accessibility.SpeakableText
2727import com.example.platform.camera.imagecapture.Camera2ImageCapture
2828import com.example.platform.camera.imagecapture.Camera2UltraHDRCapture
2929import com.example.platform.camera.preview.Camera2Preview
30+ import com.example.platform.camerax.basic.CameraXBasic
3031import com.example.platform.connectivity.audio.AudioCommsSample
3132import com.example.platform.connectivity.bluetooth.ble.BLEScanIntentSample
3233import com.example.platform.connectivity.bluetooth.ble.ConnectGATTSample
@@ -217,6 +218,18 @@ val SAMPLE_DEMOS by lazy {
217218 tags = listOf (" Camera2" ),
218219 content = { AndroidFragment <Camera2Preview >() },
219220 ),
221+
222+ // CameraX Samples
223+ ComposableSampleDemo (
224+ id = " camerax-basic" ,
225+ name = " CameraX • Basic Image Capture" ,
226+ description = " This sample demonstrates how to capture an image & tap-to-focus using CameraX" ,
227+ documentation = " https://developer.android.com/training/camerax" ,
228+ apiSurface = CameraCameraXApiSurface ,
229+ tags = listOf (" CameraX" ),
230+ content = { CameraXBasic () },
231+ ),
232+
220233 ComposableSampleDemo (
221234 id = " communication-audio-manager" ,
222235 name = " Communication Audio Manager" ,
@@ -956,7 +969,7 @@ val SAMPLE_DEMOS by lazy {
956969 documentation = " https://source.android.com/docs/core/interaction/haptics" ,
957970 apiSurface = UserInterfaceHapticsApiSurface ,
958971 tags = listOf (" Haptics" ),
959- content = { HapticsBasic () }
972+ content = { HapticsBasic () },
960973 ),
961974 ComposableSampleDemo (
962975 id = " haptics-2-resist" ,
@@ -965,7 +978,7 @@ val SAMPLE_DEMOS by lazy {
965978 documentation = " https://source.android.com/docs/core/interaction/haptics" ,
966979 apiSurface = UserInterfaceHapticsApiSurface ,
967980 tags = listOf (" Haptics" ),
968- content = { Resist () }
981+ content = { Resist () },
969982 ),
970983 ComposableSampleDemo (
971984 id = " haptics-3-expand" ,
@@ -974,7 +987,7 @@ val SAMPLE_DEMOS by lazy {
974987 documentation = " https://source.android.com/docs/core/interaction/haptics" ,
975988 apiSurface = UserInterfaceHapticsApiSurface ,
976989 tags = listOf (" Haptics" ),
977- content = { Expand () }
990+ content = { Expand () },
978991 ),
979992 ComposableSampleDemo (
980993 id = " haptics-4-bounce" ,
@@ -983,7 +996,7 @@ val SAMPLE_DEMOS by lazy {
983996 documentation = " https://source.android.com/docs/core/interaction/haptics" ,
984997 apiSurface = UserInterfaceHapticsApiSurface ,
985998 tags = listOf (" Haptics" ),
986- content = { Bounce () }
999+ content = { Bounce () },
9871000 ),
9881001 ComposableSampleDemo (
9891002 id = " haptics-5-wobble" ,
@@ -992,7 +1005,7 @@ val SAMPLE_DEMOS by lazy {
9921005 documentation = " https://source.android.com/docs/core/interaction/haptics" ,
9931006 apiSurface = UserInterfaceHapticsApiSurface ,
9941007 tags = listOf (" Haptics" ),
995- content = { Wobble () }
1008+ content = { Wobble () },
9961009 ),
9971010 ComposableSampleDemo (
9981011 id = " live-updates" ,
@@ -1014,23 +1027,23 @@ val SAMPLE_DEMOS by lazy {
10141027 description = " Basic usage of Picture-in-Picture mode showcasing video playback" ,
10151028 documentation = " https://developer.android.com/develop/ui/views/picture-in-picture" ,
10161029 apiSurface = UserInterfacePictureInPictureApiSurface ,
1017- content = PiPMovieActivity ::class .java
1030+ content = PiPMovieActivity ::class .java,
10181031 ),
10191032 ActivitySampleDemo (
10201033 id = " picture-in-picture-stopwatch" ,
10211034 name = " Picture in Picture (PiP) - Stopwatch" ,
10221035 description = " Basic usage of Picture-in-Picture mode showcasing a stopwatch" ,
10231036 documentation = " https://developer.android.com/develop/ui/views/picture-in-picture" ,
10241037 apiSurface = UserInterfacePictureInPictureApiSurface ,
1025- content = PiPSampleActivity ::class .java
1038+ content = PiPSampleActivity ::class .java,
10261039 ),
10271040 ActivitySampleDemo (
10281041 id = " predictive-back" ,
10291042 name = " Predictive Back" ,
10301043 description = " Shows Predictive Back animations." ,
10311044 documentation = " https://developer.android.com/about/versions/14/features/predictive-back" ,
10321045 apiSurface = UserInterfacePredictiveBackApiSurface ,
1033- content = PBHostingActivity ::class .java
1046+ content = PBHostingActivity ::class .java,
10341047 ),
10351048 ComposableSampleDemo (
10361049 id = " quick-settings" ,
@@ -1051,15 +1064,15 @@ val SAMPLE_DEMOS by lazy {
10511064 description = " Receive texts and images from other apps." ,
10521065 documentation = null ,
10531066 apiSurface = UserInterfaceShareApiSurface ,
1054- content = ShareReceiverActivity ::class .java
1067+ content = ShareReceiverActivity ::class .java,
10551068 ),
10561069 ComposableSampleDemo (
10571070 id = " send-data-with-sharesheet" ,
10581071 name = " Send data with sharesheet" ,
10591072 description = " Send texts and images to other apps using the Android Sharesheet." ,
10601073 documentation = null ,
10611074 apiSurface = UserInterfaceShareApiSurface ,
1062- content = { ShareSender () }
1075+ content = { ShareSender () },
10631076 ),
10641077 ComposableSampleDemo (
10651078 id = " conversion-suggestions" ,
@@ -1068,7 +1081,7 @@ val SAMPLE_DEMOS by lazy {
10681081 documentation = " https://developer.android.com/about/versions/13/features#text-conversion" ,
10691082 apiSurface = UserInterfaceTextApiSurface ,
10701083 tags = listOf (" Text" ),
1071- content = { AndroidFragment <ConversionSuggestions >() }
1084+ content = { AndroidFragment <ConversionSuggestions >() },
10721085 ),
10731086 ComposableSampleDemo (
10741087 id = " downloadable-fonts" ,
@@ -1077,7 +1090,7 @@ val SAMPLE_DEMOS by lazy {
10771090 documentation = " https://developer.android.com/develop/ui/views/text-and-emoji/downloadable-fonts" ,
10781091 apiSurface = UserInterfaceTextApiSurface ,
10791092 tags = listOf (" Text" ),
1080- content = { AndroidFragment <DownloadableFontsFragment >() }
1093+ content = { AndroidFragment <DownloadableFontsFragment >() },
10811094 ),
10821095 ComposableSampleDemo (
10831096 id = " hyphenation" ,
@@ -1086,7 +1099,7 @@ val SAMPLE_DEMOS by lazy {
10861099 documentation = " https://developer.android.com/reference/android/widget/TextView#attr_android:hyphenationFrequency" ,
10871100 apiSurface = UserInterfaceTextApiSurface ,
10881101 tags = listOf (" Text" ),
1089- content = { AndroidFragment <Hyphenation >() }
1102+ content = { AndroidFragment <Hyphenation >() },
10901103 ),
10911104 ComposableSampleDemo (
10921105 id = " line-break" ,
@@ -1095,7 +1108,7 @@ val SAMPLE_DEMOS by lazy {
10951108 documentation = " https://developer.android.com/about/versions/13/features#japanese-wrapping" ,
10961109 apiSurface = UserInterfaceTextApiSurface ,
10971110 tags = listOf (" Text" ),
1098- content = { AndroidFragment <LineBreak >() }
1111+ content = { AndroidFragment <LineBreak >() },
10991112 ),
11001113 ComposableSampleDemo (
11011114 id = " linkify" ,
@@ -1104,7 +1117,7 @@ val SAMPLE_DEMOS by lazy {
11041117 documentation = " https://developer.android.com/reference/kotlin/androidx/core/text/util/LinkifyCompat" ,
11051118 apiSurface = UserInterfaceTextApiSurface ,
11061119 tags = listOf (" Text" ),
1107- content = { AndroidFragment <Linkify >() }
1120+ content = { AndroidFragment <Linkify >() },
11081121 ),
11091122 ComposableSampleDemo (
11101123 id = " text-span" ,
@@ -1113,31 +1126,31 @@ val SAMPLE_DEMOS by lazy {
11131126 documentation = " https://developer.android.com/kotlin/ktx#core" ,
11141127 apiSurface = UserInterfaceTextApiSurface ,
11151128 tags = listOf (" Text" ),
1116- content = { AndroidFragment <TextSpanFragment >() }
1129+ content = { AndroidFragment <TextSpanFragment >() },
11171130 ),
11181131 ComposableSampleDemo (
11191132 id = " immersive-mode" ,
11201133 name = " Immersive mode" ,
11211134 description = " Immersive mode enables your app to display full-screen by hiding system bars." ,
11221135 documentation = " https://developer.android.com/develop/ui/views/layout/immersive" ,
11231136 apiSurface = UserInterfaceWindowInsetsApiSurface ,
1124- content = { ImmersiveMode () }
1137+ content = { ImmersiveMode () },
11251138 ),
11261139 ActivitySampleDemo (
11271140 id = " window-insets-animation" ,
11281141 name = " WindowInsetsAnimation" ,
11291142 description = " Shows how to react to the on-screen keyboard (IME) changing visibility, and also controlling the IME's visibility." ,
11301143 documentation = " https://developer.android.com/develop/ui/views/layout/sw-keyboard" ,
11311144 apiSurface = UserInterfaceWindowInsetsApiSurface ,
1132- content = WindowInsetsAnimationActivity ::class .java
1145+ content = WindowInsetsAnimationActivity ::class .java,
11331146 ),
11341147 ActivitySampleDemo (
11351148 id = " window-manager" ,
11361149 name = " WindowManager" ,
11371150 description = " Demonstrates how to use the Jetpack WindowManager library." ,
11381151 documentation = " https://developer.android.com/jetpack/androidx/releases/window" ,
11391152 apiSurface = UserInterfaceWindowManagerApiSurface ,
1140- content = WindowDemosActivity ::class .java
1153+ content = WindowDemosActivity ::class .java,
11411154 ),
11421155 ).associateBy { it.id }
11431156}
0 commit comments