Skip to content

Commit 3e5e62d

Browse files
committed
Update README.md
1 parent 017bd1f commit 3e5e62d

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

README.md

+65
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,71 @@ HoloCircularProgressBar is a Custom View implementation for Android you might kn
1414

1515
## Usage
1616

17+
### Sample Project
18+
19+
You can see the ProgressBar working in the sample application. Just check out the library and create a new "Android Project form Existing Code"
20+
21+
### Use it in your own Code
22+
23+
Add the View in your Layout
24+
25+
<de.passsy.holocircularprogressbar.HoloCircularProgressBar
26+
android:id="@+id/holoCircularProgressBar1"
27+
android:layout_width="wrap_content"
28+
android:layout_height="wrap_content"/>
29+
30+
#### Got this error?
31+
32+
The following classes could not be instantiated:
33+
- de.passsy.holocircularprogressbar.HoloCircularProgressBar (Open Class, Show Error Log)
34+
See the Error Log (Window > Show View) for more details.
35+
Tip: Use View.isInEditMode() in your custom views to skip code when shown in Eclipse
36+
37+
If your Layout Editor can't draw the view, you have to restart Eclipse. There is a bug in the ADT Plugin
38+
39+
##### Got the next error?
40+
41+
Missing styles. Is the correct theme chosen for this layout?
42+
Use the Theme combo box above the layout to choose a different layout, or fix the theme style references.
43+
44+
Failed to find style 'circularProgressBarStyle' in current theme
45+
46+
You have to add a style for this View. see below
47+
48+
There are several XML attributes you can add the the HoloCircularProgressBar
49+
50+
<de.passsy.holocircularprogressbar.HoloCircularProgressBar
51+
android:id="@+id/holoCircularProgressBar1"
52+
android:layout_height="wrap_content"
53+
android:layout_width="wrap_content"
54+
55+
app:stroke_width="10dp"
56+
app:progress="0.4"
57+
app:marker_progress="0.6"
58+
app:progress_color="@android:color/holo_orange_dark"
59+
app:progress_background_color="#cccccc"
60+
app:gravity="center" />
61+
62+
### Style
63+
64+
Don't forget to add a default style to your AppTheme
65+
66+
<style name="AppTheme" parent="android:Theme.Holo">
67+
<item name="circularProgressBarStyle">@style/CircularProgressBar</item>
68+
</style>
69+
70+
I added two simple styles @style/CircularProgressBar and @style/CircularProgressBarLight to give you a quick start. You can see both styles in action in the sample Project
71+
72+
After you wrote your own style you might restart your Eclipse again as I mentioned before. The ADT Plugin really has some troubles working with Android Libraries and Styles
73+
74+
## Bugs
75+
76+
You found bugs? Report them or feel free to fix them by yourself and make a pull request. No one wants a buggy library
77+
78+
79+
80+
81+
1782

1883
## License
1984

0 commit comments

Comments
 (0)