jaredrummler / ColorPicker

A highly customizable color picker for Android
Apache License 2.0
791 stars 170 forks source link

What is the purpose of having NestedGridView? #72

Closed yccheok closed 5 years ago

yccheok commented 5 years ago

I look at the code of NestedGridView - https://github.com/jaredrummler/ColorPicker/blob/master/library/src/main/java/com/jaredrummler/android/colorpicker/NestedGridView.java

I have been puzzled a while, as I'm not understand the idea behind the following code?

  @Override public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
    int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
    super.onMeasure(widthMeasureSpec, expandSpec);
  }

May I know the purpose of having NestedGridView, instead of a standard GridView?

yccheok commented 5 years ago

Sorry. I read the code and run the demo. I know why.