Tag: xml

Parsing Android menu XML resource to objects list

I can’t resolve this problem for 3 days. I have simple XML resource for menu <?xml version=”1.0″ encoding=”utf-8″?> <menu xmlns:android=”http://schemas.android.com/apk/res/android”> <item android:id=”@+id/categoryEditButton” android:title=”@string/edit” android:icon=”@drawable/edit” /> <item android:id=”@+id/categoryMoveUpButton” android:title=”@string/move_up” android:icon=”@drawable/up” /> <item android:id=”@+id/categoryMoveDownButton” android:title=”@string/move_down” android:icon=”@drawable/down” /> <item android:id=”@+id/categoryDeleteButton” android:title=”@string/delete” android:icon=”@drawable/trash” /> </menu> I want to receive List<MenuItem> after parsing of this XML: public class MenuItem { […]

“Message description not found” warnings in strings.xml

I receive tons of annoying warnings from my strings.xml. To the left of each declaration I get a warning saying “Message description not found.”. How can I fix it?

Out of memory error when inflating simple xml layout in android

I have an out if memory error reported by some users on google play that i cant seem to reproduce no matter how hard I try. The error is shown on the line of my java file where I try to set the layout of my file. Here is the complete dump of logcat: {java.lang.RuntimeException: […]

Read ApplicationManifest of Android Application (apk) using .NET

I´m working on an application (developed with .NET Framework) that manages Android Application packages (apk) and the program has to read the ApplicationManifest.xml that resides inside the apk. Extracting the Manifest file from the apk is no problem, because I can use standard zip tools to extract all files from an apk. But reading the […]

Xml getText return null – Android

i’m using XmlPullParser on Android but get getText return null. Why is this happening? The code, the commented line gives the null ArrayList<String> titleList = new ArrayList<String>(); try { XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); factory.setNamespaceAware(true); XmlPullParser xpp = factory.newPullParser(); xpp.setInput(this.getInputStream(), null); int eventType = xpp.getEventType(); while (eventType != XmlPullParser.END_DOCUMENT) { if (eventType == XmlPullParser.START_TAG) { if […]

Error building Android project with Maven

I am trying to build my Android project with Maven so I could automate my tests, but I’m getting the following error: D:\Projects\mtproject>mvn install [INFO] Scanning for projects… [INFO] [INFO] ———————————————————————— [INFO] Building AppScience 1.0.0 [INFO] ———————————————————————— [INFO] [INFO] — maven-android-plugin:2.8.4:generate-sources (default-generate-sources) @ appsci ence — [INFO] ANDROID-904-002: Found aidl files: Count = 3 [INFO] […]

Binary XML file line #8: Error inflating class fragment, Google Maps

In this app, I am trying to add a functional V2 google map. I’ve looked at most of the tutorials for creating an activity, obtaining a key for the maps, and creating the xml file to try and see if I missed any step (I went through them like 4 times), and it doesn’t seem […]

How to change string resource xml values in Android programatically?

Is there any possibility to Edit String.xml values in Android? Please suggest me the possible ways. I want to provide Enable/Disable option for my App. To accomplish this I can use SQLite database. But I doesn’t like to Use DB for a single variable value. Thanks in Advance. With Regards, Raghavendra K.

Parsing big XML files using SAX parser (skip some lines/tags)

I am currently developing an app that retrieves data from the internet using SAX. I used it before for parsing simple XML files like Google Weather API. However, the websites that I am interested in take parsing to the next level. The page is huge and looks messy. I only need to retrieve some specific […]

Android background string resource

I am working on a layout XML file, and I want to set a background color for a LinearLayout. This bit, which I am now using, works perfectly: android:background=”#1a64b7″ However, I would much prefer to break that out. In my strings.xml file I have <string name=”bg_blue”>#1a64b7</string> but when I use that in the following manner: […]

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