近期规划做一个寝室共同的登陆界面,然后把自己寝室的一些回忆放进去。

要求:1.登陆首页根据自己的名字登陆进去

            2.登陆进去可以实现如下功能:

一:你可以访问你寝室人的QQ空间

二:后台会播放一些自己先设定的音乐,强制启动,但是用户可以自己关闭。歌曲首先会设定几个歌曲,但是用户如果想听什么歌曲,可以从网上试听。

三:会将每个成员电话号码列出,并且设置了拨打电弧的快捷键。

四:也提供发送信息功能。

五:离开该软件时,显示一个精美画面,并获取日历 天气信息。

首页界面制作以及心得如下:

1.画面:

简单的登陆界面_界面设计

2.代码:

  1. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
  2.     xmlns:tools="http://schemas.android.com/tools" 
  3.      android:layout_width="fill_parent" 
  4.     android:layout_height="fill_parent" 
  5.   android:orientation="vertical" 
  6.  
  7.   android:background="@drawable/mschoolgate"> 
  8.     
  9.     
  10.     <TextView   
  11.         android:height="15mm" 
  12.        android:text="@string/text1" 
  13.         android:textColor="#FF0000" 
  14.         android:layout_height="wrap_content" 
  15.         android:layout_width="fill_parent" 
  16.     android:layout_margin="0px" 
  17.     android:textSize="40dp" 
  18.   android:textStyle="bold|italic" 
  19.         android:id="@+id/textview1" 
  20.         
  21.       android:gravity="center"></TextView> 
  22.  
  23.       
  24.  
  25. <TableLayout   
  26.     android:layout_width="wrap_content" 
  27.     android:layout_height="wrap_content"> 
  28.     <TableRow 
  29.         android:gravity="center"   
  30.           android:layout_width="fill_parent" 
  31.             android:layout_height="wrap_content" > 
  32.       
  33.     <TextView   
  34.         android:text="用户名:" 
  35.         android:textSize="30dp" 
  36.         android:textColor="#a52a2a"         
  37.         />     
  38.     <EditText   
  39.         android:textColor="#FF0000" 
  40.         android:maxHeight="1dp" 
  41.         android:id="@+id/input1" 
  42.         android:maxWidth="5dp" 
  43. android:width="120px" 
  44.         /> 
  45.     <Button   
  46.         
  47.         android:text="进入" 
  48.         android:id="@+id/button_in" 
  49.                 />      
  50.     </TableRow> 
  51. </TableLayout> 
  52.  
  53.  
  54. </LinearLayout> 
3.心得:

为了获得一个好的显示效果可以用图片为背景:android:src="@drawable/图片生成的id号码"

设置字体的格式:斜粗体:

  1. android:textStyle="bold|italic" 

设置字体大小:

  1. android:textSize="40dp" 

设置字体颜色和背景颜色:

  1. android:textColor="#FF0000" 

 

  1. android:background="@drawable/mschoolgate" 

然后就是这个输入部分:要用tablelayout.