Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
StuStirling committed Feb 24, 2016
2 parents adbd761 + fc3fe46 commit 0a4fd81
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
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 );

0 comments on commit 0a4fd81

Please sign in to comment.