Browse Source

New : color setting method to zendesk login notify dialog

Shan-PC\Shan 8 years ago
parent
commit
cf3dda6144

+ 35 - 1
.gitignore

@@ -1 +1,35 @@
-/build
+#built application files
+*.apk
+*.ap_
+
+# files for the dex VM
+*.dex
+
+# Java class files
+*.class
+
+# generated files
+bin/
+gen/
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Windows thumbnail db
+Thumbs.db
+
+# OSX files
+.DS_Store
+
+# Eclipse project files
+.classpath
+.project
+
+# Android Studio
+*.iml
+.idea
+.gradle
+build/
+keystore.properties
+*.patch
+*.keystore

+ 28 - 0
src/main/java/com/kdanmobile/kdan_others_library_for_android/ZendeskLoginNotifyDialog.java

@@ -2,6 +2,8 @@ package com.kdanmobile.kdan_others_library_for_android;
 
 import android.content.Context;
 import android.graphics.Color;
+import android.support.annotation.ColorInt;
+import android.support.annotation.ColorRes;
 
 import com.afollestad.materialdialogs.MaterialDialog;
 
@@ -37,6 +39,32 @@ public class ZendeskLoginNotifyDialog {
                 });
     }
 
+    public void setContentColor(@ColorInt int color) {
+        builder.contentColor(color);
+    }
+
+    public void setContentColorRes(@ColorRes int colorRes) {
+        builder.contentColorRes(colorRes);
+    }
+
+    public void setBackgroundColor(@ColorInt int color) {
+        builder.backgroundColor(color);
+    }
+
+    public void setBackgroundColorRes(@ColorRes int colorRes) {
+        builder.backgroundColorRes(colorRes);
+    }
+
+    public void setButtonColor(@ColorInt int color) {
+        builder.positiveColor(color);
+        builder.negativeColor(color);
+    }
+
+    public void setButtonColorRes(@ColorRes int colorRes) {
+        builder.positiveColorRes(colorRes);
+        builder.negativeColorRes(colorRes);
+    }
+
     public void show() {
         if (builder != null) {
             builder.show();