原视频地址http://www.chuanke.com/

 

Main.axml 

 

 

 

    android:orientation="vertical"

    android:layout_width="fill_parent"

    android:layout_height="fill_parent">

   

        android:text="用户名:"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:id="@+id/textView1"

        android:layout_marginBottom="6.5dp" />

   

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:id="@+id/UserName"

        android:layout_marginRight="0.0dp" />

   

        android:text="密码:"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:id="@+id/textView2" />

   

        android:inputType="textPassword"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:id="@+id/UserPassword" />

   

        android:text="登陆"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:id="@+id/btnEnter" />

 

 

 

 MainActivity

 


using System;

 

using Android.App;

using Android.Content;

using Android.Runtime;

using Android.Views;

using Android.Widget;

using Android.OS;

namespace App2

{

    [Activity(Label = "App2", MainLauncher = true, Icon = "@drawable/icon")]

    public class MainActivity : Activity

    {

        int count = 1;

        protected override void OnCreate(Bundle bundle)

        {

            base.OnCreate(bundle);

            // Set our view from the "main" layout resource

            SetContentView(Resource.Layout.Main);

            // Get our button from the layout resource,

            // and attach an event to it

            Button button = FindViewById