-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/StuStirling/connection-in…
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Connection Indicator | ||
A very small library to implement a connection indicator view. These connections may be GPS, Network or other loading indicators. | ||
|
||
This is only an initial version of the library and I will be making improvements as I go. | ||
|
||
At the moment there aren't any attribute setters in code. All attributes must be set via XML. | ||
|
||
<com.stustirling.connectionindicator.ConnectionIndicatorView | ||
android:layout_width="60dp" | ||
android:layout_height="wrap_content" | ||
android:id="@+id/indicator" | ||
android:layout_centerHorizontal="true" | ||
android:layout_marginBottom="2dp" | ||
connection_indicator:emptyBarColor="@color/greyColor" | ||
connection_indicator:solidSearchBarColor="@color/whiteColor" | ||
connection_indicator:bars="4" | ||
connection_indicator:animType="incremental" | ||
connection_indicator:connectionLevels="4"/> | ||
|
||
There are two `animTypes`: | ||
|
||
- flash = Alternates between connection level of 0 and max. | ||
- incremental = Each bar is turned solid in turn until all are solid and then it goes back to 0. | ||
|
||
To begin search mode: | ||
|
||
indicatorView.startSearching(); | ||
|
||
To stop searching: | ||
|
||
indicatorView.stopSearching(); | ||
|
||
To display a certain "connection level" call the following: | ||
|
||
indicatorView.displayConnectionLevel( 2 ); |