ListView动态改变Item的数据与UI。出现黑一下屏幕 convertview is the old view that has created.//android是这样介绍的。建议你加判断,如果converview==null,就创建。如果converview不为null,就替换里面的内容就是了。你可以尝试一下 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我这样的替换,就是替换Layout 。 与converview为不为Null 应该是无关的。 就算不是null我也要替换 提供替换Item的Layout的思路也可以啊,愁死我了 有没有log,看看点击的那一下,给谁处理了? http://hi.baidu.com/yiyudemei/item/76ac4456b3994e9b09be1787 这个已经在xml文件里给listview设置了我的xml文件<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/msg_history_bg" android:id="@+id/msg_history_layout" > <ListView android:id="@+id/list" android:layout_width="fill_parent" android:layout_height="fill_parent" android:cacheColorHint="#00000000" android:listSelector="@drawable/list_selector" android:fadingEdge="none" android:scrollbars="none"> </ListView></LinearLayout> log看不到,就是调用了adapter.notifyDataSetChanged();刚才又试了一下,发现第二次点 开始视频,Item会直接添加一个出来。第三次也一样、就是第一次,会黑屏。 android:cacheColorHint="#00000000"android:scrollingCache="false" 会不会在getView中,有返回null的情况 新手安装 ADT Plugin 失败。 cursor拿到的值,如果不想要其中一行怎么办? 本人菜鸟,请教一个handleMessage不执行的问题 Android 开发:如何连接到服务器上的mysql数据库 如何将整个android系统作为一个应用程序启动 自定义notification布局 怎么打jar包 android调用IKAnalyzer分词器出现内存溢出情况,求大神解决 关于Vold.fstab,高分 android拦截短信的内容在模拟器上面可以跑,真机上面不能拦截了,模拟器是4.0版本 android 持久化技术 progressDialog的问题 MP3项目,播放完就报错?
我这样的替换,就是替换Layout 。 与converview为不为Null 应该是无关的。 就算不是null我也要替换
这个已经在xml文件里给listview设置了我的xml文件
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/msg_history_bg"
android:id="@+id/msg_history_layout"
>
<ListView android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:cacheColorHint="#00000000"
android:listSelector="@drawable/list_selector"
android:fadingEdge="none"
android:scrollbars="none">
</ListView>
</LinearLayout>
log看不到,就是调用了adapter.notifyDataSetChanged();刚才又试了一下,发现第二次点 开始视频,Item会直接添加一个出来。第三次也一样、
就是第一次,会黑屏。
android:scrollingCache="false"