I have used DynamicGrid in a ScrollView.(because I need to put a picture above DynamicGrid)
And I Override onMeasure Method to show all items; But the item below can't drag drop to move to other place;
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, expandSpec);
}
Really have to use Recyclerview... Any help will be much appreciated.Thanks.
using gridview inside scrollview is an bad programming practice because gridview have its own scrollview class and your are going to again embed it into the scrollview for a result it will produce jerk in the vertical scrolling.
Try to implement RecyclerView.
RecyclerView is an latest component introduced by Android. it has better performance than GridView.
You can achieve your requirement by making use of RecyclerView.