In fact, this is a question of repeated questions. But every time you have to forget the same.
At first I thought it was just a matter of focus, so I spent a lot of time in the layout file of the interview focus, really lack of experience. Originally I was wrong object, for the ListView inside the GridView, in the ListView and GridView outside to write a scrollview on okay, and then the rewrite Onmeasure () method can be
/** * Created by Catherine on 15/7/23. */public class Noscrollgridview extends GridView {public Noscrollgridview (context context, AttributeSet attrs) {
super (context, attrs); } /** * Set does not scroll * /public void onmeasure (int widthmeasurespec, int heightmeasurespec) { int expandspec = Measurespec.makemeasurespec (Integer.max_value >> 2, measurespec.at_most); Super.onmeasure (Widthmeasurespec, Expandspec);} }
Okay, easy ending!
Remember: Improve code quality.
Vertical swipe in Android for horizontal swipe without obstacles