├── .gradle ├── 5.4.1 │ ├── executionHistory │ │ ├── executionHistory.bin │ │ └── executionHistory.lock │ ├── fileChanges │ │ └── last-build.bin │ ├── fileContent │ │ └── fileContent.lock │ ├── fileHashes │ │ ├── fileHashes.bin │ │ ├── fileHashes.lock │ │ └── resourceHashesCache.bin │ ├── gc.properties │ └── javaCompile │ │ ├── classAnalysis.bin │ │ ├── jarAnalysis.bin │ │ ├── javaCompile.lock │ │ └── taskHistory.bin ├── buildOutputCleanup │ ├── buildOutputCleanup.lock │ ├── cache.properties │ └── outputFiles.bin └── vcs-1 │ └── gc.properties ├── .idea ├── caches │ ├── build_file_checksums.ser │ └── gradle_models.ser ├── codeStyles │ └── Project.xml ├── gradle.xml ├── inspectionProfiles │ └── Project_Default.xml ├── libraries │ ├── Gradle__androidx_activity_activity_1_0_0_aar.xml │ ├── Gradle__androidx_annotation_annotation_1_1_0_jar.xml │ ├── Gradle__androidx_appcompat_appcompat_1_1_0_aar.xml │ ├── Gradle__androidx_appcompat_appcompat_resources_1_1_0_aar.xml │ ├── Gradle__androidx_arch_core_core_common_2_1_0_jar.xml │ ├── Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml │ ├── Gradle__androidx_collection_collection_1_1_0_jar.xml │ ├── Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml │ ├── Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml │ ├── Gradle__androidx_core_core_1_1_0_aar.xml │ ├── Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml │ ├── Gradle__androidx_customview_customview_1_0_0_aar.xml │ ├── Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml │ ├── Gradle__androidx_fragment_fragment_1_1_0_aar.xml │ ├── Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_common_2_1_0_jar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml │ ├── Gradle__androidx_loader_loader_1_0_0_aar.xml │ ├── Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml │ ├── Gradle__androidx_test_espresso_espresso_core_3_1_0_aar.xml │ ├── Gradle__androidx_test_espresso_espresso_idling_resource_3_1_0_aar.xml │ ├── Gradle__androidx_test_monitor_1_1_0_aar.xml │ ├── Gradle__androidx_test_runner_1_1_0_aar.xml │ ├── Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml │ ├── Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml │ ├── Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml │ ├── Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml │ ├── Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml │ ├── Gradle__com_squareup_javawriter_2_1_1_jar.xml │ ├── Gradle__javax_inject_javax_inject_1_jar.xml │ ├── Gradle__junit_junit_4_12_jar.xml │ ├── Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml │ ├── Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml │ ├── Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml │ └── Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── workspace.xml ├── LICENSE ├── README.md ├── build.gradle ├── gbutton.iml ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── images ├── GoogleSignInLight.png └── GoogleSignUpDark.png ├── library ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── developer │ │ └── gbuttons │ │ ├── GoogleSignInButton.java │ │ └── util │ │ └── Constants.java │ └── res │ ├── drawable-hdpi │ ├── btn_google_signin_dark_disabled.9.png │ ├── btn_google_signin_dark_focus.9.png │ ├── btn_google_signin_dark_normal.9.png │ ├── btn_google_signin_dark_pressed.9.png │ ├── btn_google_signin_light_disabled.9.png │ ├── btn_google_signin_light_focus.9.png │ ├── btn_google_signin_light_normal.9.png │ └── btn_google_signin_light_pressed.9.png │ ├── drawable-ldpi │ ├── btn_google_signin_dark_disabled.9.png │ ├── btn_google_signin_dark_focus.9.png │ ├── btn_google_signin_dark_normal.9.png │ ├── btn_google_signin_dark_pressed.9.png │ ├── btn_google_signin_light_disabled.9.png │ ├── btn_google_signin_light_focus.9.png │ ├── btn_google_signin_light_normal.9.png │ └── btn_google_signin_light_pressed.9.png │ ├── drawable-mdpi │ ├── btn_google_signin_dark_disabled.9.png │ ├── btn_google_signin_dark_focus.9.png │ ├── btn_google_signin_dark_normal.9.png │ ├── btn_google_signin_dark_pressed.9.png │ ├── btn_google_signin_light_disabled.9.png │ ├── btn_google_signin_light_focus.9.png │ ├── btn_google_signin_light_normal.9.png │ └── btn_google_signin_light_pressed.9.png │ ├── drawable-tvdpi │ ├── btn_google_signin_dark_disabled.9.png │ ├── btn_google_signin_dark_focus.9.png │ ├── btn_google_signin_dark_normal.9.png │ ├── btn_google_signin_dark_pressed.9.png │ ├── btn_google_signin_light_disabled.9.png │ ├── btn_google_signin_light_focus.9.png │ ├── btn_google_signin_light_normal.9.png │ └── btn_google_signin_light_pressed.9.png │ ├── drawable-xhdpi │ ├── btn_google_signin_dark_disabled.9.png │ ├── btn_google_signin_dark_focus.9.png │ ├── btn_google_signin_dark_normal.9.png │ ├── btn_google_signin_dark_pressed.9.png │ ├── btn_google_signin_light_disabled.9.png │ ├── btn_google_signin_light_focus.9.png │ ├── btn_google_signin_light_normal.9.png │ └── btn_google_signin_light_pressed.9.png │ ├── drawable-xxhdpi │ ├── btn_google_signin_dark_disabled.9.png │ ├── btn_google_signin_dark_focus.9.png │ ├── btn_google_signin_dark_normal.9.png │ ├── btn_google_signin_dark_pressed.9.png │ ├── btn_google_signin_light_disabled.9.png │ ├── btn_google_signin_light_focus.9.png │ ├── btn_google_signin_light_normal.9.png │ └── btn_google_signin_light_pressed.9.png │ ├── drawable-xxxhdpi │ ├── btn_google_signin_dark_disabled.9.png │ ├── btn_google_signin_dark_focus.9.png │ ├── btn_google_signin_dark_normal.9.png │ ├── btn_google_signin_dark_pressed.9.png │ ├── btn_google_signin_light_disabled.9.png │ ├── btn_google_signin_light_focus.9.png │ ├── btn_google_signin_light_normal.9.png │ └── btn_google_signin_light_pressed.9.png │ ├── drawable │ ├── dark_theme_google_icon_selector.xml │ └── light_theme_google_icon_selector.xml │ └── values │ ├── attrs.xml │ ├── colors.xml │ └── strings.xml ├── local.properties ├── sample ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── developer │ │ └── gbutton │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── developer │ │ │ └── gbutton │ │ │ └── MainActivity.java │ └── res │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── developer │ └── gbutton │ └── ExampleUnitTest.java └── settings.gradle /.gradle/5.4.1/executionHistory/executionHistory.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/.gradle/5.4.1/executionHistory/executionHistory.bin -------------------------------------------------------------------------------- /.gradle/5.4.1/executionHistory/executionHistory.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/.gradle/5.4.1/executionHistory/executionHistory.lock -------------------------------------------------------------------------------- /.gradle/5.4.1/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gradle/5.4.1/fileContent/fileContent.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/.gradle/5.4.1/fileContent/fileContent.lock -------------------------------------------------------------------------------- /.gradle/5.4.1/fileHashes/fileHashes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/.gradle/5.4.1/fileHashes/fileHashes.bin -------------------------------------------------------------------------------- /.gradle/5.4.1/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/.gradle/5.4.1/fileHashes/fileHashes.lock -------------------------------------------------------------------------------- /.gradle/5.4.1/fileHashes/resourceHashesCache.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/.gradle/5.4.1/fileHashes/resourceHashesCache.bin -------------------------------------------------------------------------------- /.gradle/5.4.1/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/.gradle/5.4.1/gc.properties -------------------------------------------------------------------------------- /.gradle/5.4.1/javaCompile/classAnalysis.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/.gradle/5.4.1/javaCompile/classAnalysis.bin -------------------------------------------------------------------------------- /.gradle/5.4.1/javaCompile/jarAnalysis.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/.gradle/5.4.1/javaCompile/jarAnalysis.bin -------------------------------------------------------------------------------- /.gradle/5.4.1/javaCompile/javaCompile.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/.gradle/5.4.1/javaCompile/javaCompile.lock -------------------------------------------------------------------------------- /.gradle/5.4.1/javaCompile/taskHistory.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/.gradle/5.4.1/javaCompile/taskHistory.bin -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/buildOutputCleanup.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/.gradle/buildOutputCleanup/buildOutputCleanup.lock -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/cache.properties: -------------------------------------------------------------------------------- 1 | #Tue Nov 19 19:30:37 IST 2019 2 | gradle.version=5.4.1 3 | -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/outputFiles.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/.gradle/buildOutputCleanup/outputFiles.bin -------------------------------------------------------------------------------- /.gradle/vcs-1/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/.gradle/vcs-1/gc.properties -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /.idea/caches/gradle_models.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/.idea/caches/gradle_models.ser -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | xmlns:android 14 | 15 | ^$ 16 | 17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 | xmlns:.* 25 | 26 | ^$ 27 | 28 | 29 | BY_NAME 30 | 31 |
32 |
33 | 34 | 35 | 36 | .*:id 37 | 38 | http://schemas.android.com/apk/res/android 39 | 40 | 41 | 42 |
43 |
44 | 45 | 46 | 47 | .*:name 48 | 49 | http://schemas.android.com/apk/res/android 50 | 51 | 52 | 53 |
54 |
55 | 56 | 57 | 58 | name 59 | 60 | ^$ 61 | 62 | 63 | 64 |
65 |
66 | 67 | 68 | 69 | style 70 | 71 | ^$ 72 | 73 | 74 | 75 |
76 |
77 | 78 | 79 | 80 | .* 81 | 82 | ^$ 83 | 84 | 85 | BY_NAME 86 | 87 |
88 |
89 | 90 | 91 | 92 | .* 93 | 94 | http://schemas.android.com/apk/res/android 95 | 96 | 97 | ANDROID_ATTRIBUTE_ORDER 98 | 99 |
100 |
101 | 102 | 103 | 104 | .* 105 | 106 | .* 107 | 108 | 109 | BY_NAME 110 | 111 |
112 |
113 |
114 |
115 |
116 |
-------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_activity_activity_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_annotation_annotation_1_1_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_appcompat_appcompat_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_arch_core_core_common_2_1_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_collection_collection_1_1_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_core_core_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_fragment_fragment_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_1_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_test_monitor_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_test_runner_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__junit_junit_4_12_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 42 | 43 | 44 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 75 | 76 | 77 | 78 | 84 | 85 | 86 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 1574172012834 145 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 GButton 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Google Sign-In Dark](images/GoogleSignUpDark.png) 2 | 3 | **GButtons** [![API](https://img.shields.io/badge/API-21%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=21) [![Known Vulnerabilities](https://snyk.io/test/github/TutorialsAndroid/GButton/badge.svg?targetFile=build.gradle)](https://snyk.io/test/github/TutorialsAndroid/GButton?targetFile=build.gradle) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/TutorialsAndroid/GButton) 4 | --- 5 | 6 | You want to add a Google Sign-In button to your Android application. But you want to change the text on the Google Sign-In button or provide custom localization? You would think setting `android:text` on the `com.google.android.gms.common.SignInButton` in your layout file would do the trick. However it turns out that that attribute is not available for `SignInButton`. 7 | 8 | ## Hire-Me 9 | 10 |

Are you having trouble in your android projects then let me help you with it just Email me. I love my users, so feel free to visit http://asm.life 11 | 12 | **Solution** 13 | --- 14 | 15 | This library helps you add text to Google Sign-In Button easily using standard `android:text` attribute. It also allows you to set the button theme to dark or light using `app:isDarkTheme="true"` attribute. It does so following Google's guidelines to create sign-in button. 16 | 17 | Light Theme (White) | Dark Theme (Blue) 18 | :-------------------------:|:-------------------------: 19 | ![Google Sign-In Light](images/GoogleSignInLight.png) | ![Google Sign-In Dark](images/GoogleSignUpDark.png) 20 | 21 | 22 | **Usage** 23 | --- 24 | 25 | One-step install 26 | 27 | Add it in your root build.gradle at the end of repositories: 28 | 29 | ```allprojects { 30 | repositories { 31 | ... 32 | maven { url 'https://jitpack.io' } 33 | } 34 | } 35 | ``` 36 | 37 | Step 2. Add the dependency 38 | 39 | Add the following to your `app` module level `build.gradle` file: 40 | 41 | ```gradle 42 | dependencies { 43 | implementation 'com.github.TutorialsAndroid:GButton:v1.0.19' 44 | } 45 | ``` 46 | 47 | In your XML Layout, have the following: 48 | 49 | ```xml 50 | 53 | 54 | 60 | 61 | ``` 62 | 63 | 64 | **Options** 65 | --- 66 | 67 | - `app:isDarkTheme="{Boolean}"` : To switch between blue theme and gray white for the button. The library handles changing of text color and background color. It also handles the change of color on button press or button clicks. 68 | - `android:text="{string}"`: As usual to set the text on the button. 69 | 70 | **Google's Suggestion** 71 | --- 72 | 73 | From documentation, Google suggests creating a custom button as mentioned on [Customizing the Sign-In Button](https://developers.google.com/identity/sign-in/android/custom-button). Then it suggests using the branding guidelines as mentioned at [Sign-In Branding Guidelines](https://developers.google.com/identity/branding-guidelines#sign-in-button). It includes using custom icons and images int he button, setting text size to specifics, paddings and other do's and don'ts for the logo. 74 | 75 | 76 | Doing as per Google's suggestion involves some custom work. This small 3.93 KB library does that for you. Please feel free to make pull requests to improve the library. I wanted to create a re-usable solution when I came across this problem while implementing the Sign-In button. Just wanted to share with everyone. 77 | 78 | 79 | **License** 80 | ``` 81 | Copyright 2019 GButton 82 | 83 | Licensed under the Apache License, Version 2.0 (the "License"); 84 | you may not use this file except in compliance with the License. 85 | You may obtain a copy of the License at 86 | 87 | http://www.apache.org/licenses/LICENSE-2.0 88 | 89 | Unless required by applicable law or agreed to in writing, software 90 | distributed under the License is distributed on an "AS IS" BASIS, 91 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 92 | See the License for the specific language governing permissions and 93 | limitations under the License. 94 | 95 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | dependencies { 7 | classpath 'com.android.tools.build:gradle:3.5.2' 8 | classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | task clean(type: Delete) { 20 | delete rootProject.buildDir 21 | } 22 | -------------------------------------------------------------------------------- /gbutton.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | android.enableJetifier=true 13 | android.useAndroidX=true 14 | #org.gradle.jvmargs=-Xmx1536m 15 | 16 | # When configured, Gradle will run in incubating parallel mode. 17 | # This option should only be used with decoupled projects. More details, visit 18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 19 | # org.gradle.parallel=true 20 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Sep 02 17:32:16 IST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 7 | 8 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /images/GoogleSignInLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/images/GoogleSignInLight.png -------------------------------------------------------------------------------- /images/GoogleSignUpDark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/images/GoogleSignUpDark.png -------------------------------------------------------------------------------- /library/.gitignore: -------------------------------------------------------------------------------- 1 | /captures 2 | 3 | # built application files 4 | *.apk 5 | *.ap_ 6 | 7 | # files for the dex VM 8 | *.dex 9 | 10 | # Java class files 11 | *.class 12 | 13 | # built native files (uncomment if you build your own) 14 | # *.o 15 | # *.so 16 | 17 | # generated files 18 | bin/ 19 | gen/ 20 | 21 | # Ignore gradle files 22 | .gradle/ 23 | build/ 24 | captures/ 25 | 26 | # Local configuration file (sdk path, etc) 27 | local.properties 28 | 29 | # Proguard folder generated by Eclipse 30 | proguard/ 31 | 32 | # Eclipse Metadata 33 | .metadata/ 34 | 35 | # Mac OS X clutter 36 | *.DS_Store 37 | 38 | # Windows clutter 39 | Thumbs.db 40 | 41 | # Eclipse project files 42 | .classpath 43 | .project 44 | 45 | # Intellij IDEA (see https://intellij-support.jetbrains.com/entries/23393067) 46 | .idea/tasks.xml 47 | .idea/datasources.xml 48 | .idea/dataSources.ids 49 | *.iml 50 | *.ipr 51 | *.iws 52 | .idea/ 53 | out/ 54 | 55 | -------------------------------------------------------------------------------- /library/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | apply plugin: 'com.github.dcendents.android-maven' 4 | group='com.github.TutorialsAndroid' 5 | 6 | android { 7 | compileSdkVersion 29 8 | 9 | defaultConfig { 10 | minSdkVersion 21 11 | targetSdkVersion 29 12 | versionCode 1 13 | versionName "1.0.19" 14 | 15 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 16 | 17 | } 18 | buildTypes { 19 | release { 20 | minifyEnabled false 21 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 22 | } 23 | } 24 | } 25 | 26 | dependencies { 27 | implementation fileTree(dir: 'libs', include: ['*.jar']) 28 | implementation 'androidx.appcompat:appcompat:1.1.0' 29 | } 30 | -------------------------------------------------------------------------------- /library/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/shobhit/Documents/adt-bundle-mac-x86_64-20140702/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /library/src/main/java/com/developer/gbuttons/GoogleSignInButton.java: -------------------------------------------------------------------------------- 1 | package com.developer.gbuttons; 2 | 3 | import android.content.Context; 4 | import android.content.res.TypedArray; 5 | import androidx.core.content.ContextCompat; 6 | import androidx.appcompat.widget.AppCompatButton; 7 | import android.util.AttributeSet; 8 | import android.util.TypedValue; 9 | 10 | import static com.developer.gbuttons.util.Constants.BUTTON_TEXT_SIZE; 11 | 12 | /** 13 | * This is a customized Google Sign In button. Supports: 14 | * - android:text - set text on button (not supported by com.google.android.gms.common.SignInButton) 15 | * - app:mIsDarkTheme - get both dark and light theme using this attribute. 16 | *

17 | * Based on: 18 | * - Google guidelines details https://developers.google.com/identity/sign-in/android/custom-button 19 | * - Branding guidelines https://developers.google.com/identity/branding-guidelines#sign-in-button 20 | *

21 | * Created by shobhit on 2017-09-11. 22 | */ 23 | 24 | public class GoogleSignInButton extends AppCompatButton { 25 | 26 | /** 27 | * Text that user wants the button to have. 28 | * This overrides the default "Sign in with Google" text. 29 | */ 30 | private String mText; 31 | 32 | /** 33 | * Flag to show the dark theme with Google's standard dark blue color. 34 | */ 35 | private boolean mIsDarkTheme; 36 | 37 | /** 38 | * Constructor 39 | * 40 | * @param context Context 41 | */ 42 | public GoogleSignInButton(Context context) { 43 | super(context); 44 | } 45 | 46 | /** 47 | * Constructor 48 | * 49 | * @param context Context 50 | * @param attributeSet AttributeSet 51 | */ 52 | public GoogleSignInButton(Context context, AttributeSet attributeSet) { 53 | super(context, attributeSet); 54 | init(context, attributeSet, 0); 55 | } 56 | 57 | /** 58 | * Constructor 59 | * 60 | * @param context Context 61 | * @param attributeSet AttributeSet 62 | * @param defStyleAttr int 63 | */ 64 | public GoogleSignInButton(Context context, AttributeSet attributeSet, int defStyleAttr) { 65 | super(context, attributeSet, defStyleAttr); 66 | init(context, attributeSet, defStyleAttr); 67 | } 68 | 69 | /** 70 | * Initialize the process to get custom attributes from xml and set button params. 71 | * 72 | * @param context Context 73 | * @param attributeSet AttributeSet 74 | */ 75 | private void init(Context context, AttributeSet attributeSet, int defStyleAttr) { 76 | parseAttributes(context, attributeSet, defStyleAttr); 77 | setButtonParams(); 78 | } 79 | 80 | /** 81 | * Parses out the custom attributes. 82 | * 83 | * @param context Context 84 | * @param attributeSet AttributeSet 85 | */ 86 | private void parseAttributes(Context context, AttributeSet attributeSet, int defStyleAttr) { 87 | if (attributeSet == null) { 88 | return; 89 | } 90 | 91 | // Retrieve styled attribute information from the styleable. 92 | TypedArray typedArray = context.getTheme(). 93 | obtainStyledAttributes(attributeSet, R.styleable.ButtonStyleable, defStyleAttr, 0); 94 | 95 | try { 96 | // Get text which user wants to set the button. 97 | mText = typedArray.getString(R.styleable.ButtonStyleable_android_text); 98 | // Get the attribute to check if user wants dark theme. 99 | mIsDarkTheme = typedArray.getBoolean(R.styleable.ButtonStyleable_isDarkTheme, false); 100 | } catch (Exception ex) { 101 | ex.printStackTrace(); 102 | } finally { 103 | typedArray.recycle(); 104 | } 105 | } 106 | 107 | /** 108 | * Set button parameters. 109 | */ 110 | private void setButtonParams() { 111 | // We need not have only upper case character. 112 | this.setTransformationMethod(null); 113 | // Set button text 114 | setButtonText(); 115 | // Set button text size 116 | setButtonTextSize(); 117 | // Set button text color 118 | setButtonTextColor(); 119 | // Set background of button 120 | setButtonBackground(); 121 | } 122 | 123 | /** 124 | * Set the text size to standard as mentioned in guidelines. 125 | */ 126 | private void setButtonTextSize() { 127 | this.setTextSize(TypedValue.COMPLEX_UNIT_SP, BUTTON_TEXT_SIZE); 128 | } 129 | 130 | /** 131 | * Check the theme and set background based on theme which is a selector. 132 | * The selector handles the background color when button is clicked. 133 | */ 134 | private void setButtonBackground() { 135 | int googleIconImageSelector = mIsDarkTheme ? R.drawable.dark_theme_google_icon_selector : 136 | R.drawable.light_theme_google_icon_selector; 137 | this.setBackgroundResource(googleIconImageSelector); 138 | } 139 | 140 | /** 141 | * Check the theme and set text color based on theme. 142 | */ 143 | private void setButtonTextColor() { 144 | int textColor = mIsDarkTheme ? android.R.color.white : R.color.text_color_dark; 145 | this.setTextColor(ContextCompat.getColor(getContext(), textColor)); 146 | } 147 | 148 | /** 149 | * If user has set text, that takes priority else use default button text. 150 | */ 151 | private void setButtonText() { 152 | if (mText == null || mText.isEmpty()) { 153 | mText = getContext().getString(R.string.google_sign_in); 154 | } 155 | this.setText(mText); 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /library/src/main/java/com/developer/gbuttons/util/Constants.java: -------------------------------------------------------------------------------- 1 | package com.developer.gbuttons.util; 2 | 3 | /** 4 | * Constants file to keep constants needed for the button. 5 | * Created by shobhit on 2017-09-13. 6 | */ 7 | 8 | public class Constants { 9 | // Standard text size got SignInButton 10 | public static final int BUTTON_TEXT_SIZE = 14; 11 | } 12 | -------------------------------------------------------------------------------- /library/src/main/res/drawable-hdpi/btn_google_signin_dark_disabled.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-hdpi/btn_google_signin_dark_disabled.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-hdpi/btn_google_signin_dark_focus.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-hdpi/btn_google_signin_dark_focus.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-hdpi/btn_google_signin_dark_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-hdpi/btn_google_signin_dark_normal.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-hdpi/btn_google_signin_dark_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-hdpi/btn_google_signin_dark_pressed.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-hdpi/btn_google_signin_light_disabled.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-hdpi/btn_google_signin_light_disabled.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-hdpi/btn_google_signin_light_focus.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-hdpi/btn_google_signin_light_focus.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-hdpi/btn_google_signin_light_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-hdpi/btn_google_signin_light_normal.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-hdpi/btn_google_signin_light_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-hdpi/btn_google_signin_light_pressed.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-ldpi/btn_google_signin_dark_disabled.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-ldpi/btn_google_signin_dark_disabled.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-ldpi/btn_google_signin_dark_focus.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-ldpi/btn_google_signin_dark_focus.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-ldpi/btn_google_signin_dark_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-ldpi/btn_google_signin_dark_normal.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-ldpi/btn_google_signin_dark_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-ldpi/btn_google_signin_dark_pressed.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-ldpi/btn_google_signin_light_disabled.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-ldpi/btn_google_signin_light_disabled.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-ldpi/btn_google_signin_light_focus.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-ldpi/btn_google_signin_light_focus.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-ldpi/btn_google_signin_light_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-ldpi/btn_google_signin_light_normal.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-ldpi/btn_google_signin_light_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-ldpi/btn_google_signin_light_pressed.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-mdpi/btn_google_signin_dark_disabled.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-mdpi/btn_google_signin_dark_disabled.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-mdpi/btn_google_signin_dark_focus.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-mdpi/btn_google_signin_dark_focus.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-mdpi/btn_google_signin_dark_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-mdpi/btn_google_signin_dark_normal.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-mdpi/btn_google_signin_dark_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-mdpi/btn_google_signin_dark_pressed.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-mdpi/btn_google_signin_light_disabled.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-mdpi/btn_google_signin_light_disabled.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-mdpi/btn_google_signin_light_focus.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-mdpi/btn_google_signin_light_focus.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-mdpi/btn_google_signin_light_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-mdpi/btn_google_signin_light_normal.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-mdpi/btn_google_signin_light_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-mdpi/btn_google_signin_light_pressed.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-tvdpi/btn_google_signin_dark_disabled.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-tvdpi/btn_google_signin_dark_disabled.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-tvdpi/btn_google_signin_dark_focus.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-tvdpi/btn_google_signin_dark_focus.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-tvdpi/btn_google_signin_dark_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-tvdpi/btn_google_signin_dark_normal.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-tvdpi/btn_google_signin_dark_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-tvdpi/btn_google_signin_dark_pressed.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-tvdpi/btn_google_signin_light_disabled.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-tvdpi/btn_google_signin_light_disabled.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-tvdpi/btn_google_signin_light_focus.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-tvdpi/btn_google_signin_light_focus.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-tvdpi/btn_google_signin_light_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-tvdpi/btn_google_signin_light_normal.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-tvdpi/btn_google_signin_light_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-tvdpi/btn_google_signin_light_pressed.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xhdpi/btn_google_signin_dark_disabled.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xhdpi/btn_google_signin_dark_disabled.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xhdpi/btn_google_signin_dark_focus.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xhdpi/btn_google_signin_dark_focus.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xhdpi/btn_google_signin_dark_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xhdpi/btn_google_signin_dark_normal.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xhdpi/btn_google_signin_dark_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xhdpi/btn_google_signin_dark_pressed.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xhdpi/btn_google_signin_light_disabled.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xhdpi/btn_google_signin_light_disabled.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xhdpi/btn_google_signin_light_focus.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xhdpi/btn_google_signin_light_focus.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xhdpi/btn_google_signin_light_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xhdpi/btn_google_signin_light_normal.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xhdpi/btn_google_signin_light_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xhdpi/btn_google_signin_light_pressed.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxhdpi/btn_google_signin_dark_disabled.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xxhdpi/btn_google_signin_dark_disabled.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxhdpi/btn_google_signin_dark_focus.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xxhdpi/btn_google_signin_dark_focus.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxhdpi/btn_google_signin_dark_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xxhdpi/btn_google_signin_dark_normal.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxhdpi/btn_google_signin_dark_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xxhdpi/btn_google_signin_dark_pressed.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxhdpi/btn_google_signin_light_disabled.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xxhdpi/btn_google_signin_light_disabled.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxhdpi/btn_google_signin_light_focus.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xxhdpi/btn_google_signin_light_focus.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxhdpi/btn_google_signin_light_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xxhdpi/btn_google_signin_light_normal.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxhdpi/btn_google_signin_light_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xxhdpi/btn_google_signin_light_pressed.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxxhdpi/btn_google_signin_dark_disabled.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xxxhdpi/btn_google_signin_dark_disabled.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxxhdpi/btn_google_signin_dark_focus.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xxxhdpi/btn_google_signin_dark_focus.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxxhdpi/btn_google_signin_dark_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xxxhdpi/btn_google_signin_dark_normal.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxxhdpi/btn_google_signin_dark_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xxxhdpi/btn_google_signin_dark_pressed.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxxhdpi/btn_google_signin_light_disabled.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xxxhdpi/btn_google_signin_light_disabled.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxxhdpi/btn_google_signin_light_focus.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xxxhdpi/btn_google_signin_light_focus.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxxhdpi/btn_google_signin_light_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xxxhdpi/btn_google_signin_light_normal.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xxxhdpi/btn_google_signin_light_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/library/src/main/res/drawable-xxxhdpi/btn_google_signin_light_pressed.9.png -------------------------------------------------------------------------------- /library/src/main/res/drawable/dark_theme_google_icon_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/light_theme_google_icon_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | #4285F4 3 | #80000000 4 | -------------------------------------------------------------------------------- /library/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Sign in with Google 3 | Sign up with Google 4 | 5 | -------------------------------------------------------------------------------- /local.properties: -------------------------------------------------------------------------------- 1 | ## This file must *NOT* be checked into Version Control Systems, 2 | # as it contains information specific to your local configuration. 3 | # 4 | # Location of the SDK. This is only used by Gradle. 5 | # For customization when using a Version Control System, please read the 6 | # header note. 7 | #Tue Nov 19 19:30:11 IST 2019 8 | sdk.dir=/home/akshay/Android/Sdk 9 | -------------------------------------------------------------------------------- /sample/.gitignore: -------------------------------------------------------------------------------- 1 | /captures 2 | 3 | # built application files 4 | *.apk 5 | *.ap_ 6 | 7 | # files for the dex VM 8 | *.dex 9 | 10 | # Java class files 11 | *.class 12 | 13 | # built native files (uncomment if you build your own) 14 | # *.o 15 | # *.so 16 | 17 | # generated files 18 | bin/ 19 | gen/ 20 | 21 | # Ignore gradle files 22 | .gradle/ 23 | build/ 24 | captures/ 25 | 26 | # Local configuration file (sdk path, etc) 27 | local.properties 28 | 29 | # Proguard folder generated by Eclipse 30 | proguard/ 31 | 32 | # Eclipse Metadata 33 | .metadata/ 34 | 35 | # Mac OS X clutter 36 | *.DS_Store 37 | 38 | # Windows clutter 39 | Thumbs.db 40 | 41 | # Eclipse project files 42 | .classpath 43 | .project 44 | 45 | # Intellij IDEA (see https://intellij-support.jetbrains.com/entries/23393067) 46 | .idea/tasks.xml 47 | .idea/datasources.xml 48 | .idea/dataSources.ids 49 | *.iml 50 | *.ipr 51 | *.iws 52 | .idea/ 53 | out/ 54 | -------------------------------------------------------------------------------- /sample/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | android { 3 | compileSdkVersion 29 4 | defaultConfig { 5 | applicationId "com.developer.gbutton" 6 | minSdkVersion 21 7 | targetSdkVersion 29 8 | versionCode 1 9 | versionName "1.0.19" 10 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 11 | } 12 | buildTypes { 13 | release { 14 | minifyEnabled false 15 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 16 | } 17 | } 18 | } 19 | dependencies { 20 | implementation fileTree(include: ['*.jar'], dir: 'libs') 21 | // Using the library source code to run and test it. 22 | implementation project(':library') 23 | 24 | androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { 25 | exclude group: 'com.android.support', module: 'support-annotations' 26 | }) 27 | implementation 'androidx.appcompat:appcompat:1.1.0' 28 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 29 | testImplementation 'junit:junit:4.12' 30 | } 31 | 32 | -------------------------------------------------------------------------------- /sample/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/shobhit/Documents/adt-bundle-mac-x86_64-20140702/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /sample/src/androidTest/java/com/developer/gbutton/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.developer.gbutton; 2 | 3 | import android.content.Context; 4 | import androidx.test.InstrumentationRegistry; 5 | import androidx.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.shobhitpuri.googlecustomsigninbutton", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /sample/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /sample/src/main/java/com/developer/gbutton/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.developer.gbutton; 2 | 3 | import android.os.Bundle; 4 | import androidx.appcompat.app.AppCompatActivity; 5 | 6 | /** 7 | * Sample activity to show the Custom Google Sign in button 8 | */ 9 | public class MainActivity extends AppCompatActivity { 10 | 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | setContentView(R.layout.activity_main); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/sample/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/sample/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/sample/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/sample/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/sample/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TutorialsAndroid/GButton/4867df40beed1e7fed4ceb5df1d300467f3c98c1/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /sample/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | GoogleCustomSignInButton 3 | 4 | -------------------------------------------------------------------------------- /sample/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /sample/src/test/java/com/developer/gbutton/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.developer.gbutton; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':sample', ':library' 2 | --------------------------------------------------------------------------------