/development/samples/browseable/DragAndDropAcrossApps/DropTarget/src/com.example.android/droptarget/ |
D | ImageDragListener.java | 21 import android.view.DragEvent; 22 import android.view.View; 34 public boolean onDrag(View view, DragEvent event) { in onDrag() argument 37 setTargetColor(view, COLOR_ACTIVE); in onDrag() 41 setTargetColor(view, COLOR_HOVER); in onDrag() 49 setTargetColor(view, COLOR_ACTIVE); in onDrag() 53 return processDrop(view, event); in onDrag() 56 setTargetColor(view, COLOR_INACTIVE); in onDrag() 66 private void setTargetColor(View view, int color) { in setTargetColor() argument 67 view.setBackgroundColor(color); in setTargetColor() [all …]
|
/development/samples/browseable/DragAndDropAcrossApps/DragSource/src/com.example.android/dragsource/ |
D | ImageDragListener.java | 21 import android.view.DragEvent; 22 import android.view.View; 40 public boolean onDrag(View view, DragEvent event) { in onDrag() argument 45 setTargetColor(view, COLOR_ACTIVE); in onDrag() 49 setTargetColor(view, COLOR_HOVER); in onDrag() 57 setTargetColor(view, COLOR_ACTIVE); in onDrag() 61 return processDrop(view, event); in onDrag() 64 setTargetColor(view, COLOR_INACTIVE); in onDrag() 74 private void setTargetColor(View view, int color) { in setTargetColor() argument 75 view.setBackgroundColor(color); in setTargetColor() [all …]
|
/development/samples/browseable/SlidingTabsBasic/src/com.example.android.slidingtabsbasic/ |
D | SlidingTabsBasicFragment.java | 20 import com.example.android.common.view.SlidingTabLayout; 24 import android.support.v4.view.PagerAdapter; 25 import android.support.v4.view.ViewPager; 26 import android.view.LayoutInflater; 27 import android.view.View; 28 import android.view.ViewGroup; 72 public void onViewCreated(View view, Bundle savedInstanceState) { in onViewCreated() argument 75 mViewPager = (ViewPager) view.findViewById(R.id.viewpager); in onViewCreated() 82 mSlidingTabLayout = (SlidingTabLayout) view.findViewById(R.id.sliding_tabs); in onViewCreated() 109 public boolean isViewFromObject(View view, Object o) { in isViewFromObject() argument [all …]
|
/development/samples/browseable/SwipeRefreshMultipleViews/src/com.example.android.swiperefreshmultipleviews/ |
D | MultiSwipeRefreshLayout.java | 20 import android.support.v4.view.ViewCompat; 23 import android.view.View; 70 for (View view : mSwipeableChildren) { in canChildScrollUp() 71 if (view != null && view.isShown() && !canViewScrollUp(view)) { in canChildScrollUp() 88 private static boolean canViewScrollUp(View view) { in canViewScrollUp() argument 91 return ViewCompat.canScrollVertically(view, -1); in canViewScrollUp() 93 if (view instanceof AbsListView) { in canViewScrollUp() 96 final AbsListView listView = (AbsListView) view; in canViewScrollUp() 102 return view.getScrollY() > 0; in canViewScrollUp()
|
D | SwipeRefreshMultipleViewsFragment.java | 26 import android.view.LayoutInflater; 27 import android.view.Menu; 28 import android.view.MenuInflater; 29 import android.view.MenuItem; 30 import android.view.View; 31 import android.view.ViewGroup; 88 View view = inflater.inflate(R.layout.fragment_sample, container, false); in onCreateView() local 90 mSwipeRefreshLayout = (MultiSwipeRefreshLayout) view.findViewById(R.id.swiperefresh); in onCreateView() 99 mGridView = (GridView) view.findViewById(android.R.id.list); in onCreateView() 100 mEmptyView = view.findViewById(android.R.id.empty); in onCreateView() [all …]
|
/development/samples/browseable/ClippingBasic/src/com.example.android.clippingbasic/ |
D | ClippingBasicFragment.java | 23 import android.view.LayoutInflater; 24 import android.view.View; 25 import android.view.ViewGroup; 26 import android.view.ViewOutlineProvider; 64 public void onViewCreated(final View view, Bundle savedInstanceState) { in onViewCreated() argument 65 super.onViewCreated(view, savedInstanceState); in onViewCreated() 68 mTextView = (TextView) view.findViewById(R.id.text_view); in onViewCreated() 72 final View clippedView = view.findViewById(R.id.frame); in onViewCreated() 78 view.findViewById(R.id.button).setOnClickListener(new View.OnClickListener() { in onViewCreated() 99 view.findViewById(R.id.text_view).setOnClickListener(new View.OnClickListener() { in onViewCreated() [all …]
|
/development/samples/devbytes/animation/MultiPropertyAnimations/src/com/example/android/multipropertyanimations/ |
D | MultiPropertyAnimations.java | 25 import android.view.View; 52 public void runValueAnimator(final View view) { in runValueAnimator() argument 58 view.setTranslationX(TX_START + fraction * (TX_END - TX_START)); in runValueAnimator() 59 view.setTranslationY(TY_START + fraction * (TY_END - TY_START)); in runValueAnimator() 70 public void runViewPropertyAnimator(View view) { in runViewPropertyAnimator() argument 71 view.animate().translationX(TX_END).translationY(TY_END); in runViewPropertyAnimator() 77 public void runObjectAnimators(View view) { in runObjectAnimators() argument 78 ObjectAnimator.ofFloat(view, View.TRANSLATION_X, TX_END).start(); in runObjectAnimators() 79 ObjectAnimator.ofFloat(view, View.TRANSLATION_Y, TY_END).start(); in runObjectAnimators() 87 public void runObjectAnimator(View view) { in runObjectAnimator() argument [all …]
|
/development/samples/browseable/XYZTouristAttractions/Application/src/com.example.android.xyztouristattractions/ui/ |
D | ScaleTransition.java | 12 import android.view.View; 13 import android.view.ViewGroup; 27 public Animator createAnimation(View view, float startScale, float endScale) { in createAnimation() argument 28 view.setScaleX(startScale); in createAnimation() 29 view.setScaleY(startScale); in createAnimation() 32 return ObjectAnimator.ofPropertyValuesHolder(view, holderX, holderY); in createAnimation() 36 public Animator onAppear(ViewGroup sceneRoot, View view, TransitionValues startValues, in onAppear() argument 38 return createAnimation(view, 0, 1); in onAppear() 42 public Animator onDisappear(ViewGroup sceneRoot, View view, TransitionValues startValues, in onDisappear() argument 44 return createAnimation(view, 1, 0); in onDisappear()
|
/development/samples/devbytes/animation/SquashAndStretch/src/com/example/squashandstretch/ |
D | SquashAndStretch.java | 25 import android.view.Menu; 26 import android.view.MenuItem; 27 import android.view.View; 28 import android.view.ViewGroup; 29 import android.view.animation.AccelerateInterpolator; 30 import android.view.animation.DecelerateInterpolator; 74 public void onButtonClick(View view) { in onButtonClick() argument 78 view.setPivotX(view.getWidth() / 2); in onButtonClick() 79 view.setPivotY(view.getHeight()); in onButtonClick() 83 mContainer.getHeight() - view.getHeight()); in onButtonClick() [all …]
|
/development/apps/Development/src/com/android/development/ |
D | ArrayAdapter.java | 20 import android.view.View; 21 import android.view.ViewGroup; 22 import android.view.LayoutInflater; 40 public abstract void bindView(View view, E item); in bindView() argument 63 View view; in getView() local 65 view = mInflater.inflate(mLayoutRes, parent, false); in getView() 67 view = convertView; in getView() 69 bindView(view, mList.get(position)); in getView() 70 return view; in getView()
|
/development/samples/browseable/WearNotifications/Wearable/src/com.example.android.wearable.wear.wearnotifications/ |
D | CustomRecyclerAdapter.java | 21 import android.support.wearable.view.WearableRecyclerView; 23 import android.view.LayoutInflater; 24 import android.view.View; 25 import android.view.ViewGroup; 52 public ViewHolder(View view) { in ViewHolder() argument 53 super(view); in ViewHolder() 54 mTextView = (TextView) view.findViewById(R.id.textView); in ViewHolder() 68 View view = LayoutInflater.from(viewGroup.getContext()) in onCreateViewHolder() local 71 return new ViewHolder(view); in onCreateViewHolder() 81 public void onClick(View view) { in onBindViewHolder()
|
/development/samples/ApiDemos/src/com/example/android/apis/graphics/ |
D | GraphicsActivity.java | 21 import android.view.View; 22 import android.view.ViewGroup; 34 public void setContentView(View view) { in setContentView() argument 37 vg.addView(view); in setContentView() 38 view = vg; in setContentView() 41 super.setContentView(view); in setContentView()
|
/development/samples/MultiDisplay/src/com/example/android/multidisplay/launcher/ |
D | AppListAdapter.java | 20 import android.view.LayoutInflater; 21 import android.view.View; 22 import android.view.ViewGroup; 49 View view; in getView() local 52 view = mInflater.inflate(R.layout.app_grid_item, parent, false); in getView() 54 view = convertView; in getView() 58 ((ImageView)view.findViewById(R.id.app_icon)).setImageDrawable(item.getIcon()); in getView() 59 ((TextView)view.findViewById(R.id.app_name)).setText(item.getLabel()); in getView() 61 return view; in getView()
|
/development/samples/browseable/ActionBarCompat-ListPopupMenu/src/com.example.android.actionbarcompat.listpopupmenu/ |
D | PopupListFragment.java | 21 import android.view.MenuItem; 22 import android.view.View; 23 import android.view.ViewGroup; 60 public void onClick(final View view) { in onClick() argument 64 view.post(new Runnable() { in onClick() 67 showPopupMenu(view); in onClick() 73 private void showPopupMenu(View view) { in showPopupMenu() argument 77 final String item = (String) view.getTag(); in showPopupMenu() 80 PopupMenu popup = new PopupMenu(getActivity(), view); in showPopupMenu() 116 View view = super.getView(position, convertView, container); in getView() local [all …]
|
/development/samples/devbytes/animation/SlidingFragments/src/com/example/android/slidingfragments/ |
D | ImageFragment.java | 21 import android.view.LayoutInflater; 22 import android.view.View; 23 import android.view.ViewGroup; 31 View view = inflater.inflate(R.layout.image_fragment, container, false); in onCreateView() local 32 view.setOnClickListener(clickListener); in onCreateView() 33 return view; in onCreateView()
|
/development/samples/devbytes/animation/ListViewExpandingCells/src/com/example/android/expandingcells/ |
D | ExpandingListView.java | 27 import android.view.View; 28 import android.view.ViewTreeObserver; 75 public void onItemClick (AdapterView<?> parent, View view, int position, long id) { 77 (view)); 79 expandView(view); 81 collapseView(view); 176 private void expandView(final View view) { 178 (view)); 181 final int oldTop = view.getTop(); 182 final int oldBottom = view.getBottom(); [all …]
|
/development/samples/ShortcutDemo/common/src/com/example/android/pm/shortcutdemo/ |
D | ShortcutAdapter.java | 30 import android.view.LayoutInflater; 31 import android.view.View; 32 import android.view.View.OnClickListener; 33 import android.view.ViewGroup; 128 final View view; in getView() local 130 view = convertView; in getView() 132 view = mInflater.inflate(getLayoutId(), null); in getView() 135 bindView(view, position, mShortcuts.get(position)); in getView() 137 return view; in getView() 140 public void bindView(View view, int position, ShortcutInfo si) { in bindView() argument [all …]
|
/development/samples/browseable/ElevationBasic/src/com.example.android.elevationbasic/ |
D | ElevationBasicFragment.java | 21 import android.view.LayoutInflater; 22 import android.view.MotionEvent; 23 import android.view.View; 24 import android.view.ViewGroup; 54 public boolean onTouch(View view, MotionEvent motionEvent) { in onCreateView() 60 view.setTranslationZ(120); in onCreateView() 64 view.setTranslationZ(0); in onCreateView()
|
/development/samples/devbytes/animation/ListViewItemAnimations/src/com/example/android/listviewitemanimations/ |
D | ListViewItemAnimations.java | 28 import android.view.MotionEvent; 29 import android.view.View; 30 import android.view.ViewConfiguration; 31 import android.view.ViewTreeObserver; 32 import android.view.animation.AlphaAnimation; 33 import android.view.animation.Animation; 34 import android.view.animation.Animation.AnimationListener; 35 import android.view.animation.AnimationSet; 36 import android.view.animation.TranslateAnimation; 185 private void animateSwipe(final View view, float endX, long duration, final boolean remove) { in animateSwipe() argument [all …]
|
/development/samples/browseable/WatchViewStub/src/com.example.android.google.wearable.watchviewstub/ |
D | MainActivity.java | 21 import android.support.v4.view.GestureDetectorCompat; 22 import android.support.wearable.view.DismissOverlayView; 23 import android.support.wearable.view.WatchViewStub; 24 import android.view.GestureDetector; 25 import android.view.MotionEvent; 26 import android.view.View; 27 import android.view.animation.Animation; 28 import android.view.animation.ScaleAnimation; 60 public void onLayoutClicked(View view) { in onLayoutClicked() argument
|
/development/samples/ApiDemos/src/com/example/android/apis/app/ |
D | ActionBarSettingsActionProviderActivity.java | 23 import android.view.ActionProvider; 24 import android.view.LayoutInflater; 25 import android.view.Menu; 26 import android.view.MenuItem; 27 import android.view.View; 89 View view = layoutInflater.inflate(R.layout.action_bar_settings_action_provider, null); in onCreateActionView() local 90 ImageButton button = (ImageButton) view.findViewById(R.id.button); in onCreateActionView() 98 return view; in onCreateActionView()
|
/development/samples/devbytes/animation/ToonGame/src/com/example/android/toongame/ |
D | ToonGame.java | 29 import android.view.MotionEvent; 30 import android.view.View; 31 import android.view.View.OnTouchListener; 32 import android.view.ViewGroup; 33 import android.view.ViewTreeObserver; 34 import android.view.animation.AccelerateInterpolator; 35 import android.view.animation.DecelerateInterpolator; 36 import android.view.animation.LinearInterpolator; 138 public void play(View view) { in play() argument 154 view.removeCallbacks(mSquishRunnable); in play() [all …]
|
/development/samples/browseable/ActivitySceneTransitionBasic/src/com.example.android.activityscenetransitionbasic/ |
D | MainActivity.java | 27 import android.view.View; 28 import android.view.ViewGroup; 62 public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) { in onItemClick() argument 80 new Pair<View, String>(view.findViewById(R.id.imageview_item), in onItemClick() 82 new Pair<View, String>(view.findViewById(R.id.textview_name), in onItemClick() 111 public View getView(int position, View view, ViewGroup viewGroup) { in getView() argument 112 if (view == null) { in getView() 113 view = getLayoutInflater().inflate(R.layout.grid_item, viewGroup, false); in getView() 119 ImageView image = (ImageView) view.findViewById(R.id.imageview_item); in getView() 123 TextView name = (TextView) view.findViewById(R.id.textview_name); in getView() [all …]
|
/development/samples/browseable/JumpingJack/src/com.example.android.wearable.jumpingjack/fragments/ |
D | SettingsFragment.java | 24 import android.view.LayoutInflater; 25 import android.view.View; 26 import android.view.ViewGroup; 37 View view = inflater.inflate(R.layout.setting_layout, container, false); in onCreateView() local 38 Button button = (Button) view.findViewById(R.id.btn); in onCreateView() 45 return view; in onCreateView()
|
/development/samples/browseable/DataLayer/Wearable/src/com.example.android.wearable.datalayer/fragments/ |
D | AssetFragment.java | 23 import android.view.LayoutInflater; 24 import android.view.View; 25 import android.view.ViewGroup; 41 View view = inflater.inflate(R.layout.asset_fragment, container, false); in onCreateView() local 42 mPhoto = (ImageView) view.findViewById(R.id.photo); in onCreateView() 43 return view; in onCreateView()
|