When doing development, we often put the listview in the middle and then place an edittext control at the bottom. This causes the editor to pop up when the editor gains focus, and the Edittext control moves upward, blocking part of the data in the listview, which is not very beautiful. So, we need to let the listview move upwards, so we need:
Method 1:In the XML file, adding this sentence when setting the listview attribute is OK android:transscriptMode="normal";
Method 2:Add statements to the program:
(ListView.TRANSCRIPT_MODE_NORMAL);
If you want the listview to move up, the listview scrolls upwards as the item increases.
(AbsListView.TRANSCRIPT_MODE_ALWAYS_SCROLL);
If you don't want the listview to move up, you won't let the listview scroll upward as the item increases.
(ListView.TRANSCRIPT_MODE_DISABLED);<span style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;">//</span><span style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;">dataitemStill increasing listview</span><span style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;">Don't scroll,</span>
The listview data remains in its original position after refreshing.
When pulling down to refresh, set (AbsListView.TRANSCRIPT_MODE_DISABLED);
Then calculate the original position and refresh the data ();
Then there is the setting, which is basically smooth and has no jumps. Good experience
The above is all the simple method that the editor brings to you to avoid popping up soft keyboards to cover listviews. I hope it will be helpful to everyone and support me more~