- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我只是在设计我的布局,没想到会出现任何问题,但有一天 android 9.0 发布了,我带上手机并在其中安装了我的应用程序,并尝试在夜间模式下打开我的应用程序,我开始看到白色颜色布局在黑暗中发生变化,我的思绪被阻塞了。我想知道如何禁用主题。
I tried changing themes, changing the background colors none of those works
<RelativeLayout
android:layout_width="190dp"
android:layout_height="200dp"
android:layout_marginTop="-15dp"
android:layout_below="@+id/tableTxt"
android:background="@drawable/table_no_orders_border"
android:theme="@style/ThemeOverlay.AppCompat.Light"
android:layout_centerHorizontal="true">
<android.support.v7.widget.CardView
android:id="@+id/cv_one_login"
android:layout_width="189dp"
android:layout_height="199dp"
android:layout_centerHorizontal="true"
android:elevation="10dp"
app:cardCornerRadius="1dp"
app:cardElevation="10dp"
android:layout_marginTop="0.1dp">
<android.support.v4.widget.NestedScrollView
android:id="@+id/sv1"
android:layout_width="match_parent"
android:layout_height="147dp"
android:scrollbars="vertical"
android:scrollbarSize="10dp"
android:isScrollContainer="true">
<TextView
android:id="@+id/tableItems"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/table"
android:layout_marginStart="5dp"
android:layout_marginTop="13dp"
android:textColor="@color/TextcolorforBlack"/>
</android.support.v4.widget.NestedScrollView>
<TextView
android:id="@+id/totalTableBill"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/total_bill"
android:textColor="@color/SettingsColor"
android:layout_below="@id/sv1"
android:textAlignment="gravity"
android:gravity="bottom"
android:layout_marginStart="5dp"/>
</RelativeLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
我需要我设计的布局。即使应用了主题,它也应该是相同的。
最佳答案
您可以将 App 主题更改为 App Manifest 文件中的任何主题,例如,
<application
android:theme="@android:style/Theme.Holo"/>
<application
android:theme="@android:style/Theme.Holo.Light"/>
<application
android:theme="@android:style/Theme.Black"/>
<application
android:theme="@android:style/Theme.DeviceDefault"/>
或者你可以在styles.xml文件中自定义主题,然后在Manifest中应用
<style name="AppBaseTheme" parent="android:Theme.Holo.Light"/>
<style name="AppTheme" parent="AppBaseTheme"/>
现在在 list 文件中
<application
android:theme="@style/AppBaseTheme"/>
您还可以在 Android Studio 的预览窗口中预览主题。
关于android - android 9.0 中的 Dark Theme 使我的应用布局变丑了,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56573786/
Closed. This question does not meet Stack Overflow guidelines。它当前不接受答案。 想要改善这个问题吗?更新问题,以便将其作为on-topi
我正在使用自定义主题,代码如下:- 自定义样式.xml #FFFFFF 40dp @style/CustomWindowTitleBackground
我正在尝试将不同的 html(主题)应用到我的首页 (index.html),而我的所有其他页面都将具有相同的主题 (index_in.html)。我正在尝试这种方式,并想知道为什么它不起作用: 摘自
如何准确地、一步一步地安装夹层主题? 例如,Moderna free theme . 最佳答案 先决条件: 0) 版本控制 Python 2.7.6. Django 1.6.10 Mezzanine
使用 gatsby-plugin-theme-ui 构建 Gatsby 主题时,文档指出您可以通过将其添加到嵌套颜色对象中的主题对象来调整主体的背景颜色。这似乎没有效果。字体和样式等其他变量正确引入,
使用 gatsby-plugin-theme-ui 构建 Gatsby 主题时,文档指出您可以通过将其添加到嵌套颜色对象中的主题对象来调整主体的背景颜色。这似乎没有效果。字体和样式等其他变量正确引入,
我使用“@android:style/Theme.Holo”作为我的游戏主题: 但是为了能够设置 snackbar 小部件,我别无选择,只能使用“@style/Theme.AppCompat”,否则我
我使用这些说明通过 zopeskel 创建了一个新主题 http://docs.plone.org/adapt-and-extend/theming/theme_product_with_diazo.
我正在为我的工具栏使用当前的样式和主题,并使用一个支持库。我正在扩展 AppCompatActivity 而不是正常 Activity 。 false true
我用了但是 Theme.Holo 不起作用。 Android list : 截图: 最佳答案 根据documentation ,您引用的主题不存在。 在这种情况下,它被称为Theme_Holo_No
我正在尝试发布一个 github 博客页面,两个月前我可以毫无问题地将其发布到 github.io 页面,但现在抛出错误。我仍然可以在本地成功构建 jekyll 主题。 但是,当我将其推送到 gith
我最近使用 Android Asset Studio 为应用程序生成自定义操作栏主题,当我将所有内容放入我的项目时,应用程序崩溃并出现以下异常: java.lang.IllegalStateExcep
在较新版本的 Android Studio 中 在 values 目录中有 theme.xml 和 theme.xml(night) 可以指出它们之间的区别吗? 它会取代styles.xml 吗? 最
我想在 Atom 编辑器中为我的不同项目提供多个 UI 主题和语法主题,即每个打开的窗口都有一个主题,我该如何做到这一点?目前,更改首选项中的一项将会更改所有打开的窗口。 我安装了项目管理器插件,并尝
我只是为了安装magento 2.1.i迁移我的数据库感谢magento提供的工具。它工作得很好! 但是问题是,当我运行前端时,我收到此错误:无法通过指定的键加载主题:'pure' 当我想在管理中更改
我不喜欢 CustomTheme 的外观,我想保留 AppTheme。 但是当我将自定义标题栏与 AppTheme 一起使用时,它崩溃了,告诉我我无法组合多种样式。 我该怎么做? 谢谢! 最佳答案 首
我正在记录这个警告: I/AppCompatViewInflater:app:theme 现已弃用。请改为使用 android:theme。 奇怪的是,我使用了 Android Studio 的 Fi
我有一个“轻”主题的应用程序: @color/primary @color/primary_dark @color/accent 我希望我的 Toolbar 是深
我在 list 文件中声明我的 Activity ,如下所示。 我声明了全
这个问题在这里已经有了答案: You need to use a Theme.AppCompat theme (or descendant) with this activity (63 个答案)
我是一名优秀的程序员,十分优秀!