gpt4 book ai didi

Android styles.xml 窗口标题

转载 作者:数据小太阳 更新时间:2023-10-29 02:39:50 24 4
gpt4 key购买 nike

在 styles.xml 中,在我的用户样式中我无法设置窗口标题大小(高度)。

enter image description here

总是一样的。

<item name="android:windowTitleSize">20dip</item>

<style name="my_menu" parent="@android:style/Theme.Dialog">
<item name="android:windowTitleStyle">@style/CustomMenuTitle</item>
...
<style/>

<style name="CustomMenuTitle" >
<item name="android:layout_height">12dip</item>
<item name="android:windowTitleSize">12dip</item>
<style/>

* 编辑 *

in manifest.xml:

<activity android:name=".DlgSubmenuZnajdz"
android:screenOrientation="sensor"
android:configChanges="orientation|keyboardHidden"
android:theme="@style/my_menu">
</activity>

不工作。

我该怎么做?

最佳答案

如果您设置自定义样式,您还必须修改您的AndroidManifest.xml

类似于:

<application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/my_menu">

您还可以将自定义主题应用于特定的 Activity。就像下面的例子。

<activity android:name="com.example.Activity" android:theme="@style/my_menu">

编辑:尝试以下 xml:

<style name="my_menu" parent="@android:style/Theme.Dialog">
<item name="android:layout_height">12dip</item>
<item name="android:windowTitleSize">12dip</item>
<item name="android:windowTitleStyle">@style/CustomMenuTitle</item>
...
<style/>

<style name="CustomMenuTitle" >
<!-- customize other stuff here, like the example below -->
<item name="android:textSize">20dip</item>
<style/>

关于Android styles.xml 窗口标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32844840/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com