/developers/build/prebuilts/gradle/NavigationDrawer/kotlinApp/Application/src/main/java/com/example/android/navigationdrawer/ |
D | MainActivity.kt | 52 override fun onItemClick(container: AdapterView<*>, view: View, position: Int, id: Long) { in onItemClick() 53 startActivity(samples[position].intent) in onItemClick() 60 override fun getItem(position: Int) = samples[position] in getCount() 62 override fun getItemId(position: Int) = samples[position].hashCode().toLong() in getCount() 64 override fun getView(position: Int, convertView: View?, container: ViewGroup): View { in getCount() 68 samples[position].titleResId) in getCount() 70 samples[position].descriptionResId) in getCount()
|
/developers/samples/android/ui/views/NavigationDrawer/kotlinApp/Application/src/main/java/com/example/android/navigationdrawer/ |
D | MainActivity.kt | 52 override fun onItemClick(container: AdapterView<*>, view: View, position: Int, id: Long) { in onItemClick() 53 startActivity(samples[position].intent) in onItemClick() 60 override fun getItem(position: Int) = samples[position] in getCount() 62 override fun getItemId(position: Int) = samples[position].hashCode().toLong() in getCount() 64 override fun getView(position: Int, convertView: View?, container: ViewGroup): View { in getCount() 68 samples[position].titleResId) in getCount() 70 samples[position].descriptionResId) in getCount()
|
/developers/samples/android/ui/transition/FragmentTransition/Application/src/main/java/com/example/android/fragmenttransition/ |
D | MeatAdapter.java | 42 public Meat getItem(int position) { in getItem() argument 43 return Meat.MEATS[position]; in getItem() 47 public long getItemId(int position) { in getItemId() argument 48 return Meat.MEATS[position].resourceId; in getItemId() 52 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument 66 bindView(holder, position); in getView() 70 public void bindView(ViewHolder holder, int position) { in bindView() argument 71 Meat meat = getItem(position); in bindView()
|
/developers/samples/android/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/contacts/ |
D | ContactsListAdapter.java | 106 public void onChanged(int position, int count) { in ContactsListAdapter() 108 notifyItemRangeChanged(position + INDEX_OFFSET, count); in ContactsListAdapter() 123 public void onInserted(int position, int count) { in ContactsListAdapter() 124 notifyItemRangeInserted(position + INDEX_OFFSET, count); in ContactsListAdapter() 128 public void onRemoved(int position, int count) { in ContactsListAdapter() 129 notifyItemRangeRemoved(position + INDEX_OFFSET, count); in ContactsListAdapter() 156 public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) { in onBindViewHolder() argument 163 Profile contact = mContacts.get(position - INDEX_OFFSET); in onBindViewHolder() 191 int position = viewHolderContent.getAdapterPosition(); in onBindViewHolder() 192 toggleContact(position); in onBindViewHolder() [all …]
|
/developers/build/prebuilts/gradle/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/contacts/ |
D | ContactsListAdapter.java | 106 public void onChanged(int position, int count) { in ContactsListAdapter() 108 notifyItemRangeChanged(position + INDEX_OFFSET, count); in ContactsListAdapter() 123 public void onInserted(int position, int count) { in ContactsListAdapter() 124 notifyItemRangeInserted(position + INDEX_OFFSET, count); in ContactsListAdapter() 128 public void onRemoved(int position, int count) { in ContactsListAdapter() 129 notifyItemRangeRemoved(position + INDEX_OFFSET, count); in ContactsListAdapter() 156 public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) { in onBindViewHolder() argument 163 Profile contact = mContacts.get(position - INDEX_OFFSET); in onBindViewHolder() 191 int position = viewHolderContent.getAdapterPosition(); in onBindViewHolder() 192 toggleContact(position); in onBindViewHolder() [all …]
|
/developers/build/prebuilts/gradle/CustomChoiceList/Application/src/main/java/com/example/android/customchoicelist/ |
D | MainActivity.java | 48 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()
|
/developers/samples/android/ui/lists/CustomChoiceList/Application/src/main/java/com/example/android/customchoicelist/ |
D | MainActivity.java | 48 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()
|
/developers/build/prebuilts/gradle/DoneBar/Application/src/main/java/com/example/android/donebar/ |
D | MainActivity.java | 58 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()
|
/developers/build/prebuilts/gradle/NavigationDrawer/Application/src/main/java/com/example/android/navigationdrawer/ |
D | MainActivity.java | 56 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()
|
/developers/samples/android/ui/views/SlidingTabs/SlidingTabsBasic/Application/src/main/java/com/example/android/slidingtabsbasic/ |
D | SlidingTabsBasicFragment.java | 122 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()
|
/developers/build/prebuilts/gradle/SlidingTabsBasic/Application/src/main/java/com/example/android/slidingtabsbasic/ |
D | SlidingTabsBasicFragment.java | 122 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()
|
/developers/build/prebuilts/gradle/ActivitySceneTransitionBasic/Application/src/main/java/com/example/android/activityscenetransitionbasic/ |
D | MainActivity.java | 62 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()
|
/developers/samples/android/ui/activityscenetransition/ActivitySceneTransitionBasic/Application/src/main/java/com/example/android/activityscenetransitionbasic/ |
D | MainActivity.java | 62 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()
|
/developers/build/prebuilts/gradle/SwipeRefreshLayoutBasic/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabLayout.java | 59 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 …]
|
/developers/build/prebuilts/gradle/BasicTransition/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabLayout.java | 59 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 …]
|
/developers/samples/android/common/src/java/com/example/android/common/view/ |
D | SlidingTabLayout.java | 59 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 …]
|
/developers/build/prebuilts/gradle/SwipeRefreshListFragment/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabLayout.java | 59 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 …]
|
/developers/build/prebuilts/gradle/SwipeRefreshMultipleViews/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabLayout.java | 59 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 …]
|
/developers/build/prebuilts/gradle/SlidingTabsBasic/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabLayout.java | 59 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 …]
|
/developers/build/prebuilts/gradle/SlidingTabsColors/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabLayout.java | 59 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 …]
|
/developers/samples/android/ui/transition/AdapterTransition/Application/src/main/java/com/example/android/adaptertransition/ |
D | MeatAdapter.java | 57 public Meat getItem(int position) { in getItem() argument 58 return Meat.MEATS[position]; in getItem() 62 public long getItemId(int position) { in getItemId() argument 63 return Meat.MEATS[position].resourceId; in getItemId() 67 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument 81 Meat meat = getItem(position); in getView() 88 public void onItemClick(AdapterView<?> parent, View view, int position, long id) { in onItemClick() argument
|
/developers/samples/android/notification/LNotifications/Application/src/main/java/com/example/android/lnotifications/ |
D | LNotificationActivity.java | 56 public Fragment getItem(int position) { in getItem() argument 57 switch (position) { in getItem() 76 public CharSequence getPageTitle(int position) { in getPageTitle() argument 77 switch (position) { in getPageTitle() 85 return super.getPageTitle(position); in getPageTitle()
|
/developers/build/prebuilts/gradle/LNotifications/Application/src/main/java/com/example/android/lnotifications/ |
D | LNotificationActivity.java | 56 public Fragment getItem(int position) { in getItem() argument 57 switch (position) { in getItem() 76 public CharSequence getPageTitle(int position) { in getPageTitle() argument 77 switch (position) { in getPageTitle() 85 return super.getPageTitle(position); in getPageTitle()
|
/developers/build/prebuilts/gradle/BluetoothAdvertisements/Application/src/main/java/com/example/android/bluetoothadvertisements/ |
D | ScanResultAdapter.java | 55 public Object getItem(int position) { in getItem() argument 56 return mArrayList.get(position); in getItem() 60 public long getItemId(int position) { in getItemId() argument 61 return mArrayList.get(position).getDevice().getAddress().hashCode(); in getItemId() 65 public View getView(int position, View view, ViewGroup parent) { in getView() argument 76 ScanResult scanResult = mArrayList.get(position); in getView() 93 int position = -1; in getPosition() local 96 position = i; in getPosition() 100 return position; in getPosition()
|
/developers/samples/android/connectivity/bluetooth/BluetoothAdvertisements/Application/src/main/java/com/example/android/bluetoothadvertisements/ |
D | ScanResultAdapter.java | 55 public Object getItem(int position) { in getItem() argument 56 return mArrayList.get(position); in getItem() 60 public long getItemId(int position) { in getItemId() argument 61 return mArrayList.get(position).getDevice().getAddress().hashCode(); in getItemId() 65 public View getView(int position, View view, ViewGroup parent) { in getView() argument 76 ScanResult scanResult = mArrayList.get(position); in getView() 93 int position = -1; in getPosition() local 96 position = i; in getPosition() 100 return position; in getPosition()
|