I am trying to create a custom view object that I can display on the
screen. I have been able to display the object but and I now trying to
add this view to a gallery type thing so that I can horizontally
scroll through a few of them. I am wondering if I can just add them
directly to the gallery somehow or do I have to construct a new class
that would extend a gallery view. I am unsure on how to do either one
of these and would like any assistance you are willing to give.
The custom view that I created is below. I have not done much on the
visual aspect of this project because I am unsure about custom views.
********************************************************************
class Domino extends View {
public Domino(Context context) {
super(context);
}
@Override
public void onDraw(Canvas canvas) {
Bitmap _dom = BitmapFactory.decodeResource(getResources(),
R.drawable.domino_image);
canvas.drawColor(Color.BLACK);
canvas.drawBitmap(_dom, 20, 20, null);
}
}
********************************************************************
I know by using the drawBitmap() method I am just drawing all images
on top of each other.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en