当前位置:web 服务器 > Tomcat >>

Android Tomcat 的应用之客户端部分

最近因为做一个客户端的登录部分,最后选择了使用Tomcat作为servlet服务器,MySQL作为数据库,今天就先写了一下客户端的部分,主要就是Android的网络编程部分,服务器端编程明天再写吧,今天有点累了。

       首先是布局文件,如下:

[html] <?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" > 
 
    <TextView 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:text="@string/hello" /> 
 
    <TableLayout > 
        <TableRow > 
            <TextView  
                android:id="@+id/tv_name" 
                android:layout_width="wrap_content" 
                android:layout_height="wrap_content" 
                android:text="@string/nameStr"/> 
            <EditText  
                android:id="@+id/et_name" 
                android:layout_width="fill_parent" 
                android:layout_height="wrap_content"/> 
        </TableRow> 
        <TableRow > 
            <TextView  
                android:id="@+id/tv_passwd" 
                android:layout_width="wrap_content" 
                android:layout_height="wrap_content" 
                android:text="@string/passwdStr"/> 
            <EditText  
                android:id="@+id/et_passwd" 
                android:layout_width="fill_parent" 
                android:layout_height="wrap_content" 
                android:password="true"/> 
        </TableRow> 
        <TableRow > 
            <Button  
                android:id="@+id/btn_confirm" 
                android:layout_width="wrap_content" 
                android:layout_height="wrap_content" 
                android:text="@string/btn_confirm"/> 
            <Button  
                android:id="@+id/btn_cancel" 
                android:layout_width="wrap_content" 
                android:layout_height="wrap_content" 
                android:text="@string/btn_cancel"/> 
        </TableRow> 
    </TableLayout> 
     
</LinearLayout> 
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello" />

    <TableLayout >
        <TableRow >
         <TextView
             android:id="@+id/tv_name"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="@string/nameStr"/>
         <EditText
             android:id="@+id/et_name"
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"/>
        </TableRow>
        <TableRow >
            <TextView
                android:id="@+id/tv_passwd"
                android:layout_width="wrap_content"
         &

补充:移动开发 , Android ,
Apache
IIS
Nginx
Tomcat
如果你遇到web 服务器难题:
请访问www.zzzyk.com 试试
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,