Android编程单元测试实例详解(附源码下载)

2019-12-10 19:53:41刘景俊
  • android:layout_width="fill_parent"  android:layout_height="fill_parent" 
  • android:orientation="vertical" >   <EditText 
  • android:id="@+id/name"  android:layout_width="fill_parent" 
  • android:layout_height="wrap_content"  android:hint="@string/name"/>  
  • <EditText  android:id="@+id/psd" 
  • android:layout_width="fill_parent"  android:layout_height="wrap_content" 
  • android:hint="@string/psd"/>   <LinearLayout 
  • android:orientation="horizontal"  android:layout_width="match_parent" 
  • android:layout_height="wrap_content"  >  
  • <Button  android:id="@+id/login" 
  • android:layout_width="fill_parent"  android:layout_height="wrap_content" 
  • android:layout_weight="1"  android:text="@string/login"/>  
  • <Button  android:id="@+id/reset" 
  • android:layout_width="fill_parent"  android:layout_height="wrap_content" 
  • android:layout_weight="1"  android:text="@string/reset"/>  
  • </LinearLayout>   </LinearLayout> 

    显示用户信息界面的FxResultActivity代码如下:

     

     
    1. package com.phicomm.hu;   import android.app.Activity;  
    2. import android.content.Intent;   import android.os.Bundle;