public class Char extends ImageView {
/**
* Constructor for <code>Char</code>
*
* @param context The {@link Context} to use
* @param resId The resource identifier of the {@link Drawable}
*/
public Char(Context context, int resId) {
super(context);
setImageResource(resId);
}
}
To use it call: new Char(your_context, R.drawable.your_drawable))