zoukankan      html  css  js  c++  java
  • 软件开发记录02

           今天我在eclipse上新建了Hello World项目,并且新建了虚拟机。然后在虚拟机上和我的手机上分别调试了Hello world项目。然后打算写“小虎记账”app。"小虎记账“一共有6个功能:记录日常收入,记录日常支出,查看收支列表,软件设置,预算列表,添加预算。然后今天分别home页面布局,日出支出,收支列表,软件设置的页面布局。

    (1)home页面、

    <?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" >
        <!-- 收入 -->
        <LinearLayout 
            android:id="@+id/llincome"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginLeft="50dp"
             android:layout_marginTop="40dp"
             android:gravity="center"
             android:orientation="vertical" 
            >
            
            <ImageView 
                android:id="@+id/ivHomeIncome"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/myincome"
               />
            
            <TextView 
                 android:id="@+id/tvHomeIncome"
                 style="@style/HomeTextStyle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/home_income"
                />
        </LinearLayout>
        
        <!-- 支出 -->
        <LinearLayout 
             android:id="@+id/lloutcome"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginLeft="70dp"
             android:layout_marginTop="40dp"
             android:layout_toRightOf="@+id/llincome"
              android:gravity="center"
             android:orientation="vertical" 
           >
         <ImageView 
                android:id="@+id/ivHomeOutcome"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/mypay"
               />
            
            <TextView 
                 android:id="@+id/tvHomeOutcome"
                 style="@style/HomeTextStyle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/home_outcome"
                />
            
            </LinearLayout>
        
        <!-- 列表 -->
        <LinearLayout 
             android:id="@+id/lllist"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_below="@+id/llincome"
             android:layout_marginLeft="50dp"
              android:layout_marginTop="50dp"
              android:gravity="center"
             android:orientation="vertical" 
           >
         <ImageView 
                android:id="@+id/ivHomeList"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/mymemo"
            />
            
            <TextView 
                 android:id="@+id/tvHomeList"
                 style="@style/HomeTextStyle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/home_list"
                />
            
            </LinearLayout>
        
        <!-- 设置 -->
        <LinearLayout 
             android:id="@+id/llsetting"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_below="@+id/lloutcome"
             android:layout_toRightOf="@+id/lllist"
             android:layout_marginLeft="70dp"
             android:layout_marginTop="50dp"
              android:gravity="center"
             android:orientation="vertical" 
           >
         <ImageView 
                android:id="@+id/ivHomeSetting"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/memo"
               />
            
            <TextView 
                 android:id="@+id/tvHomeSetting"
                 style="@style/HomeTextStyle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/home_setting"
                />
            
            </LinearLayout>
            
          <!-- 分类-->
          <LinearLayout 
             android:id="@+id/llfenlei"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_below="@+id/lllist"
             android:layout_marginLeft="50dp"
             android:layout_marginTop="50dp"
              android:gravity="center"
             android:orientation="vertical" 
           >
         <ImageView 
                android:id="@+id/ivHomeFenlei"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/data"
               />
            
            <TextView 
                 android:id="@+id/tvHomeFenlei"
                 style="@style/HomeTextStyle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/home_fenlei"
                />
            
            </LinearLayout>
            
       <!-- 模板 -->
       <LinearLayout 
             android:id="@+id/llmodle"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_below="@+id/llsetting"
             android:layout_marginLeft="70dp"
             android:layout_marginTop="50dp"
             android:layout_toRightOf="@+id/llfenlei"
              android:gravity="center"
             android:orientation="vertical" 
           >
         <ImageView 
                android:id="@+id/ivHomeModle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/memo"
               />
            
            <TextView 
                 android:id="@+id/tvHomeModle"
                 style="@style/HomeTextStyle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/home_modle"
                />
            
            </LinearLayout>
    
    </RelativeLayout>

    (2)日常收入

    <?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"
       >
        
         <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_gravity="center_horizontal"
            android:src="@drawable/xiaohu_shouru" />
     
        <!-- 收入金额 -->
        <LinearLayout
            android:id="@+id/lltest01"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal" >
    
            <TextView
                android:id="@+id/tvincome01"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/income_num"
             />
             <EditText
                android:id="@+id/etincome01"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="4"
                android:hint="@string/income_input_num"
             />
         </LinearLayout>
        
        <!-- 收入方式 -->
        <LinearLayout
            android:id="@+id/lltest02"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal" >
    
            <TextView
                android:id="@+id/tvincome02"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/income_style"
             />
             <Spinner
                android:id="@+id/spinner01"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="4"
                style="@android:attr/spinnerDropDownItemStyle"
                android:spinnerMode="dropdown"
             />
         </LinearLayout>
        
        <!-- 收入分类-->
         <LinearLayout
            android:id="@+id/lltest03"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal" >
    
            <TextView
                android:id="@+id/tvincome03"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/income_fenlei"
             />
             <Spinner
                android:id="@+id/spinner02"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="4"
                style="@android:attr/spinnerDropDownItemStyle"
                android:spinnerMode="dropdown"
             />
         </LinearLayout>
         
         <!-- 收入时间 -->
          <LinearLayout
            android:id="@+id/lltest04"
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:gravity="center"
            android:orientation="horizontal" >
    
            <TextView
                android:id="@+id/tvincome04"
                style="@style/IncomeTimeStyle"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:text="@string/income_time"
             />
             <TextView
                android:id="@+id/tvtime"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="输入时间"
             />
         </LinearLayout>
        
        <!-- 收入备注 -->
        <LinearLayout
            android:id="@+id/lltest05"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal" >
    
            <TextView
                android:id="@+id/tvincome05"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/income_note"
             />
             <EditText
                android:id="@+id/etincomenote"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="4"
                android:hint="@string/income_note_input"
             />
         </LinearLayout>
        
        <LinearLayout
            android:id="@+id/lltestbootom"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="20dp"
            android:orientation="horizontal" >
    
            <Button
                android:id="@+id/income_btn_reset"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/income_reset" />
    
            <Button
                android:id="@+id/income_btn_submit"
                android:layout_width="0dp"
                android:layout_height="46dp"
                android:layout_weight="1"
                android:background="@drawable/login_bnt_img"
                android:enabled="false"
                android:text="@string/income_submit" />
        </LinearLayout>
    </LinearLayout>

    (3)日常支出

    <?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" >
        
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_gravity="center_horizontal"
            android:src="@drawable/xiaohu_shouru" />
        
        <!--收入金额 -->
        <LinearLayout
            android:id="@+id/lltest01"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            
            <TextView
                android:id="@+id/tvincome01"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/outcome_num"
                />
            
            <EditText
                android:id="@+id/etincome01"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="4"
                android:hint="@string/outcome_input_num"
                />
             </LinearLayout>
             
             <!-- 收入方式 -->
               <LinearLayout
            android:id="@+id/lltest02"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            
            <TextView
                android:id="@+id/tvincome02"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/outcome_style"
                />
            
            <Spinner
                android:id="@+id/spinner01"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="4"
                android:text="@android:attr/spinnerDropDownItemStyle"
                android:spinnerMode="dropdown"
                />
             </LinearLayout>
             
              <!-- 收入分类 -->
               <LinearLayout
            android:id="@+id/lltest03"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            
            <TextView
                android:id="@+id/tvincome03"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/outcome_fenlei"
                />
            
            <Spinner
                android:id="@+id/spinner02"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="4"
                android:text="@android:attr/spinnerDropDownItemStyle"
                android:spinnerMode="dropdown"
                />
             </LinearLayout>
             
               <!-- 收入时间 -->
                <LinearLayout
            android:id="@+id/lltest04"
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:gravity="center"
            android:orientation="horizontal">
            
            <TextView
                android:id="@+id/tvincome04"
                style="@style/IncomeTimeStyle"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:text="@string/outcome_time"
                />
            
            <TextView
                android:id="@+id/tvtime"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text=""
                />
           
             </LinearLayout>
             
              <!-- 收入备注 -->
               <LinearLayout
            android:id="@+id/lltest05"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            
            <TextView
                android:id="@+id/tvincome05"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/outcome_note"
                />
            
            <EditText
                android:id="@+id/etincomenote"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="4"
                android:hint="@string/outcome_note_input"
                />
             </LinearLayout>
             
              <LinearLayout
            android:id="@+id/lltestbootom"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="20dp"
            android:orientation="horizontal">
            
              <Button
                android:id="@+id/income_btn_reset"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/outcome_reset"
                />
              
              <Button
                android:id="@+id/income_btn_submit"
                android:layout_width="0dp"
                android:layout_height="46dp"
                android:layout_weight="1"
                android:background="@drawable/login_bnt_img"
                android:enabled="false"
                android:text="@string/outcome_submit"
                />
            
            </LinearLayout>
    
    </LinearLayout>

    (4)收支列表

    <?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:id="@+id/tvlistcometitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:text="@string/listcome_title"></TextView>
    <LinearLayout android:id="@+id/llListChice"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="@dimen/income_padding">
        <Button android:id="@+id/btnlistin"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:text="@string/listcome_showin"/>
        <Button android:id="@+id/btnlistout"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:text="@string/listcome_showout"/>
    </LinearLayout>
    <TableLayout 
        android:id="@+id/tlListCome"
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            android:background="#dedcd2" 
            android:stretchColumns="*" > 
     
            <TableRow 
                android:layout_margin="0.5dip" 
                android:background="#dedcd2" > 
     
                <TextView 
                    android:background="#ffffff" 
                    android:gravity="center" 
                    android:text="@string/listcome_table_head_inorout" 
                    /> 
     
                <TextView 
                    android:gravity="center" 
                    android:background="#ffffff" 
                    android:text="@string/listcome_table_head_money" 
                     /> 
     
                <TextView 
                    android:gravity="center" 
                    android:background="#ffffff" 
                    android:text="@string/listcome_table_head_style" 
                     /> 
                     <TextView 
                    android:gravity="center" 
                    android:background="#ffffff" 
                    android:text="@string/listcome_table_head_fenlei" 
                     /> 
                     <TextView 
                    android:gravity="center" 
                    android:background="#ffffff" 
                    android:text="@string/listcome_table_head_time" 
                     /> 
                     <TextView 
                    android:gravity="center" 
                    android:background="#ffffff" 
                    android:text="@string/listcome_table_head_note" 
                     /> 
            </TableRow> 
        </TableLayout> 
    </LinearLayout>

    (5)收入列表

    <?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:id="@+id/tvlistcometitle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:text="@string/listcome_title"
                />
         <LinearLayout
               android:id="@+id/llListChice"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:padding="@dimen/income_padding" 
             >
             <Button android:id="@+id/btnlistin"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:text="@string/listcome_showincome_back"/>"
         </LinearLayout>
        
         <TableLayout 
              android:id="@+id/tlListCome"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="#dedcd2"
                android:stretchColumns="*"
             >
             <TableRow
                android:layout_margin="0.5dip"
                android:background="#dedcd2" >
    
                <TextView
                    android:background="#ffffff"
                    android:gravity="center"
                    android:text="@string/listcome_table_head_inorout" />
    
                <TextView
                    android:background="#ffffff"
                    android:gravity="center"
                    android:text="@string/listcome_table_head_money" />
    
                <TextView
                    android:background="#ffffff"
                    android:gravity="center"
                    android:text="@string/listcome_table_head_style" />
    
                <TextView
                    android:background="#ffffff"
                    android:gravity="center"
                    android:text="@string/listcome_table_head_fenlei" />
    
                <TextView
                    android:background="#ffffff"
                    android:gravity="center"
                    android:text="@string/listcome_table_head_time" />
    
                <TextView
                    android:background="#ffffff"
                    android:gravity="center"
                    android:text="@string/listcome_table_head_note" />
            </TableRow>
         </TableLayout>
         
    </LinearLayout>

    (6)支出列表

    <?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:id="@+id/tvlistcometitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:text="@string/listcome_title" >
        </TextView>
    
        <LinearLayout
            android:id="@+id/llListChice"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="@dimen/income_padding" >
    
            <Button
                android:id="@+id/btnlistin"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/listcome_showincome_back" />
        </LinearLayout>
    
        <TableLayout
            android:id="@+id/tlListCome"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#dedcd2"
            android:stretchColumns="*" >
    
            <TableRow
                android:layout_margin="0.5dip"
                android:background="#dedcd2" >
    
                <TextView
                    android:background="#ffffff"
                    android:gravity="center"
                    android:text="@string/listcome_table_head_inorout" />
    
                <TextView
                    android:background="#ffffff"
                    android:gravity="center"
                    android:text="@string/listcome_table_head_money" />
    
                <TextView
                    android:background="#ffffff"
                    android:gravity="center"
                    android:text="@string/listcome_table_head_style" />
    
                <TextView
                    android:background="#ffffff"
                    android:gravity="center"
                    android:text="@string/listcome_table_head_fenlei" />
    
                <TextView
                    android:background="#ffffff"
                    android:gravity="center"
                    android:text="@string/listcome_table_head_time" />
    
                <TextView
                    android:background="#ffffff"
                    android:gravity="center"
                    android:text="@string/listcome_table_head_note" />
            </TableRow>
        </TableLayout>
    
    </LinearLayout>
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利.
  • 相关阅读:
    nuxt使用pdfjs-dist插件实现pdf预览
    package.json详细介绍
    encodeURI()和encodeURIComponent() 区别
    前端预览pdf——文件流
    fatal: unable to access 'https://github.com/xxxxx/xxxx.git/': Failed to connect to github.com port 443: Timed out
    vue分隔输入验证码
    Vue简单实现滚动到底部加载数据
    nuxt pdf在线预览
    Eclipse入门-HelloWorld
    多任务学习算法综述
  • 原文地址:https://www.cnblogs.com/wl2017/p/8497081.html
Copyright © 2011-2022 走看看