I'm trying to make a simple graphic in my Android app. I don't know how to start. I searched for some examples,but I found them to difficult for me.
I have 2 arrays with values and I want to represent them on a graphic, on Ox one array, and on Oy the other one.
Can anyone give me some simple example ? Please..
I believe you mean making "charts" ("graphics is too broad a term).
Check this questions for chart libraries to do it: Is there a good charting library for Android?
Related
I'll start with the fact that I'm quite new to Android
app development and I came across a real App screen, that I thought will be a good practice to convert to XML.
Although I successfully copied some parts of it, I believe I lack a little bit of knowledge to achieve that goal. So I hope to learn from your answers.
Please keep the answer as clean as possible since I wish to learn forward from it.
Thanks in advance!
NOTE:
1) The icons on the gray line are clickable.
2) the X on the light blue line is clickable and deletes the line.
So, I create for you quick demo app(it is not as good as for commerce practice). How it looks and works from inside you may see here in GitHub repo. Hope I help you!
Things you try to avoid:
hardcoded text & colors in XML
not consistent id-naming
none-dimensional code *, for example like this - android:textSize="16sp"
* - I mean use dimens.xml, for instance - android:textSize="#dimen/default_input_text_size"
I will recommend you read a great book:
Clean Code - Robert Martin
Also, I support #FrancislainyCampos post. You should try to read also about design and develop tools to think and do more consistently with Google recommendations.
Although I've heard of some new tools that proclaim to be able to automate the task of converting design screens to xml, I don't think that's wide spread around the Android community yet. I think the best tip for you here is just to actually type each element on the screen not converting it but making the layout happen. There's a few tutorials on how to use Constrainst Layout to achieve that on Youtube. I'd also suggest this course here on Udacity that explains the step by step on creating your first screens for Android.
Hope that helps.
I tried to find answer for my question, but I wasn't lucky. I have an Android app where I have thousands of points which have an altitude data and I want to draw that data in graph. What app is doing now is drawing graph data to ImageView. But I want to add zoom functionality, because when there are too many points that graph is too contracted.
I dont want to draw it to larger image and then downsample it, because it will take much memory - there can possible be many of these graphs. And I tried MPAndroidChart library to create that graph, but when there were thousands of points it drastically slowed down app.
I don't know what is the best to do. What do you think? I hope that this isn't a duplicate question and if you know that someone tried to solve this question, please let me know. Thnaks a lot.
This is complex stuff.
I can only recommand HelloCharts library that handles many things (including zoom): https://github.com/lecho/hellocharts-android
In my app, I have the following information which I want to display in the form of a graph.
Weight of a person.
Body temperature.
Date.
Now in my case, I want weight and body temperature on the y-axis parallel to each other and Date on the x-axis. So can anyone tell me which is the best android graph tool to do this? If possible with an example.
Regards
Anshuman
I have done quiet a research on this.If you are looking for drawing pie,histograms, bar or line graphs with 3D look I beliver ther is not such library available.You can use aichart for some 2D charts.Or final solution is you can start using the google Chart APIS , they are very good but they all are in web view and you need to have internet available on the phone/emulator.
There is a google group for achartengine, lots of good code is floating around there you can join it.
But I am afraid you will not get the 3D charting anywhere else.
if you thought of using the Adobe Flex (using AIR 3.1 or higher) you may get tremendous fullfillment of the requirement you are having in your head.You may get tempted to use it at once,but teh programming is in AS(Action Script)
have a look at the linked video, you will get teh idea of what I am talking about, but sadly you have to code in Action Script and not in Andorid PL.
I am trying to make an application in which I want to use wobble effect. It's same like the AndWobble2 apps. But I am not able to find how it should be exactly done. I found one library named Army Knife Library which is used for J2ME based mobiles. My question is can we use the same library for the adding the wobble effect to images or can we do this in opengl? Does anyone have any links or explanations to see how this is done? Thanks in advance.
I have currently some values in an array that I would like to display in a trend / graph ( don't know the appropriate english word)
I have been looking in Android source code to find the Gingerbread battery graph (https://android.googlesource.com/platform/packages/apps/Settings/+/gingerbread-release/src/com/android/settings/fuelgauge/BatteryHistoryChart.java
)
That solution seem to be a little bit overcomplicated and too much for a simple and nice graph.
Can someone point me a tutorial / code sample?
Try AChartEngine, it's really easy to understand and set up. Comes with plenty of examples too. http://www.achartengine.org/