From 6cb11b1226f39a469d78d3a6031e5f1f79a970e5 Mon Sep 17 00:00:00 2001 From: godfreyduke Date: Sat, 10 Oct 2015 16:11:38 -0700 Subject: [PATCH 1/2] Update README.md to include usage information --- README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e5b0667..37cc72b 100644 --- a/README.md +++ b/README.md @@ -6,12 +6,55 @@ An Android library for drawing gauges on Canvas. ![GaugeView](http://goo.gl/Hu7Ou) - -TODO (coming soon) ------------------- - -Clean up the code. - -Document the main features. - -Add javadoc. \ No newline at end of file +### Usage +===== + +Import the library into your project. + +Configuration takes place via XML: *interaction via code is largely limited to updating the value the gauge will display.* + +In your layout XML file add/configure the GaugeView(s) as shown: + +```xml + + + +``` + +Interact with the GaugeView: + +```java +private GaugeView mGaugeView1; +private GaugeView mGaugeView2; + +// Retrieve the references +mGaugeView1 = (GaugeView) findViewById(R.id.gauge_view1); +mGaugeView2 = (GaugeView) findViewById(R.id.gauge_view2); + +// Set the values to display +mGaugeView1.setTargetValue(25); +mGaugeView2.setTargetValue(35); +``` + +### TODO (coming soon) +===== + +- [ ] Clean up the code. + +- [ ] Document the main features. + +- [ ] Add javadoc. From c1ecc6ccfed21ce5ef10bd7e2a52d30a0f5ea082 Mon Sep 17 00:00:00 2001 From: godfreyduke Date: Sat, 10 Oct 2015 16:14:48 -0700 Subject: [PATCH 2/2] Minor formatting update --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 37cc72b..0e03e50 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,7 @@ An Android library for drawing gauges on Canvas. ![GaugeView](http://goo.gl/Hu7Ou) -### Usage -===== +## Usage Import the library into your project. @@ -50,8 +49,7 @@ mGaugeView1.setTargetValue(25); mGaugeView2.setTargetValue(35); ``` -### TODO (coming soon) -===== +## TODO (coming soon) - [ ] Clean up the code.