Android 在xml布局配置文件中给Button按钮添加事件

【转】http://blog.csdn.net/sky123123/article/details/5954446

在Android里面,添加Listener,具体步骤如下:

1.首先在layout里面定义Button并指定响应的Listener


http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/hello"
    />



你可能感兴趣的:(====,知识库,====,--,Android开发)