明日计划:团队开发Fooks第二天

一、明日计划

实现书籍列表按照数据条数生成列表数

二、今日成果

代码

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="140dp"
            android:text="读书"
            android:textSize="60sp"
            android:textColor="#0A0A0A"/>

    </LinearLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="90dp">

        <ListView
            android:id="@+id/book_list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#FFFFFF">

        </ListView>
    </LinearLayout>


    <TextView
        android:layout_marginTop="88dp"
        android:layout_width="match_parent"
        android:layout_height="1sp"
        android:background="#9FA3A5"></TextView>

    <TextView
        android:layout_marginTop="640dp"
        android:layout_width="match_parent"
        android:layout_height="1sp"
        android:background="#9FA3A5"></TextView>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="600dp"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp">

        <Button
            android:id="@+id/btn_home"
            android:layout_width="70dp"
            android:layout_height="70dp"
            android:background="@drawable/ic_home_black_24dp"/>

        <Button
            android:id="@+id/btn_book"
            android:layout_width="70dp"
            android:layout_height="70dp"
            android:layout_marginLeft="88dp"
            android:background="@drawable/ic_library_books_black_24dp" />

        <Button
            android:id="@+id/btn_person"
            android:layout_width="70dp"
            android:layout_height="70dp"
            android:layout_marginLeft="77dp"
            android:background="@drawable/ic_person_black_24dp" />

    </LinearLayout>


</RelativeLayout>
activity_read.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:background="#FFFFFF">


        <TextView
            android:id="@+id/book_show"
            android:layout_width="match_parent"
            android:text="@string/app_name"
            android:textSize="33dp"
            android:layout_height="80dp"
            android:gravity="center_vertical">

        </TextView>
</LinearLayout>
booklist.xml

猜你喜欢

转载自www.cnblogs.com/yeyueweiliang/p/12716275.html
今日推荐