2

How I can put an image over an activity (something like the image below) but with the buttons and other widgets under this image receiving the touch events?

image http://images.macworld.com/appguide/images/android/558/2908791394402692/5582908791394402692_1.jpg

Erwin Brandstetter
  • 605,456
  • 145
  • 1,078
  • 1,228
Brais Gabin
  • 5,827
  • 6
  • 57
  • 92

2 Answers2

0

You can create a transparent Activity like this How do I create a transparent Activity on Android? and make a Layout with a fullscreen ImageView

Community
  • 1
  • 1
Mats Hofman
  • 7,060
  • 6
  • 33
  • 48
0

I solve the problem override the draw function.

public class TutorialLinearLayout extends LinearLayout {

  public TutorialLinearLayout(Context context) {
    super(context);
  }

  @Override
  public void draw(Canvas canvas) {
    super.draw(canvas);
    Bitmap tutorial = BitmapFactory.decodeResource(getResources(), R.drawable.tutorial);
    canvas.drawBitmap(tutorial, 0, 0, null);
    tutorial.recycle();
  }
}
Brais Gabin
  • 5,827
  • 6
  • 57
  • 92