Home
last modified time | relevance | path

Searched refs:view (Results 1 – 25 of 1010) sorted by relevance

12345678910>>...41

/development/samples/browseable/DragAndDropAcrossApps/DragSource/src/com.example.android/dragsource/
DImageDragListener.java21 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 …]
DDragSourceFragment.java31 import android.support.v13.view.DragStartHelper;
34 import android.view.DragEvent;
35 import android.view.LayoutInflater;
36 import android.view.View;
37 import android.view.ViewGroup;
91 View view = inflater.inflate(R.layout.fragment_dragsource, null); in onCreateView() local
95 ImageView imageView = (ImageView) view.findViewById(R.id.image_one); in onCreateView()
100 imageView = (ImageView) view.findViewById(R.id.image_two); in onCreateView()
105 final ImageView localImageTarget = (ImageView) view.findViewById(R.id.local_target); in onCreateView()
108 protected boolean setImageUri(View view, DragEvent event, Uri uri) { in onCreateView()
[all …]
/development/samples/browseable/DragAndDropAcrossApps/DropTarget/src/com.example.android/droptarget/
DImageDragListener.java21 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/SlidingTabsBasic/src/com.example.android.slidingtabsbasic/
DSlidingTabsBasicFragment.java20 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/devbytes/animation/ListViewExpandingCells/src/com/example/android/expandingcells/
DExpandingListView.java27 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/browseable/ClippingBasic/src/com.example.android.clippingbasic/
DClippingBasicFragment.java23 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/SquashAndStretch/src/com/example/squashandstretch/
DSquashAndStretch.java25 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/samples/devbytes/animation/ListViewItemAnimations/src/com/example/android/listviewitemanimations/
DListViewItemAnimations.java28 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/SwipeRefreshMultipleViews/src/com.example.android.swiperefreshmultipleviews/
DMultiSwipeRefreshLayout.java20 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()
DSwipeRefreshMultipleViewsFragment.java26 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/devbytes/animation/MultiPropertyAnimations/src/com/example/android/multipropertyanimations/
DMultiPropertyAnimations.java25 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/devbytes/animation/ToonGame/src/com/example/android/toongame/
DToonGame.java29 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/ShortcutDemo/common/src/com/example/android/pm/shortcutdemo/
DShortcutAdapter.java30 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/ApiDemos/src/com/example/android/apis/app/
DPrintCustomContent.java35 import android.view.LayoutInflater;
36 import android.view.Menu;
37 import android.view.MenuItem;
38 import android.view.View;
39 import android.view.View.MeasureSpec;
40 import android.view.ViewGroup;
231 View view = null; in print()
245 view = adapter.getView(i, view, dummyParent); in print()
247 view = adapter.getView(i, null, dummyParent); in print()
252 measureView(view); in print()
[all …]
/development/samples/browseable/XYZTouristAttractions/Application/src/com.example.android.xyztouristattractions/ui/
DScaleTransition.java12 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()
DAttractionListFragment.java28 import android.view.LayoutInflater;
29 import android.view.View;
30 import android.view.ViewGroup;
77 View view = inflater.inflate(R.layout.fragment_main, container, false); in onCreateView() local
79 (AttractionsRecyclerView) view.findViewById(android.R.id.list); in onCreateView()
80 recyclerView.setEmptyView(view.findViewById(android.R.id.empty)); in onCreateView()
84 return view; in onCreateView()
152 View view = inflater.inflate(R.layout.list_row, parent, false); in onCreateViewHolder() local
153 return new ViewHolder(view, this); in onCreateViewHolder()
190 public void onItemClick(View view, int position) { in onItemClick() argument
[all …]
/development/samples/browseable/ActionBarCompat-ListPopupMenu/src/com.example.android.actionbarcompat.listpopupmenu/
DPopupListFragment.java21 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/HoneycombGallery/src/com/example/android/hcgallery/
DContentFragment.java30 import android.view.ActionMode;
31 import android.view.DragEvent;
32 import android.view.LayoutInflater;
33 import android.view.Menu;
34 import android.view.MenuInflater;
35 import android.view.MenuItem;
36 import android.view.View;
37 import android.view.View.OnClickListener;
38 import android.view.ViewGroup;
39 import android.view.Window;
[all …]
/development/samples/browseable/WearNotifications/Wearable/src/com.example.android.wearable.wear.wearnotifications/
DCustomRecyclerAdapter.java21 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/apps/Development/src/com/android/development/
DArrayAdapter.java20 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/AppShortcuts/src/com.example.android.appshortcuts/
DMain.java25 import android.view.LayoutInflater;
26 import android.view.View;
27 import android.view.View.OnClickListener;
28 import android.view.ViewGroup;
29 import android.view.inputmethod.EditorInfo;
217 final View view; in getView() local
219 view = convertView; in getView()
221 view = mInflater.inflate(R.layout.list_item, null); in getView()
224 bindView(view, position, mList.get(position)); in getView()
226 return view; in getView()
[all …]
/development/samples/ApiDemos/src/com/example/android/apis/graphics/
DDensityActivity.java33 import android.view.LayoutInflater;
34 import android.view.View;
115 private View scrollWrap(View view) { in scrollWrap() argument
117 scroller.addView(view, new ScrollView.LayoutParams(ScrollView.LayoutParams.MATCH_PARENT, in scrollWrap()
138 View view = new View(this); in addBitmapDrawable() local
142 view.setBackgroundDrawable(d); in addBitmapDrawable()
144 view.setLayoutParams(new LinearLayout.LayoutParams(d.getIntrinsicWidth(), in addBitmapDrawable()
146 layout.addView(view); in addBitmapDrawable()
150 View view = new View(this); in addResourceDrawable() local
153 view.setBackgroundDrawable(d); in addResourceDrawable()
[all …]
/development/samples/MultiDisplay/src/com/example/android/multidisplay/launcher/
DAppListAdapter.java20 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/XYZTouristAttractions/Wearable/src/com.example.android.xyztouristattractions/ui/
DAttractionsGridPagerAdapter.java28 import android.support.wearable.view.ActionPage;
29 import android.support.wearable.view.CardFrame;
30 import android.support.wearable.view.CardScrollView;
31 import android.support.wearable.view.GridPagerAdapter;
32 import android.support.wearable.view.GridViewPager;
34 import android.view.Gravity;
35 import android.view.LayoutInflater;
36 import android.view.View;
37 import android.view.ViewGroup;
108 final View view = mLayoutInflater.inflate( in instantiateItem() local
[all …]
/development/samples/browseable/ActivitySceneTransitionBasic/src/com.example.android.activityscenetransitionbasic/
DMainActivity.java27 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 …]

12345678910>>...41