我的默认颜色是紫色(#9b59b6
),我也想将顶部标题(蓝色)颜色更改为紫色。我在 Android 中自定义 Account Kit UI 的红色手册实现了这样的样式,但没有进一步的运气将顶部标题颜色更改为紫色。
//Delauft color: purple
UIManager uiManager = new SkinManager(SkinManager.Skin.CONTEMPORARY, ContextCompat.getColor(this, R.color.default_color), R.drawable.register_screen, SkinManager.Tint.WHITE, 0.1);
configurationBuilder.setUIManager(uiManager);
在我的style.xml
我有
<style name="AppBaseTheme" parent="android:style/Theme.Light.NoTitleBar">
<item name="colorPrimary">#9b59b6</item>
<item name="colorPrimaryDark">#9b59b6</item>
<item name="colorAccent">#9b59b6</item>
<!-- other elements-->
</style>
其他活动正常。
我有看起来像这样的应用程序:
更新
解决方案:在AndroidManifest
<activity android:name="com.facebook.accountkit.ui.AccountKitActivity" android:theme="@style/CustomFbStyle" tools:replace="android:theme"/>
在 style.xml 中
<style name="CustomFbStyle" parent="Theme.AccountKit">
<item name="colorPrimary">#9b59b6</item>
<item name="colorPrimaryDark">#9b59b6</item>
</style>