1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-11-04 17:23:12 +00:00

add channel avatar

This commit is contained in:
Christian Schabesberger
2016-08-01 11:48:52 +02:00
parent f3a73ecc4a
commit c03b106118
4 changed files with 49 additions and 0 deletions

View File

@@ -129,6 +129,8 @@ public class ChannelActivity extends AppCompatActivity {
ImageView channelBanner = (ImageView) findViewById(R.id.channel_banner_image);
View channelContentView = (View) findViewById(R.id.channel_content_view);
FloatingActionButton feedButton = (FloatingActionButton) findViewById(R.id.channel_rss_fab);
ImageView avatarView = (ImageView) findViewById(R.id.channel_avatar_view);
ImageView haloView = (ImageView) findViewById(R.id.channel_avatar_halo);
progressBar.setVisibility(View.GONE);
channelContentView.setVisibility(View.VISIBLE);
@@ -142,6 +144,13 @@ public class ChannelActivity extends AppCompatActivity {
new FailedThumbnailListener(info.service_id));
}
if(info.avatar_url != null && !info.avatar_url.isEmpty()) {
avatarView.setVisibility(View.VISIBLE);
haloView.setVisibility(View.VISIBLE);
imageLoader.displayImage(info.avatar_url, avatarView,
new FailedThumbnailListener(info.service_id));
}
if(info.feed_url != null && !info.feed_url.isEmpty()) {
feedButton.setOnClickListener(new View.OnClickListener() {
@Override