We usually use TextView and Edittextview when the time is always very random to write its corresponding XML, but when you have a sliding effect in the interface if you do not pay attention to, you may find your interface actually sometimes have a very card feeling, specific why card, Where is the card we often can not touch the mind, obviously a little time-consuming operation is not, the interface is more than a sentence, TextView Settex function, how on the card is not a sample, we sometimes go to suspect the android mechanism is not good apple. In fact, the reason is that we don't know enough about the control.
When there is a control like ScrollView or ListView in an interface, we need to slide the interface, and sometimes the sliding interface has the corresponding textview to explain, but a swipe to find the interface special card. If this is the case, note that your XML is set to the TextView of the width of the wrapcontent, this time to set him to Fillparent. Of course, sometimes fillparent is not good, because if your textview's parent view's length and width is also a change in value, it could also lead to Kaka.
Why the use of wrapcontent after the lag will occur. After thinking about it, when you swipe, the ListView or ScrollView is redrawing his sub-view. At this point, TextView is set when sliding, such as using TextView to modify the content. This time TextView because the content length of the setting has changed, resulting in a redraw with the parent view, the calculation of the length of the width has been conflicting. Therefore, in order to avoid this conflict, the length of the TextView must be computed by the parent view. So either you set it to fillparent or you fix a long-width, which solves the TextView of the interface when the content is set. Anyway, when you can't find out the root of the lag, check to see if the length of the parent view is affected by the child view.
In fact, many on the web about the ListView sliding occurs, in fact, the summary is not very perfect, most of the ListView is set into Fillparent, and so on, many say GetView repeated calls, and this also has a relationship. Many of these are due to the fact that the length of the TextView is not a fixed value or is not measurable. If you write them down as a value, you will find that the interface is smooth and smooth.
About Android Textview,edittext, causing the interface to stutter