aloneGirle 2015-07-30 01:32 采纳率: 42.1%
浏览 3069

android ListView的item数据的显示问题

获取到的应该显示的数据都可以打印出来,但是界面上只有时间显示了出来,其他数据都
没有显示出来,查看布局也没发现哪儿的问题,希望各位帮帮忙喽!
图片说明
item的数据未显示部分布局如下:
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/rellay0"
android:orientation="horizontal" >

    <RelativeLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:layout_weight="1.0" >

        <TextView
            android:id="@+id/counpond_shop"
            style="@style/text_yahei_18sp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dp"
            android:layout_marginTop="5dp"
            android:singleLine="true"
            android:text="14549885" />

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/counpond_shop"
            android:layout_centerHorizontal="true" >

            <TextView
                android:id="@+id/text_fu"
                style="@style/text_meihong_18sp"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="35dp"
                android:layout_marginTop="10dp"
                android:text="¥" />

            <TextView
                android:id="@+id/coupond_money"
                style="@style/text_meihong_30sp"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="5dp"
                android:layout_toRightOf="@id/text_fu" />
        </RelativeLayout>
    </RelativeLayout>

    <RelativeLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1.0" >

        <TextView
            android:id="@+id/coupond_price_limit"
            style="@style/text_hei_14sp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="8dp" />

        <TextView
            android:id="@+id/coupond_name"
            style="@style/text_hei_14sp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:ellipsize="end"
            android:gravity="center"
            android:maxLines="2"
            android:padding="5dp" />
    </RelativeLayout>
</LinearLayout>
  • 写回答

2条回答 默认 最新

  • JPF1024 2015-07-30 01:50
    关注

    是不是被遮挡了?

    你可以用Logcat打印一下要显示的数据,看下其它数据是不是正确

    评论

报告相同问题?

悬赏问题

  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 Web.config连不上数据库
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退
  • ¥20 win系统的PYQT程序生成的数据如何放入云服务器阿里云window版?