mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
player description + new toolbar experience
This commit is contained in:
parent
66f4984249
commit
851e76db04
4
.idea/misc.xml
generated
4
.idea/misc.xml
generated
@ -7,13 +7,13 @@
|
|||||||
<entry key="app/src/main/res/drawable/ic_play.xml" value="0.17135416666666667" />
|
<entry key="app/src/main/res/drawable/ic_play.xml" value="0.17135416666666667" />
|
||||||
<entry key="app/src/main/res/drawable/ic_search2.xml" value="0.17135416666666667" />
|
<entry key="app/src/main/res/drawable/ic_search2.xml" value="0.17135416666666667" />
|
||||||
<entry key="app/src/main/res/layout-land/fragment_player.xml" value="0.1" />
|
<entry key="app/src/main/res/layout-land/fragment_player.xml" value="0.1" />
|
||||||
<entry key="app/src/main/res/layout/activity_main.xml" value="0.1" />
|
<entry key="app/src/main/res/layout/activity_main.xml" value="0.17" />
|
||||||
<entry key="app/src/main/res/layout/activity_player.xml" value="0.1" />
|
<entry key="app/src/main/res/layout/activity_player.xml" value="0.1" />
|
||||||
<entry key="app/src/main/res/layout/channel_search_row.xml" value="0.33" />
|
<entry key="app/src/main/res/layout/channel_search_row.xml" value="0.33" />
|
||||||
<entry key="app/src/main/res/layout/exo_styled_player_control_view.xml" value="0.12" />
|
<entry key="app/src/main/res/layout/exo_styled_player_control_view.xml" value="0.12" />
|
||||||
<entry key="app/src/main/res/layout/fragment_home.xml" value="0.16" />
|
<entry key="app/src/main/res/layout/fragment_home.xml" value="0.16" />
|
||||||
<entry key="app/src/main/res/layout/fragment_library.xml" value="0.11956521739130435" />
|
<entry key="app/src/main/res/layout/fragment_library.xml" value="0.11956521739130435" />
|
||||||
<entry key="app/src/main/res/layout/fragment_player.xml" value="0.1" />
|
<entry key="app/src/main/res/layout/fragment_player.xml" value="0.2" />
|
||||||
<entry key="app/src/main/res/layout/fragment_search.xml" value="0.25" />
|
<entry key="app/src/main/res/layout/fragment_search.xml" value="0.25" />
|
||||||
<entry key="app/src/main/res/layout/fragment_subscriptions.xml" value="0.1" />
|
<entry key="app/src/main/res/layout/fragment_subscriptions.xml" value="0.1" />
|
||||||
<entry key="app/src/main/res/layout/playlist_search_row.xml" value="0.33" />
|
<entry key="app/src/main/res/layout/playlist_search_row.xml" value="0.33" />
|
||||||
|
@ -6,6 +6,7 @@ import android.os.Bundle
|
|||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
|
import androidx.appcompat.widget.Toolbar
|
||||||
import androidx.constraintlayout.motion.widget.MotionLayout
|
import androidx.constraintlayout.motion.widget.MotionLayout
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.navigation.Navigation
|
import androidx.navigation.Navigation
|
||||||
@ -17,36 +18,39 @@ import com.google.android.exoplayer2.ExoPlayer
|
|||||||
|
|
||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : AppCompatActivity() {
|
||||||
lateinit var bottomNavigationView: BottomNavigationView
|
lateinit var bottomNavigationView: BottomNavigationView
|
||||||
|
lateinit var toolbar: Toolbar
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
supportActionBar?.hide()
|
||||||
|
|
||||||
setContentView(R.layout.activity_main)
|
setContentView(R.layout.activity_main)
|
||||||
bottomNavigationView = findViewById<BottomNavigationView>(R.id.bottomNav)
|
bottomNavigationView = findViewById<BottomNavigationView>(R.id.bottomNav)
|
||||||
val navController = findNavController(R.id.fragment)
|
val navController = findNavController(R.id.fragment)
|
||||||
bottomNavigationView.setupWithNavController(navController)
|
bottomNavigationView.setupWithNavController(navController)
|
||||||
}
|
|
||||||
|
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean = when (item.itemId){
|
toolbar = findViewById(R.id.toolbar)
|
||||||
R.id.action_search -> {
|
toolbar.setOnMenuItemClickListener{
|
||||||
val navController = findNavController(R.id.fragment)
|
when (it.itemId){
|
||||||
navController.popBackStack()
|
R.id.action_search -> {
|
||||||
navController.navigate(R.id.searchFragment)
|
val navController = findNavController(R.id.fragment)
|
||||||
//bottomNavigationView.clearFocus()
|
navController.popBackStack()
|
||||||
//val navController = findNavController(R.id.fragment)
|
navController.navigate(R.id.searchFragment)
|
||||||
//navController.navigate(R.id.searchFragment)
|
//bottomNavigationView.clearFocus()
|
||||||
//navController.navigate(R.id.home2)
|
//val navController = findNavController(R.id.fragment)
|
||||||
true
|
//navController.navigate(R.id.searchFragment)
|
||||||
}
|
//navController.navigate(R.id.home2)
|
||||||
R.id.action_settings -> {
|
true
|
||||||
|
}
|
||||||
|
R.id.action_settings -> {
|
||||||
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
else -> {
|
}
|
||||||
super.onOptionsItemSelected(item)
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
|
||||||
menuInflater.inflate(R.menu.action_bar,menu)
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,11 +46,14 @@ import android.widget.TextView
|
|||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import com.google.android.exoplayer2.util.Util
|
import com.google.android.exoplayer2.util.Util
|
||||||
import android.graphics.drawable.ColorDrawable
|
import android.graphics.drawable.ColorDrawable
|
||||||
|
import android.os.Build
|
||||||
|
import android.text.Html
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import androidx.core.text.PrecomputedTextCompat
|
import androidx.core.text.PrecomputedTextCompat
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import com.google.android.exoplayer2.Player
|
import com.google.android.exoplayer2.Player
|
||||||
@ -60,6 +63,7 @@ import com.google.android.exoplayer2.util.RepeatModeUtil
|
|||||||
|
|
||||||
import com.google.android.exoplayer2.ui.TimeBar
|
import com.google.android.exoplayer2.ui.TimeBar
|
||||||
import com.google.android.exoplayer2.ui.TimeBar.OnScrubListener
|
import com.google.android.exoplayer2.ui.TimeBar.OnScrubListener
|
||||||
|
import com.squareup.picasso.Picasso
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
@ -68,6 +72,7 @@ import retrofit2.Retrofit
|
|||||||
import retrofit2.converter.jackson.JacksonConverterFactory
|
import retrofit2.converter.jackson.JacksonConverterFactory
|
||||||
import retrofit2.http.GET
|
import retrofit2.http.GET
|
||||||
import retrofit2.http.Path
|
import retrofit2.http.Path
|
||||||
|
import xyz.btcland.libretube.adapters.TrendingAdapter
|
||||||
import xyz.btcland.libretube.obj.PipedStream
|
import xyz.btcland.libretube.obj.PipedStream
|
||||||
|
|
||||||
|
|
||||||
@ -92,6 +97,7 @@ class PlayerFragment : Fragment() {
|
|||||||
private var isFullScreen = false
|
private var isFullScreen = false
|
||||||
private var whichQuality = 0
|
private var whichQuality = 0
|
||||||
|
|
||||||
|
private lateinit var relatedRecView: RecyclerView
|
||||||
private lateinit var exoPlayerView: StyledPlayerView
|
private lateinit var exoPlayerView: StyledPlayerView
|
||||||
private lateinit var motionLayout: MotionLayout
|
private lateinit var motionLayout: MotionLayout
|
||||||
private lateinit var exoPlayer: ExoPlayer
|
private lateinit var exoPlayer: ExoPlayer
|
||||||
@ -119,7 +125,7 @@ class PlayerFragment : Fragment() {
|
|||||||
val playerMotionLayout = view.findViewById<MotionLayout>(R.id.playerMotionLayout)
|
val playerMotionLayout = view.findViewById<MotionLayout>(R.id.playerMotionLayout)
|
||||||
motionLayout = playerMotionLayout
|
motionLayout = playerMotionLayout
|
||||||
exoPlayerView = view.findViewById(R.id.player)
|
exoPlayerView = view.findViewById(R.id.player)
|
||||||
view.findViewById<TextView>(R.id.textTest).text = videoId
|
view.findViewById<TextView>(R.id.player_description).text = videoId
|
||||||
playerMotionLayout.addTransitionListener(object: MotionLayout.TransitionListener {
|
playerMotionLayout.addTransitionListener(object: MotionLayout.TransitionListener {
|
||||||
override fun onTransitionStarted(
|
override fun onTransitionStarted(
|
||||||
motionLayout: MotionLayout?,
|
motionLayout: MotionLayout?,
|
||||||
@ -147,13 +153,11 @@ class PlayerFragment : Fragment() {
|
|||||||
view.findViewById<ImageButton>(R.id.close_imageButton).visibility =View.GONE
|
view.findViewById<ImageButton>(R.id.close_imageButton).visibility =View.GONE
|
||||||
view.findViewById<TextView>(R.id.quality_text).visibility =View.GONE
|
view.findViewById<TextView>(R.id.quality_text).visibility =View.GONE
|
||||||
mainMotionLayout.progress = 1.toFloat()
|
mainMotionLayout.progress = 1.toFloat()
|
||||||
mainActivity.supportActionBar?.show()
|
|
||||||
}else if(currentId==sId){
|
}else if(currentId==sId){
|
||||||
view.findViewById<ImageButton>(R.id.quality_select).visibility =View.VISIBLE
|
view.findViewById<ImageButton>(R.id.quality_select).visibility =View.VISIBLE
|
||||||
view.findViewById<ImageButton>(R.id.close_imageButton).visibility =View.VISIBLE
|
view.findViewById<ImageButton>(R.id.close_imageButton).visibility =View.VISIBLE
|
||||||
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()
|
||||||
mainActivity.supportActionBar?.hide()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -223,6 +227,9 @@ class PlayerFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
relatedRecView = view.findViewById(R.id.player_recView)
|
||||||
|
relatedRecView.layoutManager = GridLayoutManager(view.context, resources.getInteger(R.integer.grid_items))
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,7 +237,6 @@ class PlayerFragment : Fragment() {
|
|||||||
override fun onStop() {
|
override fun onStop() {
|
||||||
super.onStop()
|
super.onStop()
|
||||||
try {
|
try {
|
||||||
(activity as MainActivity).supportActionBar?.show()
|
|
||||||
exoPlayer.stop()
|
exoPlayer.stop()
|
||||||
}catch (e: Exception){}
|
}catch (e: Exception){}
|
||||||
|
|
||||||
@ -366,6 +372,17 @@ class PlayerFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
relatedRecView.adapter = TrendingAdapter(response.relatedStreams!!)
|
||||||
|
view.findViewById<TextView>(R.id.player_description).text = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
|
Html.fromHtml(response.description, Html.FROM_HTML_MODE_COMPACT)
|
||||||
|
} else {
|
||||||
|
Html.fromHtml(response.description)
|
||||||
|
}
|
||||||
|
view.findViewById<TextView>(R.id.player_sub).text = response.views.videoViews() + " views • "+response.uploadDate
|
||||||
|
view.findViewById<TextView>(R.id.textLike).text = response.likes.videoViews()
|
||||||
|
val channelImage = view.findViewById<ImageView>(R.id.player_channelImage)
|
||||||
|
Picasso.get().load(response.uploaderAvatar).into(channelImage)
|
||||||
|
view.findViewById<TextView>(R.id.player_channelName).text=response.uploader
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@ data class Streams(
|
|||||||
val lbryId: String?,
|
val lbryId: String?,
|
||||||
val uploaderVerified: Boolean?,
|
val uploaderVerified: Boolean?,
|
||||||
val duration: Int?,
|
val duration: Int?,
|
||||||
val views: Int?,
|
val views: Long?,
|
||||||
val likes: Int?,
|
val likes: Long?,
|
||||||
val dislikes: Int?,
|
val dislikes: Int?,
|
||||||
val audioStreams: List<PipedStream>?,
|
val audioStreams: List<PipedStream>?,
|
||||||
val videoStreams: List<PipedStream>?,
|
val videoStreams: List<PipedStream>?,
|
||||||
|
10
app/src/main/res/drawable/ic_download.xml
Normal file
10
app/src/main/res/drawable/ic_download.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="?attr/colorControlNormal">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M19.35,10.04C18.67,6.59 15.64,4 12,4 9.11,4 6.6,5.64 5.35,8.04 2.34,8.36 0,10.91 0,14c0,3.31 2.69,6 6,6h13c2.76,0 5,-2.24 5,-5 0,-2.64 -2.05,-4.78 -4.65,-4.96zM17,13l-5,5 -5,-5h3V9h4v4h3z"/>
|
||||||
|
</vector>
|
10
app/src/main/res/drawable/ic_like.xml
Normal file
10
app/src/main/res/drawable/ic_like.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="?attr/colorControlNormal">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M1,21h4L5,9L1,9v12zM23,10c0,-1.1 -0.9,-2 -2,-2h-6.31l0.95,-4.57 0.03,-0.32c0,-0.41 -0.17,-0.79 -0.44,-1.06L14.17,1 7.59,7.59C7.22,7.95 7,8.45 7,9v10c0,1.1 0.9,2 2,2h9c0.83,0 1.54,-0.5 1.84,-1.22l3.02,-7.05c0.09,-0.23 0.14,-0.47 0.14,-0.73v-2z"/>
|
||||||
|
</vector>
|
10
app/src/main/res/drawable/ic_save.xml
Normal file
10
app/src/main/res/drawable/ic_save.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="?attr/colorControlNormal">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M19,12v7L5,19v-7L3,12v7c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2zM13,12.67l2.59,-2.58L17,11.5l-5,5 -5,-5 1.41,-1.41L11,12.67L11,3h2z"/>
|
||||||
|
</vector>
|
10
app/src/main/res/drawable/ic_share.xml
Normal file
10
app/src/main/res/drawable/ic_share.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="?attr/colorControlNormal">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z"/>
|
||||||
|
</vector>
|
@ -1,108 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<xyz.btcland.libretube.SingleViewTouchableMotionLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
app:layoutDescription="@xml/player_scene"
|
|
||||||
tools:context=".PlayerFragment"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
android:id="@+id/playerMotionLayout"
|
|
||||||
>
|
|
||||||
|
|
||||||
<ScrollView
|
|
||||||
android:id="@+id/scrollView2"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/main_container"
|
|
||||||
android:background="@color/white"
|
|
||||||
|
|
||||||
>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/linLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
|
|
||||||
>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textTest"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text=""
|
|
||||||
|
|
||||||
/>
|
|
||||||
</LinearLayout>
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/main_container"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="350dp"
|
|
||||||
android:background="#FFFFFF"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
<xyz.btcland.libretube.CustomExoPlayerView
|
|
||||||
android:id="@+id/player"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/main_container"
|
|
||||||
app:layout_constraintStart_toStartOf="@id/main_container"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/main_container"
|
|
||||||
app:show_buffering="always"
|
|
||||||
android:background="@color/black"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/close_imageView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:alpha="0"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/main_container"
|
|
||||||
app:layout_constraintEnd_toEndOf="@id/main_container"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/main_container"
|
|
||||||
android:src="@drawable/ic_close"
|
|
||||||
android:visibility="gone"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/play_imageView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="24dp"
|
|
||||||
android:alpha="0"
|
|
||||||
android:src="@drawable/ic_play"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/close_imageView"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/close_imageView"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/close_imageView"
|
|
||||||
android:visibility="gone"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/title_textView"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginEnd="12dp"
|
|
||||||
android:alpha="0"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxLines="1"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/play_imageView"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/play_imageView"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/player"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/play_imageView"
|
|
||||||
android:visibility="gone"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</xyz.btcland.libretube.SingleViewTouchableMotionLayout>
|
|
@ -9,6 +9,17 @@
|
|||||||
android:id="@+id/mainMotionLayout"
|
android:id="@+id/mainMotionLayout"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorPrimary"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
android:theme="?attr/actionBarTheme"
|
||||||
|
app:menu="@menu/action_bar"
|
||||||
|
app:title="@string/app_name"
|
||||||
|
/>
|
||||||
|
|
||||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
android:id="@+id/bottomNav"
|
android:id="@+id/bottomNav"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -27,7 +38,7 @@
|
|||||||
app:layout_constraintBottom_toTopOf="@+id/bottomNav"
|
app:layout_constraintBottom_toTopOf="@+id/bottomNav"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/toolbar"
|
||||||
app:navGraph="@navigation/nav" />
|
app:navGraph="@navigation/nav" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
@ -32,12 +32,169 @@
|
|||||||
>
|
>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textTest"
|
android:id="@+id/player_description"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text=""
|
android:text="Description"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
/>
|
/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/player_sub"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=""
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="4"
|
||||||
|
>
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/player_like"
|
||||||
|
android:src="@drawable/ic_like"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="1K"
|
||||||
|
android:id="@+id/textLike"
|
||||||
|
android:layout_below="@id/player_like"
|
||||||
|
android:layout_centerHorizontal="true"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/player_share"
|
||||||
|
android:src="@drawable/ic_share"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textShare"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/player_share"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:text="@string/share" />
|
||||||
|
</RelativeLayout>
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/player_download"
|
||||||
|
android:src="@drawable/ic_download"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/download"
|
||||||
|
android:id="@+id/textDownload"
|
||||||
|
android:layout_below="@id/player_download"
|
||||||
|
android:layout_centerHorizontal="true"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/player_save"
|
||||||
|
android:src="@drawable/ic_save"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/save"
|
||||||
|
android:id="@+id/textSave"
|
||||||
|
android:layout_below="@id/player_save"
|
||||||
|
android:layout_centerHorizontal="true"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
>
|
||||||
|
|
||||||
|
<de.hdodenhof.circleimageview.CircleImageView
|
||||||
|
android:id="@+id/player_channelImage"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginRight="4dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/player_channelName"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_toRightOf="@+id/player_channelImage"
|
||||||
|
android:text=""
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/player_subscribe"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:background="#00000000"
|
||||||
|
android:text="SUBSCRIBE"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
/>
|
||||||
|
</RelativeLayout>
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:descendantFocusability="blocksDescendants">
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/player_recView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:nestedScrollingEnabled="false"
|
||||||
|
/>
|
||||||
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
|
@ -5,4 +5,7 @@
|
|||||||
<string name="choose_quality_dialog">Choose Quality:</string>
|
<string name="choose_quality_dialog">Choose Quality:</string>
|
||||||
<string name="search_hint">Search</string>
|
<string name="search_hint">Search</string>
|
||||||
<string name="subscribe">SUBSCRIBE</string>
|
<string name="subscribe">SUBSCRIBE</string>
|
||||||
|
<string name="share">Share</string>
|
||||||
|
<string name="download">Download</string>
|
||||||
|
<string name="save">Save</string>
|
||||||
</resources>
|
</resources>
|
Loading…
x
Reference in New Issue
Block a user