3

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.

Community
  • 1
  • 1
myrthan
  • 33
  • 3

2 Answers2

1

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.

Egor
  • 37,239
  • 10
  • 109
  • 127
  • Yes sure, but i want to use others phone functions when this image on top, in your solve when i exit the Activity then image will disappear. In my linked solution user can do everything while text is dispplaying. service is necessary because of control of image (when it can be display when not, only Service has control). But maybe i'm wrong this is my first app. Sorry for my English – myrthan Jul 20 '13 at 13:07
0

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)

Adam Toth
  • 911
  • 1
  • 12
  • 25