Android之如何解决Listview里面的值出现了2次

74 阅读1分钟

Listview里面的值出现了2次

                 不废话,先爆照

我去,这个listview里面的值怎么出现了2次,一直在找原因,后来解决了,先看下我的部分代码吧。

这是mainactivity.xml内容

 

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:sat="http://schemas.android.com/apk/res-auto"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    andro