android-sdk: Adds templates for all methods of a couple more classes

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1837 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
sekelsenmat 2011-08-26 15:48:44 +00:00
parent 9ce86062fb
commit a71bf8ca2b

View File

@ -9,7 +9,11 @@
# For Interfaces:
# {InterfaceName} Parent1 Parent2 Parent3
#
# For Callback types
# type DialogInterface.OnClickListener = void onClick(DialogInterface dialog, int which)
#
#
#
#[MenuItem] TJavaObject
#classcallback MenuItem.OnMenuItemClickListener boolean onMenuItemClick (MenuItem item)
#method MenuItem setOnMenuItemClickListener (MenuItem.OnMenuItemClickListener menuItemClickListener)
@ -21,6 +25,13 @@
# android.util.*
#
[DisplayMetrics] TJavaObject
# all methods added
const DENSITY_DEFAULT = $000000a0;
const DENSITY_HIGH = $000000f0;
const DENSITY_LOW = $00000078;
const DENSITY_MEDIUM = $000000a0;
const DENSITY_TV = $000000d5;
const DENSITY_XHIGH = $00000140;
constructor Create(); override;
field float density
field int densityDpi
@ -29,15 +40,26 @@ field float scaledDensity
field int widthPixels
field float xdpi
field float ydpi
#void setTo(DisplayMetrics o)
#void setToDefaults()
#String toString()
#
# android.content.*
#
{DialogInterface}
# all methods added
#interface DialogInterface.OnCancelListener Interface used to allow the creator of a dialog to run some code when the dialog is canceled.
type DialogInterface.OnClickListener = void onClick(DialogInterface dialog, int which)
#interface DialogInterface.OnDismissListener Interface used to allow the creator of a dialog to run some code when the dialog is dismissed.
#interface DialogInterface.OnKeyListener Interface definition for a callback to be invoked when a key event is dispatched to this dialog.
#interface DialogInterface.OnMultiChoiceClickListener Interface used to allow the creator of a dialog to run some code when an item in a multi-choice dialog is clicked.
#interface DialogInterface.OnShowListener Interface used to allow the creator of a dialog to run some code when the dialog is shown.
const BUTTON_NEGATIVE = $fffffffe;
const BUTTON_NEUTRAL = $fffffffd;
const BUTTON_POSITIVE = $ffffffff;
#abstract void cancel()
#abstract void dismiss()
#
# android.app.*
@ -47,12 +69,28 @@ method void setTitle(CharSequence title)
method CharSequence getTitle()
[Display] TJavaObject
# all methods added
const DEFAULT_DISPLAY = 0;
#public int getDisplayId ()
#public int getHeight ()
method void getMetrics(DisplayMetrics outMetrics)
#public int getOrientation ()
#public int getPixelFormat ()
#public void getRectSize (Rect outSize)
#public float getRefreshRate ()
#public int getRotation ()
#public void getSize (Point outSize)
#public int getWidth ()
[WindowManager] TJavaObject
# all methods added, but it should be an interface, check this latter
method Display getDefaultDisplay()
#abstract void removeViewImmediate(View view)
[Dialog] TJavaObject
# all methods added
#Dialog(Context context)
# Dialog(Context context, int theme)
#void addContentView(View view, ViewGroup.LayoutParams params)
#void cancel()
#void closeOptionsMenu()
@ -135,9 +173,13 @@ method void show()
#void unregisterForContextMenu(View view)
[AlertDialog] Dialog
# all methods added
const THEME_HOLO_DARK = $00000002;
const THEME_HOLO_LIGHT = $00000003;
const THEME_TRADITIONAL = $00000001;
#AlertDialog(Context context)
# AlertDialog(Context context, int theme)
# AlertDialog(Context context, boolean cancelable, DialogInterface.OnCancelListener cancelListener)
# Button getButton(int whichButton)
# ListView getListView()
# boolean onKeyDown(int keyCode, KeyEvent event)
@ -161,7 +203,9 @@ method void setTitle(CharSequence title)
method void setView(View view)
[AlertDialog.Builder] TJavaObject
# all methods added
constructor Create(Activity); override;
# AlertDialog.Builder(Context context, int theme)
method AlertDialog create ()
#public Context getContext ()
#public AlertDialog.Builder setAdapter (ListAdapter adapter, DialogInterface.OnClickListener listener)
@ -200,12 +244,19 @@ method AlertDialog show ()
# android.view
#
[ViewGroup.LayoutParams] TJavaObject
constructor Create(int width, int height);
# all methods added
const FILL_PARENT = $FFFFFFFF;
const MATCH_PARENT = $FFFFFFFF;
const WRAP_CONTENT = $FFFFFFFE;
#public int height Information about how tall the view wants to be.
#public LayoutAnimationController.AnimationParameters layoutAnimationParameters Used to animate layouts.
#public int width Information about how wide the view wants to be.
#ViewGroup.LayoutParams(Context c, AttributeSet attrs)
constructor Create(int width, int height);
#ViewGroup.LayoutParams(ViewGroup.LayoutParams source)
[View] TJavaObject
# all methods added
const DRAWING_CACHE_QUALITY_AUTO = 0;
const DRAWING_CACHE_QUALITY_HIGH = $00100000;
const DRAWING_CACHE_QUALITY_LOW = $00080000;
@ -244,6 +295,7 @@ const STATUS_BAR_HIDDEN = 1;
const STATUS_BAR_VISIBLE = 0;
const VIEW_LOG_TAG = 'View';
const VISIBLE = 0;
type View.OnClickListener = void onClick(View v)
#
#View(Context context)
#View(Context context, AttributeSet attrs)
@ -546,26 +598,156 @@ method void setVisibility(int visibility);
#boolean willNotDraw()
[ViewGroup] View
# all methods added
const CLIP_TO_PADDING_MASK = $00000022;
const FOCUS_AFTER_DESCENDANTS = $00040000;
const FOCUS_BEFORE_DESCENDANTS = $00020000;
const FOCUS_BLOCK_DESCENDANTS = $00060000;
const PERSISTENT_ALL_CACHES = 3;
const PERSISTENT_ANIMATION_CACHE = 1;
const PERSISTENT_NO_CACHE = 0;
const PERSISTENT_SCROLLING_CACHE = 2;
#
public ViewGroup (Context context)
public ViewGroup (Context context, AttributeSet attrs)
public ViewGroup (Context context, AttributeSet attrs, int defStyle)
public void addFocusables (ArrayList<View> views, int direction, int focusableMode)
public void addFocusables (ArrayList<View> views, int direction)
public boolean addStatesFromChildren ()
public void addTouchables (ArrayList<View> views)
method void addView(View child, int aindex, ViewGroup.LayoutParams params); overload;
method void addView(View child, ViewGroup.LayoutParams params); overload;
method void addView(View child, int aindex); overload;
method void addView(View child); overload;
method void addView(View child, int width, int height); overload;
type View.OnClickListener = void onClick(View v)
#public void bringChildToFront (View child)
#public void childDrawableStateChanged (View child)
#public void clearChildFocus (View child)
#public void clearDisappearingChildren ()
#public void clearFocus ()
#public void dispatchConfigurationChanged (Configuration newConfig)
#public boolean dispatchDragEvent (DragEvent event)
#public boolean dispatchGenericMotionEvent (MotionEvent event)
#public boolean dispatchKeyEvent (KeyEvent event)
#public boolean dispatchKeyEventPreIme (KeyEvent event)
#public boolean dispatchKeyShortcutEvent (KeyEvent event)
#public boolean dispatchPopulateAccessibilityEvent (AccessibilityEvent event)
#public void dispatchSetActivated (boolean activated)
#public void dispatchSetSelected (boolean selected)
#public void dispatchSystemUiVisibilityChanged (int visible)
#public boolean dispatchTouchEvent (MotionEvent ev)
#public boolean dispatchTrackballEvent (MotionEvent event)
#public boolean dispatchUnhandledMove (View focused, int direction)
#public void dispatchWindowFocusChanged (boolean hasFocus)
#public void dispatchWindowVisibilityChanged (int visibility)
#public void endViewTransition (View view)
#public View findFocus ()
#public View focusSearch (View focused, int direction)
#public void focusableViewAvailable (View v)
#public boolean gatherTransparentRegion (Region region)
#public ViewGroup.LayoutParams generateLayoutParams (AttributeSet attrs)
#public View getChildAt (int index)
#public int getChildCount ()
#public static int getChildMeasureSpec (int spec, int padding, int childDimension)
#public boolean getChildVisibleRect (View child, Rect r, Point offset)
#public int getDescendantFocusability ()
#public View getFocusedChild ()
#public LayoutAnimationController getLayoutAnimation ()
#public Animation.AnimationListener getLayoutAnimationListener ()
#public LayoutTransition getLayoutTransition ()
#public int getPersistentDrawingCache ()
#public boolean hasFocus ()
#public boolean hasFocusable ()
#public int indexOfChild (View child)
#public final void invalidateChild (View child, Rect dirty)
#public ViewParent invalidateChildInParent (int[] location, Rect dirty)
#public boolean isAlwaysDrawnWithCacheEnabled ()
#public boolean isAnimationCacheEnabled ()
#public boolean isMotionEventSplittingEnabled ()
#public void jumpDrawablesToCurrentState ()
#public final void layout (int l, int t, int r, int b)
#public final void offsetDescendantRectToMyCoords (View descendant, Rect rect)
#public final void offsetRectIntoDescendantCoords (View descendant, Rect rect)
#public boolean onInterceptTouchEvent (MotionEvent ev)
#public void recomputeViewAttributes (View child)
#public void removeAllViews ()
#public void removeAllViewsInLayout ()
#public void removeView (View view)
#public void removeViewAt (int index)
#public void removeViewInLayout (View view)
#public void removeViews (int start, int count)
#public void removeViewsInLayout (int start, int count)
#public void requestChildFocus (View child, View focused)
#public boolean requestChildRectangleOnScreen (View child, Rect rectangle, boolean immediate)
#public void requestDisallowInterceptTouchEvent (boolean disallowIntercept)
#public boolean requestFocus (int direction, Rect previouslyFocusedRect)
#public void scheduleLayoutAnimation ()
#public void setAddStatesFromChildren (boolean addsStates)
#public void setAlwaysDrawnWithCacheEnabled (boolean always)
#public void setAnimationCacheEnabled (boolean enabled)
#public void setClipChildren (boolean clipChildren)
#public void setClipToPadding (boolean clipToPadding)
#public void setDescendantFocusability (int focusability)
#public void setLayoutAnimation (LayoutAnimationController controller)
#public void setLayoutAnimationListener (Animation.AnimationListener animationListener)
#public void setLayoutTransition (LayoutTransition transition)
#public void setMotionEventSplittingEnabled (boolean split)
#public void setOnHierarchyChangeListener (ViewGroup.OnHierarchyChangeListener listener)
#public void setPadding (int left, int top, int right, int bottom)
#public void setPersistentDrawingCache (int drawingCacheToKeep)
#public boolean showContextMenuForChild (View originalView)
#public ActionMode startActionModeForChild (View originalView, ActionMode.Callback callback)
#public void startLayoutAnimation ()
#public void startViewTransition (View view)
#public void updateViewLayout (View view, ViewGroup.LayoutParams params)
[LinearLayout] ViewGroup
constructor Create(Activity); override;
method void setOrientation(int orientation);
# all methods added
const HORIZONTAL = 0;
const SHOW_DIVIDER_BEGINNING = 1;
const SHOW_DIVIDER_END = 8;
const SHOW_DIVIDER_MIDDLE = 2;
const SHOW_DIVIDER_NONE = 0;
const VERTICAL = 1;
constructor Create(Activity); override;
#public LinearLayout (Context context, AttributeSet attrs)
#public LinearLayout (Context context, AttributeSet attrs, int defStyle)
#public LinearLayout.LayoutParams generateLayoutParams (AttributeSet attrs)
#public int getBaseline ()
#public int getBaselineAlignedChildIndex ()
#public int getOrientation ()
#public int getShowDividers ()
#public float getWeightSum ()
#public boolean isBaselineAligned ()
#public boolean isMeasureWithLargestChildEnabled ()
#public void setBaselineAligned (boolean baselineAligned)
#public void setBaselineAlignedChildIndex (int i)
#public void setDividerDrawable (Drawable divider)
#public void setGravity (int gravity)
#public void setHorizontalGravity (int horizontalGravity)
#public void setMeasureWithLargestChildEnabled (boolean enabled)
method void setOrientation(int orientation);
#public void setShowDividers (int showDividers)
#public void setVerticalGravity (int verticalGravity)
#public void setWeightSum (float weightSum)
[AbsoluteLayout] ViewGroup
# all methods added
constructor Create(Activity); override;
# AbsoluteLayout(Context context, AttributeSet attrs)
# AbsoluteLayout(Context context, AttributeSet attrs, int defStyle)
#ViewGroup.LayoutParams generateLayoutParams(AttributeSet attrs)
[AbsoluteLayout.LayoutParams] ViewGroup.LayoutParams
#public int x The horizontal, or X, location of the child within the view group.
#public int y The vertical, or Y, location of the child within the view group.
constructor Create(int param_width, int param_height, int param_x, int param_y);
# AbsoluteLayout.LayoutParams(Context c, AttributeSet attrs)
# AbsoluteLayout.LayoutParams(ViewGroup.LayoutParams source)
#String debug(String output)
[TextView] View
# all methods added
constructor Create(Activity); override;
#TextView(Context context, AttributeSet attrs)
#TextView(Context context, AttributeSet attrs, int defStyle)
@ -743,6 +925,7 @@ method void setTextSize(int unit_; float size);
#void setWidth(int pixels)
[EditText] TextView
# all methods added
constructor Create(Activity); override;
#EditText(Context context, AttributeSet attrs)
#EditText(Context context, AttributeSet attrs, int defStyle)
@ -755,7 +938,10 @@ constructor Create(Activity); override;
#void setText(CharSequence text, TextView.BufferType type)
[Button] TextView
# all methods added
constructor Create(Activity); override;
#Button(Context context, AttributeSet attrs)
#Button(Context context, AttributeSet attrs, int defStyle)
[FrameLayout] ViewGroup