Android Question How to change default label.textcolor in manifest

cambol

Active Member
Licensed User
How to use manifest editor to set label.textcolor black
In B4A ,the default label.textcolors is colors.white
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The default color is not white. The default color is based on the theme. You can use a light theme to change it to black.

You can use this manifest editor code to set a light theme on Android 4+:
B4X:
SetApplicationAttribute(android:theme, "@style/LightTheme")
CreateResource(values-v20, theme.xml,
<resources>
  <style
  name="LightTheme" parent="@android:style/Theme.Material.Light">
  </style>
</resources>
)
CreateResource(values-v14, theme.xml,
<resources>
  <style
  name="LightTheme" parent="@android:style/Theme.Holo.Light">
  </style>
</resources>
)
 
Upvote 0

cambol

Active Member
Licensed User
something error ~


'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
SetApplicationAttribute(android:theme, "@style/LightTheme")
CreateResource(values-v20, theme.xml,
<resources>
<style
name="LightTheme" parent="@android:style/Theme.Material.Light">
</style>
</resources>
)
CreateResource(values-v14, theme.xml,
<resources>
<style
name="LightTheme" parent="@android:style/Theme.Holo.Light">
</style>
</resources>
)

I use SDK :android-19

error is below :

Parsing code. 0.44
Compiling code. Error
Error parsing manifest script:
Line = 14, Word = C
Command expected.
 
Upvote 0

cambol

Active Member
Licensed User
I upgrade B4A to 5.8

error show different .

B4A version: 5.80
Parsing code. (0.61s)
Compiling code. (0.80s)
Compiling layouts code. (0.09s)
Generating R file. Error
res\values-v20\theme.xml:3: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.Light'.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…