一,程设计概况
开这门课程我们学到了很多东西:
简单的Android的界面开发,学习了 LinearLayout (线性布局)和(RelativeLayout) 相对布局,和一些简单组件和属性,学会了做简单的界面开发。
客户端连接服务tyleSmall"
android:layout_width="match_ parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="#3299cc"
android:onClick="valLogin”
android: text="登录"
android:textSize="20sp " />
<EditText
android:id="@+id/userPwd2"
android:layout_width="wrap_ content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/textView2"
android:layout_alignRight="@+id/userName"
android:ems="10"
android: hint="请输入密码”
android:inputType="textPassword" />
<TextView
android:id= n@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_ content"
android:layout_alignLeft="@+id/textViewl"
android:layout_below="@+id/textViewl"
android:layout_marginTop= " 4 2 dp"
android: text="密码"/> </RelativeLayout>
跳转的界面
跳转部分的代码
Intent intent = new Intent();
(, ); startActivity(intent);
finish ();
客户端连接服务器代码
public void valLogin(View v)(
String userName = ().toString();
String password = ().toString();
n+use
//把name和切迫 提交到服务器端 String url =
":8080/test_phone/servlet/Servlet_login?userName= rName+n &password=n + password;
//异步提交数据
AsyncHttpClient http
android的界面开发课程设计报告 来自淘豆网m.daumloan.com转载请标明出处.