Android Learning----WindowManager Interface (

Source: Internet
Author: User

The interface that's apps use to talk to the window manager.

This interface is used to interact with Window Manager (the Windows Manager, application framework layer).

Use to get one of Context.getSystemService(Context.WINDOW_SERVICE) these.

An instance of WindowManager can be obtained through Context.getsystemservice (Context.window_service).

Inheritance relationship

Public interface WindowManager implements Viewmanager

Owning package

Android.view.WindowManager

Method

    • Abstract Display Getdefaultdisplay ()

Gets the display object that is displayed by default.

    • abstract void Removeviewimmediate (view view)

is a special extension of the Removeview (view) that can immediately invoke the View.ondetachedfromwindow () method of the view hierarchy before the method returns.

* not applicable to general programs; If you want to use it correctly, you need to be extra careful.

Nested classes

    • Class Windowmanager.badtokenexception
      Exception that was thrown when trying to add view whose is WindowManager.LayoutParams token invalid.
    • Class Windowmanager.layoutparams

Layoutparams layout parameters See: http://blog.sina.com.cn/s/blog_4b3c1f950100qd9s.html

The meaning of WindowManager interface

This interface is used to interact with Window Manager (Windows Manager). This interface allows you to add a view to the screen or remove the view from the screen. It faces the object one end of the screen, the other end is view, directly ignoring our previous Activity or Dialog and other stuff.

window Manager (Window manager)

Window Manager is an important service in Android.

The Window Manager Service is Global and unique.

It takes the user's actions, translates them into instructions, and sends them to the various windows that appear on the interface. The activity registers the top-level controls with the window manager, and when the user touches the screen or keyboard, the window manager notifies, and when the control has some requests, it is sent back to the window via viewparent. Manager. Thus complete the entire communication process.

Android Learning----WindowManager Interface (

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.