First of all thanks for the .aar file, It's really helpful.
I tried to set the width and height to match_parent but it seems that some constraint is set which is not allowing me to change the same more than.. around 300dp.
Please let me know how to change it to match the parent view (full screen in my case)
I use this library for testing in handheld and tablet device. Everything work in handheld device but on tablet I get this error on layout editor :
java.lang.IllegalArgumentException: width and height must be > 0 at android.graphics.Bitmap.createBitmap(Bitmap.java:877) at android.graphics.Bitmap.createBitmap(Bitmap.java:856) at android.graphics.Bitmap.createBitmap(Bitmap.java:787) at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:663) at com.cardiomood.android.controls.gauge.SpeedometerGauge.drawBackground(SpeedometerGauge.java:372) at com.cardiomood.android.controls.gauge.SpeedometerGauge.onDraw_Original(SpeedometerGauge.java:218) at com.cardiomood.android.controls.gauge.SpeedometerGauge.onDraw(SpeedometerGauge.java) at android.view.View.draw(View.java:17071) at android.view.View.draw(View.java:16979) at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3764) at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61) at android.view.ViewGroup.drawChild(ViewGroup.java:3764) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550) at android.view.View.draw(View.java:16977) at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3764) at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61) at android.view.ViewGroup.drawChild(ViewGroup.java:3764) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550) at android.view.View.draw(View.java:16977) at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3764) at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61) at android.view.ViewGroup.drawChild(ViewGroup.java:3764) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550) at android.view.View.draw(View.java:16977) at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3764) at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61) at android.view.ViewGroup.drawChild(ViewGroup.java:3764) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550) at android.view.View.draw(View.java:16977) at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3764) at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61) at android.view.ViewGroup.drawChild(ViewGroup.java:3764) at android.support.design.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1230) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550) at android.view.View.draw(View.java:17074) at android.view.View.draw(View.java:16979) at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3764) at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61) at android.view.ViewGroup.drawChild(ViewGroup.java:3764) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550) at android.view.View.draw(View.java:16977) at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3764) at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61) at android.view.ViewGroup.drawChild(ViewGroup.java:3764) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550) at android.view.View.draw(View.java:16977) at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3764) at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61) at android.view.ViewGroup.drawChild(ViewGroup.java:3764) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550) at android.view.View.draw(View.java:17074) at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:401) at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:539) at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:422) at com.android.layoutlib.bridge.BridgeRenderSession.render(BridgeRenderSession.java:104) at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:154) at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:136) at com.android.tools.idea.rendering.RenderTask.lambda$renderInner$3(RenderTask.java:752) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
The gauges view look like weird. The text indicator is outside of the gauges. The line indicator is so big too. There is many many different from handheld view.
Hi @ntoskrnl
I used your library which is very useful to my requirement, But i am stucking how to draw needle as a triangle shape.
How to convert needle draw line method to draw bitmap or draw like a triangle shape needle.
Please Help.
I want to draw this image in place of needle line and rotate on around arc.
I'm trying to make Signal meter with dBm value. How can I change the start and the end value. It shoule start with -94 dBm (very bad signal) and end at 0 dBm (excellent signal strength).