Răsfoiți Sursa

customView(View) will use themed context for inflation too

Aidan Follestad 10 ani în urmă
părinte
comite
c58b6a59e7

+ 2 - 1
library/src/main/java/com/afollestad/materialdialogs/MaterialDialog.java

@@ -812,7 +812,8 @@ public class MaterialDialog extends DialogBase implements
         }
 
         public Builder customView(@LayoutRes int layoutRes, boolean wrapInScrollView) {
-            LayoutInflater li = LayoutInflater.from(this.context);
+            final ContextThemeWrapper themedContext = DialogInit.getTheme(this);
+            LayoutInflater li = LayoutInflater.from(themedContext);
             return customView(li.inflate(layoutRes, null), wrapInScrollView);
         }