本文整理汇总了Java中kaaes.spotify.webapi.android.models.AlbumSimple类的典型用法代码示例。如果您正苦于以下问题:Java AlbumSimple类的具体用法?Java AlbumSimple怎么用?Java AlbumSimple使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AlbumSimple类属于kaaes.spotify.webapi.android.models包,在下文中一共展示了AlbumSimple类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: searchAlbums
import kaaes.spotify.webapi.android.models.AlbumSimple; //导入依赖的package包/类
private void searchAlbums(String query) {
SpotifyTvApplication.getInstance().getSpotifyService().searchAlbums(query, getSearchOptions(), new Callback<AlbumsPager>() {
@Override
public void success(AlbumsPager albumsPager, Response response) {
ArrayObjectAdapter listRowAdapter = new ArrayObjectAdapter(new AlbumCardPresenter());
for (AlbumSimple artist : albumsPager.albums.items) {
listRowAdapter.add(artist);
}
HeaderItem header = new HeaderItem(getString(R.string.albums));
mRowsAdapter.add(new ListRow(header, listRowAdapter));
// TODO next pages ?
}
@Override
public void failure(RetrofitError error) {
}
});
}
开发者ID:sregg,项目名称:spotify-tv,代码行数:21,代码来源:SearchFragment.java
示例2: searchAlbums
import kaaes.spotify.webapi.android.models.AlbumSimple; //导入依赖的package包/类
private void searchAlbums(String query, MatrixCursor cursor) {
AlbumsPager albumsPager = SpotifyTvApplication.getInstance().getSpotifyService().searchAlbums(query, getSearchOptions());
if (albumsPager != null && albumsPager.albums != null) {
for (AlbumSimple album : albumsPager.albums.items) {
MatrixCursor.RowBuilder row = cursor.newRow();
row.add(SearchManager.SUGGEST_COLUMN_TEXT_1, album.name);
row.add(SearchManager.SUGGEST_COLUMN_CONTENT_TYPE, album.type);
row.add(SearchManager.SUGGEST_COLUMN_INTENT_DATA, album.uri);
row.add(SearchManager.SUGGEST_COLUMN_TEXT_2, getContext().getString(R.string.albums));
if (album.images != null && album.images.size() > 0) {
row.add(SearchManager.SUGGEST_COLUMN_RESULT_CARD_IMAGE, album.images.get(0).url);
}
}
}
}
开发者ID:sregg,项目名称:spotify-tv,代码行数:19,代码来源:SearchProvider.java
示例3: Song
import kaaes.spotify.webapi.android.models.AlbumSimple; //导入依赖的package包/类
public Song(String addedBySpotifyId, String addedByUserName, String songSpotifyId,
List<ArtistSimple> artists, AlbumSimple album, long durationMs,
String name, String previewUrl) {
this.addedBySpotifyId = addedBySpotifyId;
this.songSpotifyId = songSpotifyId;
this.addedByUserName = addedByUserName;
this.artists = artists;
this.album = album;
this.durationMs = durationMs;
this.name = name;
this.previewUrl = previewUrl;
}
开发者ID:ZinoKader,项目名称:SpotiQ,代码行数:13,代码来源:Song.java
示例4: getImageUrlSmallForAlbum
import kaaes.spotify.webapi.android.models.AlbumSimple; //导入依赖的package包/类
/**
* Returns a URL for a small image for a Spotify album.
* @param album the Spotify album
* @return a URL for a small image for the Spotify album.
*/
public static String getImageUrlSmallForAlbum(AlbumSimple album) {
if (album == null) {
return null;
}
return SpotifyUtil.getImageUrlSmall(album.images);
}
开发者ID:edmundjohnson,项目名称:nd-spotify,代码行数:12,代码来源:SpotifyUtil.java
示例5: getImageUrlLargeForAlbum
import kaaes.spotify.webapi.android.models.AlbumSimple; //导入依赖的package包/类
/**
* Returns a URL for a small image for a Spotify album.
* @param album the Spotify album
* @return a URL for a small image for the Spotify album.
*/
public static String getImageUrlLargeForAlbum(AlbumSimple album) {
if (album == null) {
return null;
}
return SpotifyUtil.getImageUrlLarge(album.images);
}
开发者ID:edmundjohnson,项目名称:nd-spotify,代码行数:12,代码来源:SpotifyUtil.java
示例6: launchDetailScreen
import kaaes.spotify.webapi.android.models.AlbumSimple; //导入依赖的package包/类
public void launchDetailScreen(Activity activity, Object item) {
if (item instanceof AlbumSimple) {
AlbumSimple albumSimple = (AlbumSimple) item;
AlbumActivity.launch(activity, albumSimple.id, albumSimple.name);
} else if (item instanceof ArtistSimple) {
ArtistSimple artistSimple = (ArtistSimple) item;
ArtistsAlbumsActivity.launch(activity, artistSimple.id, artistSimple.name);
} else if (item instanceof PlaylistBase) {
PlaylistBase playlist = (PlaylistBase) item;
PlaylistActivity.launch(activity, playlist.id, playlist.name, playlist.owner.id);
} else if (item instanceof Category) {
Category category = (Category) item;
CategoryActivity.launch(activity, category.id, category.name);
}
}
开发者ID:sregg,项目名称:spotify-tv,代码行数:16,代码来源:SpotifyTvApplication.java
示例7: getUriFromSpotiyObject
import kaaes.spotify.webapi.android.models.AlbumSimple; //导入依赖的package包/类
public static String getUriFromSpotiyObject(Object spotifyObject) {
String uri = null;
if (spotifyObject instanceof TrackSimple) {
uri = ((TrackSimple) spotifyObject).uri;
} else if (spotifyObject instanceof Playlist) {
uri = ((Playlist) spotifyObject).uri;
} else if (spotifyObject instanceof PlaylistSimple) {
uri = ((PlaylistSimple) spotifyObject).uri;
} else if (spotifyObject instanceof AlbumSimple) {
uri = ((AlbumSimple) spotifyObject).uri;
} else if (spotifyObject instanceof ArtistSimple) {
uri = ((ArtistSimple) spotifyObject).uri;
}
return uri;
}
开发者ID:sregg,项目名称:spotify-tv,代码行数:16,代码来源:Utils.java
示例8: onBindViewHolder
import kaaes.spotify.webapi.android.models.AlbumSimple; //导入依赖的package包/类
@Override
public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {
super.onBindViewHolder(viewHolder, item);
final CardViewHolder cardViewHolder = (CardViewHolder) viewHolder;
final SpotifyCardView imageCardView = cardViewHolder.getImageCardView();
AlbumSimple albumSimple = (AlbumSimple) item;
// name
imageCardView.setTitleText(albumSimple.name);
if (albumSimple instanceof Album) {
// if full album object, display info
setupFullAlbumInfo(((Album) albumSimple), imageCardView, cardViewHolder);
} else {
// if not, reset the info views
imageCardView.setContentText("");
// and load the full object from API
SpotifyTvApplication.getInstance().getSpotifyService().getAlbum(albumSimple.id, new Callback<Album>() {
@Override
public void success(final Album album, Response response) {
setupFullAlbumInfo(album, imageCardView, cardViewHolder);
}
@Override
public void failure(RetrofitError error) {
}
});
}
}
开发者ID:sregg,项目名称:spotify-tv,代码行数:35,代码来源:AlbumCardPresenter.java
示例9: Album
import kaaes.spotify.webapi.android.models.AlbumSimple; //导入依赖的package包/类
public Album(AlbumSimple album) {
id = album.id;
name = album.name;
for (Image image : album.images) {
if ((image.width >= 150) && (image.width <= 250)) {
smallImageUrl = image.url;
} else if ((image.width >= 600) && (image.width <= 700)) {
imageUrl = image.url;
}
}
}
开发者ID:tassioauad,项目名称:SpotifyStreamer,代码行数:12,代码来源:Album.java
示例10: getAlbum
import kaaes.spotify.webapi.android.models.AlbumSimple; //导入依赖的package包/类
public AlbumSimple getAlbum() {
return album;
}
开发者ID:ZinoKader,项目名称:SpotiQ,代码行数:4,代码来源:Song.java
注:本文中的kaaes.spotify.webapi.android.models.AlbumSimple类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论