简体   繁体   English

Android Studio 上的 AVD 中不会显示按钮

[英]Button will not show in AVD on Android Studio

I'm new to Android Studio and i have been trying to get the button to work but on my device it wouldn't show but on my design page it's there but no errors show up.我是 Android Studio 的新手,我一直在尝试让按钮工作,但在我的设备上它不会显示,但在我的设计页面上它在那里但没有出现错误。

the design layout设计布局

设计布局

the code编码

编码

the AVD AVD

AVD

Remove either layout_marginTop or layout_constraintVertical_bias attribute from the Button, according to the design requirements.根据设计要求,从 Button 中删除layout_marginToplayout_constraintVertical_bias属性。 Bias moves the button to the very bottom of the screen, and margin moves it event lower, out of the visible are. Bias 将按钮移动到屏幕的最底部,而 margin 将其移动到更低的位置,超出可见区域。

PS do not trust AS layout preview, it lies sometimes:) PS 不信任 AS 布局预览,它有时会说谎:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM