mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
Merge pull request #105 from AbduAmeen/title_description_seperation
Added separation of title, description and views/date
This commit is contained in:
commit
3d822947fe
@ -4,7 +4,6 @@ import android.app.Activity
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.pm.ActivityInfo
|
import android.content.pm.ActivityInfo
|
||||||
import android.content.res.Configuration
|
import android.content.res.Configuration
|
||||||
import android.content.res.Resources
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
@ -13,7 +12,6 @@ import android.os.Handler
|
|||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.*
|
import android.view.*
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
import android.widget.FrameLayout
|
|
||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
import androidx.appcompat.app.AppCompatDelegate
|
||||||
import androidx.appcompat.widget.Toolbar
|
import androidx.appcompat.widget.Toolbar
|
||||||
@ -21,21 +19,12 @@ import androidx.constraintlayout.motion.widget.MotionLayout
|
|||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import androidx.core.os.bundleOf
|
import androidx.core.os.bundleOf
|
||||||
import androidx.core.text.HtmlCompat
|
import androidx.core.text.HtmlCompat
|
||||||
import androidx.core.view.ViewCompat
|
|
||||||
import androidx.core.view.ViewCompat.getWindowInsetsController
|
|
||||||
import androidx.core.view.WindowInsetsCompat
|
|
||||||
import androidx.core.view.WindowInsetsControllerCompat
|
|
||||||
import androidx.core.view.WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
|
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.navigation.NavController
|
import androidx.navigation.NavController
|
||||||
import androidx.navigation.Navigation
|
|
||||||
import com.google.android.material.bottomnavigation.BottomNavigationView
|
import com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
import androidx.navigation.findNavController
|
import androidx.navigation.findNavController
|
||||||
import androidx.navigation.ui.NavigationUI
|
|
||||||
import androidx.navigation.ui.NavigationUI.onNavDestinationSelected
|
|
||||||
import androidx.navigation.ui.setupWithNavController
|
import androidx.navigation.ui.setupWithNavController
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
import com.google.android.exoplayer2.ExoPlayer
|
|
||||||
import com.google.android.material.color.DynamicColors
|
import com.google.android.material.color.DynamicColors
|
||||||
import java.lang.Exception
|
import java.lang.Exception
|
||||||
|
|
||||||
@ -44,6 +33,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
lateinit var bottomNavigationView: BottomNavigationView
|
lateinit var bottomNavigationView: BottomNavigationView
|
||||||
lateinit var toolbar: Toolbar
|
lateinit var toolbar: Toolbar
|
||||||
lateinit var navController : NavController
|
lateinit var navController : NavController
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this)
|
val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
|
@ -26,6 +26,7 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
|||||||
import androidx.core.app.ActivityCompat
|
import androidx.core.app.ActivityCompat
|
||||||
import androidx.core.net.toUri
|
import androidx.core.net.toUri
|
||||||
import androidx.core.os.bundleOf
|
import androidx.core.os.bundleOf
|
||||||
|
import androidx.core.view.isVisible
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
@ -53,7 +54,6 @@ import java.io.IOException
|
|||||||
import java.net.URLEncoder
|
import java.net.URLEncoder
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
|
|
||||||
|
|
||||||
var isFullScreen = false
|
var isFullScreen = false
|
||||||
class PlayerFragment : Fragment() {
|
class PlayerFragment : Fragment() {
|
||||||
|
|
||||||
@ -84,7 +84,8 @@ class PlayerFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
inflater: LayoutInflater,
|
||||||
|
container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
): View? {
|
): View? {
|
||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
@ -94,6 +95,8 @@ class PlayerFragment : Fragment() {
|
|||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
hideKeyboard()
|
hideKeyboard()
|
||||||
|
|
||||||
|
val playerDescription = view.findViewById<TextView>(R.id.player_description)
|
||||||
videoId = videoId!!.replace("/watch?v=", "")
|
videoId = videoId!!.replace("/watch?v=", "")
|
||||||
relDownloadVideo = view.findViewById(R.id.relPlayer_download)
|
relDownloadVideo = view.findViewById(R.id.relPlayer_download)
|
||||||
val mainActivity = activity as MainActivity
|
val mainActivity = activity as MainActivity
|
||||||
@ -108,7 +111,6 @@ class PlayerFragment : Fragment() {
|
|||||||
startId: Int,
|
startId: Int,
|
||||||
endId: Int
|
endId: Int
|
||||||
) {
|
) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onTransitionChange(motionLayout: MotionLayout?, startId: Int, endId: Int, progress: Float) {
|
override fun onTransitionChange(motionLayout: MotionLayout?, startId: Int, endId: Int, progress: Float) {
|
||||||
@ -117,7 +119,6 @@ class PlayerFragment : Fragment() {
|
|||||||
mainMotionLayout.progress = abs(progress)
|
mainMotionLayout.progress = abs(progress)
|
||||||
eId = endId
|
eId = endId
|
||||||
sId = startId
|
sId = startId
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onTransitionCompleted(motionLayout: MotionLayout?, currentId: Int) {
|
override fun onTransitionCompleted(motionLayout: MotionLayout?, currentId: Int) {
|
||||||
@ -135,7 +136,6 @@ class PlayerFragment : Fragment() {
|
|||||||
view.findViewById<TextView>(R.id.quality_text).visibility = View.VISIBLE
|
view.findViewById<TextView>(R.id.quality_text).visibility = View.VISIBLE
|
||||||
mainMotionLayout.progress = 0.toFloat()
|
mainMotionLayout.progress = 0.toFloat()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onTransitionTrigger(
|
override fun onTransitionTrigger(
|
||||||
@ -144,8 +144,6 @@ class PlayerFragment : Fragment() {
|
|||||||
positive: Boolean,
|
positive: Boolean,
|
||||||
progress: Float
|
progress: Float
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
playerMotionLayout.progress = 1.toFloat()
|
playerMotionLayout.progress = 1.toFloat()
|
||||||
@ -158,7 +156,6 @@ class PlayerFragment : Fragment() {
|
|||||||
mainActivity.supportFragmentManager.beginTransaction()
|
mainActivity.supportFragmentManager.beginTransaction()
|
||||||
.remove(this)
|
.remove(this)
|
||||||
.commit()
|
.commit()
|
||||||
|
|
||||||
}
|
}
|
||||||
view.findViewById<ImageButton>(R.id.close_imageButton).setOnClickListener {
|
view.findViewById<ImageButton>(R.id.close_imageButton).setOnClickListener {
|
||||||
motionLayout.transitionToEnd()
|
motionLayout.transitionToEnd()
|
||||||
@ -180,6 +177,12 @@ class PlayerFragment : Fragment() {
|
|||||||
true
|
true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
view.findViewById<ConstraintLayout>(R.id.player_title_layout).setOnClickListener {
|
||||||
|
var visible = playerDescription.isVisible
|
||||||
|
|
||||||
|
playerDescription.visibility = if (visible) View.GONE else View.VISIBLE
|
||||||
|
}
|
||||||
// FullScreen button trigger
|
// FullScreen button trigger
|
||||||
view.findViewById<ImageButton>(R.id.fullscreen).setOnClickListener {
|
view.findViewById<ImageButton>(R.id.fullscreen).setOnClickListener {
|
||||||
// remember to hide everything when new thing added
|
// remember to hide everything when new thing added
|
||||||
@ -193,7 +196,6 @@ class PlayerFragment : Fragment() {
|
|||||||
val mainActivity = activity as MainActivity
|
val mainActivity = activity as MainActivity
|
||||||
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE
|
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE
|
||||||
isFullScreen=true
|
isFullScreen=true
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
with(motionLayout) {
|
with(motionLayout) {
|
||||||
getConstraintSet(R.id.start).constrainHeight(R.id.player, 0)
|
getConstraintSet(R.id.start).constrainHeight(R.id.player, 0)
|
||||||
@ -205,15 +207,11 @@ class PlayerFragment : Fragment() {
|
|||||||
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||||
isFullScreen = false
|
isFullScreen = false
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
relatedRecView = view.findViewById(R.id.player_recView)
|
relatedRecView = view.findViewById(R.id.player_recView)
|
||||||
relatedRecView.layoutManager = GridLayoutManager(view.context, resources.getInteger(R.integer.grid_items))
|
relatedRecView.layoutManager = GridLayoutManager(view.context, resources.getInteger(R.integer.grid_items))
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun onStop() {
|
override fun onStop() {
|
||||||
super.onStop()
|
super.onStop()
|
||||||
}
|
}
|
||||||
@ -225,7 +223,6 @@ class PlayerFragment : Fragment() {
|
|||||||
} catch (e: Exception) {}
|
} catch (e: Exception) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun fetchJson(view: View) {
|
private fun fetchJson(view: View) {
|
||||||
fun run() {
|
fun run() {
|
||||||
lifecycleScope.launchWhenCreated {
|
lifecycleScope.launchWhenCreated {
|
||||||
@ -250,10 +247,13 @@ class PlayerFragment : Fragment() {
|
|||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
var subtitle = mutableListOf<SubtitleConfiguration>()
|
var subtitle = mutableListOf<SubtitleConfiguration>()
|
||||||
if (response.subtitles!!.isNotEmpty()) {
|
if (response.subtitles!!.isNotEmpty()) {
|
||||||
subtitle?.add(SubtitleConfiguration.Builder(response.subtitles!![0].url!!.toUri())
|
subtitle?.add(
|
||||||
|
SubtitleConfiguration.Builder(response.subtitles!![0].url!!.toUri())
|
||||||
.setMimeType(response.subtitles!![0].mimeType!!) // The correct MIME type (required).
|
.setMimeType(response.subtitles!![0].mimeType!!) // The correct MIME type (required).
|
||||||
.setLanguage(response.subtitles!![0].code) // The subtitle language (optional).
|
.setLanguage(response.subtitles!![0].code) // The subtitle language (optional).
|
||||||
.build())}
|
.build()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
exoPlayer = ExoPlayer.Builder(view.context)
|
exoPlayer = ExoPlayer.Builder(view.context)
|
||||||
.setSeekBackIncrementMs(5000)
|
.setSeekBackIncrementMs(5000)
|
||||||
@ -301,7 +301,6 @@ class PlayerFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
response.hls != null -> {
|
response.hls != null -> {
|
||||||
val mediaItem: MediaItem = MediaItem.Builder()
|
val mediaItem: MediaItem = MediaItem.Builder()
|
||||||
@ -335,7 +334,8 @@ class PlayerFragment : Fragment() {
|
|||||||
exoPlayer.prepare()
|
exoPlayer.prepare()
|
||||||
exoPlayer.play()
|
exoPlayer.play()
|
||||||
|
|
||||||
view.findViewById<TextView>(R.id.title_textView).text = response.title
|
view.findViewById<TextView>(R.id.player_title).text = response.title
|
||||||
|
view.findViewById<TextView>(R.id.player_description).text = response.description
|
||||||
|
|
||||||
view.findViewById<ImageButton>(R.id.quality_select).setOnClickListener {
|
view.findViewById<ImageButton>(R.id.quality_select).setOnClickListener {
|
||||||
// Dialog for quality selection
|
// Dialog for quality selection
|
||||||
@ -343,7 +343,8 @@ class PlayerFragment : Fragment() {
|
|||||||
AlertDialog.Builder(it)
|
AlertDialog.Builder(it)
|
||||||
}
|
}
|
||||||
builder!!.setTitle(R.string.choose_quality_dialog)
|
builder!!.setTitle(R.string.choose_quality_dialog)
|
||||||
.setItems(videosNameArray,
|
.setItems(
|
||||||
|
videosNameArray,
|
||||||
DialogInterface.OnClickListener { _, which ->
|
DialogInterface.OnClickListener { _, which ->
|
||||||
whichQuality = which
|
whichQuality = which
|
||||||
if (response.subtitles!!.isNotEmpty()) {
|
if (response.subtitles!!.isNotEmpty()) {
|
||||||
@ -381,7 +382,8 @@ class PlayerFragment : Fragment() {
|
|||||||
exoPlayer.setMediaSource(mergeSource)
|
exoPlayer.setMediaSource(mergeSource)
|
||||||
}
|
}
|
||||||
view.findViewById<TextView>(R.id.quality_text).text = videosNameArray[which]
|
view.findViewById<TextView>(R.id.quality_text).text = videosNameArray[which]
|
||||||
})
|
}
|
||||||
|
)
|
||||||
val dialog: AlertDialog? = builder?.create()
|
val dialog: AlertDialog? = builder?.create()
|
||||||
dialog?.show()
|
dialog?.show()
|
||||||
}
|
}
|
||||||
@ -389,8 +391,10 @@ class PlayerFragment : Fragment() {
|
|||||||
exoPlayer!!.addListener(object : com.google.android.exoplayer2.Player.Listener {
|
exoPlayer!!.addListener(object : com.google.android.exoplayer2.Player.Listener {
|
||||||
override fun onPlayerStateChanged(playWhenReady: Boolean, playbackState: Int) {
|
override fun onPlayerStateChanged(playWhenReady: Boolean, playbackState: Int) {
|
||||||
|
|
||||||
exoPlayerView.keepScreenOn = !(playbackState == Player.STATE_IDLE || playbackState == Player.STATE_ENDED ||
|
exoPlayerView.keepScreenOn = !(
|
||||||
!playWhenReady)
|
playbackState == Player.STATE_IDLE || playbackState == Player.STATE_ENDED ||
|
||||||
|
!playWhenReady
|
||||||
|
)
|
||||||
|
|
||||||
if (playWhenReady && playbackState == Player.STATE_READY) {
|
if (playWhenReady && playbackState == Player.STATE_READY) {
|
||||||
// media actually playing
|
// media actually playing
|
||||||
@ -412,7 +416,7 @@ class PlayerFragment : Fragment() {
|
|||||||
} else {
|
} else {
|
||||||
Html.fromHtml(response.description)
|
Html.fromHtml(response.description)
|
||||||
}
|
}
|
||||||
view.findViewById<TextView>(R.id.player_sub).text = response.views.formatShort() + " views • "+response.uploadDate
|
view.findViewById<TextView>(R.id.player_views_info).text = response.views.formatShort() + " views • " + response.uploadDate
|
||||||
view.findViewById<TextView>(R.id.textLike).text = response.likes.formatShort()
|
view.findViewById<TextView>(R.id.textLike).text = response.likes.formatShort()
|
||||||
val channelImage = view.findViewById<ImageView>(R.id.player_channelImage)
|
val channelImage = view.findViewById<ImageView>(R.id.player_channelImage)
|
||||||
Picasso.get().load(response.uploaderAvatar).into(channelImage)
|
Picasso.get().load(response.uploaderAvatar).into(channelImage)
|
||||||
@ -455,10 +459,12 @@ class PlayerFragment : Fragment() {
|
|||||||
Log.d("myz", "" + SDK_INT)
|
Log.d("myz", "" + SDK_INT)
|
||||||
if (!Environment.isExternalStorageManager()) {
|
if (!Environment.isExternalStorageManager()) {
|
||||||
ActivityCompat.requestPermissions(
|
ActivityCompat.requestPermissions(
|
||||||
mainActivity, arrayOf(
|
mainActivity,
|
||||||
|
arrayOf(
|
||||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||||
Manifest.permission.MANAGE_EXTERNAL_STORAGE
|
Manifest.permission.MANAGE_EXTERNAL_STORAGE
|
||||||
), 1
|
),
|
||||||
|
1
|
||||||
) // permission request code is just an int
|
) // permission request code is just an int
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -533,13 +539,12 @@ class PlayerFragment : Fragment() {
|
|||||||
Toast.makeText(context, R.string.vlcerror, Toast.LENGTH_SHORT)
|
Toast.makeText(context, R.string.vlcerror, Toast.LENGTH_SHORT)
|
||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
}}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
run()
|
run()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun isSubscribed(button: MaterialButton, channel_id: String) {
|
private fun isSubscribed(button: MaterialButton, channel_id: String) {
|
||||||
@ -561,13 +566,15 @@ class PlayerFragment : Fragment() {
|
|||||||
(context as Activity).theme.resolveAttribute(
|
(context as Activity).theme.resolveAttribute(
|
||||||
android.R.attr.colorPrimary,
|
android.R.attr.colorPrimary,
|
||||||
colorPrimary,
|
colorPrimary,
|
||||||
true)
|
true
|
||||||
|
)
|
||||||
|
|
||||||
val ColorText = TypedValue()
|
val ColorText = TypedValue()
|
||||||
(context as Activity).theme.resolveAttribute(
|
(context as Activity).theme.resolveAttribute(
|
||||||
R.attr.colorOnSurface,
|
R.attr.colorOnSurface,
|
||||||
ColorText,
|
ColorText,
|
||||||
true)
|
true
|
||||||
|
)
|
||||||
|
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
if (response.subscribed == true) {
|
if (response.subscribed == true) {
|
||||||
@ -581,13 +588,13 @@ class PlayerFragment : Fragment() {
|
|||||||
unsubscribe(channel_id)
|
unsubscribe(channel_id)
|
||||||
button.text = getString(R.string.subscribe)
|
button.text = getString(R.string.subscribe)
|
||||||
button.setTextColor(colorPrimary.data)
|
button.setTextColor(colorPrimary.data)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
subscribe(channel_id)
|
subscribe(channel_id)
|
||||||
button.text = getString(R.string.unsubscribe)
|
button.text = getString(R.string.unsubscribe)
|
||||||
button.setTextColor(colorPrimary.data)
|
button.setTextColor(colorPrimary.data)
|
||||||
}
|
}
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -633,7 +640,6 @@ class PlayerFragment : Fragment() {
|
|||||||
run()
|
run()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun Fragment?.runOnUiThread(action: () -> Unit) {
|
private fun Fragment?.runOnUiThread(action: () -> Unit) {
|
||||||
this ?: return
|
this ?: return
|
||||||
if (!isAdded) return // Fragment not attached to an Activity
|
if (!isAdded) return // Fragment not attached to an Activity
|
||||||
@ -656,5 +662,4 @@ class PlayerFragment : Fragment() {
|
|||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -29,24 +29,68 @@
|
|||||||
|
|
||||||
>
|
>
|
||||||
|
|
||||||
<TextView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/player_description"
|
android:id="@+id/player_info_layout"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:paddingLeft="8dp"
|
|
||||||
android:paddingRight="8dp"
|
|
||||||
android:text=""
|
|
||||||
android:textSize="15sp"
|
|
||||||
android:layout_margin="7dp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TextView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/player_sub"
|
android:id="@+id/player_title_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/player_title"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="8dp"
|
||||||
android:paddingLeft="8dp"
|
android:paddingLeft="8dp"
|
||||||
android:paddingRight="8dp"
|
android:paddingRight="8dp"
|
||||||
android:text="" />
|
android:text="Title"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/player_description_arrow"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/player_views_info"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:text="TextView"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/player_description_arrow"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/player_title" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/player_description_arrow"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
android:src="@drawable/ic_arrow_down"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/player_description"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/player_title_layout" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user