/development/samples/Support7Demos/src/com/example/android/supportv7/media/ |
D | SessionManager.java | 92 PlaylistItem item = mPlaylist.get(i); in updateStatus() local 93 mPlayer.getStatus(item, (i == mPlaylist.size() - 1) /* update */); in updateStatus() 115 PlaylistItem item = new PlaylistItem( in add() local 117 mPlaylist.add(item); in add() 122 mPlayer.enqueue(item); in add() 125 return item; in add() 144 PlaylistItem item = getCurrentItem(); in seek() local 145 if (pos != item.getPosition()) { in seek() 146 item.setPosition(pos); in seek() 147 if (item.getState() == MediaItemStatus.PLAYBACK_STATE_PLAYING in seek() [all …]
|
D | RemotePlayer.java | 126 public void play(final PlaylistItem item) { in play() argument 128 Log.d(TAG, "play: item=" + item); in play() 130 mClient.play(item.getUri(), "video/mp4", null, 0, null, new ItemActionCallback() { in play() 135 item.setRemoteItemId(itemId); in play() 136 if (item.getPosition() > 0) { in play() 137 seekInternal(item); in play() 139 if (item.getState() == MediaItemStatus.PLAYBACK_STATE_PAUSED) { in play() 157 public void seek(final PlaylistItem item) { in seek() argument 158 seekInternal(item); in seek() 162 public void getStatus(final PlaylistItem item, final boolean update) { in getStatus() argument [all …]
|
D | SampleMediaRouterActivity.java | 144 PlaylistItem item = getCheckedPlaylistItem(); 145 if (item != null) { 146 long pos = item.getPosition() + (mSessionManager.isPaused() ? 147 0 : (SystemClock.elapsedRealtime() - item.getTimestamp())); 323 PlaylistItem item = getCheckedPlaylistItem(); in onCreate() 324 if (fromUser && item != null && item.getDuration() > 0) { in onCreate() 325 long pos = progress * item.getDuration() / 100; in onCreate() 326 mSessionManager.seek(item.getItemId(), pos); in onCreate() 327 item.setPosition(pos); in onCreate() 328 item.setTimestamp(SystemClock.elapsedRealtime()); in onCreate() [all …]
|
D | SampleMediaRouteProvider.java | 254 public void onItemChanged(PlaylistItem item) { in SampleRouteController() 255 handleStatusChange(item); in SampleRouteController() 332 PlaylistItem item = mSessionManager.getCurrentItem(); in onControlRequest() local 333 if (item != null) { in onControlRequest() 334 data.putString(TRACK_INFO_DESC, item.toString()); in onControlRequest() 397 PlaylistItem item = mSessionManager.add(uri, mime, receiver); in handleEnqueue() local 399 if (item != null) { in handleEnqueue() 401 result.putString(MediaControlIntent.EXTRA_SESSION_ID, item.getSessionId()); in handleEnqueue() 402 result.putString(MediaControlIntent.EXTRA_ITEM_ID, item.getItemId()); in handleEnqueue() 404 item.getStatus().asBundle()); in handleEnqueue() [all …]
|
/development/samples/browseable/MediaRouter/src/com.example.android.mediarouter/player/ |
D | SessionManager.java | 96 PlaylistItem item = mPlaylist.get(i); in updateStatus() local 97 mPlayer.getStatus(item, (i == mPlaylist.size() - 1) /* update */); in updateStatus() 119 PlaylistItem item = new PlaylistItem( in add() local 121 mPlaylist.add(item); in add() 126 mPlayer.enqueue(item); in add() 129 return item; in add() 148 PlaylistItem item = getCurrentItem(); in seek() local 149 if (pos != item.getPosition()) { in seek() 150 item.setPosition(pos); in seek() 151 if (item.getState() == MediaItemStatus.PLAYBACK_STATE_PLAYING in seek() [all …]
|
D | RemotePlayer.java | 128 public void play(final PlaylistItem item) { in play() argument 130 Log.d(TAG, "play: item=" + item); in play() 132 mClient.play(item.getUri(), "video/mp4", null, 0, null, new ItemActionCallback() { in play() 137 item.setRemoteItemId(itemId); in play() 138 if (item.getPosition() > 0) { in play() 139 seekInternal(item); in play() 141 if (item.getState() == MediaItemStatus.PLAYBACK_STATE_PAUSED) { in play() 157 public void seek(final PlaylistItem item) { in seek() argument 158 seekInternal(item); in seek() 162 public void getStatus(final PlaylistItem item, final boolean update) { in getStatus() argument [all …]
|
D | MainActivity.java | 150 PlaylistItem item = getCheckedPlaylistItem(); 151 if (item != null) { 152 long pos = item.getPosition() + 153 (mPaused ? 0 : (SystemClock.elapsedRealtime() - item.getTimestamp())); 338 PlaylistItem item = getCheckedPlaylistItem(); in onCreate() 339 if (fromUser && item != null && item.getDuration() > 0) { in onCreate() 340 long pos = progress * item.getDuration() / 100; in onCreate() 341 mSessionManager.seek(item.getItemId(), pos); in onCreate() 342 item.setPosition(pos); in onCreate() 343 item.setTimestamp(SystemClock.elapsedRealtime()); in onCreate() [all …]
|
D | Player.java | 38 public abstract void play(final PlaylistItem item); in play() argument 39 public abstract void seek(final PlaylistItem item); in seek() argument 40 public abstract void getStatus(final PlaylistItem item, final boolean update); in getStatus() argument 47 public abstract void enqueue(final PlaylistItem item); in enqueue() argument
|
/development/samples/Support4Demos/src/com/example/android/supportv4/widget/ |
D | ExploreByTouchHelperActivity.java | 146 final CustomItem item = new CustomItem(); in addItem() local 147 item.bounds = new RectF(top, left, bottom, right); in addItem() 148 item.description = description; in addItem() 149 item.checked = false; in addItem() 150 mItems.add(item); in addItem() 162 for (CustomItem item : mItems) { in onDraw() 163 paint.setColor(item.checked ? Color.RED : Color.BLUE); in onDraw() 165 scaleRectF(item.bounds, bounds, width, height); in onDraw() 169 canvas.drawText(item.description, bounds.centerX(), bounds.centerY(), paint); in onDraw() 174 final CustomItem item = getItem(index); in onItemClicked() local [all …]
|
/development/samples/SupportLeanbackDemos/src/com/example/android/leanback/ |
D | BrowseAnimationFragment.java | 93 public void onItemClicked(Presenter.ViewHolder itemViewHolder, Object item, in createRandomItem() 97 int index = adapter.indexOf(item); in createRandomItem() 108 public void onItemClicked(Presenter.ViewHolder itemViewHolder, Object item, in createRandomItem() 112 int index = adapter.indexOf(item); in createRandomItem() 123 public void onItemClicked(Presenter.ViewHolder itemViewHolder, Object item, in createRandomItem() 127 int index = adapter.indexOf(item); in createRandomItem() 136 public void onItemClicked(Presenter.ViewHolder itemViewHolder, Object item, in createRandomItem() 146 public void onItemClicked(Presenter.ViewHolder itemViewHolder, Object item, in createRandomItem() 150 int index = adapter.indexOf(item); in createRandomItem() 159 public void onItemClicked(Presenter.ViewHolder itemViewHolder, Object item, in createRandomItem() [all …]
|
/development/samples/ApiDemos/src/com/example/android/apis/content/ |
D | ClipboardSample.java | 146 ClipData.Item item = clip.getItemAt(0); in updateClipData() local 147 if (item.getHtmlText() != null) { in updateClipData() 149 } else if (item.getText() != null) { in updateClipData() 151 } else if (item.getIntent() != null) { in updateClipData() 153 } else if (item.getUri() != null) { in updateClipData() 164 ClipData.Item item = clip.getItemAt(0); in updateClipData() local 170 mDataText.setText(item.getText()); in updateClipData() 173 mDataText.setText(item.getHtmlText()); in updateClipData() 176 mDataText.setText(item.getIntent().toUri(0)); in updateClipData() 179 mDataText.setText(item.getUri().toString()); in updateClipData() [all …]
|
D | ChangedContacts.java | 285 LinearLayout item = new LinearLayout(mContext); in newView() local 286 item.addView(buildText(context)); in newView() 287 item.addView(buildText(context)); in newView() 288 return item; in newView() 293 LinearLayout item = (LinearLayout) view; in bindView() local 299 setText(item.getChildAt(0), id); in bindView() 300 setText(item.getChildAt(1), timestamp); in bindView() 315 LinearLayout item = new LinearLayout(mContext); in newView() local 316 item.addView(buildText(context)); in newView() 317 item.addView(buildText(context)); in newView() [all …]
|
/development/samples/browseable/RecipeAssistant/Application/src/com.example.android.wearable.recipeassistant/ |
D | RecipeListAdapter.java | 69 JSONObject item = items.getJSONObject(i); in parseJson() local 71 parsed.name = item.getString(Constants.RECIPE_FIELD_NAME); in parseJson() 72 parsed.title = item.getString(Constants.RECIPE_FIELD_TITLE); in parseJson() 73 if (item.has(Constants.RECIPE_FIELD_IMAGE)) { in parseJson() 74 String imageFile = item.getString(Constants.RECIPE_FIELD_IMAGE); in parseJson() 77 parsed.summary = item.getString(Constants.RECIPE_FIELD_SUMMARY); in parseJson() 120 Item item = (Item) getItem(position); in getView() local 125 titleView.setText(item.title); in getView() 126 summaryView.setText(item.summary); in getView() 127 if (item.image != null) { in getView() [all …]
|
/development/samples/ApiDemos/src/com/example/android/apis/app/ |
D | SearchInvoke.java | 111 MenuItem item; in onPrepareOptionsMenu() local 121 item = menu.add( 0, 0, 0, "(Search Key)"); in onPrepareOptionsMenu() 125 item = menu.add( 0, 0, 0, "Search"); in onPrepareOptionsMenu() 126 item.setAlphabeticShortcut(SearchManager.MENU_KEY); in onPrepareOptionsMenu() 130 item = menu.add( 0, 0, 0, "(Type-To-Search)"); in onPrepareOptionsMenu() 134 item = menu.add( 0, 0, 0, "(Disabled)"); in onPrepareOptionsMenu() 138 item = menu.add(0, 1, 0, "Clear History"); in onPrepareOptionsMenu() 144 public boolean onOptionsItemSelected(MenuItem item) { in onOptionsItemSelected() argument 145 switch (item.getItemId()) { in onOptionsItemSelected() 180 return super.onOptionsItemSelected(item); in onOptionsItemSelected()
|
/development/samples/browseable/MediaBrowserService/src/com.example.android.mediabrowserservice/ |
D | MusicPlayerActivity.java | 40 public void onMediaItemSelected(MediaBrowser.MediaItem item) { in onMediaItemSelected() argument 41 if (item.isPlayable()) { in onMediaItemSelected() 42 getMediaController().getTransportControls().playFromMediaId(item.getMediaId(), null); in onMediaItemSelected() 48 } else if (item.isBrowsable()) { in onMediaItemSelected() 50 .replace(R.id.container, BrowseFragment.newInstance(item.getMediaId())) in onMediaItemSelected()
|
/development/samples/Support4Demos/src/com/example/android/supportv4/app/ |
D | FragmentMenuSupport.java | 113 MenuItem item; in onCreateOptionsMenu() local 114 item = menu.add("Menu 1a"); in onCreateOptionsMenu() 115 MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM); in onCreateOptionsMenu() 116 item = menu.add("Menu 1b"); in onCreateOptionsMenu() 117 MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM); in onCreateOptionsMenu() 134 MenuItem item; in onCreateOptionsMenu() local 135 item = menu.add("Menu 2"); in onCreateOptionsMenu() 136 MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM); in onCreateOptionsMenu()
|
/development/samples/Support4Demos/src/com/example/android/supportv4/media/ |
D | MediaBrowserSupport.java | 43 public void onMediaItemSelected(MediaBrowserCompat.MediaItem item) { in onMediaItemSelected() argument 44 if (item.isPlayable()) { in onMediaItemSelected() 45 mMediaController.getTransportControls().playFromMediaId(item.getMediaId(), null); in onMediaItemSelected() 51 } else if (item.isBrowsable()) { in onMediaItemSelected() 53 .replace(R.id.container, BrowseFragment.newInstance(item.getMediaId())) in onMediaItemSelected()
|
/development/samples/Support7Demos/src/com/example/android/supportv7/graphics/ |
D | PaletteDetailActivity.java | 79 final Palette.Swatch item = (Palette.Swatch) adapterView.getItemAtPosition(pos); in onCreate() 81 item.toString(), Toast.LENGTH_LONG); in onCreate() 97 public boolean onOptionsItemSelected(MenuItem item) { in onOptionsItemSelected() argument 98 switch (item.getItemId()) { in onOptionsItemSelected() 101 item.setChecked(true); in onOptionsItemSelected() 105 item.setChecked(true); in onOptionsItemSelected() 109 item.setChecked(true); in onOptionsItemSelected() 113 item.setChecked(true); in onOptionsItemSelected() 117 item.setChecked(true); in onOptionsItemSelected() 120 return super.onOptionsItemSelected(item); in onOptionsItemSelected()
|
/development/samples/Support7Demos/src/com/example/android/supportv7/app/ |
D | ActionBarUsage.java | 69 public boolean onOptionsItemSelected(MenuItem item) { in onOptionsItemSelected() argument 70 switch (item.getItemId()) { in onOptionsItemSelected() 73 onSort(item); in onOptionsItemSelected() 77 Toast.makeText(this, "Selected Item: " + item.getTitle(), Toast.LENGTH_SHORT).show(); in onOptionsItemSelected() 82 private void onSort(MenuItem item) { in onSort() argument 83 mSortMode = item.getItemId(); in onSort()
|
/development/tutorials/NotepadCodeLab/Notepadv3Solution/src/com/android/demo/notepad3/ |
D | Notepadv3.java | 76 public boolean onMenuItemSelected(int featureId, MenuItem item) { in onMenuItemSelected() argument 77 switch(item.getItemId()) { in onMenuItemSelected() 83 return super.onMenuItemSelected(featureId, item); in onMenuItemSelected() 94 public boolean onContextItemSelected(MenuItem item) { in onContextItemSelected() argument 95 switch(item.getItemId()) { in onContextItemSelected() 97 AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo(); in onContextItemSelected() 102 return super.onContextItemSelected(item); in onContextItemSelected()
|
/development/samples/SupportDesignDemos/src/com/example/android/support/design/widget/ |
D | TabLayoutPreselectedUsage.java | 140 final Item item = (Item) object; in getItemPosition() local 141 final int index = mCheeses.indexOf(item.cheese); in getItemPosition() 154 Item item = new Item(); in instantiateItem() local 155 item.cheese = mCheeses.get(position); in instantiateItem() 156 item.view = tv; in instantiateItem() 157 return item; in instantiateItem() 162 final Item item = (Item) object; in isViewFromObject() local 163 return item.view == view; in isViewFromObject() 173 final Item item = (Item) object; in destroyItem() local 174 container.removeView(item.view); in destroyItem()
|
D | TabLayoutUsage.java | 159 final Item item = (Item) object; in getItemPosition() local 160 final int index = mCheeses.indexOf(item.cheese); in getItemPosition() 173 Item item = new Item(); in instantiateItem() local 174 item.cheese = mCheeses.get(position); in instantiateItem() 175 item.view = tv; in instantiateItem() 176 return item; in instantiateItem() 181 final Item item = (Item) object; in isViewFromObject() local 182 return item.view == view; in isViewFromObject() 192 final Item item = (Item) object; in destroyItem() local 193 container.removeView(item.view); in destroyItem()
|
/development/samples/RSSReader/src/com/example/android/rssreader/ |
D | RssReader.java | 185 RssItem item = this.getItem(position); in getView() local 191 view.getText1().setText(item.getTitle()); in getView() 192 String descr = item.getDescription().toString(); in getView() 216 RssItem item = mAdapter.getItem(position); in onListItemClick() local 219 Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(item.getLink().toString())); in onListItemClick() 279 ItemAdder(RssItem item) { in ItemAdder() argument 280 mItem = item; in ItemAdder() 356 public boolean onMenuItemClick(MenuItem item) { in onCreateOptionsMenu() 377 public boolean onMenuItemClick(MenuItem item) { in onMenuItemClick() argument 414 RssItem item = mAdapter.getItem(i); in onSaveInstanceState() local [all …]
|
/development/samples/browseable/StorageProvider/src/com.example.android.storageprovider/ |
D | StorageProviderFragment.java | 51 MenuItem item = menu.findItem(R.id.sample_action); in onPrepareOptionsMenu() local 52 item.setTitle(mLoggedIn ? R.string.log_out : R.string.log_in); in onPrepareOptionsMenu() 56 public boolean onOptionsItemSelected(MenuItem item) { in onOptionsItemSelected() argument 57 if (item.getItemId() == R.id.sample_action) { in onOptionsItemSelected() 59 item.setTitle(mLoggedIn ? R.string.log_out : R.string.log_in); in onOptionsItemSelected()
|
/development/samples/training/AnimationsDemo/src/com/example/android/animationsdemo/ |
D | CardFlipActivity.java | 81 MenuItem item = menu.add(Menu.NONE, R.id.action_flip, Menu.NONE, in onCreateOptionsMenu() local 85 item.setIcon(mShowingBack in onCreateOptionsMenu() 88 item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); in onCreateOptionsMenu() 93 public boolean onOptionsItemSelected(MenuItem item) { in onOptionsItemSelected() argument 94 switch (item.getItemId()) { in onOptionsItemSelected() 106 return super.onOptionsItemSelected(item); in onOptionsItemSelected()
|