主要是开发收支页面的每一项与头布局绘制,并且将记录页面的绘制完成

头布局绘制,以及每一项的绘制

头布局

iteam_mainlv-top.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/grey_f3f3f3">
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="20dp">
        <TextView
            android:id="@+id/iteam_mainlv_top_tv1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/mounth_out"/>
        <TextView
            android:id="@+id/iteam_mainlv_top_out"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="¥ 0"
            android:layout_below="@id/iteam_mainlv_top_tv1"
            android:textSize="26sp"
            android:textStyle="bold"
            android:layout_marginTop="10dp"
            android:layout_marginBottom="10dp"
            android:textColor="@color/black"/>
        <ImageView
            android:id="@+id/iteam_mainlv_top_hide"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:src="@mipmap/ih_show"
            android:layout_alignTop="@id/iteam_mainlv_top_out"/>
        <TextView
            android:id="@+id/iteam_mainlv_top_tv2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/mounth_in"
            android:layout_below="@id/iteam_mainlv_top_out"/>
        <TextView
            android:id="@+id/iteam_mainlv_top_tv_in"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@color/black"
            android:text="¥ 0"
            android:layout_below="@id/iteam_mainlv_top_out"
            android:layout_toRightOf="@id/iteam_mainlv_top_tv2"
            android:layout_marginLeft="5dp"/>
        <TextView
            android:id="@+id/iteam_mainlv_top_tv_budget"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="¥ 0"
            android:textColor="@color/black"
            android:layout_alignParentRight="true"
            android:layout_alignBottom="@id/iteam_mainlv_top_tv2"
            android:layout_marginLeft="5dp"/>
        <TextView
            android:id="@+id/iteam_mainlv_top_tv3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/budget"
            android:layout_toLeftOf="@id/iteam_mainlv_top_tv_budget"
            android:layout_alignBottom="@id/iteam_mainlv_top_tv2"/>
        <TextView
            android:id="@+id/iteam_mainlv_top_tv4"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:drawableLeft="@mipmap/ih_biaoge"
            android:layout_below="@id/iteam_mainlv_top_tv2"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="20dp"
            android:text="@string/seeExcel"
            android:textColor="@color/green_006400"
            android:drawablePadding="10dp"/>
    </RelativeLayout>
    <TextView
        android:id="@+id/iteam_mainlv_top_tv_day"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="今日支出 ¥0 收入 ¥0"
        android:textStyle="bold"
        android:layout_marginTop="20dp"
        android:layout_marginBottom="10dp"/>

</LinearLayout>

效果

每一项

iteam_mainlv.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="wrap_content"
    android:layout_margin="10dp"
    android:padding="10dp"
    android:background="@color/white">
    <ImageView
        android:id="@+id/item_mainly_iv"
        android:layout_width="45dp"
        android:layout_height="45dp"
        android:src="@mipmap/ic_yanjiu"/>
    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toRightOf="@id/item_mainly_iv"
        android:layout_marginLeft="10dp"
        android:orientation="vertical">
        <TextView
            android:id="@+id/iteam_mainlv_tv_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="烟酒茶"
            android:textStyle="bold"
            android:textSize="16sp"/>
        <TextView
            android:id="@+id/iteam_mainlv_tv_beizhu"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="华子一盒"
            android:textStyle="bold"
            android:layout_marginBottom="5dp"
            android:textSize="12sp"/>
    </LinearLayout>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_marginLeft="10dp"
        android:orientation="vertical">
        <TextView
            android:id="@+id/iteam_mainlv_tv_money"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="¥25.0"
            android:textStyle="bold"
            />
        <TextView
            android:id="@+id/iteam_mainlv_tv_time"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="2024.02.17.18:30"
            android:textStyle="bold"
            android:layout_marginBottom="5dp"
            />
    </LinearLayout>
</RelativeLayout>

效果

记录页面的绘制

头部

activity_record.xml

<?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="@color/grey_f3f3f3">
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="50dp">
        <ImageView
            android:id="@+id/record_iv_back"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:src="@mipmap/ih_error"
            android:layout_marginLeft="10dp"/>
        <com.google.android.material.tabs.TabLayout
            android:id="@+id/record_tabs"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_centerHorizontal="true"
            app:tabGravity="center"
            app:tabMode="fixed"
            app:tabTextColor="@color/grey_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>

效果

具体

fragment_outcome.xml

<?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="@color/grey_f3f3f3">

    <!-- TODO: Update blank fragment layout -->
    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:text="@string/hello_blank_fragment" />

    <RelativeLayout
        android:id="@+id/frag_record_r1_top"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/white"
        android:padding="10dp">
        <ImageView
            android:id="@+id/frag_record_iv"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:src="@mipmap/ic_qita_fs"/>
        <TextView
            android:id="@+id/frag_record_tv_type"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="其他"
            android:layout_toRightOf="@id/frag_record_iv"
            android:layout_centerVertical="true"
            android:textSize="16sp"
            android:textStyle="bold"
            android:layout_marginLeft="10dp"/>
        <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:inputType="number"
            android:background="@color/white" />

    </RelativeLayout>
    <View
        android:id="@+id/frag_record_line1"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:layout_below="@id/frag_record_r1_top"
        android:background="@color/grey_f3f3f3"/>

    <GridView
        android:id="@+id/frag_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"/>
<!--    自定义键盘-->
    <android.inputmethodservice.KeyboardView
        android:id="@+id/frag_record_keyboard"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/grey_f3f3f3"
        android:keyTextColor="@color/black"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:paddingTop="1dp"
        android:layout_alignParentBottom="true"
        android:shadowColor="@color/white"
        android:shadowRadius="0.0"/>

    <RelativeLayout
        android:layout_above="@id/frag_record_keyboard"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/white">
        <TextView
            android:id="@+id/frag_record_tv_time"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="202010yue30ri"
            android:layout_alignParentRight="true"
            android:padding="10dp"/>

        <TextView
            android:id="@+id/frag_record_tv_beizhu"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="添加备注"
            android:layout_toLeftOf="@id/frag_record_tv_time"
            android:padding="10dp"/>
    </RelativeLayout>


</RelativeLayout>

效果

最下面是软键盘,具体还没开始写呢

posted on 2024-02-18 20:45  许七安gyg  阅读(1)  评论(0编辑  收藏  举报
$(document).ready(function() { // 禁止右键 $(document).bind("contextmenu", function(){return false;}); // 禁止选择 $(document).bind("selectstart", function(){return false;}); // 禁止Ctrl+C 和Ctrl+A $(document).keydown(function(event) { if ((event.ctrlKey&&event.which==67) || (event.ctrlKey&&event.which==86)) { //alert("对不起,版权所有,禁止复制"); return false; } }); });