@@ -22,7 +22,7 @@ allprojects {
2222##### Step 2. Add the dependency
2323~~~ xml
2424dependencies {
25- compile 'com.github.andyxialm:MultiStateLayout:0.1.0 '
25+ compile 'com.github.andyxialm:MultiStateLayout:0.1.1 '
2626}
2727~~~
2828
@@ -42,7 +42,7 @@ dependencies {
4242<dependency >
4343 <groupId >com.github.andyxialm</groupId >
4444 <artifactId >MultiStateLayout</artifactId >
45- <version >0.1.0 </version >
45+ <version >0.1.1 </version >
4646</dependency >
4747~~~
4848
@@ -118,6 +118,18 @@ mMultiStateLayout.setOnStateViewCreatedListener(new OnStateViewCreatedListener()
118118
119119```
120120
121+ ##### Add a listener that will be invoked whenever the state view changes or is incrementally.
122+ ``` java
123+
124+ mMultiStateLayout. addOnStateChangedListener(new OnStateChangedListener () {
125+ @Override
126+ public void onChanged (int state ) {
127+
128+ }
129+ });
130+
131+ ```
132+
121133##### How to add customize state view?
122134``` java
123135View customStateView = LayoutInflater . from(this ). inflate(R . layout. layout_custom_notice, mStateLayout, false );
@@ -165,7 +177,7 @@ allprojects {
165177##### Step 2. Add the dependency
166178~~~ xml
167179dependencies {
168- compile 'com.github.andyxialm:MultiStateLayout:0.1.0 '
180+ compile 'com.github.andyxialm:MultiStateLayout:0.1.1 '
169181}
170182~~~
171183
@@ -185,7 +197,7 @@ dependencies {
185197<dependency >
186198 <groupId >com.github.andyxialm</groupId >
187199 <artifactId >MultiStateLayout</artifactId >
188- <version >0.1.0 </version >
200+ <version >0.1.1 </version >
189201</dependency >
190202~~~
191203
@@ -261,6 +273,18 @@ mMultiStateLayout.setOnStateViewCreatedListener(new OnStateViewCreatedListener()
261273
262274```
263275
276+ ##### 监听状态改变
277+ ``` java
278+
279+ mMultiStateLayout. addOnStateChangedListener(new OnStateChangedListener () {
280+ @Override
281+ public void onChanged (int state ) {
282+
283+ }
284+ });
285+
286+ ```
287+
264288##### 如何添加自定义的状态视图?
265289``` java
266290View customStateView = LayoutInflater . from(this ). inflate(R . layout. layout_custom_notice, mStateLayout, false );
0 commit comments