\u5b89\u5353APP\u5f00\u53d1<\/a>\u6700\u65b0\u7248\u672c\u7684JDK\u3002<\/p>\n4. \u521b\u5efa\u7b2c\u4e00\u4e2aAndroid\u5e94\u7528\u7a0b\u5e8f<\/p>\n
\u5728Visual Studio\u4e2d\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Xamarin.Android\u9879\u76ee\u6765\u5f00\u53d1\u60a8\u7684\u7b2c\u4e00\u4e2aAndroid\u5e94\u7528\u7a0b\u5e8f\u3002\u4ece\u6587\u4ef6\u83dc\u5355\u4e2d\u9009\u62e9\u65b0\u5efa\u9879\u76ee\uff0c\u7136\u540e\u5728\u6a21\u677f\u9009\u62e9\u5668\u4e2d\u9009\u62e9\u201cAndroid App\u201d\u6a21\u677f\u3002\u4e3a\u60a8\u7684\u9879\u76ee\u547d\u540d\uff0c\u5982”MyFirstAndroidApp”\uff0c\u7136\u540e\u70b9\u51fb\u521b\u5efa\u3002<\/p>\n
5. UI\u8bbe\u8ba1<\/p>\n
Xamarin.Android\u4f7f\u7528\u754c\u9762\u8bbe\u8ba1\u5668\u548cXML\u5e03\u5c40\u6587\u4ef6\u6765\u5b9e\u73b0UI\u8bbe\u8ba1\u3002\u6253\u5f00”Resources\/layout\/MainActivity.axml”\u6587\u4ef6\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u62d6\u653e\u7ec4\u4ef6\u6216\u624b\u5de5\u7f16\u8f91XML\u4ee3\u7801\u6765\u521b\u5efa\u7528\u6237\u754c\u9762\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u767b\u5f55\u754c\u9762\u7684\u793a\u4f8b\uff1a<\/p>\n
“`<\/p>\n<\/p>\n
android:orientation=”vertical”<\/p>\n
android:layout_width=”match_parent”<\/p>\n
android:layout_height=”match_parent”><\/p>\n<\/p>\n
android:id=”@+id\/editTextUsername”<\/p>\n
android:hint=”\u7528\u6237\u540d”<\/p>\n
android:layout_width=”match_parent”<\/p>\n
android:layout_height=”wrap_content” \/><\/p>\n<\/p>\n
android:id=”@+id\/editTextPassword”<\/p>\n
android:hint=”\u5bc6\u7801”<\/p>\n
android:inputType=”textPassword”<\/p>\n
android:layout_width=”match_parent”<\/p>\n
android:layout_height=”wrap_content” \/><\/p>\n<\/p>\n
android:id=”@+id\/buttonLogin”<\/p>\n
android:text=”\u767b\u5f55”<\/p>\n
android:layout_width=”match_parent”<\/p>\n
android:layout_height=”wrap_content” \/><\/p>\n
“`<\/p>\n
6. \u4f7f\u7528C#\u7f16\u5199\u4e1a\u52a1\u903b\u8f91<\/p>\n
Xamarin.Android\u5229\u7528C#\u8bed\u8a00\u7f16\u5199\u63a7\u5236\u903b\u8f91\u3002\u5728\u7f16\u5199\u4ee3\u7801\u65f6\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528Xamarin\u63d0\u4f9b\u7684\u4e30\u5bcc.NET\u7c7b\u5e93\u4ee5\u53ca\u8c03\u7528Android SDK\u7684API\u3002\u6bd4\u5982\uff0c\u4e0b\u9762\u7684\u4ee3\u7801\u662f\u5728\u7528\u6237\u70b9\u51fb\u767b\u5f55\u6309\u94ae\u65f6\u68c0\u67e5\u7528\u6237\u540d\u548c\u5bc6\u7801\u7684\u5408\u6cd5\u6027\uff1a<\/p>\n
“`<\/p>\n
using Android.App;<\/p>\n
using Android.OS;<\/p>\n
using Android.Support.V7.App;<\/p>\n
using Android.Widget;<\/p>\n
namespace MyFirstAndroidApp<\/p>\n
{<\/p>\n
[Activity(Label = “@string\/app_name”, Theme = “@style\/AppTheme”, MainLauncher = true)]<\/p>\n
public class MainActivity : AppCompatActivity<\/p>\n
{<\/p>\n
protected override void OnCreate(Bundle savedInstanceState)<\/p>\n
{<\/p>\n
base.OnCreate(savedIns<\/p>\n
<\/figure>\n<\/p>\ntanceState);<\/p>\n
SetContentView(Resource.Layout.activity_main);<\/p>\n
EditText editTextUsername = FindViewById(Resource.Id.editTextUsername);<\/p>\n
EditText editTextPassword = FindViewById(Resource.Id.editTextPassword);<\/p>\n
Button buttonLogin = FindViewById