所以嘿,这是一个非常丑陋的解决方案,但它很短并且有效。
public class PreferenceActivity extends Activity {
//Sorry for stupid variable names, couldn't be bothered to be smart
private ScrollView svOptions;
private Runnable _run_sb_on;
private final Handler _handle_sb_on = new Handler();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.preference);
svOptions = (ScrollView) findViewById(R.id.svOptions);
_run_sb_on = new Runnable() { //i hate you google for making me write crap code !
public void run() {
svOptions.fling(0); //don't move it, just keep it alive
_handle_sb_on.postDelayed(this, 300); //300 is the timeout of the fader
}
};
_handle_sb_on.post(_run_sb_on);
}
// etc
}
所以你有它。请注意,投掷可以吃触摸事件,它很少见但有点烦人 - 但可行。