├── p1_inicio ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── themes.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── develou │ │ │ └── compose_inicio │ │ │ └── LoginActivity.kt │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── develou │ │ │ └── compose_inicio │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── com │ │ └── develou │ │ └── compose_inicio │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── p4_estado ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── themes.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── develou │ │ │ │ └── compose_estado │ │ │ │ ├── SumActivity.kt │ │ │ │ ├── examples │ │ │ │ ├── 01TextFieldState.kt │ │ │ │ └── Components.kt │ │ │ │ └── viewmodel │ │ │ │ └── SumViewModel.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── develou │ │ │ └── compose_estado │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── com │ │ └── develou │ │ └── compose_estado │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── p5_gestos ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── themes.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── develou │ │ │ │ └── compose_gestos │ │ │ │ ├── GesturesActivity.kt │ │ │ │ └── examples │ │ │ │ ├── Transformation.kt │ │ │ │ ├── Dragging.kt │ │ │ │ ├── Swiping.kt │ │ │ │ └── Tapping.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── develou │ │ │ └── compose_gestos │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── com │ │ └── develou │ │ └── compose_gestos │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── p6_temas ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── themes.xml │ │ │ ├── drawable │ │ │ │ └── product.jpg │ │ │ ├── font │ │ │ │ ├── nunito_bold.ttf │ │ │ │ ├── overlock_bold.ttf │ │ │ │ ├── nunito_regular.ttf │ │ │ │ └── overlock_regular.ttf │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── develou │ │ │ │ └── compose_temas │ │ │ │ ├── theme │ │ │ │ ├── Color.kt │ │ │ │ ├── Shape.kt │ │ │ │ ├── Theme.kt │ │ │ │ └── Typography.kt │ │ │ │ └── ProductsActivity.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── develou │ │ │ └── compose_temas │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── com │ │ └── develou │ │ └── compose_temas │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── p3_modificadores ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── themes.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── develou │ │ │ │ └── compose_modificadores │ │ │ │ ├── Colors.kt │ │ │ │ ├── ExampleActivity.kt │ │ │ │ └── examples │ │ │ │ ├── PositionExamples.kt │ │ │ │ ├── ChainingExample.kt │ │ │ │ ├── BorderExamples.kt │ │ │ │ ├── PaddingExamples.kt │ │ │ │ └── TransformationExamples.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── develou │ │ │ └── compose_modificadores │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── com │ │ └── develou │ │ └── compose_modificadores │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── p7_componentes ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── ac1.jpg │ │ │ │ ├── ac2.jpg │ │ │ │ ├── ac3.jpg │ │ │ │ ├── image.jpg │ │ │ │ ├── image2.jpg │ │ │ │ ├── no_avatar.jpg │ │ │ │ ├── ic_filter_list.xml │ │ │ │ ├── ic_flag.xml │ │ │ │ ├── ic_file_download.xml │ │ │ │ ├── ic_bookmark.xml │ │ │ │ ├── ic_format_align_center.xml │ │ │ │ ├── ic_format_align_left.xml │ │ │ │ ├── ic_format_align_right.xml │ │ │ │ ├── ic_bookmark_border.xml │ │ │ │ ├── ic_image.xml │ │ │ │ ├── ic_save.xml │ │ │ │ ├── ic_cancel.xml │ │ │ │ ├── ic_visibility.xml │ │ │ │ ├── ic_link.xml │ │ │ │ ├── ic_attachment.xml │ │ │ │ └── ic_visibility_off.xml │ │ │ ├── font │ │ │ │ ├── besley_black.ttf │ │ │ │ ├── besley_bold.ttf │ │ │ │ ├── nunito_bold.ttf │ │ │ │ ├── besley_medium.ttf │ │ │ │ ├── besley_regular.ttf │ │ │ │ ├── besley_semibold.ttf │ │ │ │ ├── besley_extrabold.ttf │ │ │ │ └── playfairdisplay_regular.ttf │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── themes.xml │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── develou │ │ │ │ └── compose_componentes │ │ │ │ ├── examples │ │ │ │ ├── Menu │ │ │ │ │ ├── MenuItem.kt │ │ │ │ │ ├── README.md │ │ │ │ │ ├── MenusScreen.kt │ │ │ │ │ └── 02_ExposedDropdownMenu.kt │ │ │ │ ├── Button │ │ │ │ │ ├── README.md │ │ │ │ │ └── ButtonsScreen.kt │ │ │ │ ├── Card │ │ │ │ │ ├── README.md │ │ │ │ │ ├── 01_CardTypes.kt │ │ │ │ │ └── 04_ThemingCard.kt │ │ │ │ ├── FloatingActionButton │ │ │ │ │ ├── README.md │ │ │ │ │ ├── 02_FABInScaffold.kt │ │ │ │ │ ├── FABsScreen.kt │ │ │ │ │ └── 01_FABTypes.kt │ │ │ │ ├── Scaffold │ │ │ │ │ └── README.md │ │ │ │ ├── Checkbox │ │ │ │ │ ├── 01_CheckBox.kt │ │ │ │ │ ├── README.md │ │ │ │ │ ├── 05_TriStateCheckbox.kt │ │ │ │ │ ├── CheckboxesScreen.kt │ │ │ │ │ ├── 04_DisabledCheckbox.kt │ │ │ │ │ ├── 03_CheckboxList.kt │ │ │ │ │ └── 02_LabelledCheckbox.kt │ │ │ │ ├── Switch │ │ │ │ │ ├── README.md │ │ │ │ │ ├── 01_SimpleSwitch.kt │ │ │ │ │ ├── 03_DisabledSwitch.kt │ │ │ │ │ └── 04_ColoredSwitch.kt │ │ │ │ ├── List │ │ │ │ │ ├── README.md │ │ │ │ │ └── 05_ThemingList.kt │ │ │ │ ├── TextField │ │ │ │ │ ├── 02Labels.kt │ │ │ │ │ ├── 01TextFieldTypes.kt │ │ │ │ │ ├── TextFieldScreen.kt │ │ │ │ │ ├── 07Style.kt │ │ │ │ │ ├── 05InputTypes.kt │ │ │ │ │ └── 06Keyboard.kt │ │ │ │ ├── TopAppBar │ │ │ │ │ ├── README.md │ │ │ │ │ ├── 04_Styling.kt │ │ │ │ │ └── 05_Theming.kt │ │ │ │ ├── Slider │ │ │ │ │ └── README.md │ │ │ │ ├── RadioButton │ │ │ │ │ ├── README.md │ │ │ │ │ ├── 01_RadioButton.kt │ │ │ │ │ ├── 06_ColoredRadioButton.kt │ │ │ │ │ ├── 03_RadioButtonGroup.kt │ │ │ │ │ ├── 02_LabelledRadioButton.kt │ │ │ │ │ └── 04_SelectableModifier.kt │ │ │ │ ├── Dialog │ │ │ │ │ ├── README.md │ │ │ │ │ ├── 05_StylingDialogs.kt │ │ │ │ │ └── 01_AlertDialog.kt │ │ │ │ └── ProgressIndicator │ │ │ │ │ └── README.md │ │ │ │ └── ComponentsActivity.kt │ │ └── AndroidManifest.xml │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── develou │ │ │ └── compose_componentes │ │ │ └── ExampleInstrumentedTest.kt │ └── test │ │ └── java │ │ └── com │ │ └── develou │ │ └── compose_componentes │ │ ├── ExampleUnitTest.kt │ │ └── examples │ │ └── OffsetMappersTest.kt ├── README.md ├── proguard-rules.pro └── build.gradle ├── p2_layouts_standard ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── themes.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── develou │ │ │ │ └── compose_layouts │ │ │ │ ├── ExampleActivity.kt │ │ │ │ ├── Spacers.kt │ │ │ │ ├── Childs.kt │ │ │ │ ├── Boxes.kt │ │ │ │ ├── Rows.kt │ │ │ │ └── Columns.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── develou │ │ │ └── compose_layouts │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── com │ │ └── develou │ │ └── compose_layouts │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── media └── dialogos.png ├── .gitignore ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── settings.gradle ├── README.md └── gradle.properties /p1_inicio/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /p4_estado/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /p5_gestos/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /p6_temas/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /p3_modificadores/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /p7_componentes/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /p2_layouts_standard/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /media/dialogos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/media/dialogos.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | local.properties 4 | .idea 5 | .DS_Store 6 | build 7 | captures 8 | .externalNativeBuild -------------------------------------------------------------------------------- /p1_inicio/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Jetpack Compose 3 | -------------------------------------------------------------------------------- /p4_estado/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Jetpack Compose 3 | -------------------------------------------------------------------------------- /p5_gestos/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Jetpack Compose 3 | -------------------------------------------------------------------------------- /p6_temas/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Jetpack Compose 3 | -------------------------------------------------------------------------------- /p3_modificadores/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Jetpack Compose 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Jetpack Compose 3 | -------------------------------------------------------------------------------- /p6_temas/src/main/res/drawable/product.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p6_temas/src/main/res/drawable/product.jpg -------------------------------------------------------------------------------- /p6_temas/src/main/res/font/nunito_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p6_temas/src/main/res/font/nunito_bold.ttf -------------------------------------------------------------------------------- /p6_temas/src/main/res/font/overlock_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p6_temas/src/main/res/font/overlock_bold.ttf -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ac1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/drawable/ac1.jpg -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ac2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/drawable/ac2.jpg -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ac3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/drawable/ac3.jpg -------------------------------------------------------------------------------- /p6_temas/src/main/res/font/nunito_regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p6_temas/src/main/res/font/nunito_regular.ttf -------------------------------------------------------------------------------- /p6_temas/src/main/res/font/overlock_regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p6_temas/src/main/res/font/overlock_regular.ttf -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/drawable/image.jpg -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/drawable/image2.jpg -------------------------------------------------------------------------------- /p7_componentes/src/main/res/font/besley_black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/font/besley_black.ttf -------------------------------------------------------------------------------- /p7_componentes/src/main/res/font/besley_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/font/besley_bold.ttf -------------------------------------------------------------------------------- /p7_componentes/src/main/res/font/nunito_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/font/nunito_bold.ttf -------------------------------------------------------------------------------- /p1_inicio/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p1_inicio/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p1_inicio/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p1_inicio/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p1_inicio/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p1_inicio/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p4_estado/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p4_estado/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p4_estado/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p4_estado/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p4_estado/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p4_estado/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p5_gestos/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p5_gestos/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p5_gestos/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p5_gestos/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p5_gestos/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p5_gestos/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p6_temas/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p6_temas/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p6_temas/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p6_temas/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p6_temas/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p6_temas/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p6_temas/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p6_temas/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/no_avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/drawable/no_avatar.jpg -------------------------------------------------------------------------------- /p7_componentes/src/main/res/font/besley_medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/font/besley_medium.ttf -------------------------------------------------------------------------------- /p7_componentes/src/main/res/font/besley_regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/font/besley_regular.ttf -------------------------------------------------------------------------------- /p7_componentes/src/main/res/font/besley_semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/font/besley_semibold.ttf -------------------------------------------------------------------------------- /p1_inicio/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p1_inicio/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p1_inicio/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p1_inicio/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p4_estado/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p4_estado/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p4_estado/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p4_estado/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p5_gestos/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p5_gestos/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p5_gestos/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p5_gestos/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p6_temas/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p6_temas/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p7_componentes/src/main/res/font/besley_extrabold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/font/besley_extrabold.ttf -------------------------------------------------------------------------------- /p1_inicio/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p1_inicio/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p1_inicio/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p1_inicio/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p4_estado/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p4_estado/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p4_estado/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p4_estado/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p5_gestos/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p5_gestos/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p5_gestos/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p5_gestos/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p6_temas/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p6_temas/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p6_temas/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p6_temas/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p6_temas/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p6_temas/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p7_componentes/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p7_componentes/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p7_componentes/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p1_inicio/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p1_inicio/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p1_inicio/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p1_inicio/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p3_modificadores/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p3_modificadores/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p3_modificadores/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p3_modificadores/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p3_modificadores/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p3_modificadores/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p4_estado/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p4_estado/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p4_estado/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p4_estado/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p5_gestos/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p5_gestos/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p5_gestos/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p5_gestos/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p6_temas/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p6_temas/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p6_temas/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p6_temas/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p7_componentes/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p7_componentes/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p1_inicio/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p1_inicio/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p2_layouts_standard/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p2_layouts_standard/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p2_layouts_standard/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p3_modificadores/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p3_modificadores/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p3_modificadores/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p3_modificadores/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p4_estado/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p4_estado/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p5_gestos/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p5_gestos/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p7_componentes/src/main/res/font/playfairdisplay_regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/font/playfairdisplay_regular.ttf -------------------------------------------------------------------------------- /p7_componentes/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p7_componentes/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p2_layouts_standard/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p2_layouts_standard/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /p3_modificadores/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p3_modificadores/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p3_modificadores/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p3_modificadores/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p7_componentes/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p7_componentes/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p2_layouts_standard/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p2_layouts_standard/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p3_modificadores/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p3_modificadores/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p3_modificadores/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p3_modificadores/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p3_modificadores/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p3_modificadores/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p7_componentes/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p7_componentes/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p2_layouts_standard/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p2_layouts_standard/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesreve/android-jetpack-compose/HEAD/p2_layouts_standard/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 04 10:57:15 COT 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /p3_modificadores/src/main/java/com/develou/compose_modificadores/Colors.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_modificadores 2 | 3 | import androidx.compose.ui.graphics.Color 4 | 5 | val yellow = Color(0xFFFFF9C4) 6 | val blue = Color(0xFFB3E5FC) 7 | val red = Color(0xFFFFCDD2) 8 | val green = Color(0xFFC8E6C9) -------------------------------------------------------------------------------- /p6_temas/src/main/java/com/develou/compose_temas/theme/Color.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_temas.theme 2 | 3 | import androidx.compose.ui.graphics.Color 4 | 5 | val Yellow500 = Color(0xFFFFEB3B) 6 | 7 | val Blue200 = Color(0xFF81D4FA) 8 | val Blue500 = Color(0xFF2196F3) 9 | val Blue700 = Color(0xFF1976D2) -------------------------------------------------------------------------------- /p7_componentes/README.md: -------------------------------------------------------------------------------- 1 | ## Text Fields En Compose 2 | 3 | En este módulo encontrarás múltiples ejemplos sobre los componentes `TextField` y `OutlinedTextField` en Compose. 4 | Puedes encontrar la explicación de cada ejemplo en mi tutorial [TextField En Compose](https://www.develou.com/android-textfield-en-compose/). -------------------------------------------------------------------------------- /p6_temas/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /p1_inicio/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /p4_estado/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /p5_gestos/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /p1_inicio/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /p3_modificadores/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /p4_estado/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /p5_gestos/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /p6_temas/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /p7_componentes/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /p3_modificadores/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /p7_componentes/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ic_filter_list.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /p6_temas/src/main/java/com/develou/compose_temas/theme/Shape.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_temas.theme 2 | 3 | import androidx.compose.foundation.shape.RoundedCornerShape 4 | import androidx.compose.material.Shapes 5 | import androidx.compose.ui.unit.dp 6 | 7 | val ProductsShapes = Shapes( 8 | small = RoundedCornerShape(50), 9 | medium = RoundedCornerShape(topEnd = 80.dp), 10 | large = RoundedCornerShape(8.dp) 11 | ) -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Menu/MenuItem.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.Menu 2 | 3 | import androidx.compose.ui.graphics.vector.ImageVector 4 | 5 | sealed interface MenuItem { 6 | 7 | data class Option( 8 | val name: String, 9 | val icon: ImageVector?, 10 | val enabled: Boolean = true 11 | ) : MenuItem 12 | 13 | object Divider : MenuItem 14 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ic_flag.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /p6_temas/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /p1_inicio/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /p4_estado/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /p5_gestos/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /p3_modificadores/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ic_file_download.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /p7_componentes/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ic_bookmark.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /p6_temas/src/test/java/com/develou/compose_temas/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_temas 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /p1_inicio/src/test/java/com/develou/compose_inicio/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_inicio 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /p4_estado/src/test/java/com/develou/compose_estado/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_estado 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /p5_gestos/src/test/java/com/develou/compose_gestos/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_gestos 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/java/com/develou/compose_layouts/ExampleActivity.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_layouts 2 | 3 | import android.os.Bundle 4 | import androidx.activity.ComponentActivity 5 | import androidx.activity.compose.setContent 6 | 7 | class ExampleActivity : ComponentActivity() { 8 | override fun onCreate(savedInstanceState: Bundle?) { 9 | super.onCreate(savedInstanceState) 10 | setContent { 11 | SpacersExample() 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /p2_layouts_standard/src/test/java/com/develou/compose_layouts/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_layouts 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /p3_modificadores/src/test/java/com/develou/compose_modificadores/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_modificadores 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ic_format_align_center.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ic_format_align_left.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ic_format_align_right.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ic_bookmark_border.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | dependencyResolutionManagement { 2 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 3 | repositories { 4 | google() 5 | mavenCentral() 6 | jcenter() // Warning: this repository is going to shut down soon 7 | } 8 | } 9 | rootProject.name = "Jetpack Compose" 10 | include ':p1_inicio', 11 | 'p2_layouts_standard', 12 | ':p3_modificadores', 13 | ':p4_estado', 14 | ':p5_gestos', 15 | ':p6_temas', 16 | ':p7_componentes' 17 | -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ic_image.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Button/README.md: -------------------------------------------------------------------------------- 1 | ## Floating Action Button En Compose 2 | 3 | En este paquete encontrarás el código de todos los ejemplos de mi tutorial [FloatingActionButton En Compose](https://www.develou.com/floating-action-button-en-compose/) de Develou.com. 4 | Cada archivo Kotlin contiene las funciones componibles asociadas a cada sección del tutorial: 5 | 6 | 1. Tipos de FAB -> `01_FABTypes.kt` 7 | 2. Posicionar FAB En Scaffold -> `02_FABInScaffold.kt` 8 | 3. Estilizar Botones -> `03_FABTheming.kt` -------------------------------------------------------------------------------- /p5_gestos/src/main/java/com/develou/compose_gestos/GesturesActivity.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_gestos 2 | 3 | import android.os.Bundle 4 | import androidx.activity.ComponentActivity 5 | import androidx.activity.compose.setContent 6 | import com.develou.compose_gestos.examples.RotationExample 7 | 8 | class GesturesActivity : ComponentActivity() { 9 | 10 | override fun onCreate(savedInstanceState: Bundle?) { 11 | super.onCreate(savedInstanceState) 12 | setContent { 13 | RotationExample() 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Componentes En Compose 3 | 4 | Texto desde strings.xml 5 | Cantidad de ítems: %1$s 6 | Este es un párrafo que será alineado con el parámetro textAlign 7 | 8 | String 1 9 | String 2 10 | String 3 11 | 12 | -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Card/README.md: -------------------------------------------------------------------------------- 1 | ## Cards En Jetpack Compose 2 | 3 | En este paquete encontrarás el código de todos los ejemplos de mi 4 | tutorial [Cards En Jetpack Compose](https://www.develou.com/cards-en-jetpack-compose/) de 5 | Develou.com. Dentro del archivo CardsScreen.kt encuentras los ejemplos que se estudian: 6 | 7 | 1. Tipos De Cards -> `01_CardTypes.kt.kt` 8 | 2. Estilizar Una Card -> `02_StylingCard.kt.kt` 9 | 3. Lista De Cards -> `03_CardList.kt.kt` 10 | 4. Cambiar Tema De Card -> `04_ThemingCard.kt.kt` -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/FloatingActionButton/README.md: -------------------------------------------------------------------------------- 1 | ## Floating Action Button En Compose 2 | 3 | En este paquete encontrarás el código de todos los ejemplos de mi tutorial [FloatingActionButton En Compose](https://www.develou.com/floating-action-button--en-compose/) de Develou.com. 4 | Cada archivo Kotlin contiene las funciones componibles asociadas a cada sección del tutorial: 5 | 6 | 1. Tipos de FAB -> `01_FABTypes.kt` 7 | 2. Posicionar FAB En Scaffold -> `02_FABInScaffold.kt` 8 | 3. Estilizar Botones -> `03_FABTheming.kt` 9 | -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Menu/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Menus En Compose 3 | 4 | En este paquete encontrarás el código de todos los ejemplos de mi tutorial [Menus En Compose](https://www.develou.com/menus-en-compose/) de Develou.com. 5 | Dentro del archivo MenusScreen.kt encontrarás los ejemplos que se estudian: 6 | 7 | 1. Dropdown Menu Simple-> `TaskMenu()` 8 | 2. Dropdown Menu Items Personalizados -> `ImageMenu()` 9 | 3. Dropdown Menu Temificado -> `ThemedTaskMenu()` 10 | 4. Exposed Dropdown Menu Simple -> `PhoneNumberTypeMenu()` -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Scaffold/README.md: -------------------------------------------------------------------------------- 1 | ## Scaffold En Jetpack Compose 2 | 3 | En este paquete encontrarás el código de todos los ejemplos de mi 4 | tutorial [Scaffold En Jetpack Compose](https://www.develou.com/scaffold-en-jetpack-compose/) de 5 | Develou.com. Dentro del archivo ScaffoldScreen.kt encuentras los ejemplos que se estudian: 6 | 7 | 2. Añadir Top App Bar 8 | 3. Añadir Bottom App Bar 9 | 4. Mostrar Una Snackbar 10 | 5. Añadir Floating Action Button 11 | 6. Añadir Navigation Drawer 12 | 7. Contenido Del Scaffold -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ic_save.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /p3_modificadores/src/main/java/com/develou/compose_modificadores/ExampleActivity.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_modificadores 2 | 3 | import android.os.Bundle 4 | import androidx.activity.ComponentActivity 5 | import androidx.activity.compose.setContent 6 | import com.develou.compose_modificadores.examples.ChainingExample 7 | 8 | class ExampleActivity : ComponentActivity() { 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | setContent { 12 | ChainingExample() 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Checkbox/01_CheckBox.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.Checkbox 2 | 3 | import androidx.compose.material.Checkbox 4 | import androidx.compose.runtime.Composable 5 | import androidx.compose.runtime.mutableStateOf 6 | import androidx.compose.runtime.remember 7 | 8 | @Composable 9 | fun CheckboxExample() { 10 | val checked = remember { mutableStateOf(true) } 11 | Checkbox( 12 | checked = checked.value, 13 | onCheckedChange = { checked.value = it } 14 | ) 15 | } 16 | -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ic_cancel.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Switch/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## RadioButtons En Compose 3 | 4 | En este paquete encontrarás el código de todos los ejemplos de mi tutorial [Switch En Compose](https://www.develou.com/switch-en-compose/) de Develou.com. 5 | Cada archivo Kotlin contiene las funciones componibles asociadas a cada sección del tutorial: 6 | 7 | 1. Crear Un Switch-> `01_SimpleSwitch.kt` 8 | 2. Añadir Etiqueta A Un Switch -> `02_LabelledSwitch.kt` 9 | 3. Deshabilitar Un Switch -> `03_DisabledSwitch.kt` 10 | 4. Cambiar Color De Un Switch -> `04_ColoredSwitch.kt` -------------------------------------------------------------------------------- /p4_estado/src/main/java/com/develou/compose_estado/SumActivity.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_estado 2 | 3 | import android.os.Bundle 4 | import androidx.activity.ComponentActivity 5 | import androidx.activity.compose.setContent 6 | import com.develou.compose_estado.examples.SumScreenWithViewModel 7 | 8 | class SumActivity : ComponentActivity() { 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | setContent { 12 | SumScreenWithViewModel() 13 | } 14 | } 15 | } 16 | 17 | fun String?.toDoubleOrZero() = this?.toDoubleOrNull() ?: 0.0 -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/List/README.md: -------------------------------------------------------------------------------- 1 | ## Listas En Compose 2 | 3 | En este paquete encontrarás el código de todos los ejemplos de mi 4 | tutorial [Listas En Compose](https://www.develou.com/listas-en-compose/) de Develou.com. Dentro del 5 | archivo ListsScreen.kt encontrarás los ejemplos que se estudian: 6 | 7 | 1. Componentes Para Crear Listas -> `01_ListsComponents.kt` 8 | 2. Propiedades De LazyColumn -> `02_Properties.kt` 9 | 3. Gestos Sobre Listas -> `03_Gestures.kt` 10 | 4. Controles De Lista -> `04_ Controls.kt` 11 | 5. Cambiar El Tema De Una Lista -> `05_ThemingList.kt` -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ic_visibility.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/TextField/02Labels.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.TextField 2 | 3 | import androidx.compose.material.OutlinedTextField 4 | import androidx.compose.material.Text 5 | import androidx.compose.runtime.* 6 | 7 | @Composable 8 | fun LabelAndPlaceholderExample() { 9 | var address by remember { 10 | mutableStateOf("") 11 | } 12 | 13 | OutlinedTextField( 14 | value = address, 15 | onValueChange = { address = it }, 16 | label = { Text("Dirección") }, 17 | placeholder = { Text("¿Dónde vives?") } 18 | ) 19 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ic_link.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ic_attachment.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/TopAppBar/README.md: -------------------------------------------------------------------------------- 1 | ## TopAppBar En Jetpack Compose 2 | 3 | En este paquete encontrarás el código de todos los ejemplos de mi 4 | tutorial [TopAppBar En Jetpack Compose](https://www.develou.com/topappbar-en-jetpack-compose/) de 5 | Develou.com. Dentro del archivo TopAppBarScreen.kt encuentras los ejemplos que se estudian: 6 | 7 | 1. Crear Una Top App Bar -> `01_Creation.kt` 8 | 2. Añadir Action Items -> `02_ActionItems.kt` 9 | 3. Crear Una Top App Bar Prominente ->`03_ProminentTopAppBar.kt` 10 | 4. Personalizar La TopAppBar -> `04_Styling.kt` 11 | 5. Tematizar TopAppBar -> `05_Theming.kt` -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Slider/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Sliders En Compose 3 | 4 | En este paquete encontrarás el código de todos los ejemplos de mi tutorial [Slider En Compose](https://www.develou.com/slider-en-compose/) de Develou.com. 5 | Dentro del archivo SlidersScreen.kt encontrarás los seis ejemplos que se estudian: 6 | 7 | 1. Slider Continuo-> `SimpleContinuousSlider()` 8 | 2. Slider Discreto -> `SimpleDiscreteSlider()` 9 | 3. Slider Con Doble Selección -> `SimpleRangeSlider()` 10 | 4. Slider Con Texto Lateral -> `ContinuousSliderWithValue()` 11 | 5. Slider Con TextField -> `DiscreteSliderWithTextField()` 12 | 6. Slider Coloreado -> `ColoredSlider()` -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/TopAppBar/04_Styling.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.TopAppBar 2 | 3 | 4 | import androidx.compose.runtime.Composable 5 | import androidx.compose.ui.graphics.Color 6 | import androidx.compose.ui.unit.dp 7 | 8 | @Composable 9 | internal fun TopAppBarCustomBackground() { 10 | DetailTopAppBar(backgroundColor = Color(0xFF2196F3)) 11 | } 12 | 13 | @Composable 14 | internal fun TopAppBarCustomContentColor() { 15 | DetailTopAppBar(contentColor = Color(0xFFFFEB3B)) 16 | } 17 | 18 | @Composable 19 | internal fun TopAppBarCustomElevation() { 20 | DetailTopAppBar(elevation = 8.dp, backgroundColor = Color.White) 21 | } -------------------------------------------------------------------------------- /p6_temas/src/main/java/com/develou/compose_temas/ProductsActivity.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_temas 2 | 3 | import android.os.Bundle 4 | import androidx.activity.ComponentActivity 5 | import androidx.activity.compose.setContent 6 | import androidx.compose.material.Surface 7 | import androidx.compose.ui.unit.ExperimentalUnitApi 8 | import com.develou.compose_temas.theme.ProductsTheme 9 | 10 | class ProductsActivity : ComponentActivity() { 11 | override fun onCreate(savedInstanceState: Bundle?) { 12 | super.onCreate(savedInstanceState) 13 | setContent { 14 | ProductsTheme { 15 | Surface { 16 | Products() 17 | } 18 | } 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/ComponentsActivity.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes 2 | 3 | import android.os.Bundle 4 | import androidx.activity.ComponentActivity 5 | import androidx.activity.compose.setContent 6 | import androidx.compose.material.MaterialTheme 7 | import androidx.compose.material.Surface 8 | import com.develou.compose_componentes.examples.Dialog.DialogScreen 9 | 10 | class ComponentsActivity : ComponentActivity() { 11 | override fun onCreate(savedInstanceState: Bundle?) { 12 | super.onCreate(savedInstanceState) 13 | setContent { 14 | MaterialTheme { 15 | Surface { 16 | DialogScreen() 17 | } 18 | } 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/RadioButton/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## RadioButtons En Compose 3 | 4 | En este paquete encontrarás el código de todos los ejemplos de mi tutorial [RadioButton En Compose](https://www.develou.com/radiobutton-en-compose/) de Develou.com. 5 | Cada archivo Kotlin contiene las funciones componibles asociadas a cada sección del tutorial: 6 | 7 | 1. Crear Un RadioButton-> `01_RadioButton.kt` 8 | 2. Añadir Etiqueta A Un RadioButton -> `02_LabelledRadioButton.kt` 9 | 3. Crear Un Grupo De RadioButtons -> `03_RadioButtonGroup.kt` 10 | 4. Usar El Modificador selectable() -> `04_SelectableModifier.kt` 11 | 5. Deshabilitar Un RadioButton -> `05_DisabledRadiobutton.kt` 12 | 6. Cambiar El Color De Un RadioButton -> `06_ColoredRadioButton.kt` -------------------------------------------------------------------------------- /p3_modificadores/src/main/java/com/develou/compose_modificadores/examples/PositionExamples.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_modificadores.examples 2 | 3 | import androidx.compose.foundation.background 4 | import androidx.compose.foundation.layout.Box 5 | import androidx.compose.foundation.layout.offset 6 | import androidx.compose.foundation.layout.size 7 | import androidx.compose.runtime.Composable 8 | import androidx.compose.ui.Modifier 9 | import androidx.compose.ui.tooling.preview.Preview 10 | import androidx.compose.ui.unit.dp 11 | import com.develou.compose_modificadores.blue 12 | 13 | @Composable 14 | @Preview 15 | fun OffsetExample() { 16 | Box( 17 | Modifier 18 | .size(100.dp) 19 | .offset(10.dp, 15.dp) 20 | .background(blue) 21 | ) 22 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Checkbox/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Checkboxes En Compose 3 | 4 | En este paquete encontrarás el código de todos los ejemplos de mi tutorial [Checkbox En Compose](https://www.develou.com/android-checkbox-en-compose/) de Develou.com. 5 | Cada archivo Kotlin contiene las funciones componibles asociadas a cada sección del tutorial: 6 | 7 | 1. Crear Un CheckBox -> `01_CheckBox.kt` 8 | 2. Checkbox Con Etiqueta -> `02_LabelledCheckbox.kt` 9 | 3. Lista De CheckBoxes -> `03_CheckboxList.kt` 10 | 4. CheckBox Deshabilitado -> `04_DisabledCheckbox.kt` 11 | 5. CheckBox Indeterminado (TriStateCheckBox) -> `05_TriStateCheckbox.kt` 12 | 6. Relación Padre-Hijo Entre Checkboxes -> `06_CheckboxListWithParent.kt` 13 | 7. Cambiar Colores De CheckBox -> `07_ColoredCheckbox.kt` -------------------------------------------------------------------------------- /p1_inicio/src/androidTest/java/com/develou/compose_inicio/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_inicio 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.develou.compose", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/java/com/develou/compose_layouts/Spacers.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_layouts 2 | 3 | import androidx.compose.foundation.layout.Column 4 | import androidx.compose.foundation.layout.Spacer 5 | import androidx.compose.foundation.layout.size 6 | import androidx.compose.material.Text 7 | import androidx.compose.runtime.Composable 8 | import androidx.compose.ui.Modifier 9 | import androidx.compose.ui.tooling.preview.Preview 10 | import androidx.compose.ui.unit.dp 11 | 12 | @Composable 13 | @Preview 14 | fun SpacersExample() { 15 | 16 | Column(Modifier.size(200.dp)) { 17 | Text("A", modifier = aModifier(50)) 18 | Spacer(Modifier.size(100.dp, 10.dp)) 19 | Text("B", modifier = bModifier(50)) 20 | Spacer(Modifier.size(40.dp)) 21 | Text("C", modifier = cModifier(50)) 22 | } 23 | } -------------------------------------------------------------------------------- /p4_estado/src/androidTest/java/com/develou/compose_estado/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_estado 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.develou.compose", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /p5_gestos/src/androidTest/java/com/develou/compose_gestos/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_gestos 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.develou.compose", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /p6_temas/src/androidTest/java/com/develou/compose_temas/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_temas 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.develou.compose", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /p6_temas/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Dialog/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Checkboxes En Compose 3 | 4 | 5 | 6 | En este paquete encontrarás el código de todos los ejemplos de mi tutorial [Diálogos En Compose](https://www.develou.com/dialogos-en-compose/) de Develou.com. 7 | Cada archivo Kotlin contiene las funciones componibles asociadas a cada sección del tutorial: 8 | 9 | 1. Diálogo De Alerta-> `01_AlertDialog.kt` 10 | 2. Diálogo Simple -> `02_SimpleDialog.kt` 11 | 3. Diálogo De Confirmación Con Selección Única -> `03_ConfirmationDialog.kt` 12 | 4. Diálogo De Confirmación Con Selección Múltiple -> `04_MultipleChoiceConfirmationDialog.kt` 13 | 5. Cambiar Estilo De Diálogos -> `05_StylingDialogs.kt` -------------------------------------------------------------------------------- /p1_inicio/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /p4_estado/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /p5_gestos/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /p2_layouts_standard/src/androidTest/java/com/develou/compose_layouts/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_layouts 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.develou.compose", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/java/com/develou/compose_layouts/Childs.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_layouts 2 | 3 | import androidx.compose.foundation.background 4 | import androidx.compose.foundation.layout.size 5 | import androidx.compose.ui.Modifier 6 | import androidx.compose.ui.graphics.Color 7 | import androidx.compose.ui.unit.dp 8 | 9 | private val aColor = Color(0xFFfff59d) 10 | private val bColor = Color(0xFFffe082) 11 | private val cColor = Color(0xFFffcc80) 12 | 13 | fun aModifier(size: Int) = applyModifier(size, color = aColor) 14 | fun bModifier(size: Int) = applyModifier(size, color = bColor) 15 | fun cModifier(size: Int) = applyModifier(size, color = cColor) 16 | 17 | private fun applyModifier(size: Int, color: Color): Modifier { 18 | require(size < 200) 19 | return Modifier 20 | .size(size.dp) 21 | .background(color) 22 | } -------------------------------------------------------------------------------- /p3_modificadores/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /p7_componentes/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /p7_componentes/src/androidTest/java/com/develou/compose_componentes/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.develou.compose", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /p2_layouts_standard/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /p3_modificadores/src/androidTest/java/com/develou/compose_modificadores/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_modificadores 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.develou.compose", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/ProgressIndicator/README.md: -------------------------------------------------------------------------------- 1 | ## Indicadores De Progreso En Compose 2 | 3 | En este paquete encontrarás el código de todos los ejemplos de mi 4 | tutorial [Indicadores De Progreso En Compose](https://www.develou.com/indicadores-de-progreso-en-compose/) 5 | de Develou.com. Cada archivo Kotlin contiene las funciones componibles de los ejemplos expuestos: 6 | 7 | 1. LinearProgressIndicator determinado-> `DeterminedLinearProgress()` 8 | 2. LinearProgressIndicator indeterminado -> `UndeterminedLinearProgress()` 9 | 3. LinearProgressIndicator coloreado -> `ColoredLinearProgress()` 10 | 4. CircularProgressIndicator determinado -> `DeterminedCircularProgress()` 11 | 5. CircularProgressIndicator indeterminado -> `UndeterminedCircularProgress()` 12 | 6. CircularProgressIndicator coloreado -> `ColoredCircularProgress()` -------------------------------------------------------------------------------- /p4_estado/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /p1_inicio/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /p5_gestos/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /p6_temas/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /p3_modificadores/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /p7_componentes/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/TextField/01TextFieldTypes.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.TextField 2 | 3 | import androidx.compose.material.OutlinedTextField 4 | import androidx.compose.material.Text 5 | import androidx.compose.material.TextField 6 | import androidx.compose.runtime.* 7 | 8 | @Composable 9 | fun TextFieldExample() { 10 | var name by remember { 11 | mutableStateOf("Carlos") 12 | } 13 | 14 | TextField( 15 | value = name, 16 | onValueChange = { name = it }, 17 | label = { Text("Nombre") } 18 | ) 19 | } 20 | 21 | @Composable 22 | fun OutlinedTextFieldExample() { 23 | var name by remember { 24 | mutableStateOf("Carlos") 25 | } 26 | 27 | OutlinedTextField( 28 | value = name, 29 | onValueChange = { name = it }, 30 | label = { Text("Nombre") } 31 | ) 32 | } -------------------------------------------------------------------------------- /p1_inicio/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /p4_estado/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /p5_gestos/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /p6_temas/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Checkbox/05_TriStateCheckbox.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.Checkbox 2 | 3 | import androidx.compose.material.TriStateCheckbox 4 | import androidx.compose.runtime.Composable 5 | import androidx.compose.runtime.mutableStateOf 6 | import androidx.compose.runtime.remember 7 | import androidx.compose.ui.state.ToggleableState 8 | 9 | @Composable 10 | fun TriStateCheckboxExample() { 11 | val state = remember { mutableStateOf(ToggleableState.Off) } 12 | TriStateCheckbox( 13 | state = state.value, 14 | onClick = { 15 | state.value = when (state.value) { 16 | ToggleableState.Off -> ToggleableState.On 17 | ToggleableState.On -> ToggleableState.Indeterminate 18 | ToggleableState.Indeterminate -> ToggleableState.Off 19 | } 20 | } 21 | ) 22 | } -------------------------------------------------------------------------------- /p1_inicio/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /p4_estado/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /p5_gestos/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /p6_temas/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /p7_componentes/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /p3_modificadores/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /p7_componentes/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /p3_modificadores/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /p7_componentes/src/test/java/com/develou/compose_componentes/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes 2 | 3 | import com.develou.compose_componentes.examples.Slider.calculateSegment 4 | import org.junit.Assert.assertEquals 5 | import org.junit.Test 6 | 7 | class ExampleUnitTest { 8 | 9 | @Test 10 | fun testCalculateSegment() { 11 | val range = 0F..100F 12 | val steps = 4 13 | 14 | assertEquals(0F, calculateSegment("", range, steps)) 15 | assertEquals(0F, calculateSegment("0", range, steps)) 16 | assertEquals(0F, calculateSegment("5", range, steps)) 17 | assertEquals(20F, calculateSegment("20", range, steps)) 18 | assertEquals(40F, calculateSegment("30", range, steps)) 19 | assertEquals(60F, calculateSegment("65", range, steps)) 20 | assertEquals(80F, calculateSegment("75", range, steps)) 21 | assertEquals(100F, calculateSegment("400", range, steps)) 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /p4_estado/src/main/java/com/develou/compose_estado/examples/01TextFieldState.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_estado.examples 2 | 3 | import androidx.compose.foundation.text.KeyboardOptions 4 | import androidx.compose.material.Text 5 | import androidx.compose.material.TextField 6 | import androidx.compose.runtime.* 7 | import androidx.compose.ui.text.input.KeyboardType 8 | import androidx.compose.ui.tooling.preview.Preview 9 | 10 | @Composable 11 | @Preview 12 | fun TextFieldWithoutState() { 13 | TextField( 14 | value = "", 15 | onValueChange = { }, 16 | label = { Text("Número 1") } 17 | ) 18 | } 19 | 20 | @Composable 21 | fun TextFieldWithState() { 22 | var firstNumber by remember { mutableStateOf("") } 23 | TextField( 24 | value = firstNumber, 25 | onValueChange = { firstNumber = it }, 26 | label = { Text("Número 1") }, 27 | keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number) 28 | ) 29 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/res/drawable/ic_visibility_off.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /p4_estado/src/main/java/com/develou/compose_estado/examples/Components.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_estado.examples 2 | 3 | import androidx.compose.foundation.layout.size 4 | import androidx.compose.foundation.text.KeyboardOptions 5 | import androidx.compose.material.Text 6 | import androidx.compose.material.TextField 7 | import androidx.compose.runtime.Composable 8 | import androidx.compose.ui.Modifier 9 | import androidx.compose.ui.text.input.KeyboardType 10 | import androidx.compose.ui.unit.dp 11 | 12 | @Composable 13 | fun OperandTextField( 14 | label: String, 15 | number: String, 16 | numberChange: (String) -> Unit 17 | ) { 18 | TextField( 19 | value = number, 20 | onValueChange = numberChange, 21 | label = { Text(label) }, 22 | keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number) 23 | ) 24 | } 25 | 26 | @Composable 27 | fun Spacer() { 28 | androidx.compose.foundation.layout.Spacer(modifier = Modifier.size(16.dp)) 29 | } -------------------------------------------------------------------------------- /p4_estado/src/main/java/com/develou/compose_estado/viewmodel/SumViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_estado.viewmodel 2 | 3 | import androidx.lifecycle.LiveData 4 | import androidx.lifecycle.MutableLiveData 5 | import androidx.lifecycle.ViewModel 6 | import com.develou.compose_estado.toDoubleOrZero 7 | 8 | class SumViewModel : ViewModel() { 9 | 10 | private val _number1 = MutableLiveData("") 11 | val number1: LiveData = _number1 12 | 13 | private val _number2 = MutableLiveData("") 14 | val number2: LiveData = _number2 15 | 16 | private val _sum = MutableLiveData(0.0) 17 | val sum: LiveData = _sum 18 | 19 | fun onFirstNumberChange(number: String) { 20 | _number1.value = number 21 | } 22 | 23 | fun onSecondNumberChange(number: String) { 24 | _number2.value = number 25 | } 26 | 27 | fun onCalculate() { 28 | _sum.value = number1.value.toDoubleOrZero() + number2.value.toDoubleOrZero() 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /p6_temas/src/main/java/com/develou/compose_temas/theme/Theme.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_temas.theme 2 | 3 | import androidx.compose.foundation.isSystemInDarkTheme 4 | import androidx.compose.material.MaterialTheme 5 | import androidx.compose.material.darkColors 6 | import androidx.compose.material.lightColors 7 | import androidx.compose.runtime.Composable 8 | 9 | private val LightColors = lightColors( 10 | primary = Blue500, 11 | primaryVariant = Blue700, 12 | secondary = Yellow500 13 | ) 14 | 15 | private val DarkColors = darkColors( 16 | primary = Blue200, 17 | primaryVariant = Blue700, 18 | secondary = Yellow500 19 | ) 20 | 21 | @Composable 22 | fun ProductsTheme( 23 | darkTheme: Boolean = isSystemInDarkTheme(), 24 | content: @Composable () -> Unit 25 | ) { 26 | MaterialTheme( 27 | colors = if (darkTheme) DarkColors else LightColors, 28 | typography = ProductsTypography, 29 | shapes = ProductsShapes, 30 | content = content 31 | ) 32 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Jetpack Compose En Android 2 | 3 | ¡Hola! 👋 4 | 5 | Mi nombres es James Revelo 😄 y soy el creador del sitio [Develou.com](https://www.develou.com/). 6 | 7 | En este repositorio encontrarás un proyecto Android Studio con múltiples módulos, que están asociados a los tutoriales de mi guía de Jetpack Compose. 8 | 9 | Aunque la serie de tutoriales aún está en construcción, puedes encontrar siete módulos asociados a cada sección existente: 10 | 11 | 1. Agregar Jetpack Compose A Proyecto Android Studio -> `p1_inicio` 12 | 2. Layouts En Jetpack Compose -> `p2_layouts_standard` 13 | 3. Modificadores De Apariencia -> `p3_modificadores` 14 | 4. Estado En Compose -> `p4_estado` 15 | 5. Modificadores De Gestos En Compose -> `p5_gestos` 16 | 6. Aplicar Temas En Compose -> `p6_temas` 17 | 7. Componentes En Compose (TextField, Button, Toolbar, etc.) > `p7_componentes` 18 | 8. ... 19 | 20 | Si los ejemplos que encuentras son de utilidad, por favor dale ⭐**Star** al respositorio para apoyarlo. 21 | 22 | ¡Gracias! 23 | -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/RadioButton/01_RadioButton.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.RadioButton 2 | 3 | import androidx.compose.foundation.layout.Box 4 | import androidx.compose.foundation.layout.fillMaxSize 5 | import androidx.compose.foundation.layout.padding 6 | import androidx.compose.material.RadioButton 7 | import androidx.compose.runtime.* 8 | import androidx.compose.ui.Alignment 9 | import androidx.compose.ui.Modifier 10 | import androidx.compose.ui.unit.dp 11 | 12 | @Composable 13 | fun DevelouRadioButton() { 14 | var isSelected by remember { mutableStateOf(false) } 15 | 16 | RadioButton( 17 | selected = isSelected, 18 | onClick = { isSelected = true } 19 | ) 20 | } 21 | 22 | @Composable 23 | fun Example1() { 24 | Box( 25 | modifier = Modifier 26 | .fillMaxSize() 27 | .padding(24.dp), 28 | contentAlignment = Alignment.Center 29 | ) { 30 | DevelouRadioButton() 31 | } 32 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/TopAppBar/05_Theming.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.TopAppBar 2 | 3 | import androidx.compose.material.MaterialTheme 4 | import androidx.compose.runtime.Composable 5 | import androidx.compose.ui.graphics.Color 6 | import androidx.compose.ui.text.TextStyle 7 | import androidx.compose.ui.text.font.Font 8 | import androidx.compose.ui.text.font.FontFamily 9 | import androidx.compose.ui.unit.sp 10 | import com.develou.compose_componentes.R 11 | 12 | private val Besley = FontFamily(Font(R.font.besley_medium)) 13 | 14 | @Composable 15 | internal fun ThemedTopAppBar() { 16 | 17 | MaterialTheme( 18 | colors = MaterialTheme.colors.copy( 19 | primary = Color(0xFFFFF8E1), 20 | onPrimary = Color(0xFF3e2723), 21 | primaryVariant = Color(0xFFFFF8E1) 22 | ), 23 | typography = MaterialTheme.typography.copy( 24 | h6 = TextStyle(fontFamily = Besley, fontSize = 21.sp) 25 | ) 26 | ) { 27 | DetailTopAppBar() 28 | } 29 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Checkbox/CheckboxesScreen.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.Checkbox 2 | 3 | import androidx.compose.foundation.layout.Box 4 | import androidx.compose.foundation.layout.fillMaxSize 5 | import androidx.compose.foundation.layout.padding 6 | import androidx.compose.material.MaterialTheme 7 | import androidx.compose.material.Surface 8 | import androidx.compose.runtime.Composable 9 | import androidx.compose.ui.Alignment 10 | import androidx.compose.ui.Modifier 11 | import androidx.compose.ui.tooling.preview.Preview 12 | import androidx.compose.ui.unit.dp 13 | 14 | @Composable 15 | fun CheckboxesScreen() { 16 | Box( 17 | modifier = Modifier 18 | .fillMaxSize() 19 | .padding(16.dp), 20 | contentAlignment = Alignment.Center 21 | ) { 22 | // Reemplaza por el ejemplo que deseas ver 23 | DisabledCheckboxExample() 24 | } 25 | } 26 | 27 | @Composable 28 | @Preview 29 | fun CheckboxesScreenPreview() { 30 | MaterialTheme { 31 | Surface { 32 | CheckboxesScreen() 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/TextField/TextFieldScreen.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.TextField 2 | 3 | import androidx.compose.foundation.layout.Box 4 | import androidx.compose.foundation.layout.fillMaxWidth 5 | import androidx.compose.foundation.layout.padding 6 | import androidx.compose.material.MaterialTheme 7 | import androidx.compose.material.Surface 8 | import androidx.compose.runtime.Composable 9 | import androidx.compose.ui.Alignment 10 | import androidx.compose.ui.Modifier 11 | import androidx.compose.ui.tooling.preview.Preview 12 | import androidx.compose.ui.unit.dp 13 | 14 | 15 | @Composable 16 | fun TextFieldScreen() { 17 | Box( 18 | modifier = Modifier 19 | .fillMaxWidth() 20 | .padding(16.dp), 21 | contentAlignment = Alignment.Center 22 | ) { 23 | // Cambia este composable por el que deseas ejecutar 24 | SuffixExample() 25 | } 26 | } 27 | 28 | @Preview("Ejemplos De TextField") 29 | @Composable 30 | fun TextFieldExamples() { 31 | MaterialTheme { 32 | Surface(modifier = Modifier.padding(16.dp)) { 33 | TextFieldScreen() 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Menu/MenusScreen.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.Menu 2 | 3 | import androidx.compose.foundation.layout.fillMaxSize 4 | import androidx.compose.runtime.Composable 5 | import androidx.compose.ui.Modifier 6 | import androidx.compose.ui.tooling.preview.Preview 7 | import com.develou.compose_componentes.examples.Example 8 | import com.develou.compose_componentes.examples.ExampleScreen 9 | import com.develou.compose_componentes.examples.RadioButton.SurfaceForPreview 10 | 11 | @Composable 12 | fun MenusScreen() { 13 | val examples = listOf( 14 | Example("1. Dropdown Menu Simple") { TasksUi() }, 15 | Example("2. Dropdown Menu Items Personalizados") { ImageUi() }, 16 | Example("3. Dropdown Menu Temificado") { ThemedTaskMenu() }, 17 | Example("4. Exposed Dropdown Menu Simple") { PhoneNumberTypeMenu() }, 18 | ) 19 | ExampleScreen( 20 | tutorialTitle = "Menus En Compose", 21 | examples = examples 22 | ) 23 | } 24 | 25 | @Preview 26 | @Composable 27 | fun MenusScreenPreview() { 28 | SurfaceForPreview( 29 | modifier = Modifier.fillMaxSize() 30 | ) { 31 | 32 | MenusScreen() 33 | } 34 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | # Kotlin code style for this project: "official" or "obsolete": 21 | kotlin.code.style=official -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Checkbox/04_DisabledCheckbox.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.Checkbox 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.runtime.mutableStateOf 5 | import androidx.compose.runtime.remember 6 | 7 | @Composable 8 | fun DisabledCheckboxExample() { 9 | val gameReleases = listOf( 10 | "Hitman 3", 11 | "Monster Hunter World: Iceborne", 12 | "Days Gone", 13 | "Pokémon Rumble Rush" 14 | ) 15 | 16 | val options = gameReleases.map { option -> 17 | val checked = remember { mutableStateOf(false) } 18 | Option( 19 | checked = checked.value, 20 | onCheckedChange = { checked.value = it }, 21 | label = option 22 | ) 23 | } 24 | 25 | val numberOfMarks = options.count { it.checked } 26 | 27 | if (numberOfMarks == 2) { 28 | options 29 | .filterNot { option -> option.checked } 30 | .forEach { unchecked -> unchecked.enabled = false } 31 | } 32 | 33 | CheckboxList( 34 | options = options, 35 | listTitle = "En la siguiente lista hay dos videojuegos lanzados en el 2021." + 36 | " Selecciona tus respuestas:" 37 | ) 38 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/FloatingActionButton/02_FABInScaffold.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.FloatingActionButton 2 | 3 | import androidx.compose.foundation.layout.Box 4 | import androidx.compose.foundation.layout.fillMaxSize 5 | import androidx.compose.material.* 6 | import androidx.compose.material.icons.Icons 7 | import androidx.compose.material.icons.filled.Add 8 | import androidx.compose.runtime.Composable 9 | import androidx.compose.ui.Alignment 10 | import androidx.compose.ui.Modifier 11 | 12 | @Composable 13 | fun FABInScaffoldExample() { 14 | Scaffold( 15 | topBar = { 16 | TopAppBar { } 17 | }, 18 | floatingActionButton = { 19 | FloatingActionButton(onClick = { /* Tus acciones */ }) { 20 | Icon( 21 | imageVector = Icons.Default.Add, 22 | contentDescription = "Crear nota" 23 | ) 24 | } 25 | }, 26 | floatingActionButtonPosition = FabPosition.End 27 | ) { 28 | Box( 29 | modifier = Modifier.fillMaxSize(), 30 | contentAlignment = Alignment.Center 31 | ) { 32 | Text("Floating Action Button En Scaffold") 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /p5_gestos/src/main/java/com/develou/compose_gestos/examples/Transformation.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_gestos.examples 2 | 3 | import androidx.compose.foundation.background 4 | import androidx.compose.foundation.gestures.rememberTransformableState 5 | import androidx.compose.foundation.gestures.transformable 6 | import androidx.compose.foundation.layout.Box 7 | import androidx.compose.foundation.layout.fillMaxSize 8 | import androidx.compose.foundation.layout.size 9 | import androidx.compose.runtime.* 10 | import androidx.compose.ui.Alignment 11 | import androidx.compose.ui.Modifier 12 | import androidx.compose.ui.draw.rotate 13 | import androidx.compose.ui.graphics.Color 14 | import androidx.compose.ui.unit.dp 15 | 16 | @Composable 17 | fun RotationExample() { 18 | var rotation by remember { 19 | mutableStateOf(0f) 20 | } 21 | 22 | Box( 23 | modifier = Modifier.fillMaxSize(), 24 | contentAlignment = Alignment.Center 25 | ) { 26 | Box( 27 | modifier = Modifier 28 | .rotate(rotation) 29 | .transformable( 30 | state = rememberTransformableState { _, _, degrees -> 31 | rotation += degrees 32 | }) 33 | .size(150.dp, 300.dp) 34 | .background(Color.Red) 35 | ) 36 | } 37 | } -------------------------------------------------------------------------------- /p3_modificadores/src/main/java/com/develou/compose_modificadores/examples/ChainingExample.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_modificadores.examples 2 | 3 | import androidx.compose.foundation.background 4 | import androidx.compose.foundation.border 5 | import androidx.compose.foundation.layout.Box 6 | import androidx.compose.foundation.layout.Row 7 | import androidx.compose.foundation.layout.padding 8 | import androidx.compose.foundation.layout.size 9 | import androidx.compose.runtime.Composable 10 | import androidx.compose.ui.Modifier 11 | import androidx.compose.ui.tooling.preview.Preview 12 | import androidx.compose.ui.unit.dp 13 | import com.develou.compose_modificadores.blue 14 | import com.develou.compose_modificadores.red 15 | import com.develou.compose_modificadores.yellow 16 | 17 | @Composable 18 | @Preview 19 | fun ChainingExample() { 20 | Row { 21 | Box( 22 | Modifier 23 | .border(2.dp, red) 24 | .background(blue) 25 | .padding(16.dp) 26 | .background(yellow) 27 | .size(100.dp) 28 | ) 29 | 30 | Box( 31 | Modifier 32 | .size(100.dp) 33 | .background(yellow) 34 | .border(2.dp, red) 35 | .padding(16.dp) 36 | .background(blue) 37 | 38 | ) 39 | } 40 | } -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/java/com/develou/compose_layouts/Boxes.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_layouts 2 | 3 | import androidx.compose.foundation.layout.Box 4 | import androidx.compose.foundation.layout.size 5 | import androidx.compose.material.Text 6 | import androidx.compose.runtime.Composable 7 | import androidx.compose.ui.Alignment 8 | import androidx.compose.ui.Modifier 9 | import androidx.compose.ui.tooling.preview.Preview 10 | import androidx.compose.ui.unit.dp 11 | 12 | @Composable 13 | @Preview 14 | fun BoxesExample1() { 15 | Box(Modifier.size(200.dp)) { 16 | Text("A", modifier = aModifier(150)) 17 | Text("B", modifier = bModifier(100)) 18 | Text("C", modifier = cModifier(50)) 19 | } 20 | } 21 | 22 | @Composable 23 | @Preview 24 | fun BoxesExample2() { 25 | Box(Modifier.size(200.dp), contentAlignment = Alignment.BottomCenter) { 26 | Text("C", modifier = cModifier(150)) 27 | Text("B", modifier = bModifier(100)) 28 | Text("A", modifier = aModifier(50)) 29 | } 30 | } 31 | 32 | @Composable 33 | @Preview 34 | fun BoxesExample3() { 35 | Box(Modifier.size(200.dp)) { 36 | Text("A", modifier = aModifier(50).align(Alignment.TopCenter)) 37 | Text("B", modifier = bModifier(50).align(Alignment.CenterStart)) 38 | Text("C", modifier = cModifier(50).align(Alignment.BottomEnd)) 39 | } 40 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Button/ButtonsScreen.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.Button 2 | 3 | import androidx.compose.foundation.background 4 | import androidx.compose.foundation.layout.Box 5 | import androidx.compose.foundation.layout.fillMaxSize 6 | import androidx.compose.foundation.layout.padding 7 | import androidx.compose.material.MaterialTheme 8 | import androidx.compose.material.Surface 9 | import androidx.compose.runtime.Composable 10 | import androidx.compose.ui.Alignment 11 | import androidx.compose.ui.Modifier 12 | import androidx.compose.ui.graphics.Color 13 | import androidx.compose.ui.tooling.preview.Preview 14 | import androidx.compose.ui.unit.dp 15 | 16 | @Composable 17 | fun ButtonsScreen() { 18 | Box( 19 | modifier = Modifier 20 | .fillMaxSize() 21 | .padding(16.dp), 22 | contentAlignment = Alignment.TopCenter 23 | ) { 24 | // Cambia este composable por el que deseas ejecutar 25 | ButtonToggleGroupExample() 26 | } 27 | } 28 | 29 | @Composable 30 | @Preview 31 | fun ButtonsScreenPreview() { 32 | MaterialTheme { 33 | Surface( 34 | modifier = Modifier 35 | .background(Color.White) 36 | .padding(16.dp) 37 | ) { 38 | ButtonsScreen() 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Switch/01_SimpleSwitch.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.Switch 2 | 3 | import androidx.compose.foundation.layout.Box 4 | import androidx.compose.foundation.layout.fillMaxSize 5 | import androidx.compose.foundation.layout.height 6 | import androidx.compose.foundation.layout.width 7 | import androidx.compose.material.Switch 8 | import androidx.compose.runtime.Composable 9 | import androidx.compose.runtime.mutableStateOf 10 | import androidx.compose.runtime.remember 11 | import androidx.compose.ui.Modifier 12 | import androidx.compose.ui.tooling.preview.Preview 13 | import androidx.compose.ui.unit.dp 14 | import com.develou.compose_componentes.examples.RadioButton.SurfaceForPreview 15 | 16 | @Composable 17 | fun SimpleSwitch() { 18 | val isOn = remember { mutableStateOf(true) } 19 | 20 | Switch( 21 | checked = isOn.value, 22 | onCheckedChange = { newState -> isOn.value = newState } 23 | ) 24 | } 25 | 26 | @Composable 27 | fun Example1() { 28 | Box(Modifier.fillMaxSize()) { 29 | SimpleSwitch() 30 | } 31 | } 32 | 33 | @Preview 34 | @Composable 35 | fun Example1Preview() { 36 | SurfaceForPreview( 37 | modifier = Modifier 38 | .width(100.dp) 39 | .height(50.dp) 40 | ) { 41 | Example1() 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Dialog/05_StylingDialogs.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.Dialog 2 | 3 | import androidx.compose.foundation.shape.RoundedCornerShape 4 | import androidx.compose.material.AlertDialog 5 | import androidx.compose.material.ButtonDefaults 6 | import androidx.compose.material.Text 7 | import androidx.compose.material.TextButton 8 | import androidx.compose.runtime.Composable 9 | import androidx.compose.ui.graphics.Color 10 | 11 | @Composable 12 | fun StyledAlertDialog( 13 | bodyText: String, 14 | buttonText: String, 15 | onConfirm: () -> Unit, 16 | onDismiss: () -> Unit 17 | ) { 18 | AlertDialog( 19 | onDismissRequest = onDismiss, 20 | text = { 21 | Text(bodyText) 22 | }, 23 | confirmButton = { 24 | TextButton( 25 | onClick = { 26 | onConfirm() 27 | onDismiss() 28 | }, 29 | colors = ButtonDefaults.textButtonColors(contentColor = Color.White) 30 | ) { 31 | Text(text = buttonText) 32 | } 33 | }, 34 | shape = RoundedCornerShape( 35 | topEndPercent = 50, 36 | bottomStartPercent = 50 37 | ), 38 | backgroundColor = Color(0xFF311b92), 39 | contentColor = Color.White 40 | ) 41 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Dialog/01_AlertDialog.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.Dialog 2 | 3 | import androidx.compose.material.AlertDialog 4 | import androidx.compose.material.Text 5 | import androidx.compose.material.TextButton 6 | import androidx.compose.runtime.Composable 7 | 8 | @Composable 9 | fun TutorialAlertDialog( 10 | titleText: String? = null, 11 | bodyText: String, 12 | confirmButtonText: String, 13 | onConfirm: () -> Unit, 14 | cancelButtonText: String, 15 | onCancel: () -> Unit, 16 | onDismiss: () -> Unit 17 | ) { 18 | val title: @Composable (() -> Unit)? = if (titleText.isNullOrBlank()) 19 | null 20 | else { 21 | { Text(text = titleText) } 22 | } 23 | 24 | AlertDialog( 25 | title = title, 26 | text = { 27 | Text( 28 | text = bodyText 29 | ) 30 | }, 31 | onDismissRequest = onDismiss, 32 | confirmButton = { 33 | TextButton( 34 | onClick = { 35 | onConfirm() 36 | onDismiss() 37 | }) { 38 | Text(text = confirmButtonText) 39 | } 40 | }, 41 | dismissButton = { 42 | TextButton(onClick = { 43 | onCancel() 44 | onDismiss() 45 | }) { 46 | Text(text = cancelButtonText) 47 | } 48 | } 49 | ) 50 | } -------------------------------------------------------------------------------- /p6_temas/src/main/java/com/develou/compose_temas/theme/Typography.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_temas.theme 2 | 3 | import androidx.compose.material.Typography 4 | import androidx.compose.ui.text.TextStyle 5 | import androidx.compose.ui.text.font.Font 6 | import androidx.compose.ui.text.font.FontFamily 7 | import androidx.compose.ui.text.font.FontWeight 8 | import androidx.compose.ui.unit.ExperimentalUnitApi 9 | import androidx.compose.ui.unit.TextUnit 10 | import androidx.compose.ui.unit.TextUnitType 11 | import androidx.compose.ui.unit.sp 12 | import com.develou.compose_temas.R 13 | 14 | val Overlock = FontFamily( 15 | Font(R.font.overlock_regular), 16 | Font(R.font.overlock_bold, FontWeight.Bold) 17 | ) 18 | val Nunito = FontFamily( 19 | Font(R.font.nunito_regular), 20 | Font(R.font.nunito_bold, FontWeight.Bold) 21 | ) 22 | 23 | @OptIn(ExperimentalUnitApi::class) 24 | val ProductsTypography = Typography( 25 | h6 = TextStyle( 26 | fontFamily = Overlock, 27 | fontWeight = FontWeight.SemiBold, 28 | fontSize = 22.sp, 29 | letterSpacing = TextUnit(0.15f, TextUnitType.Sp) 30 | ), 31 | body1 = TextStyle( 32 | fontFamily = Nunito, 33 | fontWeight = FontWeight.Normal, 34 | fontSize = 17.sp, 35 | letterSpacing = TextUnit(0.5f, TextUnitType.Sp) 36 | ), 37 | button = TextStyle( 38 | fontFamily = Nunito, 39 | fontWeight = FontWeight.Medium, 40 | fontSize = 15.sp, 41 | letterSpacing = TextUnit(1.25f, TextUnitType.Sp) 42 | ) 43 | ) -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/RadioButton/06_ColoredRadioButton.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.RadioButton 2 | 3 | import androidx.compose.foundation.layout.fillMaxWidth 4 | import androidx.compose.foundation.layout.padding 5 | import androidx.compose.material.RadioButtonDefaults 6 | import androidx.compose.runtime.Composable 7 | import androidx.compose.runtime.mutableStateOf 8 | import androidx.compose.runtime.remember 9 | import androidx.compose.ui.Modifier 10 | import androidx.compose.ui.graphics.Color 11 | import androidx.compose.ui.unit.dp 12 | 13 | @Composable 14 | fun Example6() { 15 | val isPremium = false 16 | 17 | val templateOptions = listOf( 18 | TemplateOption("Por defecto"), 19 | TemplateOption("Elegante"), 20 | TemplateOption("Audaz"), 21 | TemplateOption("Personalizada", isPremium) 22 | ) 23 | val currentSelection = remember { mutableStateOf(templateOptions.first()) } 24 | 25 | TemplatesSelector( 26 | modifier = Modifier 27 | .padding(16.dp) 28 | .fillMaxWidth(), 29 | options = templateOptions, 30 | selection = currentSelection.value, 31 | onItemClick = { clickedItem -> 32 | currentSelection.value = clickedItem 33 | }, 34 | colors = RadioButtonDefaults.colors( 35 | selectedColor = Color(0xFF0d47a1), 36 | unselectedColor = Color(0xFF2196f3), 37 | disabledColor = Color(0xFFbbdefb) 38 | ) 39 | ) 40 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/FloatingActionButton/FABsScreen.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.FloatingActionButton 2 | 3 | import androidx.compose.foundation.background 4 | import androidx.compose.foundation.layout.Box 5 | import androidx.compose.foundation.layout.fillMaxSize 6 | import androidx.compose.foundation.layout.padding 7 | import androidx.compose.material.MaterialTheme 8 | import androidx.compose.material.Surface 9 | import androidx.compose.runtime.Composable 10 | import androidx.compose.ui.Alignment 11 | import androidx.compose.ui.Modifier 12 | import androidx.compose.ui.graphics.Color 13 | import androidx.compose.ui.tooling.preview.Preview 14 | import androidx.compose.ui.unit.ExperimentalUnitApi 15 | import androidx.compose.ui.unit.dp 16 | 17 | 18 | @ExperimentalUnitApi 19 | @Composable 20 | fun FABsScreen() { 21 | Box( 22 | modifier = Modifier 23 | .fillMaxSize() 24 | .padding(16.dp), 25 | contentAlignment = Alignment.Center 26 | ) { 27 | // Cambia este composable por el que deseas ejecutar 28 | FABTypographyExample() 29 | } 30 | } 31 | 32 | @Composable 33 | fun FABScaffoldScreen(){ 34 | FABInScaffoldExample() 35 | } 36 | 37 | @ExperimentalUnitApi 38 | @Composable 39 | @Preview 40 | fun FABsScreenPreview() { 41 | MaterialTheme { 42 | Surface( 43 | modifier = Modifier 44 | .background(Color.White) 45 | ) { 46 | FABsScreen() 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /p5_gestos/src/main/java/com/develou/compose_gestos/examples/Dragging.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_gestos.examples 2 | 3 | import androidx.compose.foundation.background 4 | import androidx.compose.foundation.gestures.Orientation 5 | import androidx.compose.foundation.gestures.draggable 6 | import androidx.compose.foundation.gestures.rememberDraggableState 7 | import androidx.compose.foundation.layout.Box 8 | import androidx.compose.foundation.layout.fillMaxSize 9 | import androidx.compose.foundation.layout.offset 10 | import androidx.compose.foundation.layout.size 11 | import androidx.compose.foundation.shape.CircleShape 12 | import androidx.compose.runtime.* 13 | import androidx.compose.ui.Alignment 14 | import androidx.compose.ui.Modifier 15 | import androidx.compose.ui.graphics.Color 16 | import androidx.compose.ui.unit.IntOffset 17 | import androidx.compose.ui.unit.dp 18 | 19 | @Composable 20 | fun DraggableExample() { 21 | var offsetY by remember { 22 | mutableStateOf(0f) 23 | } 24 | Box( 25 | modifier = Modifier.fillMaxSize(), 26 | contentAlignment = Alignment.Center 27 | ) { 28 | Box( 29 | modifier = Modifier 30 | .offset { IntOffset(0, offsetY.toInt()) } 31 | .background(Color.Magenta, CircleShape) 32 | .size(50.dp) 33 | .draggable( 34 | orientation = Orientation.Vertical, 35 | state = rememberDraggableState { delta -> 36 | offsetY += delta 37 | }) 38 | ) 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Card/01_CardTypes.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.Card 2 | 3 | import androidx.compose.foundation.BorderStroke 4 | import androidx.compose.foundation.layout.Box 5 | import androidx.compose.foundation.layout.Column 6 | import androidx.compose.foundation.layout.padding 7 | import androidx.compose.foundation.shape.RoundedCornerShape 8 | import androidx.compose.material.Divider 9 | import androidx.compose.runtime.* 10 | import androidx.compose.ui.Modifier 11 | import androidx.compose.ui.graphics.Color 12 | import androidx.compose.ui.unit.dp 13 | 14 | @Composable 15 | fun ElevatedCard() { 16 | StandardCard() 17 | } 18 | 19 | @Composable 20 | fun OutlinedCard() { 21 | StandardCard( 22 | elevation = 0.dp, 23 | border = BorderStroke(1.dp, Color.LightGray), 24 | shape = RoundedCornerShape(16.dp) 25 | ) 26 | } 27 | 28 | @Composable 29 | fun CardTypes() { 30 | val options = listOf("Elevada", "Delineada") 31 | var selection by remember { mutableStateOf(options.first()) } 32 | 33 | Column { 34 | 35 | ConfigSection( 36 | title = "Tipo de card", 37 | options = options, 38 | selection = selection, 39 | onOptionSelected = { selection = it }, 40 | modifier = Modifier.padding(16.dp) 41 | ) 42 | Divider() 43 | 44 | Box(modifier = Modifier.padding(16.dp)) { 45 | when (selection) { 46 | "Elevada" -> ElevatedCard() 47 | "Delineada" -> OutlinedCard() 48 | } 49 | } 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Switch/03_DisabledSwitch.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.Switch 2 | 3 | import androidx.compose.foundation.layout.Column 4 | import androidx.compose.foundation.layout.Spacer 5 | import androidx.compose.foundation.layout.height 6 | import androidx.compose.foundation.layout.padding 7 | import androidx.compose.runtime.Composable 8 | import androidx.compose.runtime.mutableStateOf 9 | import androidx.compose.runtime.remember 10 | import androidx.compose.ui.Modifier 11 | import androidx.compose.ui.tooling.preview.Preview 12 | import androidx.compose.ui.unit.dp 13 | import com.develou.compose_componentes.examples.Checkbox.LabelledCheckbox 14 | import com.develou.compose_componentes.examples.RadioButton.SurfaceForPreview 15 | 16 | @Composable 17 | fun Example3() { 18 | val (isPremium, setIsPremium) = remember { mutableStateOf(false) } 19 | val (notifyWeekly, setNotifyWeekly) = remember { mutableStateOf(false) } 20 | 21 | Column(Modifier.padding(vertical = 16.dp)) { 22 | 23 | LabelledCheckbox( 24 | checked = isPremium, 25 | onCheckedChange = setIsPremium, 26 | label = "¿Usuario premium?" 27 | ) 28 | 29 | Spacer(modifier = Modifier.height(56.dp)) 30 | 31 | LabelledSwitch( 32 | checked = notifyWeekly, 33 | label = "Habilitar informes semanales", 34 | onCheckedChange = setNotifyWeekly, 35 | enabled = isPremium 36 | ) 37 | } 38 | } 39 | 40 | @Composable 41 | @Preview 42 | fun Example3Preview() { 43 | SurfaceForPreview { 44 | Example3() 45 | } 46 | } -------------------------------------------------------------------------------- /p7_componentes/src/test/java/com/develou/compose_componentes/examples/OffsetMappersTest.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples 2 | 3 | import com.develou.compose_componentes.examples.TextField.PrefixOffsetMapping 4 | import com.develou.compose_componentes.examples.TextField.SuffixOffsetMapping 5 | import org.junit.Assert.* 6 | import org.junit.Test 7 | 8 | class OffsetMappersTest{ 9 | 10 | @Test 11 | fun `prefijo de un caracter`(){ 12 | val mapper = PrefixOffsetMapping("$") 13 | assertEquals(0, mapper.transformedToOriginal(0)) 14 | assertEquals(0, mapper.transformedToOriginal(1)) 15 | assertEquals(1, mapper.transformedToOriginal(2)) 16 | } 17 | 18 | @Test 19 | fun `prefijo dos caracteres`(){ 20 | val mapper = PrefixOffsetMapping("Pr") 21 | assertEquals(0, mapper.transformedToOriginal(0)) 22 | assertEquals(0, mapper.transformedToOriginal(1)) 23 | assertEquals(0, mapper.transformedToOriginal(2)) 24 | assertEquals(1, mapper.transformedToOriginal(3)) 25 | } 26 | 27 | @Test 28 | fun `sufijo de un caracter`(){ 29 | val mapper = SuffixOffsetMapping("45") 30 | assertEquals(0, mapper.originalToTransformed(0)) 31 | assertEquals(1, mapper.originalToTransformed(1)) 32 | assertEquals(2, mapper.originalToTransformed(2)) 33 | 34 | assertEquals(0, mapper.transformedToOriginal(0)) 35 | assertEquals(1, mapper.transformedToOriginal(1)) 36 | assertEquals(2, mapper.transformedToOriginal(2)) 37 | assertEquals(2, mapper.transformedToOriginal(3)) 38 | assertEquals(2, mapper.transformedToOriginal(4)) 39 | } 40 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/FloatingActionButton/01_FABTypes.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.FloatingActionButton 2 | 3 | import androidx.compose.foundation.layout.size 4 | import androidx.compose.material.ExtendedFloatingActionButton 5 | import androidx.compose.material.FloatingActionButton 6 | import androidx.compose.material.Icon 7 | import androidx.compose.material.Text 8 | import androidx.compose.material.icons.Icons 9 | import androidx.compose.material.icons.filled.Add 10 | import androidx.compose.material.icons.filled.Share 11 | import androidx.compose.runtime.Composable 12 | import androidx.compose.ui.Modifier 13 | import androidx.compose.ui.unit.dp 14 | 15 | @Composable 16 | fun DefaultFloatingActionButtonExample() { 17 | FloatingActionButton(onClick = { /* Tus acciones */ }) { 18 | Icon(imageVector = Icons.Default.Add, contentDescription = "Crear nota") 19 | } 20 | } 21 | 22 | @Composable 23 | fun MiniFloatingActionButtonExample() { 24 | val miniFabSize = 40.dp 25 | FloatingActionButton( 26 | onClick = { /* Tus acciones */ }, 27 | modifier = Modifier.size(miniFabSize) 28 | ) { 29 | Icon(imageVector = Icons.Default.Add, contentDescription = "Crear nota") 30 | } 31 | } 32 | 33 | @Composable 34 | fun ExtendedFloatingActionButtonExample() { 35 | ExtendedFloatingActionButton( 36 | text = { Text("COMPARTIR") }, 37 | onClick = { /* Tus acciones */ }, 38 | icon = { 39 | Icon( 40 | imageVector = Icons.Default.Share, 41 | contentDescription = "Compartir foto" 42 | ) 43 | }) 44 | } 45 | -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Card/04_ThemingCard.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.Card 2 | 3 | import androidx.compose.foundation.layout.Box 4 | import androidx.compose.foundation.layout.padding 5 | import androidx.compose.foundation.shape.RoundedCornerShape 6 | import androidx.compose.material.MaterialTheme 7 | import androidx.compose.runtime.Composable 8 | import androidx.compose.ui.Modifier 9 | import androidx.compose.ui.graphics.Color 10 | import androidx.compose.ui.text.TextStyle 11 | import androidx.compose.ui.text.font.Font 12 | import androidx.compose.ui.text.font.FontFamily 13 | import androidx.compose.ui.unit.dp 14 | import androidx.compose.ui.unit.sp 15 | import com.develou.compose_componentes.R 16 | 17 | @Composable 18 | fun ThemingCard() { 19 | val Besley = FontFamily(Font(R.font.besley_medium)) 20 | 21 | Box(modifier = Modifier.padding(16.dp)) { 22 | 23 | MaterialTheme( 24 | colors = MaterialTheme.colors.copy( 25 | surface = Color(0xFFFFF8E1), 26 | onSurface = Color(0xFF3e2723) 27 | ), 28 | typography = MaterialTheme.typography.copy( 29 | h6 = TextStyle(fontFamily = Besley, fontSize = 21.sp), 30 | body1 = TextStyle(fontFamily = Besley, fontSize = 16.sp), 31 | body2 = TextStyle(fontFamily = Besley, fontSize = 14.sp), 32 | button = TextStyle(fontFamily = Besley, fontSize = 14.sp) 33 | ), 34 | shapes = MaterialTheme.shapes.copy(medium = RoundedCornerShape(0)) 35 | ) { 36 | StandardCard(elevation = 4.dp) 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/List/05_ThemingList.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.List 2 | 3 | import androidx.compose.foundation.background 4 | import androidx.compose.foundation.layout.Arrangement 5 | import androidx.compose.foundation.layout.PaddingValues 6 | import androidx.compose.foundation.layout.fillMaxSize 7 | import androidx.compose.foundation.lazy.LazyColumn 8 | import androidx.compose.foundation.lazy.items 9 | import androidx.compose.foundation.shape.RoundedCornerShape 10 | import androidx.compose.material.MaterialTheme 11 | import androidx.compose.material.Surface 12 | import androidx.compose.runtime.Composable 13 | import androidx.compose.ui.Modifier 14 | import androidx.compose.ui.graphics.Color 15 | import androidx.compose.ui.unit.dp 16 | 17 | @Composable 18 | fun CustomList() { 19 | val items = List(5) { "Item ${it + 1}" } 20 | 21 | val indigo500 = Color(0xFF3F51B5) 22 | val indigo900 = Color(0xFF1A237E) 23 | MaterialTheme( 24 | colors = MaterialTheme.colors.copy(surface = indigo500, onSurface = Color.White), 25 | ) { 26 | Surface(modifier = Modifier.fillMaxSize()) { 27 | LazyColumn( 28 | contentPadding = PaddingValues(16.dp), 29 | verticalArrangement = Arrangement.spacedBy(16.dp) 30 | ) { 31 | items(items) { item -> 32 | ListItemRow( 33 | item = item, 34 | modifier = Modifier.background( 35 | color = indigo900, 36 | shape = RoundedCornerShape(50) 37 | ) 38 | ) 39 | } 40 | } 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/RadioButton/03_RadioButtonGroup.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.RadioButton 2 | 3 | import androidx.compose.foundation.layout.Column 4 | import androidx.compose.foundation.layout.fillMaxWidth 5 | import androidx.compose.foundation.layout.padding 6 | import androidx.compose.runtime.Composable 7 | import androidx.compose.runtime.mutableStateOf 8 | import androidx.compose.runtime.remember 9 | import androidx.compose.ui.Modifier 10 | import androidx.compose.ui.unit.dp 11 | import com.develou.compose_componentes.examples.List.ListWithColumn 12 | 13 | @Composable 14 | fun RadioGroup( 15 | modifier: Modifier = Modifier, 16 | items: List, 17 | selection: String, 18 | onItemClick: ((String) -> Unit) 19 | ) { 20 | Column(modifier = modifier) { 21 | items.forEach { item -> 22 | LabelledRadioButton( 23 | modifier = Modifier.fillMaxWidth(), 24 | label = item, 25 | selected = item == selection, 26 | onClick = { 27 | onItemClick(item) 28 | } 29 | ) 30 | } 31 | } 32 | } 33 | 34 | @Composable 35 | fun Example3() { 36 | val animalTypes = listOf("Todos", "Perro", "Gato", "Aves") 37 | val currentSelection = remember { mutableStateOf(animalTypes.first()) } 38 | ListWithColumn(items = List(10) { "Item $it" }) 39 | RadioGroup( 40 | modifier = Modifier 41 | .padding(16.dp) 42 | .fillMaxWidth(), 43 | items = animalTypes, 44 | selection = currentSelection.value, 45 | onItemClick = { clickedItem -> 46 | currentSelection.value = clickedItem 47 | } 48 | ) 49 | } -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/java/com/develou/compose_layouts/Rows.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_layouts 2 | 3 | import androidx.compose.foundation.layout.Arrangement 4 | import androidx.compose.foundation.layout.Row 5 | import androidx.compose.foundation.layout.size 6 | import androidx.compose.material.Text 7 | import androidx.compose.runtime.Composable 8 | import androidx.compose.ui.Alignment 9 | import androidx.compose.ui.Modifier 10 | import androidx.compose.ui.tooling.preview.Preview 11 | import androidx.compose.ui.unit.dp 12 | 13 | @Composable 14 | @Preview 15 | fun RowsExample1() { 16 | Row(Modifier.size(200.dp)) { 17 | Text("A", modifier = aModifier(50)) 18 | Text("B", modifier = bModifier(50)) 19 | Text("C", modifier = cModifier(50)) 20 | } 21 | } 22 | 23 | @Composable 24 | @Preview 25 | fun RowsExample2() { 26 | Row(Modifier.size(200.dp)) { 27 | Text("A", modifier = aModifier(50).weight(2.0f)) 28 | Text("B", modifier = bModifier(50).weight(5.0f)) 29 | Text("C", modifier = cModifier(50).weight(8.0f)) 30 | } 31 | } 32 | 33 | @Composable 34 | @Preview 35 | fun RowsExample3() { 36 | Row( 37 | Modifier.size(200.dp), 38 | verticalAlignment = Alignment.Bottom, 39 | horizontalArrangement = Arrangement.Center 40 | ) { 41 | Text("A", modifier = aModifier(50)) 42 | Text("B", modifier = bModifier(50)) 43 | Text("C", modifier = cModifier(50)) 44 | } 45 | } 46 | 47 | @Composable 48 | @Preview 49 | fun RowsExample4() { 50 | Row(Modifier.size(200.dp)) { 51 | Text("A", modifier = aModifier(50)) 52 | Text("B", modifier = aModifier(50).align(Alignment.CenterVertically)) 53 | Text("C", modifier = bModifier(50).align(Alignment.Bottom)) 54 | } 55 | } -------------------------------------------------------------------------------- /p1_inicio/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | id 'kotlin-android' 4 | } 5 | 6 | android { 7 | compileSdk project.compileSdk 8 | 9 | defaultConfig { 10 | applicationId "com.develou.compose_inicio" 11 | minSdk project.minSdk 12 | targetSdk project.targetSdk 13 | versionCode 1 14 | versionName "1.0" 15 | 16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 17 | } 18 | 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | compileOptions { 26 | sourceCompatibility JavaVersion.VERSION_1_8 27 | targetCompatibility JavaVersion.VERSION_1_8 28 | } 29 | 30 | kotlinOptions { 31 | jvmTarget = '1.8' 32 | } 33 | 34 | buildFeatures { 35 | compose true 36 | } 37 | 38 | composeOptions { 39 | kotlinCompilerExtensionVersion compose_version 40 | } 41 | namespace 'com.develou.compose_inicio' 42 | } 43 | 44 | dependencies { 45 | 46 | // Jetpack Compose 47 | implementation "androidx.compose.ui:ui:$compose_version" 48 | implementation "androidx.compose.material:material:$compose_version" 49 | implementation "androidx.compose.ui:ui-tooling:$compose_version" 50 | implementation "androidx.activity:activity-compose:$activityCompose" 51 | 52 | implementation "androidx.core:core-ktx:$androidCoreKtx" 53 | implementation "androidx.appcompat:appcompat:$appCompat" 54 | implementation "com.google.android.material:material:$material" 55 | 56 | testImplementation 'junit:junit:4.13.2' 57 | androidTestImplementation 'androidx.test.ext:junit:1.1.3' 58 | } -------------------------------------------------------------------------------- /p2_layouts_standard/src/main/java/com/develou/compose_layouts/Columns.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_layouts 2 | 3 | import androidx.compose.foundation.layout.Arrangement 4 | import androidx.compose.foundation.layout.Column 5 | import androidx.compose.foundation.layout.size 6 | import androidx.compose.material.Text 7 | import androidx.compose.runtime.Composable 8 | import androidx.compose.ui.Alignment 9 | import androidx.compose.ui.Modifier 10 | import androidx.compose.ui.tooling.preview.Preview 11 | import androidx.compose.ui.unit.dp 12 | 13 | @Composable 14 | @Preview 15 | fun ColumnsExample1() { 16 | Column(Modifier.size(200.dp)) { 17 | Text("A", aModifier(50)) 18 | Text("B", bModifier(50)) 19 | Text("C", cModifier(50)) 20 | } 21 | } 22 | 23 | @Composable 24 | @Preview 25 | fun ColumnsExample2() { 26 | Column( 27 | Modifier.size(200.dp), 28 | verticalArrangement = Arrangement.Center, 29 | horizontalAlignment = Alignment.CenterHorizontally 30 | ) { 31 | Text("A", aModifier(50)) 32 | Text("B", bModifier(50)) 33 | Text("C", cModifier(50)) 34 | } 35 | } 36 | 37 | @Composable 38 | @Preview 39 | fun ColumnsExample3() { 40 | Column( 41 | Modifier.size(200.dp) 42 | ) { 43 | Text("A", modifier = aModifier(50)) 44 | Text("B", modifier = bModifier(50).align(Alignment.CenterHorizontally)) 45 | Text("C", modifier = cModifier(50).align(Alignment.End)) 46 | } 47 | } 48 | 49 | @Composable 50 | @Preview 51 | fun ColumnsExample4() { 52 | Column( 53 | Modifier.size(200.dp) 54 | ) { 55 | Text("A", modifier = aModifier(50).weight(1.0f)) 56 | Text("B", modifier = bModifier(50).weight(2.0f)) 57 | Text("C", modifier = cModifier(50).weight(3.0f)) 58 | } 59 | } -------------------------------------------------------------------------------- /p2_layouts_standard/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | id 'kotlin-android' 4 | } 5 | 6 | android { 7 | compileSdk project.compileSdk 8 | 9 | defaultConfig { 10 | applicationId "com.develou.compose_layouts" 11 | minSdk project.minSdk 12 | targetSdk project.targetSdk 13 | versionCode 1 14 | versionName "1.0" 15 | 16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 17 | } 18 | 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | compileOptions { 26 | sourceCompatibility JavaVersion.VERSION_1_8 27 | targetCompatibility JavaVersion.VERSION_1_8 28 | } 29 | 30 | kotlinOptions { 31 | jvmTarget = '1.8' 32 | } 33 | 34 | buildFeatures { 35 | compose true 36 | } 37 | 38 | composeOptions { 39 | kotlinCompilerExtensionVersion compose_version 40 | } 41 | namespace 'com.develou.compose_layouts' 42 | } 43 | 44 | dependencies { 45 | 46 | // Jetpack Compose 47 | implementation "androidx.compose.ui:ui:$compose_version" 48 | implementation "androidx.compose.material:material:$compose_version" 49 | implementation "androidx.compose.ui:ui-tooling:$compose_version" 50 | implementation "androidx.activity:activity-compose:$activityCompose" 51 | 52 | implementation "androidx.core:core-ktx:$androidCoreKtx" 53 | implementation "androidx.appcompat:appcompat:$appCompat" 54 | implementation "com.google.android.material:material:$material" 55 | 56 | testImplementation 'junit:junit:4.13.2' 57 | androidTestImplementation 'androidx.test.ext:junit:1.1.3' 58 | } -------------------------------------------------------------------------------- /p3_modificadores/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | id 'kotlin-android' 4 | } 5 | 6 | android { 7 | compileSdk project.compileSdk 8 | 9 | defaultConfig { 10 | applicationId "com.develou.compose_modificadores" 11 | minSdk project.minSdk 12 | targetSdk project.targetSdk 13 | versionCode 1 14 | versionName "1.0" 15 | 16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 17 | } 18 | 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | compileOptions { 26 | sourceCompatibility JavaVersion.VERSION_1_8 27 | targetCompatibility JavaVersion.VERSION_1_8 28 | } 29 | 30 | kotlinOptions { 31 | jvmTarget = '1.8' 32 | } 33 | 34 | buildFeatures { 35 | compose true 36 | } 37 | 38 | composeOptions { 39 | kotlinCompilerExtensionVersion compose_version 40 | } 41 | namespace 'com.develou.compose_layouts' 42 | } 43 | 44 | dependencies { 45 | 46 | // Jetpack Compose 47 | implementation "androidx.compose.ui:ui:$compose_version" 48 | implementation "androidx.compose.material:material:$compose_version" 49 | implementation "androidx.compose.ui:ui-tooling:$compose_version" 50 | implementation "androidx.activity:activity-compose:$activityCompose" 51 | 52 | implementation "androidx.core:core-ktx:$androidCoreKtx" 53 | implementation "androidx.appcompat:appcompat:$appCompat" 54 | implementation "com.google.android.material:material:$material" 55 | 56 | testImplementation 'junit:junit:4.13.2' 57 | androidTestImplementation 'androidx.test.ext:junit:1.1.3' 58 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/TextField/07Style.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.TextField 2 | 3 | import androidx.compose.foundation.border 4 | import androidx.compose.foundation.shape.CutCornerShape 5 | import androidx.compose.foundation.shape.ZeroCornerSize 6 | import androidx.compose.material.ContentAlpha 7 | import androidx.compose.material.Text 8 | import androidx.compose.material.TextField 9 | import androidx.compose.material.TextFieldDefaults 10 | import androidx.compose.runtime.* 11 | import androidx.compose.ui.Modifier 12 | import androidx.compose.ui.graphics.Color 13 | import androidx.compose.ui.text.TextStyle 14 | import androidx.compose.ui.text.font.Font 15 | import androidx.compose.ui.text.font.FontFamily 16 | import androidx.compose.ui.unit.dp 17 | import com.develou.compose_componentes.R 18 | 19 | @Composable 20 | fun TextFieldStyleExample() { 21 | var nameOnCard by remember { 22 | mutableStateOf("Américo Vespucio") 23 | } 24 | 25 | val fontFamily = FontFamily(Font(R.font.playfairdisplay_regular)) 26 | val color = Color(0xFF120524) 27 | val shape = CutCornerShape(ZeroCornerSize) 28 | 29 | TextField( 30 | value = nameOnCard, 31 | onValueChange = { nameOnCard = it }, 32 | label = { Text("Nombre en la tarjeta") }, 33 | textStyle = TextStyle(fontFamily = fontFamily), 34 | colors = TextFieldDefaults.textFieldColors( 35 | textColor = color, 36 | backgroundColor = Color.White, 37 | focusedLabelColor = color.copy(alpha = ContentAlpha.high), 38 | focusedIndicatorColor = Color.Transparent, 39 | cursorColor = color, 40 | ), 41 | shape = shape, 42 | modifier = Modifier.border(1.dp, color) 43 | ) 44 | } -------------------------------------------------------------------------------- /p7_componentes/src/main/java/com/develou/compose_componentes/examples/Checkbox/03_CheckboxList.kt: -------------------------------------------------------------------------------- 1 | package com.develou.compose_componentes.examples.Checkbox 2 | 3 | import androidx.compose.foundation.layout.Column 4 | import androidx.compose.foundation.layout.Spacer 5 | import androidx.compose.foundation.layout.size 6 | import androidx.compose.material.Text 7 | import androidx.compose.runtime.Composable 8 | import androidx.compose.runtime.mutableStateOf 9 | import androidx.compose.runtime.remember 10 | import androidx.compose.ui.Modifier 11 | import androidx.compose.ui.text.style.TextAlign 12 | import androidx.compose.ui.unit.dp 13 | 14 | data class Option( 15 | var checked: Boolean, 16 | var onCheckedChange: (Boolean) -> Unit = {}, 17 | val label: String, 18 | var enabled: Boolean = true 19 | ) 20 | 21 | @Composable 22 | fun CheckboxList(options: List