I have successfully implemented emoticons in android as per this link.Problem is when the app is run on a higher density device,the selected emoticon appears too small.I have tried by changing the dimensionsof the drawable before display as follows
ImageGetter imageGetter = new ImageGetter() {
public Drawable getDrawable(String source) {
StringTokenizer st = new StringTokenizer(index, ".");
Drawable d = new BitmapDrawable(getResources(),
emoticons[Integer.parseInt(st.nextToken()) - 1]);
Log.i("tag", "" + Integer.parseInt(st.nextToken()));
Drawable drawable = getResources().getDrawable(
getResources().getIdentifier(
"e" + (Integer.parseInt(st.nextToken()) - 1),
"drawable", getPackageName()));
// d.setBounds(0, 0, d.getIntrinsicWidth(),
// d.getIntrinsicHeight());
d.setBounds(0, 0, 40, 40);
return d;
}
};
But that doesnt help. The .png images are in the assets folder.Is there a way of having images of dirrent densities in the assets folder?Like the drawable-ldp,drawable-mdp ...?