reformat code & optimize import & reorder entries

This commit is contained in:
CsHeng
2017-04-27 14:27:11 +08:00
parent 153f33f44b
commit 9432e34571
671 changed files with 33616 additions and 34861 deletions

View File

@ -12,12 +12,12 @@ import android.view.ViewGroup;
*/
public class MeasureHeightLayoutManager extends LinearLayoutManager {
private int[] mMeasuredDimension = new int[1];
public MeasureHeightLayoutManager(Context context) {
super(context);
}
private int[] mMeasuredDimension = new int[1];
@Override
public void onMeasure(RecyclerView.Recycler recycler, RecyclerView.State state,
int widthSpec, int heightSpec) {
@ -36,16 +36,16 @@ public class MeasureHeightLayoutManager extends LinearLayoutManager {
e.printStackTrace();
}
}
if (height > heightSize){
if (height > heightSize) {
super.onMeasure(recycler, state, widthSpec, heightSpec);
}else {
} else {
setMeasuredDimension(View.MeasureSpec.getSize(widthSpec), height);
}
}
private void measureScrapChild(RecyclerView.Recycler recycler, int position, int widthSpec,
int heightSpec, int[] measuredDimension) throws Exception{
int heightSpec, int[] measuredDimension) throws Exception {
View view = recycler.getViewForPosition(position);
if (view.getVisibility() == View.GONE) {
measuredDimension[0] = 0;