mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-09-18 15:32:35 +00:00
add platform logo
Changelog: changed
This commit is contained in:
parent
80034ad131
commit
55d042bee3
2 changed files with 34 additions and 10 deletions
|
@ -120,6 +120,7 @@ class ShortView : FrameLayout {
|
||||||
private val creatorThumbnail: CreatorThumbnail
|
private val creatorThumbnail: CreatorThumbnail
|
||||||
private val channelName: TextView
|
private val channelName: TextView
|
||||||
private val videoTitle: TextView
|
private val videoTitle: TextView
|
||||||
|
private val platformIndicator: PlatformIndicator
|
||||||
|
|
||||||
private val likeContainer: FrameLayout
|
private val likeContainer: FrameLayout
|
||||||
private val dislikeContainer: FrameLayout
|
private val dislikeContainer: FrameLayout
|
||||||
|
@ -188,6 +189,7 @@ class ShortView : FrameLayout {
|
||||||
creatorThumbnail = findViewById(R.id.creator_thumbnail)
|
creatorThumbnail = findViewById(R.id.creator_thumbnail)
|
||||||
channelName = findViewById(R.id.channel_name)
|
channelName = findViewById(R.id.channel_name)
|
||||||
videoTitle = findViewById(R.id.video_title)
|
videoTitle = findViewById(R.id.video_title)
|
||||||
|
platformIndicator = findViewById(R.id.short_platform_indicator)
|
||||||
|
|
||||||
likeContainer = findViewById(R.id.like_container)
|
likeContainer = findViewById(R.id.like_container)
|
||||||
dislikeContainer = findViewById(R.id.dislike_container)
|
dislikeContainer = findViewById(R.id.dislike_container)
|
||||||
|
@ -219,6 +221,7 @@ class ShortView : FrameLayout {
|
||||||
creatorThumbnail = findViewById(R.id.creator_thumbnail)
|
creatorThumbnail = findViewById(R.id.creator_thumbnail)
|
||||||
channelName = findViewById(R.id.channel_name)
|
channelName = findViewById(R.id.channel_name)
|
||||||
videoTitle = findViewById(R.id.video_title)
|
videoTitle = findViewById(R.id.video_title)
|
||||||
|
platformIndicator = findViewById(R.id.short_platform_indicator)
|
||||||
|
|
||||||
likeContainer = findViewById(R.id.like_container)
|
likeContainer = findViewById(R.id.like_container)
|
||||||
dislikeContainer = findViewById(R.id.dislike_container)
|
dislikeContainer = findViewById(R.id.dislike_container)
|
||||||
|
@ -250,6 +253,7 @@ class ShortView : FrameLayout {
|
||||||
creatorThumbnail = findViewById(R.id.creator_thumbnail)
|
creatorThumbnail = findViewById(R.id.creator_thumbnail)
|
||||||
channelName = findViewById(R.id.channel_name)
|
channelName = findViewById(R.id.channel_name)
|
||||||
videoTitle = findViewById(R.id.video_title)
|
videoTitle = findViewById(R.id.video_title)
|
||||||
|
platformIndicator = findViewById(R.id.short_platform_indicator)
|
||||||
|
|
||||||
likeContainer = findViewById(R.id.like_container)
|
likeContainer = findViewById(R.id.like_container)
|
||||||
dislikeContainer = findViewById(R.id.dislike_container)
|
dislikeContainer = findViewById(R.id.dislike_container)
|
||||||
|
@ -280,6 +284,7 @@ class ShortView : FrameLayout {
|
||||||
creatorThumbnail = findViewById(R.id.creator_thumbnail)
|
creatorThumbnail = findViewById(R.id.creator_thumbnail)
|
||||||
channelName = findViewById(R.id.channel_name)
|
channelName = findViewById(R.id.channel_name)
|
||||||
videoTitle = findViewById(R.id.video_title)
|
videoTitle = findViewById(R.id.video_title)
|
||||||
|
platformIndicator = findViewById(R.id.short_platform_indicator)
|
||||||
|
|
||||||
likeContainer = findViewById(R.id.like_container)
|
likeContainer = findViewById(R.id.like_container)
|
||||||
dislikeContainer = findViewById(R.id.dislike_container)
|
dislikeContainer = findViewById(R.id.dislike_container)
|
||||||
|
@ -334,6 +339,7 @@ class ShortView : FrameLayout {
|
||||||
|
|
||||||
onVideoUpdated.subscribe {
|
onVideoUpdated.subscribe {
|
||||||
videoTitle.text = it?.name
|
videoTitle.text = it?.name
|
||||||
|
platformIndicator.setPlatformFromClientID(it?.id?.pluginId)
|
||||||
creatorThumbnail.setThumbnail(it?.author?.thumbnail, true)
|
creatorThumbnail.setThumbnail(it?.author?.thumbnail, true)
|
||||||
channelName.text = it?.author?.name
|
channelName.text = it?.author?.name
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,17 +53,34 @@
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.futo.platformplayer.views.platform.PlatformIndicator
|
||||||
|
android:id="@+id/short_platform_indicator"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/video_title"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<!-- Video title -->
|
<!-- Video title -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/video_title"
|
android:id="@+id/video_title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:shadowColor="@android:color/black"
|
android:shadowColor="@android:color/black"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/short_platform_indicator"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- Buttons section -->
|
<!-- Buttons section -->
|
||||||
|
@ -218,6 +235,7 @@
|
||||||
style="@style/Widget.Material3.Button.IconButton"
|
style="@style/Widget.Material3.Button.IconButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:contentDescription="@string/refresh"
|
android:contentDescription="@string/refresh"
|
||||||
app:icon="@drawable/ic_refresh"
|
app:icon="@drawable/ic_refresh"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue