Answer the question
In order to leave comments, you need to log in
Why is the ListView slowly filling/drawing?
Hello!
The application has a list fragment that is populated from a database using a SimpleCursorAdapter.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
cursor = db.query(TABLE_NAME, null, null, null, null, null, null); // В коде непрямой вызов бд, но итог таков.
...
scAdapter = new SimpleCursorAdapter(getActivity(),
R.layout.rowlayout, cursor, from, to);
...
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_alarmclock, container, false);
mListView = (AbsListView) view.findViewById(android.R.id.list);
mListView.setAdapter(scAdapter);
mListView.setOnItemClickListener(this);
return view;
}
ContentValues cv = new ContentValues();
cv.put("text", entTime.getText().toString());
...
db.insert(TABLE_NAME, null, cv); // Тоже не вызывается напрямую.
Answer the question
In order to leave comments, you need to log in
Suddenly, my experience will be useful to the next generation of developers.
The problem was that when returning using the "up" button in the Action bar, there was an animation embedded in the android itself: the current window "floats" on the user and disappears, and the list smoothly appears from top to bottom. For me, it all looked jerky and inferior from the fact that all animation was turned off on the device. Because it seemed that the problem was with the list. And I attributed the window twitching when returning to another bug, which I planned to solve later.
Here is such a story. The question remains how to get rid of this animation if it is disabled on the user's device.
The identified problem is solved here .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question