Tag: xml

Reading a text file or XML file in Android java

I am currently working on a group project to build an Android game. I have been delegated the task of building a PC based level editor (which is all done). All I have to do now is decide on the file format for the map that is outputted. At the moment it is just a […]

Android: validate xml file at compile time?

I need to create a custom XML file to be used in my Android application, the file will contain some custom objects that are needed in my app, I understand that the I need to put them in the res\xml or res\raw. OK. Now, I would like to be notified at compile time if something […]

How do you render text in an android layer-list xml file?

I would like to add text to a layer-list xml file that is used as a drawable background for a Switch element. The problem is the text in the switch element changes before the background does so to sync these I thought I could just put the text into the background instead of setting android:textOn […]

Switch from the main.xml layout to another layout

I have a basic Android question here: I have a main.xml layout that loads up when the app is launched. This page has a menu button that I’d like to (when clicked) send the user to another layout (about.xml). I doubt this is the right. When clicked this command is kicked in: setContentView(R.layout.about); And it […]

Android Studio XML Layout file exist but I can't find it

I wanted to create a Fragment in Android Studio, so I did the following steps: Right click on package New -> Android (Other) -> Fragment (List) Checked both include fragment factory methods? and switch to grid view on large screens The description said “Creates a new fragment containing a list that can optionally change to […]

Any tool to convert Android's XML localization to iPhone's .strings file?

I guess the title is self-explanatory.

Exporting a SQLite database to an XML file in Android

I know this is possible but I’m not really sure where to start. Has anyone been able to achieve this? Thanks.

Intellij IDEA formatting XML with aligning attributes

Is there any chance to format XML files, and some code like this: <RelativeLayout android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:orientation=”horizontal” android:longClickable=”false” > to be like this? <RelativeLayout android:layout_width = “fill_parent” android:layout_height = “wrap_content” android:orientation = “horizontal” android:longClickable = “false” > I’ve tried the space around “=” option, but that’s not what I want.

xml background don't change when i use tablet

I have an xml that declare the button background: <selector xmlns:android=”http://schemas.android.com/apk/res/android”> <item android:state_pressed=”true” android:drawable=”@color/selector_pressed” /> <item android:state_focused=”true” android:drawable=”@color/selector_focused” /> <item android:drawable=”@android:color/transparent” /> </selector> On my phone Samsung Nexus S (android 4.0.3) , this xml work perfectly, when i press the view the background color change. But I got a problem on tablets (Samsung Galaxy tab, […]

How do I convert a PSD design to Android xml?

I’ve been toying with android apps the past couple of days and cannot seem to get my head around the entire UI and layout development. I’ve been programming in Java for the past year so I’m fairly familiar with the language and I’ve been front end developing in CSS for a couple years now but […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.