reformat code & optimize import & reorder entries
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user