IT. Expert System.

Android Reference



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.
        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.
        the currently attached keyboard
        See Also:
      • setShifted

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

        public boolean isShifted()
        Returns the state of the shift key of the keyboard, if any.
        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:
      • 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.
        previewEnabled - whether or not to enable the key feedback popup
        See Also:
      • isPreviewEnabled

        public boolean isPreviewEnabled()
        Returns the enabled state of the key feedback popup.
        whether or not the key feedback popup is enabled
        See Also:
      • 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.
        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
        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.
        onSizeChanged in class View
        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.
        onDraw in class View
        canvas - the canvas on which the background will be drawn
      • invalidateAllKeys

        public void invalidateAllKeys()
        Requests a redraw of the entire keyboard. Calling View.invalidate( 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

        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.
        keyIndex - the index of the key in the attached Keyboard.
        See Also:
      • 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.
        popupKey - the key that was long pressed
        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.

        onHoverEvent in class View
        event - The motion event that describes the hover.
        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.
        onTouchEvent in class View
        me - The motion event.
        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.
        onDetachedFromWindow in class View
        See Also:
      • handleBack

        public boolean handleBack()


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








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

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: 215 / 159133233. Delta: 0.06733 с