按钮在应用程序上不可见.怎么了? [英] Buttons not visible on the application. What's wrong?

查看:59
本文介绍了按钮在应用程序上不可见.怎么了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的测试应用"创建了一个空活动,预览部分中的内容如下:

I created an empty activity for 'My Testing App' and it looks like the following in the preview section:

但是当我生成一个构建apk并在手机中使用了该构建apk时,结果如下:

But when I generated a build apk and used the same in my cell phone the result was like the following:

我只能查看左上角的退出按钮,但应该位于其上方的其他两个按钮丢失. 我也尝试重新排列屏幕上的图标.我使它们位于最右边,最底部,但是重新安装apk时,我看不到任何变化.

I can only view the exit button on the very top left but the two other buttons, that should be above it are missing. I tried to rearrange the icons on the screen as well. I made them to go to the bottom, to the right most, but I see no change when the apk is reinstalled.

如何使它们在硬件上可见?

以下是该活动的代码摘要:

Here is the snap of the code for this activity:

推荐答案

要快速在布局中添加约束,只需单击推断约束 按钮在版式编辑器工具栏中.在此处了解有关此功能的更多信息: https ://developer.android.com/training/constraint-layout/index.html#use-autoconnect-and-infer-constraints

To quickly add constraints to your layout just click on the Infer Constraints button in the Layout Editor toolbar. Learn more about the feature here: https://developer.android.com/training/constraint-layout/index.html#use-autoconnect-and-infer-constraints

这篇关于按钮在应用程序上不可见.怎么了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