Skip to content

Commit

Permalink
🌲 create default callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Bakumon committed Dec 22, 2017
1 parent a3f97bf commit d07e000
Show file tree
Hide file tree
Showing 7 changed files with 132 additions and 104 deletions.
21 changes: 11 additions & 10 deletions app/src/main/java/me/bakumon/statuslayoutmanager/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.bakumon.statuslayoutmanager;

import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.LayoutRes;
import android.support.v7.app.AppCompatActivity;
Expand Down Expand Up @@ -51,29 +52,29 @@ private void setupStatusLayoutManager() {
// 设置默认布局属性
// .setDefaultEmptyText("空白了,哈哈哈哈")
// .setDefaultEmptyImg(R.mipmap.ic_launcher)
// .setDefaultEmptyRetryText("retry")
// .setDefaultEmptyRetryTextColor(getResources().getColor(R.color.colorAccent))
// .setDefaultEmptyRetryVisible(false)
// .setDefaultEmptyClickViewText("retry")
// .setDefaultEmptyClickViewTextColor(getResources().getColor(R.color.colorAccent))
// .setDefaultEmptyClickViewVisible(false)
//
// .setDefaultErrorText(R.string.app_name)
// .setDefaultErrorImg(R.mipmap.ic_launcher)
// .setDefaultErrorRetryText("重试一波")
// .setDefaultErrorRetryTextColor(getResources().getColor(R.color.colorPrimaryDark))
// .setDefaultErrorRetryVisible(true)

// .setDefaultErrorClickViewText("重试一波")
// .setDefaultErrorClickViewTextColor(getResources().getColor(R.color.colorPrimaryDark))
// .setDefaultErrorClickViewVisible(true)
//
// .setDefaultLayoutsBackgroundColor(Color.WHITE)

// 自定义布局
// .setLoadingLayout(inflate(R.layout.layout_loading))
// .setEmptyLayout(inflate(R.layout.layout_empty))
// .setErrorLayout(inflate(R.layout.layout_error))

//
// .setLoadingLayout(R.layout.layout_loading)
// .setEmptyLayout(R.layout.layout_empty)
// .setErrorLayout(R.layout.layout_error)
//
// .setEmptyRetryID(R.id.tv_empty)
// .setErrorRetryID(R.id.tv_error)
// .setEmptyClickViewID(R.id.tv_empty)
// .setErrorClickViewID(R.id.tv_error)

// 设置重试事件监听器
.setOnStatusChildClickListener(new OnStatusChildClickListener() {
Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 11
targetSdkVersion 26
versionCode 1
versionName "1.0.0"
versionCode 2
versionName "1.0.1"
}

buildTypes {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package me.bakumon.statuslayoutmanager.library;

import android.view.View;

/**
* @author mafei
* @date 2017/12/22
* @see OnStatusChildClickListener 的默认实现类
* https://bakumon.me
*/

public class DefaultOnStatusChildClickListener implements OnStatusChildClickListener {
@Override
public void onEmptyChildClick(View view) {

}

@Override
public void onErrorChildClick(View view) {

}

@Override
public void onCustomerChildClick(View view) {

}
}
Loading

0 comments on commit d07e000

Please sign in to comment.