Home
last modified time | relevance | path

Searched refs:position (Results 1 – 25 of 240) sorted by relevance

12345678910

/development/samples/ApiDemos/src/com/example/android/apis/view/
DList6.java49 protected void onListItemClick(ListView l, View v, int position, long id) in onListItemClick() argument
51 ((SpeechListAdapter)getListAdapter()).toggle(position); in onListItemClick()
85 public Object getItem(int position) { in getItem() argument
86 return position; in getItem()
93 public long getItemId(int position) { in getItemId() argument
94 return position; in getItemId()
101 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument
104 … sv = new SpeechView(mContext, mTitles[position], mDialogue[position], mExpanded[position]); in getView()
107 sv.setTitle(mTitles[position]); in getView()
108 sv.setDialogue(mDialogue[position]); in getView()
[all …]
DList5.java58 public boolean isEnabled(int position) { in isEnabled() argument
59 return !mStrings[position].startsWith("-"); in isEnabled()
62 public Object getItem(int position) { in getItem() argument
63 return position; in getItem()
66 public long getItemId(int position) { in getItemId() argument
67 return position; in getItemId()
70 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument
78 tv.setText(mStrings[position]); in getView()
DList4.java73 public Object getItem(int position) { in getItem() argument
74 return position; in getItem()
82 public long getItemId(int position) { in getItemId() argument
83 return position; in getItemId()
92 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument
95 sv = new SpeechView(mContext, Shakespeare.TITLES[position], in getView()
96 Shakespeare.DIALOGUE[position]); in getView()
99 sv.setTitle(Shakespeare.TITLES[position]); in getView()
100 sv.setDialogue(Shakespeare.DIALOGUE[position]); in getView()
DList14.java78 public Object getItem(int position) { in getItem() argument
79 return position; in getItem()
87 public long getItemId(int position) { in getItemId() argument
88 return position; in getItemId()
97 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument
122 holder.text.setText(DATA[position]); in getView()
123 holder.icon.setImageBitmap((position & 1) == 1 ? mIcon1 : mIcon2); in getView()
DLayoutAnimation5.java55 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument
58 ResolveInfo info = mApps.get(position % mApps.size()); in getView()
72 public final Object getItem(int position) { in getItem() argument
73 return mApps.get(position % mApps.size()); in getItem()
76 public final long getItemId(int position) { in getItemId() argument
77 return position; in getItemId()
DGrid1.java64 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument
75 ResolveInfo info = mApps.get(position); in getView()
86 public final Object getItem(int position) { in getItem() argument
87 return mApps.get(position); in getItem()
90 public final long getItemId(int position) { in getItemId() argument
91 return position; in getItemId()
/development/apps/Development/src/com/android/development/
DArrayAdapter.java42 public E itemForPosition(int position) { in itemForPosition() argument
47 return mList.get(position); in itemForPosition()
54 public Object getItem(int position) { in getItem() argument
55 return position; in getItem()
58 public long getItemId(int position) { in getItemId() argument
59 return position; in getItemId()
62 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument
69 bindView(view, mList.get(position)); in getView()
DAppHwConfigList.java68 protected void onListItemClick(ListView l, View v, int position, long id) { in onListItemClick() argument
69 PackageInfo app = mAdapter.appForPosition(position); in onListItemClick()
103 public PackageInfo appForPosition(int position) { in appForPosition() argument
107 return mList.get(position); in appForPosition()
114 public Object getItem(int position) { in getItem() argument
115 return position; in getItem()
118 public long getItemId(int position) { in getItemId() argument
119 return position; in getItemId()
122 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument
130 bindView(view, mList.get(position)); in getView()
DRunningProcesses.java65 protected void onListItemClick(ListView l, View v, int position, long id) { in onListItemClick() argument
66 ListItem app = mAdapter.appForPosition(position); in onListItemClick()
94 public ListItem appForPosition(int position) { in appForPosition() argument
98 return mList.get(position); in appForPosition()
105 public Object getItem(int position) { in getItem() argument
106 return position; in getItem()
109 public long getItemId(int position) { in getItemId() argument
110 return position; in getItemId()
113 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument
121 bindView(view, mList.get(position)); in getView()
/development/samples/Home/src/com/example/android/home/
DWallpaper.java79 public void onItemSelected(AdapterView parent, View v, int position, long id) { in onItemSelected() argument
80 getWindow().setBackgroundDrawableResource(IMAGE_IDS[position]); in onItemSelected()
83 public void onItemClick(AdapterView parent, View v, int position, long id) { in onItemClick() argument
84 selectWallpaper(position); in onItemClick()
92 private synchronized void selectWallpaper(int position) { in selectWallpaper() argument
98 InputStream stream = getResources().openRawResource(IMAGE_IDS[position]); in selectWallpaper()
128 public Object getItem(int position) { in getItem() argument
129 return position; in getItem()
132 public long getItemId(int position) { in getItemId() argument
133 return position; in getItemId()
[all …]
/development/samples/browseable/DoneBar/src/com.example.android.donebar/
DMainActivity.java58 public void onItemClick(AdapterView<?> container, View view, int position, long id) { in onItemClick() argument
59 startActivity(mSamples[position].intent); in onItemClick()
69 public Object getItem(int position) { in getItem() argument
70 return mSamples[position]; in getItem()
74 public long getItemId(int position) { in getItemId() argument
75 return mSamples[position].hashCode(); in getItemId()
79 public View getView(int position, View convertView, ViewGroup container) { in getView() argument
86 mSamples[position].titleResId); in getView()
88 mSamples[position].descriptionResId); in getView()
/development/samples/ApiDemos/src/com/example/android/apis/accessibility/
DTaskListView.java87 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument
94 checkbox.setChecked(mCheckboxes[position]); in getView()
97 label.setText(mLabels[position]); in getView()
102 .append(mLabels[position]).toString(); in getView()
105 convertView.setTag(position); in getView()
111 public Object getItem(int position) { in getItem() argument
112 return mLabels[position]; in getItem()
116 public long getItemId(int position) { in getItemId() argument
117 return position; in getItemId()
/development/samples/browseable/NavigationDrawer/src/com.example.android.navigationdrawer/
DMainActivity.java56 public void onItemClick(AdapterView<?> container, View view, int position, long id) { in onItemClick() argument
57 startActivity(mSamples[position].intent); in onItemClick()
67 public Object getItem(int position) { in getItem() argument
68 return mSamples[position]; in getItem()
72 public long getItemId(int position) { in getItemId() argument
73 return mSamples[position].hashCode(); in getItemId()
77 public View getView(int position, View convertView, ViewGroup container) { in getView() argument
84 mSamples[position].titleResId); in getView()
86 mSamples[position].descriptionResId); in getView()
/development/samples/Support7Demos/src/com/example/android/supportv7/widget/adapter/
DSimpleStringAdapter.java50 public String getValueAt(int position) { in getValueAt() argument
51 return mValues.get(position); in getValueAt()
92 public void onBindViewHolder(ViewHolder holder, int position) { in onBindViewHolder() argument
93 holder.mBoundString = mValues.get(position); in onBindViewHolder()
94 holder.mTextView.setText(position + ":" + mValues.get(position)); in onBindViewHolder()
95 holder.mTextView.setMinHeight((200 + mValues.get(position).length() * 10)); in onBindViewHolder()
96 holder.mTextView.setBackgroundColor(getBackgroundColor(position)); in onBindViewHolder()
99 private int getBackgroundColor(int position) { in getBackgroundColor() argument
100 switch (position % 4) { in getBackgroundColor()
/development/samples/browseable/CustomChoiceList/src/com.example.android.customchoicelist/
DMainActivity.java48 public String getItem(int position) { in getItem() argument
49 return Cheeses.CHEESES[position]; in getItem()
53 public long getItemId(int position) { in getItemId() argument
54 return Cheeses.CHEESES[position].hashCode(); in getItemId()
58 public View getView(int position, View convertView, ViewGroup container) { in getView() argument
64 .setText(getItem(position)); in getView()
/development/samples/Support7Demos/src/com/example/android/supportv7/widget/
DBaseLayoutManagerActivity.java139 public Integer getItem(int position) {
140 return position;
144 public long getItemId(int position) {
145 return position;
149 public View getView(int position, View convertView, ViewGroup parent) {
153 ((TextView) convertView).setText(" " + position + " ");
159 protected void scrollToPosition(boolean smooth, int position) {
161 mRecyclerView.smoothScrollToPosition(position);
163 mRecyclerView.scrollToPosition(position);
167 protected void scrollToPositionWithOffset(boolean smooth, int position, int offset) {
[all …]
/development/samples/browseable/SlidingTabsBasic/src/com.example.android.slidingtabsbasic/
DSlidingTabsBasicFragment.java122 public CharSequence getPageTitle(int position) { in getPageTitle() argument
123 return "Item " + (position + 1); in getPageTitle()
132 public Object instantiateItem(ViewGroup container, int position) { in instantiateItem() argument
141 title.setText(String.valueOf(position + 1)); in instantiateItem()
143 Log.i(LOG_TAG, "instantiateItem() [position: " + position + "]"); in instantiateItem()
154 public void destroyItem(ViewGroup container, int position, Object object) { in destroyItem() argument
156 Log.i(LOG_TAG, "destroyItem() [position: " + position + "]"); in destroyItem()
/development/samples/browseable/SwipeRefreshMultipleViews/src/com.example.android.common/view/
DSlidingTabLayout.java59 int getIndicatorColor(int position); in getIndicatorColor() argument
64 int getDividerColor(int position); in getDividerColor() argument
259 public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { in onPageScrolled() argument
261 if ((tabStripChildCount == 0) || (position < 0) || (position >= tabStripChildCount)) { in onPageScrolled()
265 mTabStrip.onViewPagerPageChanged(position, positionOffset); in onPageScrolled()
267 View selectedTitle = mTabStrip.getChildAt(position); in onPageScrolled()
271 scrollToTab(position, extraOffset); in onPageScrolled()
274 mViewPagerPageChangeListener.onPageScrolled(position, positionOffset, in onPageScrolled()
289 public void onPageSelected(int position) { in onPageSelected() argument
291 mTabStrip.onViewPagerPageChanged(position, 0f); in onPageSelected()
[all …]
/development/samples/browseable/SlidingTabsBasic/src/com.example.android.common/view/
DSlidingTabLayout.java59 int getIndicatorColor(int position); in getIndicatorColor() argument
64 int getDividerColor(int position); in getDividerColor() argument
259 public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { in onPageScrolled() argument
261 if ((tabStripChildCount == 0) || (position < 0) || (position >= tabStripChildCount)) { in onPageScrolled()
265 mTabStrip.onViewPagerPageChanged(position, positionOffset); in onPageScrolled()
267 View selectedTitle = mTabStrip.getChildAt(position); in onPageScrolled()
271 scrollToTab(position, extraOffset); in onPageScrolled()
274 mViewPagerPageChangeListener.onPageScrolled(position, positionOffset, in onPageScrolled()
289 public void onPageSelected(int position) { in onPageSelected() argument
291 mTabStrip.onViewPagerPageChanged(position, 0f); in onPageSelected()
[all …]
/development/samples/browseable/SwipeRefreshListFragment/src/com.example.android.common/view/
DSlidingTabLayout.java59 int getIndicatorColor(int position); in getIndicatorColor() argument
64 int getDividerColor(int position); in getDividerColor() argument
259 public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { in onPageScrolled() argument
261 if ((tabStripChildCount == 0) || (position < 0) || (position >= tabStripChildCount)) { in onPageScrolled()
265 mTabStrip.onViewPagerPageChanged(position, positionOffset); in onPageScrolled()
267 View selectedTitle = mTabStrip.getChildAt(position); in onPageScrolled()
271 scrollToTab(position, extraOffset); in onPageScrolled()
274 mViewPagerPageChangeListener.onPageScrolled(position, positionOffset, in onPageScrolled()
289 public void onPageSelected(int position) { in onPageSelected() argument
291 mTabStrip.onViewPagerPageChanged(position, 0f); in onPageSelected()
[all …]
/development/samples/browseable/SwipeRefreshLayoutBasic/src/com.example.android.common/view/
DSlidingTabLayout.java59 int getIndicatorColor(int position); in getIndicatorColor() argument
64 int getDividerColor(int position); in getDividerColor() argument
259 public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { in onPageScrolled() argument
261 if ((tabStripChildCount == 0) || (position < 0) || (position >= tabStripChildCount)) { in onPageScrolled()
265 mTabStrip.onViewPagerPageChanged(position, positionOffset); in onPageScrolled()
267 View selectedTitle = mTabStrip.getChildAt(position); in onPageScrolled()
271 scrollToTab(position, extraOffset); in onPageScrolled()
274 mViewPagerPageChangeListener.onPageScrolled(position, positionOffset, in onPageScrolled()
289 public void onPageSelected(int position) { in onPageSelected() argument
291 mTabStrip.onViewPagerPageChanged(position, 0f); in onPageSelected()
[all …]
/development/samples/browseable/SlidingTabsColors/src/com.example.android.common/view/
DSlidingTabLayout.java59 int getIndicatorColor(int position); in getIndicatorColor() argument
64 int getDividerColor(int position); in getDividerColor() argument
259 public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { in onPageScrolled() argument
261 if ((tabStripChildCount == 0) || (position < 0) || (position >= tabStripChildCount)) { in onPageScrolled()
265 mTabStrip.onViewPagerPageChanged(position, positionOffset); in onPageScrolled()
267 View selectedTitle = mTabStrip.getChildAt(position); in onPageScrolled()
271 scrollToTab(position, extraOffset); in onPageScrolled()
274 mViewPagerPageChangeListener.onPageScrolled(position, positionOffset, in onPageScrolled()
289 public void onPageSelected(int position) { in onPageSelected() argument
291 mTabStrip.onViewPagerPageChanged(position, 0f); in onPageSelected()
[all …]
/development/samples/browseable/BasicTransition/src/com.example.android.common/view/
DSlidingTabLayout.java59 int getIndicatorColor(int position); in getIndicatorColor() argument
64 int getDividerColor(int position); in getDividerColor() argument
259 public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { in onPageScrolled() argument
261 if ((tabStripChildCount == 0) || (position < 0) || (position >= tabStripChildCount)) { in onPageScrolled()
265 mTabStrip.onViewPagerPageChanged(position, positionOffset); in onPageScrolled()
267 View selectedTitle = mTabStrip.getChildAt(position); in onPageScrolled()
271 scrollToTab(position, extraOffset); in onPageScrolled()
274 mViewPagerPageChangeListener.onPageScrolled(position, positionOffset, in onPageScrolled()
289 public void onPageSelected(int position) { in onPageSelected() argument
291 mTabStrip.onViewPagerPageChanged(position, 0f); in onPageSelected()
[all …]
/development/samples/browseable/ActivitySceneTransitionBasic/src/com.example.android.activityscenetransitionbasic/
DMainActivity.java62 public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) { in onItemClick() argument
63 Item item = (Item) adapterView.getItemAtPosition(position); in onItemClick()
101 public Item getItem(int position) { in getItem() argument
102 return Item.ITEMS[position]; in getItem()
106 public long getItemId(int position) { in getItemId() argument
107 return getItem(position).getId(); in getItemId()
111 public View getView(int position, View view, ViewGroup viewGroup) { in getView() argument
116 final Item item = getItem(position); in getView()
/development/samples/ApiDemos/src/com/example/android/apis/animation/
DTransition3d.java87 private void applyRotation(int position, float start, float end) { in applyRotation() argument
99 rotation.setAnimationListener(new DisplayNextView(position)); in applyRotation()
104 public void onItemClick(AdapterView<?> parent, View v, int position, long id) { in onItemClick() argument
106 mImageView.setImageResource(PHOTOS_RESOURCES[position]); in onItemClick()
107 applyRotation(position, 0, 90); in onItemClick()
122 private DisplayNextView(int position) { in DisplayNextView() argument
123 mPosition = position; in DisplayNextView()
144 public SwapViews(int position) { in SwapViews() argument
145 mPosition = position; in SwapViews()

12345678910