Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 46 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,53 @@ An Android library for drawing gauges on Canvas.

![GaugeView](http://goo.gl/Hu7Ou)

## Usage

TODO (coming soon)
------------------
Import the library into your project.

Clean up the code.
Configuration takes place via XML: *interaction via code is largely limited to updating the value the gauge will display.*

Document the main features.
In your layout XML file add/configure the GaugeView(s) as shown:

Add javadoc.
```xml
<org.codeandmagic.android.gauge.GaugeView
android:id="@+id/gauge_view1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />

<org.codeandmagic.android.gauge.GaugeView
android:id="@+id/gauge_view2"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_marginTop="10dp"
gauge:showOuterShadow="true"
gauge:showOuterRim="false"
gauge:showNeedle="false"
gauge:showRanges="false"
gauge:showText="true"
gauge:textUnit="%" />
```

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.