├── app ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── 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 │ │ ├── layout │ │ │ ├── content_main.xml │ │ │ ├── fragment_time_dialog_demo.xml │ │ │ ├── fragment_color_dialog_demo.xml │ │ │ ├── fragment_date_dialog_demo.xml │ │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ ├── drawable │ │ │ ├── round_rectangle.xml │ │ │ ├── ic_date.xml │ │ │ ├── dlg_icon.xml │ │ │ ├── ic_time.xml │ │ │ ├── ic_color.xml │ │ │ └── ic_launcher_background.xml │ │ ├── values │ │ │ ├── colors.xml │ │ │ ├── themes.xml │ │ │ └── strings.xml │ │ ├── menu │ │ │ └── nav_menu.xml │ │ ├── values-night │ │ │ └── themes.xml │ │ └── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ └── com │ │ │ └── coderz │ │ │ └── f1 │ │ │ └── customdialogssample │ │ │ ├── DateDialogDemo.java │ │ │ ├── TimeDialogDemo.java │ │ │ ├── ColorDialogDemo.java │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── .idea ├── .name ├── .gitignore ├── compiler.xml ├── vcs.xml ├── migrations.xml ├── deploymentTargetSelector.xml ├── deploymentTargetDropDown.xml ├── gradle.xml ├── runConfigurations.xml └── misc.xml ├── CustomDialogs ├── .gitignore ├── consumer-rules.pro ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ ├── res │ │ ├── drawable │ │ │ ├── colordialog_copy.png │ │ │ ├── colordialog_paste.png │ │ │ ├── colordialog_thumb.9.png │ │ │ ├── colordialog_huepalette.png │ │ │ ├── colordialog_checkerboard.png │ │ │ ├── colordialog_blue.xml │ │ │ ├── colordialog_green.xml │ │ │ ├── colordialog_red.xml │ │ │ ├── round_rectangle.xml │ │ │ ├── bottomsheet_background.xml │ │ │ ├── dialog_button.xml │ │ │ ├── list_selector_background_transition_holo_dark.xml │ │ │ ├── list_selector_background_transition_holo_light.xml │ │ │ ├── item_background_holo_dark.xml │ │ │ └── item_background_holo_light.xml │ │ ├── drawable-hdpi │ │ │ ├── list_focused_holo.9.png │ │ │ ├── list_longpressed_holo.9.png │ │ │ ├── list_pressed_holo_dark.9.png │ │ │ ├── list_pressed_holo_light.9.png │ │ │ ├── list_selector_disabled_holo_dark.9.png │ │ │ ├── list_selector_disabled_holo_light.9.png │ │ │ └── np_numberpicker_selection_divider.9.png │ │ ├── drawable-mdpi │ │ │ ├── list_focused_holo.9.png │ │ │ ├── list_longpressed_holo.9.png │ │ │ ├── list_pressed_holo_dark.9.png │ │ │ ├── list_pressed_holo_light.9.png │ │ │ ├── list_selector_disabled_holo_dark.9.png │ │ │ ├── list_selector_disabled_holo_light.9.png │ │ │ ├── np_numberpicker_selection_divider.9.png │ │ │ ├── input_dialog_edit_text_field_background.xml │ │ │ └── clear.xml │ │ ├── drawable-xhdpi │ │ │ ├── list_focused_holo.9.png │ │ │ ├── list_longpressed_holo.9.png │ │ │ ├── list_pressed_holo_dark.9.png │ │ │ ├── list_pressed_holo_light.9.png │ │ │ ├── list_selector_disabled_holo_dark.9.png │ │ │ ├── list_selector_disabled_holo_light.9.png │ │ │ └── np_numberpicker_selection_divider.9.png │ │ ├── ids.xml │ │ ├── values │ │ │ ├── ids.xml │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── themes.xml │ │ └── layout │ │ │ ├── number_picker_with_selector_wheel.xml │ │ │ ├── timepickerdialog_main.xml │ │ │ ├── datepickerdialog_main.xml │ │ │ ├── textinputdialog_main.xml │ │ │ ├── colordialog_color_palette.xml │ │ │ ├── colordialog_rgb.xml │ │ │ └── colordialog_color_picker.xml │ │ └── java │ │ ├── utils │ │ └── Utils.java │ │ └── com │ │ └── coderz │ │ └── f1 │ │ └── customdialogs │ │ ├── datetimedialogs │ │ ├── utils │ │ │ └── Utils.java │ │ ├── TimePickerDialog.java │ │ ├── DatePickerDialog.java │ │ └── custom_views │ │ │ └── Scroller.java │ │ ├── inputdialogs │ │ └── TextInputDialog.java │ │ ├── colordialog │ │ └── utils │ │ │ └── Utils.java │ │ └── BaseDialog.java ├── proguard-rules.pro └── build.gradle ├── version.properties ├── jitpack.yml ├── updateversion.pdb ├── Newtonsoft.Json.dll ├── git_commit_push.bat ├── hello.c ├── ref └── updateversion.dll ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── readme_images ├── thumbnail_for_linkedin.png ├── colordialog_screenshot1.png ├── colordialog_screenshot2.png ├── build.svg ├── build_source.svg └── min_sdk.svg ├── updateversion.runtimeconfig.json ├── .gitignore ├── custom-dialogs └── src │ ├── main │ └── java │ │ └── io │ │ └── github │ │ └── therandomcrafter83 │ │ └── App.java │ └── test │ └── java │ └── io │ └── github │ └── therandomcrafter83 │ └── AppTest.java ├── settings.gradle ├── updateversion.runtimeconfig.dev.json ├── updateversion.deps.json ├── gradle.properties ├── scripts └── publish-root.gradle ├── gradlew.bat ├── README.md ├── gradlew ├── commit_log.log └── LICENSE /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | Custom Dialogs Sample -------------------------------------------------------------------------------- /CustomDialogs/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /CustomDialogs/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /version.properties: -------------------------------------------------------------------------------- 1 | VERSION_BUILD_MAJOR=2 2 | VERSION_BUILD_MINOR=4 -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /jitpack.yml: -------------------------------------------------------------------------------- 1 | jdk: 2 | - openjdk11 3 | before_install: 4 | - ./scripts/prepareJitpackEnvironment.sh -------------------------------------------------------------------------------- /updateversion.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/updateversion.pdb -------------------------------------------------------------------------------- /Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /git_commit_push.bat: -------------------------------------------------------------------------------- 1 | git status 2 | git add --all 3 | git commit 4 | git log > commit_log.log 5 | git push -------------------------------------------------------------------------------- /hello.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | printf("Hello World!\n"); 6 | return 0; 7 | } -------------------------------------------------------------------------------- /ref/updateversion.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/ref/updateversion.dll -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /readme_images/thumbnail_for_linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/readme_images/thumbnail_for_linkedin.png -------------------------------------------------------------------------------- /readme_images/colordialog_screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/readme_images/colordialog_screenshot1.png -------------------------------------------------------------------------------- /readme_images/colordialog_screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/readme_images/colordialog_screenshot2.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /CustomDialogs/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable/colordialog_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable/colordialog_copy.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable/colordialog_paste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable/colordialog_paste.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable/colordialog_thumb.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable/colordialog_thumb.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable/colordialog_huepalette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable/colordialog_huepalette.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-hdpi/list_focused_holo.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-hdpi/list_focused_holo.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-mdpi/list_focused_holo.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-mdpi/list_focused_holo.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-xhdpi/list_focused_holo.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-xhdpi/list_focused_holo.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable/colordialog_checkerboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable/colordialog_checkerboard.png -------------------------------------------------------------------------------- /updateversion.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "net5.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "5.0.0" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-hdpi/list_longpressed_holo.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-hdpi/list_longpressed_holo.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-hdpi/list_pressed_holo_dark.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-hdpi/list_pressed_holo_dark.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-hdpi/list_pressed_holo_light.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-hdpi/list_pressed_holo_light.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-mdpi/list_longpressed_holo.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-mdpi/list_longpressed_holo.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-mdpi/list_pressed_holo_dark.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-mdpi/list_pressed_holo_dark.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-mdpi/list_pressed_holo_light.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-mdpi/list_pressed_holo_light.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-xhdpi/list_longpressed_holo.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-xhdpi/list_longpressed_holo.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-xhdpi/list_pressed_holo_dark.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-xhdpi/list_pressed_holo_dark.9.png -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-xhdpi/list_pressed_holo_light.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-xhdpi/list_pressed_holo_light.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-hdpi/list_selector_disabled_holo_dark.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-hdpi/list_selector_disabled_holo_dark.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-hdpi/list_selector_disabled_holo_light.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-hdpi/list_selector_disabled_holo_light.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-hdpi/np_numberpicker_selection_divider.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-hdpi/np_numberpicker_selection_divider.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-mdpi/list_selector_disabled_holo_dark.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-mdpi/list_selector_disabled_holo_dark.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-mdpi/list_selector_disabled_holo_light.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-mdpi/list_selector_disabled_holo_light.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-mdpi/np_numberpicker_selection_divider.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-mdpi/np_numberpicker_selection_divider.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-xhdpi/list_selector_disabled_holo_dark.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-xhdpi/list_selector_disabled_holo_dark.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-xhdpi/list_selector_disabled_holo_light.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-xhdpi/list_selector_disabled_holo_light.9.png -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-xhdpi/np_numberpicker_selection_divider.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRandomCrafter83/CustomDialogs/HEAD/CustomDialogs/src/main/res/drawable-xhdpi/np_numberpicker_selection_divider.9.png -------------------------------------------------------------------------------- /app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable/colordialog_blue.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable/colordialog_green.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable/colordialog_red.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /.idea/migrations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /custom-dialogs/src/main/java/io/github/therandomcrafter83/App.java: -------------------------------------------------------------------------------- 1 | package io.github.therandomcrafter83; 2 | 3 | /** 4 | * Hello world! 5 | * 6 | */ 7 | public class App 8 | { 9 | public static void main( String[] args ) 10 | { 11 | System.out.println( "Hello World!" ); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/round_rectangle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable/round_rectangle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable/bottomsheet_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /.idea/deploymentTargetSelector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /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 = "Custom Dialogs Sample" 10 | include ':app' 11 | include ':CustomDialogs' 12 | -------------------------------------------------------------------------------- /updateversion.runtimeconfig.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "additionalProbingPaths": [ 4 | "C:\\Users\\willi\\.dotnet\\store\\|arch|\\|tfm|", 5 | "C:\\Users\\willi\\.nuget\\packages", 6 | "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", 7 | "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet" 8 | ] 9 | } 10 | } -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-mdpi/input_dialog_edit_text_field_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable-mdpi/clear.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /custom-dialogs/src/test/java/io/github/therandomcrafter83/AppTest.java: -------------------------------------------------------------------------------- 1 | package io.github.therandomcrafter83; 2 | 3 | import static org.junit.Assert.assertTrue; 4 | 5 | import org.junit.Test; 6 | 7 | /** 8 | * Unit test for simple App. 9 | */ 10 | public class AppTest 11 | { 12 | /** 13 | * Rigorous Test :-) 14 | */ 15 | @Test 16 | public void shouldAnswerWithTrue() 17 | { 18 | assertTrue( true ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /updateversion.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETCoreApp,Version=v5.0", 4 | "signature": "" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETCoreApp,Version=v5.0": { 9 | "updateversion/1.0.0": { 10 | "runtime": { 11 | "updateversion.dll": {} 12 | } 13 | } 14 | } 15 | }, 16 | "libraries": { 17 | "updateversion/1.0.0": { 18 | "type": "project", 19 | "serviceable": false, 20 | "sha512": "" 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable/dialog_button.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_date.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/dlg_icon.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/java/utils/Utils.java: -------------------------------------------------------------------------------- 1 | package utils; 2 | 3 | import android.graphics.Color; 4 | import android.graphics.drawable.Drawable; 5 | 6 | import androidx.annotation.ColorInt; 7 | 8 | public class Utils { 9 | public static Drawable getDialogBackgroundDrawable(@ColorInt int backgroundColor){ 10 | android.graphics.drawable.GradientDrawable gd = new android.graphics.drawable.GradientDrawable(); 11 | gd.setCornerRadius(20); 12 | gd.setColor(backgroundColor); 13 | gd.setStroke(2, Color.BLACK); 14 | return gd; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_time.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/coderz/f1/customdialogssample/DateDialogDemo.java: -------------------------------------------------------------------------------- 1 | package com.coderz.f1.customdialogssample; 2 | 3 | import android.os.Bundle; 4 | 5 | import androidx.fragment.app.Fragment; 6 | 7 | import android.view.LayoutInflater; 8 | import android.view.View; 9 | import android.view.ViewGroup; 10 | 11 | public class DateDialogDemo extends Fragment { 12 | 13 | @Override 14 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 15 | 16 | 17 | return inflater.inflate(R.layout.fragment_date_dialog_demo, container, false); 18 | } 19 | } -------------------------------------------------------------------------------- /.idea/deploymentTargetDropDown.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/menu/nav_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 13 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/coderz/f1/customdialogssample/TimeDialogDemo.java: -------------------------------------------------------------------------------- 1 | package com.coderz.f1.customdialogssample; 2 | 3 | import android.os.Bundle; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | 8 | import androidx.annotation.NonNull; 9 | import androidx.annotation.Nullable; 10 | import androidx.fragment.app.Fragment; 11 | 12 | public class TimeDialogDemo extends Fragment { 13 | 14 | @Override 15 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | return inflater.inflate(R.layout.fragment_time_dialog_demo,container,false); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_time_dialog_demo.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | -------------------------------------------------------------------------------- /app/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 -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_color.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_color_dialog_demo.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 18 | -------------------------------------------------------------------------------- /CustomDialogs/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 -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /readme_images/build.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | build 13 | build 14 | 2.4 15 | 2.4 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /readme_images/build_source.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | build 13 | build 14 | %VERSION% 15 | %VERSION% 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_date_dialog_demo.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 20 | 21 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable/list_selector_background_transition_holo_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable/list_selector_background_transition_holo_light.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /readme_images/min_sdk.svg: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Min SDK 14 | Min SDK 15 | 21 16 | 21 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #2D4357 5 | #56687C 6 | #2D4357 7 | #ffffff 8 | #C1C6D6 9 | #C1C6D6 10 | 11 | #C8380C 12 | 13 | 14 | #8BA3B6 15 | #303E4A 16 | #202A3A 17 | #ffffff 18 | #17181B 19 | #97000000 20 | #00000000 21 | 22 | #FF000000 23 | -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Custom Dialogs Sample 3 | Palette 4 | RGB 5 | Hue Palette 6 | Opacity 7 | Saturation 8 | Brightness 9 | Red 10 | Green 11 | Blue 12 | Alpha 13 | Cancel 14 | Ok 15 | January,February,March,April,May,June,July,August,September,October,November,December 16 | Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec 17 | 1,2,3,4,5,6,7,8,9,10,11,12 18 | TitlePlaceholder 19 | MessagePlaceHolder 20 | Enter your input 21 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/java/com/coderz/f1/customdialogs/datetimedialogs/utils/Utils.java: -------------------------------------------------------------------------------- 1 | package com.coderz.f1.customdialogs.datetimedialogs.utils; 2 | 3 | import android.content.Context; 4 | import android.content.res.Resources; 5 | import android.graphics.Color; 6 | import android.graphics.DashPathEffect; 7 | import android.graphics.Paint; 8 | import android.graphics.drawable.ColorDrawable; 9 | import android.graphics.drawable.ShapeDrawable; 10 | import android.graphics.drawable.shapes.RectShape; 11 | import android.os.Build; 12 | import android.util.Log; 13 | import android.util.TypedValue; 14 | import android.view.View; 15 | import android.widget.EditText; 16 | import android.widget.LinearLayout; 17 | import android.widget.NumberPicker; 18 | import android.widget.TextView; 19 | 20 | import androidx.annotation.ColorInt; 21 | 22 | import java.lang.reflect.Field; 23 | 24 | public class Utils { 25 | public static int getContrast(int color) { 26 | int y = (299 * Color.red(color) + 587 * Color.green(color) + 114 * Color.blue(color)) / 1000; 27 | return y >= 128 ? Color.BLACK : Color.WHITE; 28 | } 29 | 30 | 31 | public static int spToPx(float sp, Context context) { 32 | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, sp, context.getResources().getDisplayMetrics()); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | } 4 | 5 | android { 6 | compileSdk 31 7 | 8 | defaultConfig { 9 | applicationId "com.coderz.f1.customdialogssample" 10 | minSdk 21 11 | targetSdk 34 12 | versionCode 1 13 | versionName "1.0" 14 | 15 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 16 | minSdkVersion 21 17 | targetSdkVersion 34 18 | } 19 | 20 | buildTypes { 21 | release { 22 | minifyEnabled false 23 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 24 | } 25 | } 26 | compileOptions { 27 | sourceCompatibility JavaVersion.VERSION_11 28 | targetCompatibility JavaVersion.VERSION_11 29 | } 30 | namespace 'com.coderz.f1.customdialogssample' 31 | } 32 | 33 | dependencies { 34 | 35 | implementation 'androidx.appcompat:appcompat:1.4.0' 36 | implementation 'com.google.android.material:material:1.4.0' 37 | implementation 'androidx.constraintlayout:constraintlayout:2.1.2' 38 | implementation project(path: ':CustomDialogs') 39 | implementation 'androidx.legacy:legacy-support-v4:1.0.0' 40 | implementation 'androidx.navigation:navigation-fragment:2.3.5' 41 | implementation 'androidx.navigation:navigation-ui:2.3.5' 42 | 43 | 44 | } -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/layout/number_picker_with_selector_wheel.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Custom Dialogs Sample 3 | Show Color Dialog 4 | Color Dialog Demonstration 5 | Date Dialog Demonstration 6 | Show Date Dialog 7 | Show Time Dialog 8 | Time Dialog Demonstration 9 | User canceled the dialog. 10 | User canceled date selection. 11 | User canceled the selection. 12 | Color Dialog Result Here 13 | Date Dialog Result Here 14 | Time Dialog Result Here 15 | 16 | Hello blank fragment 17 | Temporary Text 18 | Color Dialog Demo 19 | Date Dialog Demo 20 | Time Dialog Demo 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/coderz/f1/customdialogssample/ColorDialogDemo.java: -------------------------------------------------------------------------------- 1 | package com.coderz.f1.customdialogssample; 2 | 3 | import android.graphics.Color; 4 | import android.os.Bundle; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.widget.TextView; 9 | 10 | import androidx.fragment.app.Fragment; 11 | 12 | import com.coderz.f1.customdialogs.colordialog.ColorDialog; 13 | 14 | public class ColorDialogDemo extends Fragment { 15 | 16 | @Override 17 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 18 | View content =inflater.inflate(R.layout.fragment_color_dialog_demo, container, false); 19 | TextView tv = content.findViewById(R.id.tester); 20 | tv.setClickable(true); 21 | tv.setOnClickListener(new View.OnClickListener() { 22 | @Override 23 | public void onClick(View v) { 24 | ColorDialog cd = new ColorDialog(inflater.getContext(), new ColorDialog.DialogResponseListener() { 25 | @Override 26 | public void onOkClicked(ColorDialog.ReturnResult result) { 27 | 28 | } 29 | 30 | @Override 31 | public void onCancelClicked() { 32 | 33 | } 34 | }); 35 | cd.setBackgroundColor(Color.RED); 36 | cd.setShowAsBottomSheet(true); 37 | cd.setDialogContentBackgroundColor(Color.BLUE); 38 | cd.showDialog(); 39 | 40 | } 41 | }); 42 | 43 | return content; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 21 | 22 | 31 | 32 | 42 | 43 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable/item_background_holo_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/drawable/item_background_holo_light.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/layout/timepickerdialog_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 22 | 23 | 33 | 34 | 45 | 46 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/layout/datepickerdialog_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 22 | 23 | 33 | 34 | 45 | 46 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/java/com/coderz/f1/customdialogs/inputdialogs/TextInputDialog.java: -------------------------------------------------------------------------------- 1 | package com.coderz.f1.customdialogs.inputdialogs; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import com.coderz.f1.customdialogs.R; 8 | import androidx.annotation.NonNull; 9 | import androidx.constraintlayout.widget.ConstraintLayout; 10 | 11 | import com.coderz.f1.customdialogs.BaseDialog; 12 | import com.coderz.f1.customdialogs.databinding.TextinputdialogMainBinding; 13 | import com.coderz.f1.customdialogs.datetimedialogs.DatePickerDialog; 14 | 15 | import java.util.Calendar; 16 | 17 | public class TextInputDialog extends BaseDialog implements BaseDialog.DialogResponseListener{ 18 | public interface DialogResponseListener { 19 | void onOkClicked(TextInputDialog.ReturnResult result); 20 | void onCancelClicked(); 21 | } 22 | public static class ReturnResult{ 23 | private String mEnteredText; 24 | 25 | public String getEnteredText() { 26 | return mEnteredText; 27 | } 28 | 29 | public ReturnResult(String enteredText) { 30 | this.mEnteredText = enteredText; 31 | } 32 | } 33 | 34 | private final Context context; 35 | private TextinputdialogMainBinding binding; 36 | private final DialogResponseListener listener; 37 | 38 | public TextInputDialog(@NonNull Context context, DialogResponseListener listener) { 39 | super(context); 40 | this.context = context; 41 | baseListener = this; 42 | this.listener = listener; 43 | } 44 | 45 | @Override 46 | protected View getContent(ViewGroup parent) { 47 | return content(parent); 48 | } 49 | 50 | private ConstraintLayout content(ViewGroup parent){ 51 | LayoutInflater inflater = LayoutInflater.from(context); 52 | binding = TextinputdialogMainBinding.inflate(inflater,parent,false); 53 | 54 | return binding.getRoot(); 55 | } 56 | 57 | @Override 58 | public void onOkClicked() { 59 | listener.onOkClicked(new ReturnResult(binding.textViewUserInput.getText().toString())); 60 | } 61 | 62 | @Override 63 | public void onCancelClicked() { 64 | 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /scripts/publish-root.gradle: -------------------------------------------------------------------------------- 1 | // Create variables with empty default values 2 | ext["ossrhUsername"] = '' 3 | ext["ossrhPassword"] = '' 4 | ext["sonatypeStagingProfileId"] = '' 5 | ext["signing.keyId"] = '' 6 | ext["signing.password"] = '' 7 | ext["signing.key"] = '' 8 | ext["snapshot"] = '' 9 | 10 | File secretPropsFile = project.rootProject.file('local.properties') 11 | if (secretPropsFile.exists()) { 12 | // Read local.properties file first if it exists 13 | Properties p = new Properties() 14 | new FileInputStream(secretPropsFile).withCloseable { is -> p.load(is) } 15 | p.each { name, value -> ext[name] = value } 16 | } else { 17 | // Use system environment variables 18 | ext["ossrhUsername"] = System.getenv('OSSRH_USERNAME') 19 | ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD') 20 | ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID') 21 | ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID') 22 | ext["signing.password"] = System.getenv('SIGNING_PASSWORD') 23 | ext["signing.key"] = System.getenv('SIGNING_KEY') 24 | ext["snapshot"] = System.getenv('SNAPSHOT') 25 | } 26 | 27 | def versionPropsFile = file('version.properties') 28 | def versionBuild 29 | def versionMajor 30 | def versionMinor 31 | 32 | if (versionPropsFile.canRead()) { 33 | def Properties versionProps = new Properties() 34 | versionProps.load(new FileInputStream(versionPropsFile)) 35 | versionMajor = versionProps['VERSION_BUILD_MAJOR'].toString() 36 | versionMinor = versionProps['VERSION_BUILD_MINOR'].toString() 37 | versionBuild = versionMajor + "." + versionMinor 38 | } else { 39 | throw new FileNotFoundException("Could not read version.properties!") 40 | } 41 | 42 | // Set up Sonatype repository 43 | nexusPublishing { 44 | repositories { 45 | sonatype { 46 | /* Existing params here... */ 47 | stagingProfileId = sonatypeStagingProfileId 48 | username = ossrhUsername 49 | password = ossrhPassword 50 | version = versionBuild 51 | nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) 52 | snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) 53 | } 54 | } 55 | } 56 | 57 | 58 | //group = PUBLISH_GROUP_ID 59 | //version = PUBLISH_VERSION 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/layout/textinputdialog_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 24 | 37 | 38 | 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/coderz/f1/customdialogssample/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.coderz.f1.customdialogssample; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.appcompat.app.AppCompatActivity; 5 | import androidx.core.content.res.ResourcesCompat; 6 | import androidx.fragment.app.Fragment; 7 | import androidx.fragment.app.FragmentManager; 8 | import androidx.fragment.app.FragmentTransaction; 9 | 10 | 11 | import android.graphics.Color; 12 | import android.os.Bundle; 13 | 14 | import android.view.MenuItem; 15 | import android.view.View; 16 | import android.widget.Button; 17 | import android.widget.TextView; 18 | 19 | import com.coderz.f1.customdialogs.colordialog.ColorDialog; 20 | import com.coderz.f1.customdialogs.datetimedialogs.DatePickerDialog; 21 | import com.coderz.f1.customdialogs.datetimedialogs.TimePickerDialog; 22 | import com.google.android.material.bottomnavigation.BottomNavigationView; 23 | import com.google.android.material.navigation.NavigationBarView; 24 | 25 | import java.text.SimpleDateFormat; 26 | import java.time.format.DateTimeFormatter; 27 | import java.time.format.DateTimeFormatterBuilder; 28 | import java.util.Calendar; 29 | import java.util.Date; 30 | 31 | 32 | public class MainActivity extends AppCompatActivity { 33 | 34 | BottomNavigationView bnv; 35 | FragmentManager fm = getSupportFragmentManager(); 36 | 37 | final Fragment colorFragment = new ColorDialogDemo(); 38 | final Fragment dateFragment = new DateDialogDemo(); 39 | final Fragment timeFragment = new TimeDialogDemo(); 40 | 41 | final String colorTitle = "Color Dialog Demo"; 42 | final String dateTitle = "Date Dialog Demo"; 43 | final String timeTitle = "Time Dialog Demo"; 44 | 45 | 46 | @Override 47 | protected void onCreate(Bundle savedInstanceState) { 48 | super.onCreate(savedInstanceState); 49 | setContentView(R.layout.activity_main); 50 | 51 | fm.beginTransaction().replace(R.id.content_main,colorFragment).commit(); 52 | 53 | bnv = findViewById(R.id.bottomNavigationView); 54 | bnv.setOnItemSelectedListener(item -> { 55 | 56 | switch (item.getTitle().toString()){ 57 | case colorTitle: 58 | fm.beginTransaction().replace(R.id.content_main,colorFragment).commit(); 59 | return true; 60 | case dateTitle: 61 | fm.beginTransaction().replace(R.id.content_main,dateFragment).commit(); 62 | return true; 63 | case timeTitle: 64 | fm.beginTransaction().replace(R.id.content_main,timeFragment).commit(); 65 | return true; 66 | } 67 | 68 | return false; 69 | }); 70 | } 71 | 72 | 73 | } -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | @rem SPDX-License-Identifier: Apache-2.0 17 | @rem 18 | 19 | @if "%DEBUG%"=="" @echo off 20 | @rem ########################################################################## 21 | @rem 22 | @rem Gradle startup script for Windows 23 | @rem 24 | @rem ########################################################################## 25 | 26 | @rem Set local scope for the variables with windows NT shell 27 | if "%OS%"=="Windows_NT" setlocal 28 | 29 | set DIRNAME=%~dp0 30 | if "%DIRNAME%"=="" set DIRNAME=. 31 | @rem This is normally unused 32 | set APP_BASE_NAME=%~n0 33 | set APP_HOME=%DIRNAME% 34 | 35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 37 | 38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 40 | 41 | @rem Find java.exe 42 | if defined JAVA_HOME goto findJavaFromJavaHome 43 | 44 | set JAVA_EXE=java.exe 45 | %JAVA_EXE% -version >NUL 2>&1 46 | if %ERRORLEVEL% equ 0 goto execute 47 | 48 | echo. 1>&2 49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 50 | echo. 1>&2 51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 52 | echo location of your Java installation. 1>&2 53 | 54 | goto fail 55 | 56 | :findJavaFromJavaHome 57 | set JAVA_HOME=%JAVA_HOME:"=% 58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 59 | 60 | if exist "%JAVA_EXE%" goto execute 61 | 62 | echo. 1>&2 63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 64 | echo. 1>&2 65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 66 | echo location of your Java installation. 1>&2 67 | 68 | goto fail 69 | 70 | :execute 71 | @rem Setup the command line 72 | 73 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 74 | 75 | 76 | @rem Execute Gradle 77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 78 | 79 | :end 80 | @rem End local scope for the variables with windows NT shell 81 | if %ERRORLEVEL% equ 0 goto mainEnd 82 | 83 | :fail 84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 85 | rem the _cmd.exe /c_ return code! 86 | set EXIT_CODE=%ERRORLEVEL% 87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 89 | exit /b %EXIT_CODE% 90 | 91 | :mainEnd 92 | if "%OS%"=="Windows_NT" endlocal 93 | 94 | :omega 95 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/layout/colordialog_color_palette.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 18 | 26 | 35 | 43 | 51 | 59 | 67 | 76 | 77 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/layout/colordialog_rgb.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 16 | 26 | 34 | 43 | 51 | 60 | 68 | 76 | 85 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Custom Dialogs 2 |

