Added verified in Channel Page

This commit is contained in:
Bnyro 2022-05-15 21:11:27 +02:00
parent c6c4cdfd2b
commit 93b1990948
2 changed files with 16 additions and 0 deletions

View File

@ -4,6 +4,7 @@ package com.github.libretube
import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context
import android.media.Image
import android.opengl.Visibility
import android.os.Bundle
import android.util.Log
@ -209,6 +210,7 @@ class ChannelFragment : Fragment() {
runOnUiThread {
view.findViewById<ScrollView>(R.id.channel_scrollView).visibility = View.VISIBLE
view.findViewById<TextView>(R.id.channel_name).text=response.name
if (response.verified) view.findViewById<ImageView>(R.id.channel_verified).visibility = View.VISIBLE
view.findViewById<TextView>(R.id.channel_subs).text=resources.getString(R.string.subscribers, response.subscriberCount.formatShort())
view.findViewById<TextView>(R.id.channel_description).text=response.description
val bannerImage = view.findViewById<ImageView>(R.id.channel_banner)

View File

@ -44,6 +44,10 @@
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/channel_name"
android:layout_width="wrap_content"
@ -54,6 +58,16 @@
android:textSize="20sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/channel_verified"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_margin="7dp"
android:visibility="gone"
android:src="@drawable/ic_verified" />
</LinearLayout>
<TextView
android:id="@+id/channel_subs"
android:layout_width="wrap_content"