IT. Expert System.

Android Reference

KeyboardView


android.inputmethodservice

Class KeyboardView

    • Method Detail

      • setKeyboard

        public void setKeyboard(Keyboard keyboard)
        Attaches a keyboard to this view. The keyboard can be switched at any time and the view will re-layout itself to accommodate the keyboard.
        Parameters:
        keyboard - the keyboard to display in this view
        See Also:
        Keyboard, getKeyboard()
      • getKeyboard

        public Keyboard getKeyboard()
        Returns the current keyboard being displayed by this view.
        Returns:
        the currently attached keyboard
        See Also:
        setKeyboard(Keyboard)
      • setShifted

        public boolean setShifted(boolean shifted)
        Sets the state of the shift key of the keyboard, if any.
        Parameters:
        shifted - whether or not to enable the state of the shift key
        Returns:
        true if the shift key state changed, false if there was no change
        See Also:
        isShifted()
      • isShifted

        public boolean isShifted()
        Returns the state of the shift key of the keyboard, if any.
        Returns:
        true if the shift is in a pressed state, false otherwise. If there is no shift key on the keyboard or there is no keyboard attached, it returns false.
        See Also:
        setShifted(boolean)
      • setPreviewEnabled

        public void setPreviewEnabled(boolean previewEnabled)
        Enables or disables the key feedback popup. This is a popup that shows a magnified version of the depressed key. By default the preview is enabled.
        Parameters:
        previewEnabled - whether or not to enable the key feedback popup
        See Also:
        isPreviewEnabled()
      • isPreviewEnabled

        public boolean isPreviewEnabled()
        Returns the enabled state of the key feedback popup.
        Returns:
        whether or not the key feedback popup is enabled
        See Also:
        setPreviewEnabled(boolean)
      • setVerticalCorrection

        public void setVerticalCorrection(int verticalOffset)
      • setPopupParent

        public void setPopupParent(View v)
      • setPopupOffset

        public void setPopupOffset(int x,
                          int y)
      • setProximityCorrectionEnabled

        public void setProximityCorrectionEnabled(boolean enabled)
        When enabled, calls to KeyboardView.OnKeyboardActionListener.onKey(int, int[]) will include key codes for adjacent keys. When disabled, only the primary key code will be reported.
        Parameters:
        enabled - whether or not the proximity correction is enabled
      • isProximityCorrectionEnabled

        public boolean isProximityCorrectionEnabled()
        Returns true if proximity correction is enabled.
      • onClick

        public void onClick(View v)
        Popup keyboard close button clicked.
        Specified by:
        onClick in interface View.OnClickListener
        Parameters:
        v - The view that was clicked.
      • onSizeChanged

        public void onSizeChanged(int w,
                         int h,
                         int oldw,
                         int oldh)
        Description copied from class: View
        This is called during layout when the size of this view has changed. If you were just added to the view hierarchy, you're called with the old values of 0.
        Overrides:
        onSizeChanged in class View
        Parameters:
        w - Current width of this view.
        h - Current height of this view.
        oldw - Old width of this view.
        oldh - Old height of this view.
      • onDraw

        public void onDraw(Canvas canvas)
        Description copied from class: View
        Implement this to do your drawing.
        Overrides:
        onDraw in class View
        Parameters:
        canvas - the canvas on which the background will be drawn
      • invalidateAllKeys

        public void invalidateAllKeys()
        Requests a redraw of the entire keyboard. Calling View.invalidate(android.graphics.Rect) is not sufficient because the keyboard renders the keys to an off-screen buffer and an invalidate() only draws the cached buffer.
        See Also:
        invalidateKey(int)
      • invalidateKey

        public void invalidateKey(int keyIndex)
        Invalidates a key so that it will be redrawn on the next repaint. Use this method if only one key is changing it's content. Any changes that affect the position or size of the key may not be honored.
        Parameters:
        keyIndex - the index of the key in the attached Keyboard.
        See Also:
        invalidateAllKeys()
      • onLongPress

        protected boolean onLongPress(Keyboard.Key popupKey)
        Called when a key is long pressed. By default this will open any popup keyboard associated with this key through the attributes popupLayout and popupCharacters.
        Parameters:
        popupKey - the key that was long pressed
        Returns:
        true if the long press is handled, false otherwise. Subclasses should call the method on the base class if the subclass doesn't wish to handle the call.
      • onHoverEvent

        public boolean onHoverEvent(MotionEvent event)
        Description copied from class: View
        Implement this method to handle hover events.

        This method is called whenever a pointer is hovering into, over, or out of the bounds of a view and the view is not currently being touched. Hover events are represented as pointer events with action MotionEvent.ACTION_HOVER_ENTER, MotionEvent.ACTION_HOVER_MOVE, or MotionEvent.ACTION_HOVER_EXIT.

        • The view receives a hover event with action MotionEvent.ACTION_HOVER_ENTER when the pointer enters the bounds of the view.
        • The view receives a hover event with action MotionEvent.ACTION_HOVER_MOVE when the pointer has already entered the bounds of the view and has moved.
        • The view receives a hover event with action MotionEvent.ACTION_HOVER_EXIT when the pointer has exited the bounds of the view or when the pointer is about to go down due to a button click, tap, or similar user action that causes the view to be touched.

        The view should implement this method to return true to indicate that it is handling the hover event, such as by changing its drawable state.

        The default implementation calls View.setHovered(boolean) to update the hovered state of the view when a hover enter or hover exit event is received, if the view is enabled and is clickable. The default implementation also sends hover accessibility events.

        Overrides:
        onHoverEvent in class View
        Parameters:
        event - The motion event that describes the hover.
        Returns:
        True if the view handled the hover event.
        See Also:
        View.isHovered(), View.setHovered(boolean), View.onHoverChanged(boolean)
      • onTouchEvent

        public boolean onTouchEvent(MotionEvent me)
        Description copied from class: View
        Implement this method to handle touch screen motion events.
        Overrides:
        onTouchEvent in class View
        Parameters:
        me - The motion event.
        Returns:
        True if the event was handled, false otherwise.
      • swipeRight

        protected void swipeRight()
      • swipeLeft

        protected void swipeLeft()
      • swipeUp

        protected void swipeUp()
      • swipeDown

        protected void swipeDown()
      • closing

        public void closing()
      • onDetachedFromWindow

        public void onDetachedFromWindow()
        Description copied from class: View
        This is called when the view is detached from a window. At this point it no longer has a surface for drawing.
        Overrides:
        onDetachedFromWindow in class View
        See Also:
        View.onAttachedToWindow()
      • handleBack

        public boolean handleBack()


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 336 / 158860940. Delta: 0.04181 с