[英]ListView crashing the my application why?
當我嘗試在ListView中向下滾動時我的應用程序崩潰我試圖追蹤錯誤我找不到它,活動工作正常,但當我嘗試向下滾動應用程序崩潰時,你能不能請各位告訴我哪里是錯誤或我的代碼混亂了什么?
我已經刪除了向下滾動效果並刪除了
lv.setOnScrollListener(new OnScrollListener()
但仍然是同樣的問題
listview xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background_scroller"
>
<ListView
android:id="@+id/ringtoneListview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/scrollback"
android:divider="#93c7e8"
android:dividerHeight="1dp" />
</LinearLayout>
在這里,您將對象設置為Long
convertView.setTag(r.getLong("toneid"))
然后你想要這個相同的對象是一個視圖。 ViewHolder(類型視圖)
holder = (ViewHolder) convertView.getTag();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.