xml

Solutions, Tutorial

Load localized strings at runtime

Here is a possible solution if you want to load localized text resources on a TextView in Android. Problem: You may need to extend your app flexibility to be able to load localized texts at runtime from a web server for example. That would be to be able to add new localizations (for new countries) […]

, , , , , , , ,
Tools

Android State list generator

Inspired by a post from stackoverflow, I made a simple XML State List generator :), you simply need to fill the inputs with your corresponding drawable names and then press Generate button. For more details regarding android StateList XML please check the official documentation. Android state list generator version 2 is here:  New in android state list generator

, ,
Snippets

How to make a background button selector in XML?

Step 1: Create an XML in the drawable folder and name it selected_item.xml (or any another name you want but to be suggestive). The code in this xml will be: <shape android=”http://schemas.android.com/apk/res/android” shape=”rectangle”> <solid color=”#80000000″></solid> </shape> The color=”#80000000″ is transparent black. Step 2: Create an XML again, in the drawable folder an name it not_selected.xml. The code

, , , ,
sponsored
Exit mobile version