Aidan Follestad 10 роки тому
батько
коміт
2b03518490
4 змінених файлів з 37 додано та 35 видалено
  1. 33 31
      README.md
  2. 2 2
      library/build.gradle
  3. 2 2
      sample/build.gradle
  4. BIN
      sample/sample.apk

+ 33 - 31
README.md

@@ -6,9 +6,11 @@ The code you see below is also found in the sample project. You can download a A
 
 ### What's New
 
-###### Version 0.2.1
+###### Version 0.3.0
 
-> A small but important fix to 0.2.0
+> 1. MaterialDialogCompat allows easy migration from use of AlertDialog (see README below).
+> 2. Convenience `show()` method in Builder, to skip call to `build()`.
+> 3. Various important fixes from pull requests and the maintainer. 
 
 ###### Version 0.2.0
 
@@ -24,7 +26,7 @@ Easily reference the library in your Android projects using this dependency in y
 
 ```Groovy
 dependencies {
-    compile 'com.afollestad:material-dialogs:0.2.1'
+    compile 'com.afollestad:material-dialogs:0.3'
 }
 ```
 
@@ -59,6 +61,34 @@ If the content is long enough, it will become scrollable and a divider will be d
 
 ---
 
+### Migration from AlertDialogs
+
+If you're migrating old dialogs you could use ```MaterialDialogCompat```. You need change imports and replace ```AlertDialog.Builder``` with ```MaterialDialogCompat.Builder```:
+
+```java
+MaterialDialogCompat.Builder dialogBuilder = new MaterialDialogCompat.Builder( context );
+dialogBuilder.setMessage( messageId );
+dialogBuilder.setTitle( titleId );
+dialogBuilder.setNegativeButton( R.string.OK, new DialogInterface.OnClickListener()
+{
+    @Override
+    public void onClick( DialogInterface dialog, int which )
+    {
+        dialog.dismiss();
+        if ( listener != null )
+        {
+            listener.onCancel( dialog );
+        }
+    }
+} );
+
+dialogBuilder.create().show();
+```
+
+But it's highly recommend to use original ```MaterialDialog``` API for new usages.
+
+---
+
 ### Displaying an Icon
 
 MaterialDialog supports the display of an icon just like the stock AlertDialog; it will go to the left of the title.
@@ -310,34 +340,6 @@ To see more colors that fit the Material design palette, see this page: http://w
 
 ---
 
-### Convenience Builder class
-
-If you're migrating old dialogs you could use ```MaterialDialogCompat```. You need change imports and replace ```AlertDialog.Builder``` with ```MaterialDialogCompat.Builder```:
-
-```java
-MaterialDialogCompat.Builder dialogBuilder = new MaterialDialogCompat.Builder( context );
-dialogBuilder.setMessage( messageId );
-dialogBuilder.setTitle( titleId );
-dialogBuilder.setNegativeButton( R.string.OK, new DialogInterface.OnClickListener()
-{
-    @Override
-    public void onClick( DialogInterface dialog, int which )
-    {
-        dialog.dismiss();
-        if ( listener != null )
-        {
-            listener.onCancel( dialog );
-        }
-    }
-} );
-
-dialogBuilder.create().show();
-```
-
-But we highly recommend to use original ```MaterialDialog``` API for new classes.
-
----
-
 ### Misc
 
 If you need to access a View in the custom view set to a MaterialDialog, you can use `getCustomView()` of

+ 2 - 2
library/build.gradle

@@ -10,7 +10,7 @@ android {
         minSdkVersion 14
         targetSdkVersion 21
         versionCode 1
-        versionName "0.2.1"
+        versionName "0.3.0"
     }
     buildTypes {
         release {
@@ -33,7 +33,7 @@ publish {
     userOrg = 'drummer-aidan'
     groupId = 'com.afollestad'
     artifactId = 'material-dialogs'
-    version = '0.2.1'
+    version = '0.3.03'
     description = 'A library for implementing Material design styled dialogs across all versions of Android.'
     website = 'https://github.com/afollestad/material-dialogs'
     issueTracker = "${website}/issues"

+ 2 - 2
sample/build.gradle

@@ -8,8 +8,8 @@ android {
         applicationId "com.afollestad.materialdialogssample"
         minSdkVersion 14
         targetSdkVersion 21
-        versionCode 32
-        versionName "0.2.0"
+        versionCode 33
+        versionName "0.3.0"
     }
     buildTypes {
 //        release {

BIN
sample/sample.apk