FreeRDP
Loading...
Searching...
No Matches
com.freerdp.freerdpcore.presentation.ExtendedKeyboardView Class Reference
Inheritance diagram for com.freerdp.freerdpcore.presentation.ExtendedKeyboardView:
Collaboration diagram for com.freerdp.freerdpcore.presentation.ExtendedKeyboardView:

Data Structures

interface  Listener
 

Public Member Functions

 ExtendedKeyboardView (Context context)
 
 ExtendedKeyboardView (Context context, AttributeSet attrs)
 
void setListener (Listener l)
 
void selectPage (int index)
 
void setInsets (int left, int right, int bottom)
 
void setExpanded (boolean expand)
 
void setExpanded (boolean expand, boolean notify)
 
boolean isExpanded ()
 
void refreshModifiers ()
 

Static Public Attributes

static final int PAGE_SPECIAL = 0
 
static final int PAGE_NUM = 1
 

Protected Member Functions

void onConfigurationChanged (android.content.res.Configuration newConfig)
 
void onDetachedFromWindow ()
 

Detailed Description

Definition at line 36 of file ExtendedKeyboardView.java.

Constructor & Destructor Documentation

◆ ExtendedKeyboardView() [1/2]

com.freerdp.freerdpcore.presentation.ExtendedKeyboardView.ExtendedKeyboardView ( Context  context)
inline

Definition at line 85 of file ExtendedKeyboardView.java.

86 {
87 this(context, null);
88 }

◆ ExtendedKeyboardView() [2/2]

com.freerdp.freerdpcore.presentation.ExtendedKeyboardView.ExtendedKeyboardView ( Context  context,
AttributeSet  attrs 
)
inline

Definition at line 90 of file ExtendedKeyboardView.java.

91 {
92 super(context, attrs);
93 setOrientation(VERTICAL);
94 build();
95 }

Member Function Documentation

◆ isExpanded()

boolean com.freerdp.freerdpcore.presentation.ExtendedKeyboardView.isExpanded ( )
inline

Definition at line 405 of file ExtendedKeyboardView.java.

406 {
407 return expanded;
408 }

◆ onConfigurationChanged()

void com.freerdp.freerdpcore.presentation.ExtendedKeyboardView.onConfigurationChanged ( android.content.res.Configuration  newConfig)
inlineprotected

Definition at line 423 of file ExtendedKeyboardView.java.

424 {
425 super.onConfigurationChanged(newConfig);
426
427 // the key dimensions are orientation dependent, so rebuild and restore
428 int page = currentPage;
429 boolean wasExpanded = expanded;
430
431 removeAllViews();
432 modifierKeys.clear();
433 build();
434
435 // build() starts out collapsed: without clearing the flag setExpanded() sees no change
436 // and leaves the freshly built panel hidden
437 expanded = false;
438 selectPage(page);
439 setExpanded(wasExpanded, false);
440 applyInsets();
441 refreshModifiers();
442 }

◆ onDetachedFromWindow()

void com.freerdp.freerdpcore.presentation.ExtendedKeyboardView.onDetachedFromWindow ( )
inlineprotected

Definition at line 444 of file ExtendedKeyboardView.java.

445 {
446 repeatHandler.removeCallbacksAndMessages(null);
447 super.onDetachedFromWindow();
448 }

◆ refreshModifiers()

void com.freerdp.freerdpcore.presentation.ExtendedKeyboardView.refreshModifiers ( )
inline

Definition at line 411 of file ExtendedKeyboardView.java.

412 {
413 if (listener == null)
414 return;
415 for (int i = 0; i < modifierKeys.size(); i++)
416 {
417 int state = listener.getModifierState(modifierKeys.keyAt(i));
418 modifierKeys.valueAt(i).setState(state == KeyboardMapper.KEYSTATE_ON,
419 state == KeyboardMapper.KEYSTATE_LOCKED);
420 }
421 }

◆ selectPage()

void com.freerdp.freerdpcore.presentation.ExtendedKeyboardView.selectPage ( int  index)
inline

Definition at line 360 of file ExtendedKeyboardView.java.

361 {
362 currentPage = index;
363 for (int i = 0; i < pages.length; i++)
364 pages[i].setVisibility(i == index ? VISIBLE : GONE);
365 }

◆ setExpanded() [1/2]

void com.freerdp.freerdpcore.presentation.ExtendedKeyboardView.setExpanded ( boolean  expand)
inline

Definition at line 388 of file ExtendedKeyboardView.java.

389 {
390 setExpanded(expand, true);
391 }

◆ setExpanded() [2/2]

void com.freerdp.freerdpcore.presentation.ExtendedKeyboardView.setExpanded ( boolean  expand,
boolean  notify 
)
inline

Definition at line 393 of file ExtendedKeyboardView.java.

394 {
395 if (expanded == expand)
396 return;
397 expanded = expand;
398 panel.setVisibility(expand ? VISIBLE : GONE);
399 expandKey.setText(expand ? "▲" : "▼");
400 applyInsets();
401 if (notify && listener != null)
402 listener.onExpandedChanged(expand);
403 }

◆ setInsets()

void com.freerdp.freerdpcore.presentation.ExtendedKeyboardView.setInsets ( int  left,
int  right,
int  bottom 
)
inline

Definition at line 367 of file ExtendedKeyboardView.java.

368 {
369 this.insetLeft = left;
370 this.insetRight = right;
371 this.insetBottom = bottom;
372 applyInsets();
373 }

◆ setListener()

void com.freerdp.freerdpcore.presentation.ExtendedKeyboardView.setListener ( Listener  l)
inline

Definition at line 97 of file ExtendedKeyboardView.java.

98 {
99 this.listener = l;
100 }

Field Documentation

◆ PAGE_NUM

final int com.freerdp.freerdpcore.presentation.ExtendedKeyboardView.PAGE_NUM = 1
static

Definition at line 39 of file ExtendedKeyboardView.java.

◆ PAGE_SPECIAL

final int com.freerdp.freerdpcore.presentation.ExtendedKeyboardView.PAGE_SPECIAL = 0
static

Definition at line 38 of file ExtendedKeyboardView.java.


The documentation for this class was generated from the following file: