ntoskrnl / speedometerview Goto Github PK
View Code? Open in Web Editor NEWSimple speedometer-like gauge with needle for Android
Simple speedometer-like gauge with needle for Android
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).
Is there any reason why you don't allow this value: https://github.com/ntoskrnl/SpeedometerView/blob/master/CardioMoodSpeedometerView/SpeedometerView/src/main/java/com/cardiomood/android/speedometer/SpeedometerView.java#L111-L112 to be 0?
I have worked around this temporarily by simply adding a very small number to the progress before calling setSpeed.
Hi,
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)
Thanks
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.
I want to draw this image in place of needle line and rotate on around arc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.