首页 > 编程语言 >在线直播系统源码,实现搜索后界面显示商品列表效果

在线直播系统源码,实现搜索后界面显示商品列表效果

时间:2022-12-13 14:11:23浏览次数:47  
标签:layout id content 直播 wrap 界面显示 height 源码 android

在线直播系统源码,实现搜索后界面显示商品列表效果

activity_main.xml

 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
 
    <TextView
        android:layout_width="match_parent"
        android:layout_height="45dp"
        android:text="水果商城"
        android:textSize="18sp"
        android:textColor="#FFFFFF"
        android:background="#FA3C78"
        android:gravity="center" />
    <ListView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/lv"/>
</LinearLayout>

list_view_header.xml

 

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="16dp">
    <ImageView
        android:layout_width="120dp"
        android:layout_height="90dp"
        android:id="@+id/iv"
        android:layout_centerVertical="true" />
    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:layout_toRightOf="@+id/iv"
        android:layout_centerVertical="true">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/title"
            android:text="桌子"
            android:textSize="20sp"
            android:textColor="#000000" />
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/tv_price"
            android:text="价格:"
            android:textSize="20sp"
            android:layout_marginTop="10dp"
            android:layout_below="@id/title"
            android:textColor="#FF8F03" />
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/price"
            android:text="1000"
            android:textSize="20sp"
            android:layout_marginTop="10dp"
            android:layout_below="@id/title"
            android:layout_toRightOf="@id/tv_price"
            android:textColor="#FF8F03" />
    </RelativeLayout>
</RelativeLayout> 

 

以上就是 在线直播系统源码,实现搜索后界面显示商品列表效果,更多内容欢迎关注之后的文章

 

标签:layout,id,content,直播,wrap,界面显示,height,源码,android
From: https://www.cnblogs.com/yunbaomengnan/p/16978605.html

相关文章