Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Kennyc1012 committed Aug 13, 2015
1 parent 47f6225 commit 7d615a1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ MultiStateView can be used the same as any other view by adding it as a layout f
xmlns:app="https://schemas.android.com/apk/res-auto"
android:id="@+id/multiStateView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:msv_errorView="@layout/error_view"
app:msv_emptyView="@layout/empty_view"
app:msv_loadingView="@layout/loading_view"
app:msv_viewState="loading"
android:layout_height="match_parent">
app:msv_viewState="loading">

<ListView
android:id="@+id/list"
Expand All @@ -46,19 +46,19 @@ The attributes to set for MultiStateView are
```

msv_loadingView is the view to be used for the [LOADING ViewState](https://github.com/Kennyc1012/MultiStateView/blob/master/library/src/main/java/com/kennyc/view/MultiStateView.java#L34)<br>
msv_emptyView is the view to be used for the [EMPTY ViewSate](https://github.com/Kennyc1012/MultiStateView/blob/master/library/src/main/java/com/kennyc/view/MultiStateView.java#L34)<br>
msv_errorView is the view to be used for the [ERROR ViewState](https://github.com/Kennyc1012/MultiStateView/blob/master/library/src/main/java/com/kennyc/view/MultiStateView.java#L34)<br>
msv_viewState is the [ViewState](https://github.com/Kennyc1012/MultiStateView/blob/master/library/src/main/java/com/kennyc/view/MultiStateView.java#L34) for the MultiStateView<br>
The [CONTENT ViewState](https://github.com/Kennyc1012/MultiStateView/blob/master/library/src/main/java/com/kennyc/view/MultiStateView.java#L34) is determined by whatever is inside of the tags via XML. <b>NOTE**</b> a Content view must be set for the view to function, this is by design.
msv_emptyView is the view to be used for the [EMPTY ViewSate](https://github.com/Kennyc1012/MultiStateView/blob/master/library/src/main/java/com/kennyc/view/MultiStateView.java#L32)<br>
msv_errorView is the view to be used for the [ERROR ViewState](https://github.com/Kennyc1012/MultiStateView/blob/master/library/src/main/java/com/kennyc/view/MultiStateView.java#L30)<br>
msv_viewState is the [ViewState](https://github.com/Kennyc1012/MultiStateView/blob/master/library/src/main/java/com/kennyc/view/MultiStateView.java#L38) for the MultiStateView<br>
The [CONTENT ViewState](https://github.com/Kennyc1012/MultiStateView/blob/master/library/src/main/java/com/kennyc/view/MultiStateView.java#L28) is determined by whatever is inside of the tags via XML. <b>NOTE**</b> a Content view must be set for the view to function, this is by design.

To switch the state of MultiStateView, simply call
```java
public void setViewState(ViewState state)
public void setViewState(@ViewState int state)
```

You can also get the View for the accompanying ViewState by calling
```java
public View getView(ViewState state)
public View getView(@ViewState int state)
```

#Including in your project
Expand All @@ -73,7 +73,7 @@ repositories {
## Add dependency
```groovy
dependencies {
compile 'com.kennyc:multistateview:1.0.1'
compile 'com.kennyc:multistateview:1.1'
}
```

Expand Down

0 comments on commit 7d615a1

Please sign in to comment.