使用FireMonkey删除Android应用程序边框 [英] Remove Android app border with FireMonkey

查看:56
本文介绍了使用FireMonkey删除Android应用程序边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用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:

  1. 单击表单(当然,我已经在主视图"中完成了此操作)
  2. 转到属性"选项卡,然后打开填充> 颜色
  3. 选择所需的颜色,您可以从为 TStyleBook 导入的样式中进行复制(在我的情况下为:从 backgroundstyle 样式中的设置)
  4. Fill 内还将 Kind 更改为值 Solid
  1. Click on the form (I've done it in the Master view, of course)
  2. Go to the Properties tab, then open Fill > Color
  3. Choose your desired color, you can copy it from the style you imported for the TStyleBook (In my case it was: #FF2B3840 from the backgroundstyle setting in the style)
  4. Within Fill also change the Kind to the value Solid

基本上,此替代方法是手动覆盖从 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屋!

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