AI2 Component  (Version nb184)
com.google.appinventor.components.runtime.ScaledFrameLayout Class Reference
Inheritance diagram for com.google.appinventor.components.runtime.ScaledFrameLayout:

Public Member Functions

 ScaledFrameLayout (Context context)
 
 ScaledFrameLayout (Context context, AttributeSet attrs)
 
 ScaledFrameLayout (Context context, AttributeSet attrs, int defStyle)
 
ViewParent invalidateChildInParent (final int[] location, final Rect dirty)
 
boolean dispatchTouchEvent (MotionEvent ev)
 
void setScale (float scale)
 
boolean shouldDelayChildPressedState ()
 

Protected Member Functions

void dispatchDraw (Canvas canvas)
 
void onSizeChanged (int w, int h, int oldw, int oldh)
 
void onMeasure (int widthMeasureSpec, int heightMeasureSpec)
 
void onLayout (boolean changed, int left, int top, int right, int bottom)
 

Detailed Description

This is a FrameLayout that displays all content by a scaled amount. Paddding is adjusted such that scale * (size-padding) = size. Code adjusted from Google example code found at: http://developer.android.com/reference/android/view/ViewGroup.html

Definition at line 30 of file ScaledFrameLayout.java.

Constructor & Destructor Documentation

◆ ScaledFrameLayout() [1/3]

com.google.appinventor.components.runtime.ScaledFrameLayout.ScaledFrameLayout ( Context  context)

Definition at line 46 of file ScaledFrameLayout.java.

◆ ScaledFrameLayout() [2/3]

com.google.appinventor.components.runtime.ScaledFrameLayout.ScaledFrameLayout ( Context  context,
AttributeSet  attrs 
)

Definition at line 50 of file ScaledFrameLayout.java.

◆ ScaledFrameLayout() [3/3]

com.google.appinventor.components.runtime.ScaledFrameLayout.ScaledFrameLayout ( Context  context,
AttributeSet  attrs,
int  defStyle 
)

Definition at line 54 of file ScaledFrameLayout.java.

Member Function Documentation

◆ dispatchDraw()

void com.google.appinventor.components.runtime.ScaledFrameLayout.dispatchDraw ( Canvas  canvas)
protected

Definition at line 60 of file ScaledFrameLayout.java.

◆ dispatchTouchEvent()

boolean com.google.appinventor.components.runtime.ScaledFrameLayout.dispatchTouchEvent ( MotionEvent  ev)

Definition at line 85 of file ScaledFrameLayout.java.

◆ invalidateChildInParent()

ViewParent com.google.appinventor.components.runtime.ScaledFrameLayout.invalidateChildInParent ( final int[]  location,
final Rect  dirty 
)

Definition at line 68 of file ScaledFrameLayout.java.

◆ onLayout()

void com.google.appinventor.components.runtime.ScaledFrameLayout.onLayout ( boolean  changed,
int  left,
int  top,
int  right,
int  bottom 
)
protected

Position all children within this layout.

Definition at line 169 of file ScaledFrameLayout.java.

◆ onMeasure()

void com.google.appinventor.components.runtime.ScaledFrameLayout.onMeasure ( int  widthMeasureSpec,
int  heightMeasureSpec 
)
protected

Ask all children to measure themselves and compute the measurement of this layout based on the children.

Definition at line 123 of file ScaledFrameLayout.java.

◆ onSizeChanged()

void com.google.appinventor.components.runtime.ScaledFrameLayout.onSizeChanged ( int  w,
int  h,
int  oldw,
int  oldh 
)
protected

Definition at line 106 of file ScaledFrameLayout.java.

◆ setScale()

void com.google.appinventor.components.runtime.ScaledFrameLayout.setScale ( float  scale)

Definition at line 92 of file ScaledFrameLayout.java.

◆ shouldDelayChildPressedState()

boolean com.google.appinventor.components.runtime.ScaledFrameLayout.shouldDelayChildPressedState ( )

Override because viewgroup does not scroll

Definition at line 114 of file ScaledFrameLayout.java.


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