Custom dialogs at your fingertips

3 | 4 | [![Build Status](readme_images/build.svg)](https://github.com/TheRandomCrafter83/CustomDialogs) 5 | 6 | ![minversion](readme_images/min_sdk.svg) 7 | 8 | Custom Dialogs is an Android Library containing several useful custom dialogs. 9 | - Added a BaseDialog for all other Dialogs to inherit from for cleaner code. 10 | - Library contains the following custom dialogs: 11 | - ColorDialog: used to allow the user to choose a color. The selected color will be returned via the listener. (See Screenshots below) 12 | 13 | 14 | ## Features 15 | 16 | - Set the dialog's background color 17 | - Title 18 | - Text color 19 | - Margins 20 | - An icon for the dialog 21 | 22 | ## Tech 23 | 24 | Custom Dialogs is an open source project which can be found [Here](https://github.com/TheRandomCrafter83/CustomDialogs) 25 | on GitHub. 26 | 27 | ## Installation 28 | **IMPORTANT** This library requires the repository mavenCentral(). 29 | 30 | **build.gradle(App Module)** - then you can add the following in your module level's dependencies section. Replace '[build]' with build version located above. 31 | 32 | ```gradle 33 | implementation 'io.github.therandomcrafter83:custom-dialogs:[build]' //<--add this implementation to the dependencies section 34 | ``` 35 | 36 | ## Example Usage 37 | 38 | ```java 39 | import androidx.appcompat.app.AppCompatActivity; 40 | 41 | import android.graphics.Color; 42 | import android.os.Bundle; 43 | import android.view.View; 44 | import android.widget.Button; 45 | 46 | import com.coderz.f1.customdialogs.colordialog.ColorDialog; 47 | 48 | public class MainActivity extends AppCompatActivity { 49 | 50 | @Override 51 | protected void onCreate(Bundle savedInstanceState) { 52 | super.onCreate(savedInstanceState); 53 | setContentView(R.layout.activity_main); 54 | Button button = findViewById(R.id.button); 55 | button.setOnClickListener(new View.OnClickListener() { 56 | @Override 57 | public void onClick(View v) { 58 | ColorDialog cd = new ColorDialog(MainActivity.this, new ColorDialog.DialogResponseListener() { 59 | @Override 60 | public void onOkClicked(int color) { 61 | button.setText(Integer.toString(color)); 62 | } 63 | 64 | @Override 65 | public void onCancelClicked() { 66 | 67 | } 68 | }); 69 | cd.setTitle("Choose a color"); 70 | cd.setTabIndex(ColorDialog.TabIndex.PALETTE); 71 | cd.setInitialColor(Color.RED); 72 | cd.setMargins(8); 73 | cd.setBackgroundColor(Color.GRAY); 74 | cd.setTextColor(Color.YELLOW); 75 | cd.showDialog(); 76 | } 77 | }); 78 | } 79 | } 80 | ``` 81 | 82 | ## Screenshots 83 | **ColorDialog** 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 |
Hue PaletteRGB Sliders
94 | 95 | ## License 96 | Copyright 2021 Carl Williams [TheRandomCrafter83] 97 | 98 | Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 99 | 100 | [Apache-2.0 License ](http://www.apache.org/licenses/LICENSE-2.0) 101 | 102 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 103 | 104 | -------------------------------------------------------------------------------- /CustomDialogs/src/main/res/layout/colordialog_color_picker.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 15 | 16 | 23 | 24 | 34 | 35 | 42 | 43 | 44 | 51 | 52 | 62 | 63 | 70 | 71 | 72 | 73 | 74 | 77 | 78 | 81 | 82 | 88 | 89 |