Android Network Programming-Login Interface Implementation (II)

Source: Internet
Author: User

Two. Implementation of client activity-login interface

<relativelayout xmlns:android= "Http://schemas.android.com/apk/res/android"      xmlns:tools= "Http://schemas.android.com/tools"  android:layout_width= "Match_parent"      android:layout_height= "Match_parent"  android:paddingleft= "@dimen/activity_horizontal_margin"      android:paddingright= "@dimen/activity_horizontal_margin"     android: paddingtop= "@dimen/activity_vertical_margin"     android:paddingbottom= "@dimen/activity_ Vertical_margin " tools:context=". Mainactivity ">    <textview        android: Layout_width= "Wrap_content"         android:layout_height= "wrap_content "        android:text=" User name: "         android:id= "@+id/textview"         android:textsize= "25SP "        android:layout_alignparenttop=" true "         android:layout_alignparentleft= "true"          android:layout_alignparentstart= "true"         android:layout_ margintop= "87DP"  />    <TextView         android:layout_width= "Wrap_content"         android:layout_height = "Wrap_content"         android:text= "Secret      Code:"         android:textsize= "25SP"          android:id= "@+id/textview2"         android:layout_below= "@ +id/textview "        android:layout_alignparentleft=" true "        &nBsp;android:layout_alignparentstart= "true"         android:layout_ margintop= "71DP"  />    <EditText         android:layout_width= "Wrap_content"         android:layout_height = "Wrap_content"         android:inputtype= "TextPersonName"          android:text= "Name"         android : ems= "        android:id=" @+id/edittext "         android:layout_aligntop= "@+id/textview"          android:layout_alignleft= "@+id/button"         android:layout_ Alignstart= "@+id/button"  />    <EditText         android:layout_width= "WRap_content "        android:layout_height=" Wrap_content "         android:inputtype= "Textpassword"          android:ems= "        android:id=" @+id/editText2 "         android:layout_alignbottom= "@+id/textview2"          android:layout_alignleft= "@+id/edittext"          Android:layout_alignstart= "@+id/edittext"  />    <Button         android:layout_width= "Wrap_content"          android:layout_height= "Wrap_content"         android:text= "Landing"          android:id= "@+id/button"          android:layout_margintop= "112DP"         android:layout_below= "@+id/edittext2"          android:layout_centerhorizontal= "true"  /></RelativeLayout>
package com.example.justyu.login_demo;import android.support.v7.app.actionbaractivity;import  android.os.bundle;import android.view.menu;import android.view.menuitem;import  Android.view.view;import android.widget.button;import android.widget.edittext;public class  MainActivity extends ActionBarActivity implements View.OnClickListener{     private edittext loginname,loginpassword;    private button  loginButton;     @Override     protected void oncreate ( Bundle savedinstancestate)  {        super.oncreate ( Savedinstancestate);         setcontentview (R.layout.activity_main);         loginname= (EditText) This.findviewbyid (R.id.editText);         loginpassworD= (EditText) This.findviewbyid (R.ID.EDITTEXT2);         loginbutton= ( Button) This.findviewbyid (R.id.button);         Loginbutton.setonclicklistener (this);     }   //Click the login button   after the operation       @Override     public void onclick (view v)  {     }}

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5D/E7/wKiom1UmagijX9xdAACMh8nZ3bE401.jpg "title=" Qq20150409200049.png "alt=" Wkiom1umagijx9xdaacmh8nz3be401.jpg "/>

Android Network Programming-Login Interface Implementation (II)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.