每日总结2023/2/26

今天练习了Android Studio内容

成果:

 

 

 结构代码:

复制代码
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical"
    android:background="#f3f3f3">
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="50dp">

        <ImageView
            android:id="@+id/record_iv_back"
            android:layout_width="57dp"
            android:layout_height="match_parent"
            android:padding="10dp"
            android:src="@mipmap/cuo" />
        <com.google.android.material.tabs.TabLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:id="@+id/record_tabs"
            android:layout_centerHorizontal="true"
            app:tabGravity="center"
            app:tabMode="fixed"
            app:tabTextColor="#7D7D7D"
            app:tabSelectedTextColor="@color/black"
            app:tabIndicatorColor="@color/black"/>
    </RelativeLayout>
    <androidx.viewpager.widget.ViewPager
        android:id="@+id/record_vp"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

</LinearLayout>
复制代码

二:

 

 

 

 

 

 

 

 

 

 

 

 

 

复制代码
<?xml version="1.0" encoding="utf-8"?>
<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"
    android:background="#f3f3f3">
    <!--tools:context=".frag_record.outcomeFragment"-->
    <!-- TODO: Update blank fragment layout -->
    <RelativeLayout
        android:id="@+id/frag_record_rl_top"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/white">

        <ImageView
            android:id="@+id/frag_record_iv"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:src="@mipmap/more" />

        <TextView
            android:id="@+id/frag_record_tv_type"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginLeft="10dp"
            android:layout_toRightOf="@id/frag_record_iv"
            android:text="其他"
            android:textSize="16dp"
            android:textStyle="bold" />

        <EditText
            android:id="@+id/frag_record_et_money"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:background="@color/white"
            android:inputType="number" />
    </RelativeLayout>

    <View
        android:id="@id/frag_record_line1"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:layout_below="@id/frag_record_rl_top"
        android:background="@color/gray" />

    <GridView
        android:id="@+id/record_gv"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/frag_record_line1"
        android:background="@color/white"
        android:numColumns="5"
        android:paddingTop="5dp"
        android:paddingBottom="5dp" />
    <!--自定义软键盘-->
    <!--focusable   获取焦点-->
    <!--fadeScrollbars  触摸时获取焦点-->
    <android.inputmethodservice.KeyboardView
        android:id="@+id/record_keyboard"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="@color/gray"
        android:fadeScrollbars="true"
        android:focusable="true"
        android:keyTextColor="@color/black"
        android:paddingTop="1dp"
        android:shadowColor="@color/white"
        android:shadowRadius="0.0" />

    <RelativeLayout
        android:id="@+id/frag_record_keyboard"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="@color/white">

        <TextView
            android:id="@+id/frag_record_tv_time"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:padding="10dp"
            android:text="2023年2月26日 19:23" />

        <TextView
            android:id="@+id/frag_record_tv_beizhu"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:padding="10dp"
            android:text="添加备注" />


    </RelativeLayout>

</RelativeLayout>
复制代码

 

posted @   花伤错零  阅读(10)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)

阅读目录(Content)

此页目录为空

点击右上角即可分享
微信分享提示