Where do I find the styles.xml file in Android Studio?
Asked Answered
C

4

9

I have a very simple application that runs an html file. I really want to change the color of the status bar, because the standard top and bottom in black is horrible for the color palette of the page shown. I have no idea about Android and I can't start learning now, but I tried to follow the answers, as in this question here at Stack Overflow: How to change the status bar color in android. However, I can't even find the styles.xml file that is indicated to put the parameters inside. I tried to create the "value" folder with the styles.xml file inside, but it only corrupted the app, as I imagined it would happen.

This is how the file tree of my app (generated by the Website to APK Builder) is seen:

tree of files

What do I do to accomplish this?

Note: I tried the edits through Android Studio.

For more details, here's the .apk: Google Drive

Cairngorm answered 29/4, 2020 at 20:36 Comment(0)
G
9

Change project structure to Android.

Follow below image

enter image description here

Now getting structure like below Image:

enter image description here

Here is style.xml file present under res->values

If not getting style.xml file, then Create new file res->values->New->Value Resource file

enter image description here

Gobbet answered 30/4, 2020 at 5:41 Comment(2)
heey, thanks for answering! the "Android" option isn't shown :/ look: drive.google.com/open?id=1tGfK3TmGGSnDwiXgOwY2vb0pXOChxxZCCairngorm
I think your Gradle project is not properly sync. Please make sure your gradle project sync properlyGobbet
A
9

You don't need a styles.xml file in the new Android Studio. Go to your project file view: Res>Values>Themes folder.

Open themes.xml file change actionbar.

android studio live example

Acolyte answered 14/1, 2021 at 4:6 Comment(0)
H
1

You can find it in your resource directory

res/values/styles.xml

Hazing answered 29/4, 2020 at 20:50 Comment(3)
Hello Emmanuel. Did you see my screenshot? There's no this file inside "res"Cairngorm
Then you will have to create it yourself.Hazing
when i do this the apk gets corrupted. I believe there is something more that needs to be done, but I really don't understand anything, that's why I'm asking for helpCairngorm
I
1
  1. Right click on res - new - package - write the name of package as values - in the drop down of folder type, select values - ok.
  2. The values folder is created!
  3. Right click on values package - new - Android Resource Xml file - write name as styles in the name section - Ok.
Irregular answered 29/4, 2020 at 21:27 Comment(3)
doesn't show the option to create a package, look drive.google.com/open?id=1EKBtelYa0IxWT61ZgDC6Qq5ESTm5by46Cairngorm
When u right click on res and then new...what option u get? Can u see package?Irregular
I see the follow options: File, Stratch File, Directory, C++ Class, C/C+ Source File, C/C++ Header File, Kotlin Script, Kotlin Worksheet, Gradle Kotlin DSL Build Script, Gradle Kotlin DSL Settings, Edit File Templates..., EditorConfig File, Resource Bundle. I cant see package :/Cairngorm

© 2022 - 2024 — McMap. All rights reserved.