[参考一篇博客进行修改](https://blog.csdn.net/maoruibin9035/article/details/79180621)
![13067320-8bf9334db5a4e14a.png](https://i-blog.csdnimg.cn/blog_migrate/d8f2817a709f6bba1ed0627ae89fcee2.webp?x-image-process=image/format,png)
布局
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:id="@+id/button_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"