• 团队计划(5.26)


    今天做了什么?

    进行了主页面功能和布局的实现

    主界面(进行更能的选择,主要有记账,然后显示账目,设定预算)

     1 package com.example.grouptext02;
     2 
     3 import com.example.grouptext02.Record;
     4 import com.example.grouptext02.Set;
     5 import com.example.grouptext02.Show;
     6 import com.example.grouptext02.R;
     7 
     8 import android.os.Bundle;
     9 import android.app.Activity;
    10 import android.content.Intent;
    11 import android.view.Menu;
    12 import android.view.View;
    13 import android.view.View.OnClickListener;
    14 import android.widget.Button;
    15 
    16 public class Mainpage extends Activity {
    17 
    18     @Override
    19     protected void onCreate(Bundle savedInstanceState) {
    20         super.onCreate(savedInstanceState);
    21         setContentView(R.layout.activity_main);
    22     
    23     Button button1 =(Button) findViewById(R.id.button1);
    24     button1.setOnClickListener(new OnClickListener()
    25     {
    26         public void onClick(View arg0)
    27         {
    28             Intent i0 = new Intent();
    29             i0.setClass(getBaseContext(), Record.class);
    30             startActivity(i0);
    31         }
    32     });
    33     
    34     Button button2 =(Button) findViewById(R.id.button2);
    35     button2.setOnClickListener(new OnClickListener()
    36     {
    37         public void onClick(View arg0)
    38         {
    39             Intent i0 = new Intent();
    40             i0.setClass(getBaseContext(), Show.class);
    41             startActivity(i0);
    42         }
    43     });
    44     
    45     Button button3 =(Button) findViewById(R.id.button3);
    46     button3.setOnClickListener(new OnClickListener()
    47     {
    48         public void onClick(View arg0)
    49         {
    50             Intent i0 = new Intent();
    51             i0.setClass(getBaseContext(), Set.class);
    52             startActivity(i0);
    53         }
    54     });
    55    }
    56 
    57     @Override
    58     public boolean onCreateOptionsMenu(Menu menu) {
    59         // Inflate the menu; this adds items to the action bar if it is present.
    60         getMenuInflater().inflate(R.menu.main, menu);
    61         return true;
    62    }
    63 
    64 }

    布局文件

     1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     2     xmlns:tools="http://schemas.android.com/tools"
     3     android:layout_width="match_parent"
     4     android:layout_height="match_parent"
     5     android:paddingBottom="@dimen/activity_vertical_margin"
     6     android:paddingLeft="@dimen/activity_horizontal_margin"
     7     android:paddingRight="@dimen/activity_horizontal_margin"
     8     android:paddingTop="@dimen/activity_vertical_margin"
     9     tools:context=".Mainpage" >
    10 
    11     <Button
    12         android:id="@+id/button2"
    13         android:layout_width="200dp"
    14         android:layout_height="90dp"
    15         android:layout_alignParentLeft="true"
    16         android:layout_below="@+id/button1"
    17         android:layout_marginLeft="40dp"
    18         android:layout_marginTop="30dp"
    19         android:textSize="40sp"
    20         android:text="当月账目" />
    21 
    22     <Button
    23         android:id="@+id/button3"
    24         android:layout_width="200dp"
    25         android:layout_height="90dp"
    26         android:layout_alignLeft="@+id/button2"
    27         android:layout_below="@+id/button2"
    28         android:layout_marginTop="31dp"
    29         android:textSize="40sp"
    30         android:text="设定预算" />
    31 
    32     <Button
    33         android:id="@+id/button1"
    34         android:layout_width="200dp"
    35         android:layout_height="90dp"
    36         android:layout_alignLeft="@+id/button2"
    37         android:layout_alignParentTop="true"
    38         android:layout_marginTop="51dp"
    39         android:text="    记账     "
    40         android:textSize="40sp" />
    41 
    42 </RelativeLayout>

    效果图片:

    本着功能优先的原则,先实现基本的功能,然后进行优化。、

    明天准备做什么?

    进行记账功能界面的具体实现

    遇到的困难?

    界面开发的时候最经常使用的就是线性布局还有相对布局的相互搭配。

  • 相关阅读:
    [歌词]世界末日
    AJAX是什么?
    [转]Moving Your Access 2002 Database to SQL Server
    .net from身份验证的配置介绍
    ajax
    cmd常用命令
    查看端口解除端口占用
    好久没进来了,今天发一个原创的DatePicker
    真倒霉,前不久分區表錯誤把我數據全部搞沒了
    DataGrid利用DataView过滤,排序
  • 原文地址:https://www.cnblogs.com/sisi-job/p/5527829.html
Copyright © 2020-2023  润新知