To begin with, let’s see what are resources in an Android project. All kinds of static data, such as text strings, layouts and pictures, are considered as resources. And indeed, they are very important, without them any application is useless. But resources may vary based on many situations and the device’s configurations. Luckily, handling resources is quite easy with Android’s resource-switching mechanism, that is, the device automatically sets and loads he appropriate resources depending on the configurations.
For example, the default language for an app is English and the developer also wants to make the app available in French. Doing the translation for the app is as easy as placing another strings.xml file in res/values-fr folder. When a device that is configured in French tries to open the app, Android will detect there is a strings.xml for French locale and will use values from that file.
Default resources must always be made available, otherwise the app will crash if it is launched in another locale. Locale or alternative resources can be a subset of the default resources, but not vice versa. As an example, maybe you want to translate all texts in your app to French except for the app’s title. then, you need not include the title in the strings.xml file for French locale and Android will load the default title together with French text for everything else.
When creating a resource directory for alternative resources, it is important that we follow the naming scheme specified on the android developer’s website for providing alternative resources.
Changing locale on an emulator for Android is possible with the Custom Locale application or by using the adb shell command:
setprop persist.sys.language [language code];setprop persist.sys.country [country code];stop;sleep 5;start
Yeah, I know… Once again I have been very lazy in updating the blog. But hey, at least I’m not giving up on the blog. So, today I just discovered a brand new but very useful WordPress plugin for all those you like to post images on their blog and hate to edit each and every image to add watermarks to it.
Now, there’s the Image Watermark plugin from the WP repository (which means installation is as easy as finding the plugin in your admin area and clicking Install). It allows you to easily add watermarks to all your pictures uploaded in the WordPress Media Library. You can basically have a custom watermark image that you can position on your pictures and preview it before posting.
It also has a few other features to discourage people from easily coping your pictures. It can disable right click or copying via drag and drop, etc…
That’s if for now folks. Go check the plugin out if this is something you have been looking for.
Fanpages and groups have their distinct roles on the social network. Firstly, a fanpage has fans, whereas a group has members. You can have a fanpage about a product, brand, celebrity, website or whatever and anyone can come and like the page and share their comments as well. But, a group would be more appropriate if you want to build a relationship with it’s members.
A fanpage can be on it’s own. In fact, you don’t need to have a Facebook profile to create a page. On the other hand, a group is linked to an admin. The admin has control on the group, he can add or remove members, he can delete posts in the group, he can also add others as admin too. To join a private group, the person needs to make a request and the admin chooses to accept or reject the request. Existing members in the group can also add members to it.
Of course, both have similarities as well, such as the ability to advertise upcoming events and posting on their wall.
I have recently created a fanpage for Zuberr.com, I hope you like it and become a fan.
Experienced Android app developers probably know what a pain it was to setup a development environment for Android. But now, with the ADT (Android Developer Tools) Bundle, setting up your development environment is a breeze. Seriously. You just need to download the appropriate bundle for your platform (Windows, Mac or Linux), unzip and launch Eclipse. That’s it.
Two minutes, you would have already created a simple Android app with some text on it and images in it. The bundle also includes all the components to create an emulator and launch your app, if you don’t have a device.
Of course, if you prefer to develop your Android apps on another version of Eclipse, you would have to set up everything manually. Have a look on the Android developer’s website for more information.
What the… I just merged my MSN Messenger and Skype accounts, and to my surprise, I can now see people whom I had deleted on MSN Messenger, back on my contact list. That’s something I definitely was not expecting. In trying to make my life easier by merging these 2 accounts, I just complicated things more for me.
I guess it’s firstly my fault because I should have done some reading before merging my contacts and I would have seen that quite a few users have encountered similar situations. But well, it’s done now and the worst part is that I can’t re-delete the MSN contacts from Skype directly.
After googling for a while, I figured I would need to delete the contacts from my Live account, which I did and now it seems the said MSN contact has disappeared from Skype. So, now I will need to go through all my contacts again and delete the ones I need do. Waste of time.