0

I am not the best at android programming so please correct any errors I make.

According to this developer.android.com.

Android view is:

This class represents the basic building block for user interface components. A View occupies a rectangular area on the screen and is responsible for drawing and event handling. View is the base class for widgets, which are used to create interactive UI components (buttons, text fields, etc.).

However, I have not found an article about how to get a full view. I mean as in an entire screen as a view. The image I used below is to show what I want to include in that view. I want to include everything on screen. Everything On that Screen. (I can't repeat enough). It includes the chat heads, background, and menu bar. Everything that is on screen.

I can't figure out how to get a view like that from a service or from an activity. Any help is appreciated. I don't have exact code because I don't know how to do this.

Image

Edit: I know that I am very bad at explaining, so if you are confused, I am going to explain what I want to do with my view.

So basically, I want to make a screen tapper that taps for you so you can king of "cheat" games like cookie clicker. Therefore I need a view that contains the entire screen so then I can fake "touches" on the screen.

Hope this cleared any confusion

Community
  • 1
  • 1
Fish
  • 1,689
  • 1
  • 18
  • 28

1 Answers1

0

So you have a few things to deal with. Generally, the menu bar (and possibly soft-key buttons on the bottom) will remain visible. However, you can hide the menu bar:

hide the top menu bar in my android device & Tablet

You may want gestures to allow users to see it. Or, since it appears you are building a game, you just leave it hidden until they hit "home" or "back" or "exit" or whatever.

The "chat heads" are a horrible idea, but some developers think they are awesome. You can see more about that here:

Creating a system overlay window (always on top)

You might find something like this will work (but if new notifications pop-up, it may not help):

http://goobbe.com/questions/1390940/how-to-close-cancel-dismiss-a-system-dialog-programmatically-android

Community
  • 1
  • 1
Jim
  • 10,172
  • 1
  • 27
  • 36
  • I believe I didn't explain my question clearly to cause you to totally misunderstand my question. I want a view that includes everything on the screen. One View. I don't need to create the chat heads I want to be able to use them (like fake a touch) without accessing someone else's (eg. facebook) code. – Fish May 24 '15 at 11:48
  • so you want to keep everything on the screen shown, but also know what was touched? That is not possible in the current version of Android – Jim May 25 '15 at 04:38
  • Where did you get that from? Which site or documentation. – Fish May 25 '15 at 13:20
  • http://stackoverflow.com/questions/4632608/android-detecting-the-touch-state-from-any-application – Jim May 25 '15 at 15:11
  • Well, after reading the 1st sentence from the link you sent me, I realized that the link is not what I wanted. I want to send a fake "touch" from my application (more of a service) to another application. I don't want to "hijack some other application". – Fish May 25 '15 at 18:10
  • Your question does not sound like what you are asking now. I suspect that you want to do something specific, but you are not being clear about what you want to do. You wanted a "view of the entire screen" - now you want to pass an event to another app... maybe you should explain exactly what you want to accomplish – Jim May 25 '15 at 23:12
  • In your definition of a view from the docs, it explains that the rectangle is responsible for not only touch events, but also "drawing" it's portion of the screen. You seem to overlook that in your question as it only relates to event handling. – Jim May 26 '15 at 10:52