بروز خطا
[message]
اشتراک در سوال
رای ها
[dataList]
ارور در هنگام سرچ
سلام
من از یک edittext برای سرچ تو دیتابیس سرور استفاده میکنم
اگه عدد سرچ کنم مشکلی نیست
مثلا یک عدد سرچ میکنم و بعد پاک میکنم و دوباره ...
اما وقتی یک حرف یا جمله سرچ میکنم و پاکش میکنم و دوباره عدد سرچ میکنم ارور میده
06-06 14:11:58.726: E/AndroidRuntime(6193): java.lang.IllegalStateException: The content of
the adapter has changed but ListView did not receive a notification. Make sure the content
of your adapter is not modified from a background thread, but only from the UI thread. [in
ListView(2131034138, class android.widget.ListView) with Adapter(class pr0gram3r72.BookOnlin
e.AdapterApplication)]
0
0
کمک (12 سال پیش)
برای این سوال 2 پاسخ وجود دارد.
پاسخ به سوال
Borhani
12 سال پیش
0
0
سلام برای جستجو از کد زیر استفاده کن :
public static void Search(String text)
{
NotesPerson.clear();
Cursor cursor = databasePerson.rawQuery("SELECT * FROM person where person_Name LIKE '" + text + "%'", null);
while (cursor.moveToNext())
{
StructNote note = new StructNote();
note.NamePerson = cursor.getString(cursor.getColumnIndex("person_Name"));
note.sender = cursor.getString(cursor.getColumnIndex("person_phoneNumber"));
note.GroupID = cursor.getInt(cursor.getColumnIndex("person_GroupID"));
NotesPerson.add(note);
}
cursor.close();
}
پاسخ به سوال
Borhani
12 سال پیش
0
0
این کد را در خاصیت ontextchange بذار فراخوانی کن در رحمت حق باشی
پاسخگویی و مشاهده پاسخ های این سوال تنها برای اعضای ویژه سایت امکان پذیر است .
چنانچه تمایل دارید به همه بخش ها دسترسی داشته باشید میتوانید از این بخش لایسنس این آموزش را خریداری نمایید .