Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.view.View;

import java.util.logging.Logger;

/**
* Created by cundong on 2015/10/9.
* <p/>
* 拓展的StaggeredGridLayoutManager,tks @Jack Tony
*/
public class ExStaggeredGridLayoutManager extends StaggeredGridLayoutManager {

private static final Logger LOGGER=Logger.getLogger(ExStaggeredGridLayoutManager.class.getName());
private final String TAG = getClass().getSimpleName();

GridLayoutManager.SpanSizeLookup mSpanSizeLookup;
Expand Down Expand Up @@ -60,7 +63,7 @@ public void onMeasure(RecyclerView.Recycler recycler, RecyclerView.State state,
}
// recycler.recycleView(view);
} catch (Exception e) {
e.printStackTrace();
LOGGER.warning(e.toString());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.logging.Logger;

/**
* Created by cundong on 2015/10/29.
Expand All @@ -34,6 +35,7 @@
*/
public class EndlessGridLayoutActivity extends AppCompatActivity {

private static final Logger LOGGER= Logger.getLogger(EndlessGridLayoutActivity.class.getName());
/**服务器端一共多少条数据*/
private static final int TOTAL_COUNTER = 64;

Expand Down Expand Up @@ -177,7 +179,7 @@ public void run() {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
LOGGER.warning(e.toString());
}

//模拟一下网络请求失败的情况
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.logging.Logger;

/**
* Created by cundong on 2015/10/29.
Expand All @@ -33,6 +34,7 @@
*/
public class EndlessLinearLayoutActivity extends AppCompatActivity {

private static final Logger LOGGER= Logger.getLogger(EndlessLinearLayoutActivity.class.getName());
/**服务器端一共多少条数据*/
private static final int TOTAL_COUNTER = 64;

Expand Down Expand Up @@ -183,7 +185,7 @@ public void run() {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
LOGGER.warning(e.toString());
}

//模拟一下网络请求失败的情况
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.logging.Logger;

/**
* Created by cundong on 2015/10/29.
Expand All @@ -35,6 +36,7 @@
*/
public class EndlessStaggeredGridLayoutActivity extends AppCompatActivity {

private static final Logger LOGGER= Logger.getLogger(EndlessStaggeredGridLayoutActivity.class.getName());
/**服务器端一共多少条数据*/
private static final int TOTAL_COUNTER = 64;

Expand Down Expand Up @@ -178,7 +180,7 @@ public void run() {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
LOGGER.warning(e.toString());
}

//模拟一下网络请求失败的情况
Expand Down