每日总结2023/2/24

今天继续学习了Android Studio内容

成果

 

 

 总体学习了列表视图,练习了相对布局的使用

<?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"
    android:background="#92E4CA"
    android:orientation="vertical"

    tools:context=".MainActivity">

    <RelativeLayout
        android:id="@+id/main_top_layout"
        android:layout_width="match_parent"
        android:layout_height="50dp">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:gravity="center"
            android:padding="10dp"
            android:text="@string/app_name"
            android:textColor="#0B0B0B"
            android:textSize="20dp"
            android:textStyle="bold" />

        <ImageView
            android:id="@+id/main_iv_search"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_alignParentRight="true"
            android:padding="10dp"
            android:src="@drawable/ic_launcher_background" />
    </RelativeLayout>

    <ListView
        android:id="@+id/main_lv"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/main_top_layout"
        android:background="#F9FAF9"
        android:divider="@null"
        android:dividerHeight="6dp"
        android:padding="10dp"
        android:scrollbars="none" />

    <ImageButton
        android:id="@+id/main_btn_more"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:layout_alignParentRight="true"
        android:layout_alignParentBottom="true"
        android:layout_margin="20dp"
        android:src="@drawable/ic_launcher_background" />

    <Button
        android:id="@+id/main_btn_exit"
        android:layout_width="100dp"
        android:layout_height="50dp"
        android:layout_alignBottom="@id/main_btn_more"
        android:layout_toLeftOf="@id/main_btn_more"
        android:background="@drawable/main_recordbtn_bg"
        android:text="@string/editone"
        android:textColor="@color/white"
        android:gravity="center_vertical"
        android:textStyle="bold" />


</RelativeLayout>

 

posted @ 2023-02-24 21:18  花伤错零  阅读(35)  评论(0)    收藏  举报