</ListView>`
android:layout_width="fill_parent"
android:layout_height="400dp"
android:id="@+id/listview"
android:paddingTop="51dp"
android:divider="#00ffffff"
android:dividerHeight="5dp"
android:layout_weight="1"
android:cacheColorHint="#006300ff"
android:background="@drawable/sfando"
android:longClickable="false"
android:choiceMode="multipleChoice"
android:fastScrollAlwaysVisible="false"
android:touchscreenBlocksFocus="false">`
public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long l) {
adapterView.requestFocusFromTouch();
adapterView.setSelection(i);
itemnum = view;
return false;
}
});
listView.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
view.setBackgroundResource(R.color. @Override
public void onNothingSelected(AdapterView<?> adapterView) {
itemnum.setBackgroundColor(Color.TRANSPARENT);
}
listView.setTranscriptMode(AbsListView.TRANSCRIPT_MODE_ALWAYS_SCROLL);
这是我的java代码,我不明白whi自动滚动? 谢谢,借口我糟糕的经历,但我是新的
......................................