使用FireMonkey删除Android应用程序边框 [英] Remove Android app border with FireMonkey
问题描述
我用FireMonkey(10.2.2)创建了一个Android应用程序,但是我不明白为什么我会有白色的顶部和右侧边框.我从未将其添加到我的应用中.
I create an Android app with FireMonkey (10.2.2), but I don't understand why I have a top and right white border. I never added that to my app.
我开始创建一个示例应用程序,只是一个黑色的窗体,带有黑色的无边矩形.
I started to create an example app, just a black form with a black TRectangle without sides.
我不必编写任何代码,只需设计即可.当我为Windows编译时,就可以了.我只有在Android上才有这个边框.
I don't have to code anything, just design. When I compile for Windows, it's OK. I have this border only on Android.
我得到这个结果:
您可以在此处下载示例项目:单击此处下载
You can download the example project here : Click Here to Download
推荐答案
添加 TStyleBook
时,我遇到了完全相同的问题,但是我找到了解决方法.步骤如下:
I was having the exact same problem when adding a TStyleBook
, but I found a workaround. The steps are the following:
- 单击表单(当然,我已经在主视图"中完成了此操作)
- 转到属性"选项卡,然后打开
填充
>颜色
- 选择所需的颜色,您可以从为
TStyleBook
导入的样式中进行复制(在我的情况下为:从backgroundstyle
样式中的设置) - 在
Fill
内还将Kind
更改为值Solid
- Click on the form (I've done it in the Master view, of course)
- Go to the Properties tab, then open
Fill
>Color
- Choose your desired color, you can copy it from the style you imported for the
TStyleBook
(In my case it was:#FF2B3840
from thebackgroundstyle
setting in the style) - Within
Fill
also change theKind
to the valueSolid
基本上,此替代方法是手动覆盖从 TStyleBook
继承的样式.我知道这不是理想的选择,因为它是一个硬编码的值,如果您在运行时在应用程序中更改过样式,则必须跟踪该值.
Basically, this workaround is about manually overriding the inherited style from TStyleBook
. I know this is not ideal because it's a hardcoded value you'll have to keep track of if you ever change styles at runtime in your app.
源链接1:单击此处.源链接2:单击此处.源链接3:单击此处.
Source link #1: Click here. Source link #2: Click here. Source link #3: Click here.
这篇关于使用FireMonkey删除Android应用程序边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!