@@ -27,6 +27,7 @@ import com.example.platform.accessibility.SpeakableText
27
27
import com.example.platform.camera.imagecapture.Camera2ImageCapture
28
28
import com.example.platform.camera.imagecapture.Camera2UltraHDRCapture
29
29
import com.example.platform.camera.preview.Camera2Preview
30
+ import com.example.platform.camerax.basic.CameraXBasic
30
31
import com.example.platform.connectivity.audio.AudioCommsSample
31
32
import com.example.platform.connectivity.bluetooth.ble.BLEScanIntentSample
32
33
import com.example.platform.connectivity.bluetooth.ble.ConnectGATTSample
@@ -217,6 +218,18 @@ val SAMPLE_DEMOS by lazy {
217
218
tags = listOf (" Camera2" ),
218
219
content = { AndroidFragment <Camera2Preview >() },
219
220
),
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
+
220
233
ComposableSampleDemo (
221
234
id = " communication-audio-manager" ,
222
235
name = " Communication Audio Manager" ,
@@ -956,7 +969,7 @@ val SAMPLE_DEMOS by lazy {
956
969
documentation = " https://source.android.com/docs/core/interaction/haptics" ,
957
970
apiSurface = UserInterfaceHapticsApiSurface ,
958
971
tags = listOf (" Haptics" ),
959
- content = { HapticsBasic () }
972
+ content = { HapticsBasic () },
960
973
),
961
974
ComposableSampleDemo (
962
975
id = " haptics-2-resist" ,
@@ -965,7 +978,7 @@ val SAMPLE_DEMOS by lazy {
965
978
documentation = " https://source.android.com/docs/core/interaction/haptics" ,
966
979
apiSurface = UserInterfaceHapticsApiSurface ,
967
980
tags = listOf (" Haptics" ),
968
- content = { Resist () }
981
+ content = { Resist () },
969
982
),
970
983
ComposableSampleDemo (
971
984
id = " haptics-3-expand" ,
@@ -974,7 +987,7 @@ val SAMPLE_DEMOS by lazy {
974
987
documentation = " https://source.android.com/docs/core/interaction/haptics" ,
975
988
apiSurface = UserInterfaceHapticsApiSurface ,
976
989
tags = listOf (" Haptics" ),
977
- content = { Expand () }
990
+ content = { Expand () },
978
991
),
979
992
ComposableSampleDemo (
980
993
id = " haptics-4-bounce" ,
@@ -983,7 +996,7 @@ val SAMPLE_DEMOS by lazy {
983
996
documentation = " https://source.android.com/docs/core/interaction/haptics" ,
984
997
apiSurface = UserInterfaceHapticsApiSurface ,
985
998
tags = listOf (" Haptics" ),
986
- content = { Bounce () }
999
+ content = { Bounce () },
987
1000
),
988
1001
ComposableSampleDemo (
989
1002
id = " haptics-5-wobble" ,
@@ -992,7 +1005,7 @@ val SAMPLE_DEMOS by lazy {
992
1005
documentation = " https://source.android.com/docs/core/interaction/haptics" ,
993
1006
apiSurface = UserInterfaceHapticsApiSurface ,
994
1007
tags = listOf (" Haptics" ),
995
- content = { Wobble () }
1008
+ content = { Wobble () },
996
1009
),
997
1010
ComposableSampleDemo (
998
1011
id = " live-updates" ,
@@ -1014,23 +1027,23 @@ val SAMPLE_DEMOS by lazy {
1014
1027
description = " Basic usage of Picture-in-Picture mode showcasing video playback" ,
1015
1028
documentation = " https://developer.android.com/develop/ui/views/picture-in-picture" ,
1016
1029
apiSurface = UserInterfacePictureInPictureApiSurface ,
1017
- content = PiPMovieActivity ::class .java
1030
+ content = PiPMovieActivity ::class .java,
1018
1031
),
1019
1032
ActivitySampleDemo (
1020
1033
id = " picture-in-picture-stopwatch" ,
1021
1034
name = " Picture in Picture (PiP) - Stopwatch" ,
1022
1035
description = " Basic usage of Picture-in-Picture mode showcasing a stopwatch" ,
1023
1036
documentation = " https://developer.android.com/develop/ui/views/picture-in-picture" ,
1024
1037
apiSurface = UserInterfacePictureInPictureApiSurface ,
1025
- content = PiPSampleActivity ::class .java
1038
+ content = PiPSampleActivity ::class .java,
1026
1039
),
1027
1040
ActivitySampleDemo (
1028
1041
id = " predictive-back" ,
1029
1042
name = " Predictive Back" ,
1030
1043
description = " Shows Predictive Back animations." ,
1031
1044
documentation = " https://developer.android.com/about/versions/14/features/predictive-back" ,
1032
1045
apiSurface = UserInterfacePredictiveBackApiSurface ,
1033
- content = PBHostingActivity ::class .java
1046
+ content = PBHostingActivity ::class .java,
1034
1047
),
1035
1048
ComposableSampleDemo (
1036
1049
id = " quick-settings" ,
@@ -1051,15 +1064,15 @@ val SAMPLE_DEMOS by lazy {
1051
1064
description = " Receive texts and images from other apps." ,
1052
1065
documentation = null ,
1053
1066
apiSurface = UserInterfaceShareApiSurface ,
1054
- content = ShareReceiverActivity ::class .java
1067
+ content = ShareReceiverActivity ::class .java,
1055
1068
),
1056
1069
ComposableSampleDemo (
1057
1070
id = " send-data-with-sharesheet" ,
1058
1071
name = " Send data with sharesheet" ,
1059
1072
description = " Send texts and images to other apps using the Android Sharesheet." ,
1060
1073
documentation = null ,
1061
1074
apiSurface = UserInterfaceShareApiSurface ,
1062
- content = { ShareSender () }
1075
+ content = { ShareSender () },
1063
1076
),
1064
1077
ComposableSampleDemo (
1065
1078
id = " conversion-suggestions" ,
@@ -1068,7 +1081,7 @@ val SAMPLE_DEMOS by lazy {
1068
1081
documentation = " https://developer.android.com/about/versions/13/features#text-conversion" ,
1069
1082
apiSurface = UserInterfaceTextApiSurface ,
1070
1083
tags = listOf (" Text" ),
1071
- content = { AndroidFragment <ConversionSuggestions >() }
1084
+ content = { AndroidFragment <ConversionSuggestions >() },
1072
1085
),
1073
1086
ComposableSampleDemo (
1074
1087
id = " downloadable-fonts" ,
@@ -1077,7 +1090,7 @@ val SAMPLE_DEMOS by lazy {
1077
1090
documentation = " https://developer.android.com/develop/ui/views/text-and-emoji/downloadable-fonts" ,
1078
1091
apiSurface = UserInterfaceTextApiSurface ,
1079
1092
tags = listOf (" Text" ),
1080
- content = { AndroidFragment <DownloadableFontsFragment >() }
1093
+ content = { AndroidFragment <DownloadableFontsFragment >() },
1081
1094
),
1082
1095
ComposableSampleDemo (
1083
1096
id = " hyphenation" ,
@@ -1086,7 +1099,7 @@ val SAMPLE_DEMOS by lazy {
1086
1099
documentation = " https://developer.android.com/reference/android/widget/TextView#attr_android:hyphenationFrequency" ,
1087
1100
apiSurface = UserInterfaceTextApiSurface ,
1088
1101
tags = listOf (" Text" ),
1089
- content = { AndroidFragment <Hyphenation >() }
1102
+ content = { AndroidFragment <Hyphenation >() },
1090
1103
),
1091
1104
ComposableSampleDemo (
1092
1105
id = " line-break" ,
@@ -1095,7 +1108,7 @@ val SAMPLE_DEMOS by lazy {
1095
1108
documentation = " https://developer.android.com/about/versions/13/features#japanese-wrapping" ,
1096
1109
apiSurface = UserInterfaceTextApiSurface ,
1097
1110
tags = listOf (" Text" ),
1098
- content = { AndroidFragment <LineBreak >() }
1111
+ content = { AndroidFragment <LineBreak >() },
1099
1112
),
1100
1113
ComposableSampleDemo (
1101
1114
id = " linkify" ,
@@ -1104,7 +1117,7 @@ val SAMPLE_DEMOS by lazy {
1104
1117
documentation = " https://developer.android.com/reference/kotlin/androidx/core/text/util/LinkifyCompat" ,
1105
1118
apiSurface = UserInterfaceTextApiSurface ,
1106
1119
tags = listOf (" Text" ),
1107
- content = { AndroidFragment <Linkify >() }
1120
+ content = { AndroidFragment <Linkify >() },
1108
1121
),
1109
1122
ComposableSampleDemo (
1110
1123
id = " text-span" ,
@@ -1113,31 +1126,31 @@ val SAMPLE_DEMOS by lazy {
1113
1126
documentation = " https://developer.android.com/kotlin/ktx#core" ,
1114
1127
apiSurface = UserInterfaceTextApiSurface ,
1115
1128
tags = listOf (" Text" ),
1116
- content = { AndroidFragment <TextSpanFragment >() }
1129
+ content = { AndroidFragment <TextSpanFragment >() },
1117
1130
),
1118
1131
ComposableSampleDemo (
1119
1132
id = " immersive-mode" ,
1120
1133
name = " Immersive mode" ,
1121
1134
description = " Immersive mode enables your app to display full-screen by hiding system bars." ,
1122
1135
documentation = " https://developer.android.com/develop/ui/views/layout/immersive" ,
1123
1136
apiSurface = UserInterfaceWindowInsetsApiSurface ,
1124
- content = { ImmersiveMode () }
1137
+ content = { ImmersiveMode () },
1125
1138
),
1126
1139
ActivitySampleDemo (
1127
1140
id = " window-insets-animation" ,
1128
1141
name = " WindowInsetsAnimation" ,
1129
1142
description = " Shows how to react to the on-screen keyboard (IME) changing visibility, and also controlling the IME's visibility." ,
1130
1143
documentation = " https://developer.android.com/develop/ui/views/layout/sw-keyboard" ,
1131
1144
apiSurface = UserInterfaceWindowInsetsApiSurface ,
1132
- content = WindowInsetsAnimationActivity ::class .java
1145
+ content = WindowInsetsAnimationActivity ::class .java,
1133
1146
),
1134
1147
ActivitySampleDemo (
1135
1148
id = " window-manager" ,
1136
1149
name = " WindowManager" ,
1137
1150
description = " Demonstrates how to use the Jetpack WindowManager library." ,
1138
1151
documentation = " https://developer.android.com/jetpack/androidx/releases/window" ,
1139
1152
apiSurface = UserInterfaceWindowManagerApiSurface ,
1140
- content = WindowDemosActivity ::class .java
1153
+ content = WindowDemosActivity ::class .java,
1141
1154
),
1142
1155
).associateBy { it.id }
1143
1156
}
0 commit comments