导读:myList.setOnFocusChangeListener(new View.OnFocusChangeListener() { public void onFocusChange(View v, boolean hasFocus) { if (hasFocus) { myHandler.postAtFrontOfQueue(new Runnable() { public void run() { myList.setSelection(0); } }); } } })...
myList.setOnFocusChangeListener(new View.OnFocusChangeListener() {
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus) {
myHandler.postAtFrontOfQueue(new Runnable() {
public void run() {
myList.setSelection(0);
}
});
}
}
});
private Handler myHandler = new Handler();
作者“技术人生”