From f630aa64962e8323cfc51b8e08d6f522fd9f3663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cjdsjlzx=E2=80=9D?= <“jdsjlzx@gmail.com“> Date: Tue, 30 Jan 2018 14:07:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jdsjlzx/recyclerview/LRecyclerView.java | 1 + .../jdsjlzx/recyclerview/LuRecyclerView.java | 1 + .../com/lzx/demo/adapter/DataAdapter.java | 20 ------------------- .../com/lzx/demo/base/BaseMainActivity.java | 2 ++ .../demo/ui/EndlessLinearLayoutActivity.java | 2 +- app/src/main/res/layout/sample_item_text.xml | 10 +--------- 6 files changed, 6 insertions(+), 30 deletions(-) diff --git a/LRecyclerview_library/src/main/java/com/github/jdsjlzx/recyclerview/LRecyclerView.java b/LRecyclerview_library/src/main/java/com/github/jdsjlzx/recyclerview/LRecyclerView.java index a121e41..f2bffd8 100644 --- a/LRecyclerview_library/src/main/java/com/github/jdsjlzx/recyclerview/LRecyclerView.java +++ b/LRecyclerview_library/src/main/java/com/github/jdsjlzx/recyclerview/LRecyclerView.java @@ -605,6 +605,7 @@ public void onScrolled(int dx, int dy) { if (!mLoadingData) { mLoadingData = true; mLoadMoreFooter.onLoading(); + mLoadMoreListener.onLoadMore(); } } diff --git a/LRecyclerview_library/src/main/java/com/github/jdsjlzx/recyclerview/LuRecyclerView.java b/LRecyclerview_library/src/main/java/com/github/jdsjlzx/recyclerview/LuRecyclerView.java index 53b8503..5344be3 100644 --- a/LRecyclerview_library/src/main/java/com/github/jdsjlzx/recyclerview/LuRecyclerView.java +++ b/LRecyclerview_library/src/main/java/com/github/jdsjlzx/recyclerview/LuRecyclerView.java @@ -410,6 +410,7 @@ public void onScrolled(int dx, int dy) { if (!mLoadingData) { mLoadingData = true; mLoadMoreFooter.onLoading(); + mLoadMoreListener.onLoadMore(); } } diff --git a/app/src/main/java/com/lzx/demo/adapter/DataAdapter.java b/app/src/main/java/com/lzx/demo/adapter/DataAdapter.java index 313e222..adc2b71 100644 --- a/app/src/main/java/com/lzx/demo/adapter/DataAdapter.java +++ b/app/src/main/java/com/lzx/demo/adapter/DataAdapter.java @@ -31,32 +31,12 @@ public void onBindItemHolder(SuperViewHolder holder, int position) { ItemModel item = mDataList.get(position); TextView titleText = holder.getView(R.id.info_text); - EditText titleEditor = holder.getView(R.id.info_edtor); titleText.setText(item.title); - titleEditor.addTextChangedListener(textWatcher); } @Override public void onViewRecycled(SuperViewHolder holder) { super.onViewRecycled(holder); - EditText titleEditor = holder.getView(R.id.info_edtor); - titleEditor.removeTextChangedListener(textWatcher); } - TextWatcher textWatcher = new TextWatcher() { - @Override - public void beforeTextChanged(CharSequence s, int start, int count, int after) { - - } - - @Override - public void onTextChanged(CharSequence s, int start, int before, int count) { - - } - - @Override - public void afterTextChanged(Editable s) { - - } - }; } diff --git a/app/src/main/java/com/lzx/demo/base/BaseMainActivity.java b/app/src/main/java/com/lzx/demo/base/BaseMainActivity.java index 4efe379..80ca6c0 100644 --- a/app/src/main/java/com/lzx/demo/base/BaseMainActivity.java +++ b/app/src/main/java/com/lzx/demo/base/BaseMainActivity.java @@ -13,6 +13,7 @@ import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; +import android.view.inputmethod.InputMethodManager; import android.widget.TextView; import com.lzx.demo.ItemDecoration.DividerDecoration; @@ -60,6 +61,7 @@ protected void onCreate(Bundle savedInstanceState) { .build(); mRecyclerView.addItemDecoration(divider); + } private static class ListItem { diff --git a/app/src/main/java/com/lzx/demo/ui/EndlessLinearLayoutActivity.java b/app/src/main/java/com/lzx/demo/ui/EndlessLinearLayoutActivity.java index 0fe7dbb..0477b54 100644 --- a/app/src/main/java/com/lzx/demo/ui/EndlessLinearLayoutActivity.java +++ b/app/src/main/java/com/lzx/demo/ui/EndlessLinearLayoutActivity.java @@ -190,7 +190,7 @@ public void onScrollStateChanged(int state) { //设置底部加载颜色 mRecyclerView.setFooterViewColor(R.color.colorAccent, R.color.dark ,android.R.color.white); //设置底部加载文字提示 - mRecyclerView.setFooterViewHint("拼命加载中","已经全部为你呈现了","网络不给力啊,点击再试一次吧"); + mRecyclerView.setFooterViewHint("拼命加载中","我是有底线的","网络不给力啊,点击再试一次吧"); mRecyclerView.refresh(); diff --git a/app/src/main/res/layout/sample_item_text.xml b/app/src/main/res/layout/sample_item_text.xml index 63a1323..52690fc 100644 --- a/app/src/main/res/layout/sample_item_text.xml +++ b/app/src/main/res/layout/sample_item_text.xml @@ -17,13 +17,5 @@ android:textColor="@color/color_00" android:text="22222" android:textSize="@dimen/dp_14"/> - +