Wednesday, July 25, 2012

Use of variables in strings.xml in Android

e.g X company have Y employees
where X is a string variable and Y is an integer variable.

We can use this type of case in R.string also , as discussed below:

Write in strings.xml file
<string name="abc">%1$s company have %2$d employees.</string>
where $s stands for string
$d for integers

In java file
String mystring = getResources().getString(R.string.abc);
String finalstring = mystring.format(mystring, "Google",10000);

OUTPUT:
Google company have 10000 employees.

Sunday, July 22, 2012

Facebook and Twitter Sharing in Blackberry

With lot of research from last many months, finally i concluded a code for sharing status on facebook and twitter in Blackberry. So, make changes in attached code according to your need.
Please change application secret keys before executing it.


If any doubt and queries can comment below.


Download SharingKit