Skip to content

Commit abaa66a

Browse files
committed
update README
1 parent b69113b commit abaa66a

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#MultiStateLayout
1+
# MultiStateLayout
22
[![](https://jitpack.io/v/andyxialm/MultiStateLayout.svg)](https://jitpack.io/#andyxialm/MultiStateLayout)
33

44

@@ -29,10 +29,10 @@ dependencies {
2929
##### Step 1. Add the JitPack repository to your build file
3030
~~~ xml
3131
<repositories>
32-
<repository>
33-
<id>jitpack.io</id>
34-
<url>https://jitpack.io</url>
35-
</repository>
32+
<repository>
33+
<id>jitpack.io</id>
34+
<url>https://jitpack.io</url>
35+
</repository>
3636
</repositories>
3737
~~~
3838

@@ -58,7 +58,7 @@ dependencies {
5858
state:animEnable="true"
5959
state:animDuration="500">
6060

61-
<!-- content layout -->
61+
<!-- content layout -->
6262
<TextView
6363
android:layout_width="wrap_content"
6464
android:layout_height="wrap_content"
@@ -99,6 +99,16 @@ mMultiStateLayout.setState(MultiStateLayout.State.NETWORK_ERROR);
9999

100100
```
101101

102+
##### How to add customize state view?
103+
```java
104+
View customStateView = LayoutInflater.from(this).inflate(R.layout.layout_custom_notice, mStateLayout, false);
105+
mStateLayout.putCustomStateView(KEY_CUSTOM_STATE, customStateView);
106+
```
107+
##### Show customize state view.
108+
```java
109+
mStateLayout.setCustomState(KEY_CUSTOM_STATE);
110+
```
111+
102112
##### How to customise transition animation?
103113
```java
104114
mStateLayout.setTransitionAnimator(new TransitionAnimatorLoader() {
@@ -114,7 +124,7 @@ mStateLayout.setTransitionAnimator(new TransitionAnimatorLoader() {
114124

115125
### License
116126

117-
Copyright 2016 andy
127+
Copyright 2017 andy (https://github.com/andyxialm)
118128

119129
Licensed under the Apache License, Version 2.0 (the "License");
120130
you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)