Custom designing EditText

Use the below code in your rounded_edittext.xml <?xml version=”1.0″ encoding=”utf-8″?> <shape xmlns:android=”http://schemas.android.com/apk/res/android” > <solid android:color=”#FFFFFF” /> <stroke android:width=”1dp” android:color=”#2f6699″ /> <corners android:radius=”10dp” /> </shape> This should work

Custom attributes in styles.xml

I figured it out! The answer is to NOT specify the namespace in the style. <?xml version=”1.0″ encoding=”utf-8″ ?> <resources xmlns:android=”http://schemas.android.com/apk/res/android”> <style name=”CustomStyle”> <item name=”android:layout_width”>wrap_content</item> <item name=”android:layout_height”>wrap_content</item> <item name=”custom_attr”>value</item> <!– tee hee –> </style> </resources>

How to parse same name tag in Android XML DOM Parsing?

Your getValue() method gets MyResource element, from there, you need to get all Items under MyResource and do getElementValue(). Example code is: public Map getValue(Element item, String str) { NodeList n = item.getElementsByTagName(str); for (int i = 0; i < n.getLength(); i++) { System.out.println(getElementValue(n.item(i))); } //Here store it in list/map and return list/map instead of … Read more

How do you create Preference Activity and Preference Fragment on Android?

I found this post (What to use instead of “addPreferencesFromResource” in a PreferenceActivity?) that help me understand that you have to go through a PreferenceFragment in order to do it. In the following explanation I use your.package. just to show that you have to put the package name. Everybody has its own package so please … Read more