当前位置:   article > 正文

添加两个按钮_android如何添加两个按钮

android如何添加两个按钮

main

xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="com.example.s519300214331zly.MainActivity">

    <Button
        android:id="@+id/btn_start"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="启动MyService"/>
    <Button
        android:id="@+id/btn_bind"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="绑定Service"/>
    <Button
        android:id="@+id/btn_get_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="访问Service中的数据"/>
    <Button
        android:id="@+id/btn_unbind"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="解除绑定Service"/>
    
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/340011?site
推荐阅读
相关标签
  

闽ICP备14008679号