myrthan
myrthan

Reputation: 33

Android - image on top of all

my first post here.

I want to have untouchable image on top of all user activity like using others apps, or phoning etc. all times. Image should only display, nothing more. Everything else should functioning normally. I have problem how to implement this image exactly, i know that i have to use Service, and i use it in my code. I found link, this is similar to what i want get but with picture not text.

Upvotes: 3

Views: 70

Answers (2)

Adam Toth
Adam Toth

Reputation: 951

I think its not much difference from the text.
Just use one of the drawBitmap functions instead of drawText in the Canvas class to do it.
ie.:

 protected void onDraw(Canvas canvas) {
    super.onDraw(canvas);
    canvas.drawBitmap(mBitmap, 5, 15, mLoadPaint);
 }

(I'm referencig the linked question here)

Upvotes: 0

Egor
Egor

Reputation: 40218

I doubt a Service will be of any help here, but you can actually implement this behavior using a single Activity and a number of Fragments. Just use a FrameLayout for your Activity's layout and put an ImageView on top of the container that will hold Fragments.

Upvotes: 1

Related Questions