i have some problem in my code...i try to show gallery layout in my code...
in my code
Using java Syntax Highlighting
- public void onCreate(Bundle icicle) {
- setContentView(R.layout.main);
- addContentView(myview,new new LinearLayout.LayoutParams(
- LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
- }
- class myview extends View
- protected void onDraw(Canvas canvas) {
- {
- mCanvas.drawRoundRect.................
- mCanvas.drawRoundRect................
- Gallery gallery = (Gallery) ((Activity)ctx).findViewById(R.id.gallery);
- gallery.setAdapter(new myAdapter(ctx));
- }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
it's called myAdapter class but did not display any image.what is problem behind that??how to use Gallery Layout in onDraw method??





