Java Code Examples for android.view.View
The following code examples are extracted from open source projects. You can click to
vote up the examples that are useful to you.
Example 1
From project 2Degrees-Toolbox, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/app/.
Source file: ActionBarImpl.java

public ActionBarImpl(Activity activity,int features){ mActivity=activity; Window window=activity.getWindow(); View decor=window.getDecorView(); init(decor); if ((features & (1 << Window.FEATURE_ACTION_BAR_OVERLAY)) == 0) { mContentView=(NineFrameLayout)decor.findViewById(android.R.id.content); } }
Example 2
From project 2Degrees-Toolbox, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/.
Source file: AnimatorProxy.java

public void setAlpha(float alpha){ if (mAlpha != alpha) { mAlpha=alpha; View view=mView.get(); if (view != null) { view.invalidate(); } } }
Example 3
From project 2Degrees-Toolbox, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/.
Source file: AnimatorProxy.java

public int getScrollX(){ View view=mView.get(); if (view == null) { return 0; } return view.getScrollX(); }
Example 4
From project 2Degrees-Toolbox, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/.
Source file: AnimatorProxy.java

public void setScrollX(int value){ View view=mView.get(); if (view != null) { view.scrollTo(value,view.getScrollY()); } }
Example 5
From project 2Degrees-Toolbox, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/.
Source file: AnimatorProxy.java

public int getScrollY(){ View view=mView.get(); if (view == null) { return 0; } return view.getScrollY(); }
Example 6
From project 2Degrees-Toolbox, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/.
Source file: AnimatorProxy.java

public void setScrollY(int value){ View view=mView.get(); if (view != null) { view.scrollTo(view.getScrollY(),value); } }
Example 7
From project 2Degrees-Toolbox, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/.
Source file: AnimatorProxy.java

private void prepareForUpdate(){ View view=mView.get(); if (view != null) { computeRect(mBefore,view); } }
Example 8
From project 2Degrees-Toolbox, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/.
Source file: AnimatorProxy.java

@Override protected void applyTransformation(float interpolatedTime,Transformation t){ View view=mView.get(); if (view != null) { t.setAlpha(mAlpha); transformMatrix(t.getMatrix(),view); } }
Example 9
From project 2Degrees-Toolbox, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/view/menu/.
Source file: ActionMenuPresenter.java

private View findViewForItem(MenuItem item){ final ViewGroup parent=(ViewGroup)mMenuView; if (parent == null) return null; final int count=parent.getChildCount(); for (int i=0; i < count; i++) { final View child=parent.getChildAt(i); if (child instanceof MenuView.ItemView && ((MenuView.ItemView)child).getItemData() == item) { return child; } } return null; }
Example 10
From project 2Degrees-Toolbox, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/view/menu/.
Source file: ActionMenuPresenter.java

public void run(){ mMenu.changeMenuMode(); final View menuView=(View)mMenuView; if (menuView != null && menuView.getWindowToken() != null && mPopup.tryShow()) { mOverflowPopup=mPopup; } mPostedOpenRunnable=null; }
Example 11
From project 2Degrees-Toolbox, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/view/menu/.
Source file: ActionMenuView.java

protected boolean hasDividerBeforeChildAt(int childIndex){ final View childBefore=getChildAt(childIndex - 1); final View child=getChildAt(childIndex); boolean result=false; if (childIndex < getChildCount() && childBefore instanceof ActionMenuChildView) { result|=((ActionMenuChildView)childBefore).needsDividerAfter(); } if (childIndex > 0 && child instanceof ActionMenuChildView) { result|=((ActionMenuChildView)child).needsDividerBefore(); } return result; }
Example 12
From project 4308Cirrus, under directory /Extras/actionbarsherlock/src/com/actionbarsherlock/internal/app/.
Source file: ActionBarImpl.java

public ActionBarImpl(Activity activity,int features){ mActivity=activity; Window window=activity.getWindow(); View decor=window.getDecorView(); init(decor); if ((features & (1 << Window.FEATURE_ACTION_BAR_OVERLAY)) == 0) { mContentView=(NineFrameLayout)decor.findViewById(android.R.id.content); } }
Example 13
From project 4308Cirrus, under directory /Extras/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/.
Source file: AnimatorProxy.java

public void setAlpha(float alpha){ if (mAlpha != alpha) { mAlpha=alpha; View view=mView.get(); if (view != null) { view.invalidate(); } } }
Example 14
From project 4308Cirrus, under directory /Extras/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/.
Source file: AnimatorProxy.java

public int getScrollX(){ View view=mView.get(); if (view == null) { return 0; } return view.getScrollX(); }
Example 15
From project 4308Cirrus, under directory /Extras/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/.
Source file: AnimatorProxy.java

public void setScrollX(int value){ View view=mView.get(); if (view != null) { view.scrollTo(value,view.getScrollY()); } }
Example 16
From project 4308Cirrus, under directory /Extras/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/.
Source file: AnimatorProxy.java

public int getScrollY(){ View view=mView.get(); if (view == null) { return 0; } return view.getScrollY(); }
Example 17
From project 4308Cirrus, under directory /Extras/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/.
Source file: AnimatorProxy.java

public void setScrollY(int value){ View view=mView.get(); if (view != null) { view.scrollTo(view.getScrollY(),value); } }
Example 18
From project 4308Cirrus, under directory /Extras/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/.
Source file: AnimatorProxy.java

private void prepareForUpdate(){ View view=mView.get(); if (view != null) { computeRect(mBefore,view); } }
Example 19
From project 4308Cirrus, under directory /Extras/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/.
Source file: AnimatorProxy.java

private void invalidateAfterUpdate(){ View view=mView.get(); if (view == null) { return; } View parent=(View)view.getParent(); if (parent == null) { return; } final RectF after=mAfter; computeRect(after,view); after.union(mBefore); parent.invalidate((int)FloatMath.floor(after.left),(int)FloatMath.floor(after.top),(int)FloatMath.ceil(after.right),(int)FloatMath.ceil(after.bottom)); }
Example 20
From project 4308Cirrus, under directory /Extras/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/.
Source file: AnimatorProxy.java

@Override protected void applyTransformation(float interpolatedTime,Transformation t){ View view=mView.get(); if (view != null) { t.setAlpha(mAlpha); transformMatrix(t.getMatrix(),view); } }
Example 21
From project 4308Cirrus, under directory /Extras/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/.
Source file: ActionMenuPresenter.java

private View findViewForItem(MenuItem item){ final ViewGroup parent=(ViewGroup)mMenuView; if (parent == null) return null; final int count=parent.getChildCount(); for (int i=0; i < count; i++) { final View child=parent.getChildAt(i); if (child instanceof MenuView.ItemView && ((MenuView.ItemView)child).getItemData() == item) { return child; } } return null; }
Example 22
From project 4308Cirrus, under directory /Extras/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/.
Source file: ActionMenuPresenter.java

public void run(){ mMenu.changeMenuMode(); final View menuView=(View)mMenuView; if (menuView != null && menuView.getWindowToken() != null && mPopup.tryShow()) { mOverflowPopup=mPopup; } mPostedOpenRunnable=null; }