@@ -12,9 +12,6 @@ AlertDialog for Android, a beautiful and material alert dialog to use in your an
12
12
13
13
` Latest version of this library is migrated to androidx `
14
14
15
- ## Download My Kinda App. A new way to debate on the topic
16
- [ ![ ] ( https://github.com/TutorialsAndroid/Spoti/blob/master/art/google-play-badge.png )] ( https://bit.ly/kindadownload )
17
-
18
15
## ScreenShot
19
16
![ ] ( https://github.com/TutorialsAndroid/KAlertDialog/blob/master/art/device-2019-03-23-132617.png )
20
17
@@ -35,7 +32,7 @@ Add it in your root build.gradle at the end of repositories:
35
32
Step 2. Add the dependency
36
33
37
34
dependencies {
38
- implementation 'com.github.TutorialsAndroid:KAlertDialog:v6 .0.19'
35
+ implementation 'com.github.TutorialsAndroid:KAlertDialog:v7 .0.19'
39
36
}
40
37
41
38
## Usage
@@ -147,6 +144,24 @@ Customizing the alert dialog
147
144
148
145
.confirmButtonColor(R.color.colorPrimary) // you can change the color of confirm button
149
146
.cancelButtonColor(R.color.colorAccent) // you can change the color of cancel button
147
+ .setContentTextSize(50) // you can change the content text size
148
+
149
+ //This is how you can set dark theme to alert dialog box
150
+ @Override
151
+ protected void onCreate(Bundle savedInstanceState) {
152
+
153
+ //sets the theme for app
154
+ SharedPreferences sharedPreferences = this
155
+ .getSharedPreferences("theme", Context.MODE_PRIVATE);
156
+ final boolean dark = sharedPreferences.getBoolean("dark", false);
157
+ setTheme(dark ? R.style.AppThemeDark : R.style.AppTheme);
158
+
159
+ DARK_STYLE = dark; //this will apply dark theme to KAlertDialog Box
160
+
161
+ super.onCreate(savedInstanceState);
162
+ setContentView(R.layout.main_ui);
163
+ }
164
+
150
165
151
166
And if you want to change the button corners with color create a drawable file
152
167
0 commit comments