/developers/build/prebuilts/gradle/DragAndDropAcrossApps/DragSource/src/main/java/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 …]
|
/developers/build/prebuilts/gradle/DragAndDropAcrossApps/DropTarget/src/main/java/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 …]
|
/developers/samples/android/ui/window/DragAndDropAcrossApps/DropTarget/src/main/java/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 …]
|
/developers/samples/android/ui/window/DragAndDropAcrossApps/DragSource/src/main/java/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 …]
|
/developers/build/prebuilts/gradle/SlidingTabsBasic/Application/src/main/java/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 …]
|
/developers/samples/android/ui/views/SlidingTabs/SlidingTabsBasic/Application/src/main/java/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 …]
|
/developers/samples/android/ui/views/SwipeRefreshLayout/SwipeRefreshMultipleViews/Application/src/main/java/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()
|
/developers/build/prebuilts/gradle/SwipeRefreshMultipleViews/Application/src/main/java/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()
|
/developers/build/prebuilts/androidtv/leanback/app/src/main/java/com/example/android/tvleanback/presenter/ |
D | GridItemPresenter.java | 21 import android.view.Gravity; 22 import android.view.ViewGroup; 40 TextView view = new TextView(parent.getContext()); in onCreateViewHolder() local 41 view.setLayoutParams(new ViewGroup.LayoutParams(GRID_ITEM_WIDTH, GRID_ITEM_HEIGHT)); in onCreateViewHolder() 42 view.setFocusable(true); in onCreateViewHolder() 43 view.setFocusableInTouchMode(true); in onCreateViewHolder() 44 view.setBackgroundColor(mainFragment.getResources().getColor(R.color.default_background)); in onCreateViewHolder() 45 view.setTextColor(Color.WHITE); in onCreateViewHolder() 46 view.setGravity(Gravity.CENTER); in onCreateViewHolder() 47 return new ViewHolder(view); in onCreateViewHolder() [all …]
|
/developers/samples/android/ui/transition/AdapterTransition/Application/src/main/java/com/example/android/adaptertransition/ |
D | MeatAdapter.java | 20 import android.view.LayoutInflater; 21 import android.view.View; 22 import android.view.ViewGroup; 68 final View view; in getView() local 71 view = mLayoutInflater.inflate(mResourceId, parent, false); in getView() 73 assert view != null; in getView() 74 holder.image = (ImageView) view.findViewById(R.id.meat_image); in getView() 75 holder.title = (TextView) view.findViewById(R.id.meat_title); in getView() 76 view.setTag(holder); in getView() 78 view = convertView; in getView() [all …]
|
/developers/samples/android/ui/transition/FragmentTransition/Application/src/main/java/com/example/android/fragmenttransition/ |
D | MeatAdapter.java | 19 import android.view.LayoutInflater; 20 import android.view.View; 21 import android.view.ViewGroup; 53 final View view; in getView() local 56 view = mLayoutInflater.inflate(mResourceId, parent, false); in getView() 58 assert view != null; in getView() 59 holder.image = (ImageView) view.findViewById(R.id.image); in getView() 60 holder.title = (TextView) view.findViewById(R.id.title); in getView() 61 view.setTag(holder); in getView() 63 view = convertView; in getView() [all …]
|
D | FragmentTransitionFragment.java | 23 import android.view.LayoutInflater; 24 import android.view.View; 25 import android.view.ViewGroup; 26 import android.view.animation.Animation; 27 import android.view.animation.AnimationUtils; 53 public void onViewCreated(View view, Bundle savedInstanceState) { in onViewCreated() argument 54 GridView grid = (GridView) view.findViewById(R.id.grid); in onViewCreated() 60 public void onItemClick(AdapterView<?> parent, View view, int position, long id) { in onItemClick() argument 68 (int) view.getX(), (int) view.getY(), in onItemClick() 69 view.getWidth(), view.getHeight()) in onItemClick()
|
/developers/samples/android/ui/views/Clipping/ClippingBasic/Application/src/main/java/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 …]
|
/developers/build/prebuilts/gradle/ClippingBasic/Application/src/main/java/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 …]
|
/developers/build/prebuilts/gradle/XYZTouristAttractions/Application/src/main/java/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()
|
/developers/samples/android/wearable/wear/XYZTouristAttractions/Application/src/main/java/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()
|
/developers/samples/android/ui/views/RevealEffect/RevealEffectBasic/Application/src/main/java/com/example/android/revealeffectbasic/ |
D | RevealEffectBasicFragment.java | 22 import android.view.LayoutInflater; 23 import android.view.View; 24 import android.view.ViewAnimationUtils; 25 import android.view.ViewGroup; 26 import android.view.animation.AccelerateDecelerateInterpolator; 50 public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { in onViewCreated() argument 51 final View shape = view.findViewById(R.id.circle); in onViewCreated() 52 final View button = view.findViewById(R.id.button); in onViewCreated() 56 public void onClick(View view) { in onViewCreated() 73 super.onViewCreated(view, savedInstanceState); in onViewCreated()
|
/developers/build/prebuilts/gradle/RevealEffectBasic/Application/src/main/java/com/example/android/revealeffectbasic/ |
D | RevealEffectBasicFragment.java | 22 import android.view.LayoutInflater; 23 import android.view.View; 24 import android.view.ViewAnimationUtils; 25 import android.view.ViewGroup; 26 import android.view.animation.AccelerateDecelerateInterpolator; 50 public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { in onViewCreated() argument 51 final View shape = view.findViewById(R.id.circle); in onViewCreated() 52 final View button = view.findViewById(R.id.button); in onViewCreated() 56 public void onClick(View view) { in onViewCreated() 73 super.onViewCreated(view, savedInstanceState); in onViewCreated()
|
/developers/samples/android/wearable/wear/WearNotifications/Wearable/src/main/java/com/example/android/wearable/wear/wearnotifications/ |
D | CustomRecyclerAdapter.java | 20 import android.support.wearable.view.WearableRecyclerView; 22 import android.view.LayoutInflater; 23 import android.view.View; 24 import android.view.ViewGroup; 53 public ViewHolder(View view) { in ViewHolder() argument 54 super(view); in ViewHolder() 55 mTextView = (TextView) view.findViewById(R.id.textView); in ViewHolder() 69 View view = LayoutInflater.from(viewGroup.getContext()) in onCreateViewHolder() local 72 return new ViewHolder(view); in onCreateViewHolder() 82 public void onClick(View view) { in onBindViewHolder()
|
/developers/build/prebuilts/gradle/WearNotifications/Wearable/src/main/java/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()
|
/developers/samples/android/wearable/wear/WearAccessibilityApp/Wearable/src/main/java/com/example/android/wearable/wear/wearaccessibilityapp/ |
D | LongListRecyclerViewAdapter.java | 19 import android.view.LayoutInflater; 20 import android.view.View; 21 import android.view.View.OnClickListener; 22 import android.view.ViewGroup; 59 final View view; in onCreateViewHolder() local 63 view = mInflater.inflate(R.layout.title_layout, parent, false); in onCreateViewHolder() 64 TextView titleView = view.findViewById(R.id.title_text); in onCreateViewHolder() 69 view = mInflater.inflate(R.layout.long_list_switch_widget_layout, parent, false); in onCreateViewHolder() 70 TextView switchText = view.findViewById(R.id.switch_text); in onCreateViewHolder() 73 mSwitchWidget = view.findViewById(R.id.switch_widget); in onCreateViewHolder() [all …]
|
/developers/build/prebuilts/gradle/WearAccessibilityApp/Wearable/src/main/java/com/example/android/wearable/wear/wearaccessibilityapp/ |
D | LongListRecyclerViewAdapter.java | 21 import android.view.LayoutInflater; 22 import android.view.View; 23 import android.view.View.OnClickListener; 24 import android.view.ViewGroup; 58 final View view; in onCreateViewHolder() local 62 view = mInflater.inflate(R.layout.title_layout, parent, false); in onCreateViewHolder() 63 TextView titleView = view.findViewById(R.id.title_text); in onCreateViewHolder() 68 view = mInflater.inflate(R.layout.long_list_switch_widget_layout, parent, false); in onCreateViewHolder() 69 TextView switchText = view.findViewById(R.id.switch_text); in onCreateViewHolder() 72 mSwitchWidget = view.findViewById(R.id.switch_widget); in onCreateViewHolder() [all …]
|
/developers/build/prebuilts/gradle/ActionBarCompat-ListPopupMenu/Application/src/main/java/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 …]
|
/developers/samples/android/ui/actionbarcompat/ActionBarCompat-ListPopupMenu/Application/src/main/java/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 …]
|
/developers/samples/android/ui/Interpolator/Application/src/main/java/com/example/android/interpolator/ |
D | InterpolatorFragment.java | 25 import android.view.LayoutInflater; 26 import android.view.View; 27 import android.view.ViewGroup; 28 import android.view.animation.AnimationUtils; 29 import android.view.animation.Interpolator; 116 public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { in onViewCreated() argument 117 initAnimateButton(view); in onViewCreated() 120 mDurationLabel = (TextView) view.findViewById(R.id.durationLabel); in onViewCreated() 123 mInterpolatorSpinner = (Spinner) view.findViewById(R.id.interpolatorSpinner); in onViewCreated() 128 initSeekbar(view); in onViewCreated() [all …]
|