-
-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IllegalArgumentException #174
Comments
Please make sure that the final height is not 0. |
Thanks ! `
` should I remove the layout_weight ? |
nope, leave everything as it is for now. |
Thanks, I"m waiting for it to update my App :) |
just quick solution for your layout. android:layout_height="0dp"
android:layout_weight="1" are invalid since AwesomeSpeedometer is a child of FrameLayout cause whatever changes are going to be in the next new version it may solve the exception, but your speedometer height still 0! and it will not be visible. have a good day ❤️ . |
fixed, new version c93b5e1. |
Im getting lot of crashes from my users
Android 8 and 9
I still cant reproduce the behavior
any help or fix
Fatal Exception: java.lang.IllegalArgumentException: width and height must be > 0 at android.graphics.Bitmap.createBitmap(Bitmap.java:1042) at android.graphics.Bitmap.createBitmap(Bitmap.java:1009) at android.graphics.Bitmap.createBitmap(Bitmap.java:959) at android.graphics.Bitmap.createBitmap(Bitmap.java:920) at com.github.anastr.speedviewlib.LinearGauge.createForegroundBitmapCanvas(LinearGauge.java:23) at com.github.anastr.speedviewlib.ProgressiveGauge.updateFrontAndBackBitmaps(ProgressiveGauge.java:2) at com.github.anastr.speedviewlib.LinearGauge.updateBackgroundBitmap(LinearGauge.java) at com.github.anastr.speedviewlib.LinearGauge.onSizeChanged(LinearGauge.java:3) at android.view.View.sizeChange(View.java:21272) at android.view.View.setFrame(View.java:21233) at android.view.View.layout(View.java:21085) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:21090) at android.view.ViewGroup.layout(ViewGroup.java:6460) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812) at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1801) at android.widget.LinearLayout.onLayout(LinearLayout.java:1567) at android.view.View.layout(View.java:21090) at android.view.ViewGroup.layout(ViewGroup.java:6460) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:21090) at android.view.ViewGroup.layout(ViewGroup.java:6460) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1083) at android.view.View.layout(View.java:21090) at android.view.ViewGroup.layout(ViewGroup.java:6460) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.widget.ScrollView.onLayout(ScrollView.java:1622) at android.view.View.layout(View.java:21090) at android.view.ViewGroup.layout(ViewGroup.java:6460) at androidx.viewpager.widget.ViewPager.onLayout(ViewPager.java:259) at android.view.View.layout(View.java:21090) at android.view.ViewGroup.layout(ViewGroup.java:6460) at androidx.constraintlayout.widget.ConstraintLayout.onLayout(ConstraintLayout.java:3) at android.view.View.layout(View.java:21090) at android.view.ViewGroup.layout(ViewGroup.java:6460) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:21090) at android.view.ViewGroup.layout(ViewGroup.java:6460) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656) at android.widget.LinearLayout.onLayout(LinearLayout.java:1565) at android.view.View.layout(View.java:21090) at android.view.ViewGroup.layout(ViewGroup.java:6460) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:21090) at android.view.ViewGroup.layout(ViewGroup.java:6460) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656) at android.widget.LinearLayout.onLayout(LinearLayout.java:1565) at android.view.View.layout(View.java:21090) at android.view.ViewGroup.layout(ViewGroup.java:6460) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at com.android.internal.policy.DecorView.onLayout(DecorView.java:1320) at android.view.View.layout(View.java:21090) at android.view.ViewGroup.layout(ViewGroup.java:6460) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2994) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2505) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1575) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7636) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1029) at android.view.Choreographer.doCallbacks(Choreographer.java:834) at android.view.Choreographer.doFrame(Choreographer.java:763) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1015) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:224) at android.app.ActivityThread.main(ActivityThread.java:7070) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:536) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:928)
My XML:
<com.github.anastr.speedviewlib.AwesomeSpeedometer android:id="@+id/datagaugespeed" android:layout_width="200dp" android:layout_height="0dp" android:layout_weight="1" android:layout_gravity="center" android:layout_marginTop="5dp" android:padding="8dp" app:sv_maxSpeed="100" app:sv_speedometerColor="@color/blueetooth_color" app:sv_unit="MB/s" app:sv_trembleDegree="2" app:sv_trembleDuration="6000" app:sv_unitTextColor="@color/yellow" />
The text was updated successfully, but these errors were encountered: