FinestWebView-Android
FinestWebView-Android copied to clipboard
Fatal Exception: java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to com.android.internal.widget.ActionBarOverlayLayout$LayoutParams
This crash happens on HTC devices running kitkat like:
HTC One HTC desire 610 HTC One mini 2
this crash happens EVERYTIME
+1
Solution: Add theme in builder. Example:
new FinestWebView.Builder(context) .theme(R.style.FinestWebViewAppTheme)
R.style.FinestWebViewAppTheme -> R.style.FinestWebViewTheme?
<style name="Theme.AppCompat.Light.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.AppCompat.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="FinestWebViewTheme" parent="Theme.AppCompat.NoActionBar">
<item name="colorPrimary">@color/finestWhite</item>
<item name="colorPrimaryDark">@color/finestGray</item>
<item name="colorAccent">@color/finestBlack</item>
<item name="android:textColorPrimary">@color/finestBlack</item>
<item name="android:textColorSecondary">@color/finestSilver</item>
<item name="windowActionModeOverlay">true</item>
</style>
<style name="sac_FinestWebViewTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#FFFFFF</item>
<item name="colorPrimaryDark">#E7E7E7</item>
<item name="colorAccent">#000000</item>
<item name="android:textColorPrimary">#000000</item>
<item name="android:textColorSecondary">#A5A5A5</item>
<item name="windowActionModeOverlay">true</item>
</style>
I am using sac_FinestWebViewTheme. but same error.
<style name="FinestWebViewAppTheme" parent="Theme.AppCompat.Light"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style>
@jkstop I try "Theme.AppCompat.Light". but same error. I have not HTC One device. I tested this on Google Play Deveolper Console(Pre-launch report).
I have same issue but i'm not using FinestWebView-Android
, probably it's framework/vendor bug...
any workaround ?!
up, i have it same
+1