Closed eltos closed 6 years ago
Note:
The "default TAG behaviour" is not (yet) documented in the javadocs. These state that the OnDialogResultListener
will never be called with these show
functions.
Solution:
In your proguard-rules.pro
add:
-keepclassmembers class * extends eltos.simpledialogfragment.SimpleDialog {
public static final java.lang.String TAG;
}
This prevents proguard to rename the filed during minification.
When showing a Dialog without passing an explicit TAG, the implementation tries to use the
TAG
field as default (Seeshow(Fragment fragment)
andshow(FragmentActivity activity)
in SimpleDialog.java):This is unreliable and fails if the code was minified, which is common practice for android apps during release build (e.g.
minifyEnabled true
inbuild.gradle
). The bug is particularly insidious, as it will not occur for debug builds where minification is disabled by default.