• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Someone explain XML lingo

Fuzzy13

Extreme Android User
I would be insanely grateful if someone could help me out with some things. I dont want to cloud this thread up with "maybes" and off topic garbage. I want help and answers. That's it. I want to learn not chit chat about off topic randomness. Sorry to be blunt but I just dont want to deal with it in this particular thread. Im serious when it comes to my knowledge and learning. I dont like distractions :D

With that being said.

This is what I would like explained in detail. (Leaving the "links" just for detail)


1. xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">




2. android:title="@string/settings_ics_radio"

Location within the string xml and the name associated with it???





3. settings:icon="@drawable/ic_settings_wireless">

(Being this was in the settings app, would the settings part of "settings:icon" change from whatever app you are in? Ex. "systemui:icon"

Obviously the @drawable is the location and name of the icon.



4. android:targetPackage="com.android.settings"

This is the app name? How do I find the "com" format or whatever it is. i've seen this after a system app or reg app gets installed but how do I find the "technical name"? We'll call it the technical name :D





5. android:action="android.intent.action.MAIN"

I know this is the "destination" but how do I find it. Say I want to go to the accounts and sync apk. How would I find what to enter?




6. android:targetClass="com.android.settings.wifi.WifiSettings"

I know this is an xml but that's it. Is it related to #5 above?




7. android:key="applications_settings"

I notice this only comes up on a couple. no clue as to why though.




I have looked around for guides and what not explaining this stuff and I have found "some" info but nothing that is clear. They explain it in "developer" talk which serves no purpose when trying to explain this to beginners. Please add anything to whatever I have listed above. I want to know everything there is to know.



IF anyone can give me AS much detail as possible with examples or whatever, that would be fantastic. Links to guides or how to's or whatever would be great. I'm getting to where I can open an xml and it look "normal" per say but Im still a little lost and only about halfway there to fully understand how this ish works within an android phone.

Thanks in advance to anyone that is of assistance. It's bedtime. :D
 
I would be insanely grateful if someone could help me out with some things. I dont want to cloud this thread up with "maybes" and off topic garbage. I want help and answers. That's it. I want to learn not chit chat about off topic randomness. Sorry to be blunt but I just dont want to deal with it in this particular thread. Im serious when it comes to my knowledge and learning. I dont like distractions :D

With that being said.

This is what I would like explained in detail. (Leaving the "links" just for detail)


1. xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
Basically the directory of the specified xml prefference, telling the xml what this branch of xml is dedicated to.. different parts of the main system features ie:

android=framework
settings=settings.. pretty self explanitory :D


2. android:title="@string/settings_ics_radio"

Location within the string xml and the name associated with it???


kinda yeah.. title basically meaning what it's called/labelled as on screen, links you too the 'strings' section to find/edit the actual text that appears on screen

ususally with android:title you can only link it to the string in-which the name you wish to give it


3. settings:icon="@drawable/ic_settings_wireless">

(Being this was in the settings app, would the settings part of "settings:icon" change from whatever app you are in? Ex. "systemui:icon"

Obviously the @drawable is the location and name of the icon.
not neccisarily, systemui wouldn't use that, probly just uses android:icon being that it's linked to the framework

but generally you are right, it is just the description of the specified apk you are editing,

also if you see this
settings:icon="@android:drawable/ic_settings_wireless">

it means the image file is located in the framework/drawable folder and not in the specified apk you are editing (unless it's framework LOL)

4. android:targetPackage="com.android.settings"

This is the app name? How do I find the "com" format or whatever it is. i've seen this after a system app or reg app gets installed but how do I find the "technical name"? We'll call it the technical name :D
com is a 'classes.dex' directory, so it's a link to smali files which im clueless about LOL



5. android:action="android.intent.action.MAIN"

I know this is the "destination" but how do I find it. Say I want to go to the accounts and sync apk. How would I find what to enter?

this is not a directory to a file but more like a link to a common action used by android ie:
the animation of your app drawer when opening or something.. basically saying (which action to take for a specific 'thing') lol hope that sounds right :D


6. android:targetClass="com.android.settings.wifi.WifiSettings"

I know this is an xml but that's it. Is it related to #5 above?

this im not 100% sure of, but i 'think' it means like an option in one menu that links to the specified option in the targetclass
in this example it would be wifi settings,
so tha target class of you wifi toggle in settings would be directed to
com.android.settings.wifi.WifiSettings
7. android:key="applications_settings"

I notice this only comes up on a couple. no clue as to why though.
ehhh... again this one im not too sure of, but my assumption would beee... this specific thing could not be use-able without the provided key, so lets say you want to play music from the widget, but cant play without the actual music player app, not just the widget app... sound right..? LOL


I have looked around for guides and what not explaining this stuff and I have found "some" info but nothing that is clear. They explain it in "developer" talk which serves no purpose when trying to explain this to beginners. Please add anything to whatever I have listed above. I want to know everything there is to know.



IF anyone can give me AS much detail as possible with examples or whatever, that would be fantastic. Links to guides or how to's or whatever would be great. I'm getting to where I can open an xml and it look "normal" per say but Im still a little lost and only about halfway there to fully understand how this ish works within an android phone.

Thanks in advance to anyone that is of assistance. It's bedtime. :D
Hope my answers helped.. and hopefully they were some-what correct LOL

responses are in BOLD
 
hedy8u9u.jpg



I'm trying to add the account functions like the jelly bean settings. Each account now is linked to the normal "manage accounts" link cause i haven't figured out how to get the target for each one.

It works but it's not correct. :/
 
After learning what I've learned in how the tabs work inside of settings and where they go when clicked, im going to try something i brought up once before and if i can get it to work, it will be epic to say the least. I'm excited now lol
 
haha yeah i wont lie, i tried again to get those toggles working now that i have a lil more of an understanding but still no luck lol basically i made an extra link to the toggle menu but still nothing even worked but i copied the whole code so there something we are doing wrong.. i suggest grabbing a copy of aosp 4.0+ settings.apk and examine the differences... will take a while but possible outcome would be well worth the trouble :D, could possibly be another apk used to link the options to that menu, doubtful but possible LOL
 
Back
Top Bottom