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
  • 539,169
  • 125
  • 977
  • 1,137
Brais Gabin
  • 5,726
  • 6
  • 53
  • 89

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
  • 6,810
  • 6
  • 32
  • 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,726
  • 6
  • 53
  • 89