mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
collapse sheets by default
This commit is contained in:
parent
1b60f31fa3
commit
3bee5b146c
@ -6,11 +6,11 @@ import android.view.ViewGroup
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.github.libretube.databinding.VideoRowBinding
|
||||
import com.github.libretube.sheets.VideoOptionsBottomSheet
|
||||
import com.github.libretube.extensions.formatShort
|
||||
import com.github.libretube.extensions.setWatchProgressLength
|
||||
import com.github.libretube.extensions.toID
|
||||
import com.github.libretube.obj.StreamItem
|
||||
import com.github.libretube.sheets.VideoOptionsBottomSheet
|
||||
import com.github.libretube.util.ImageHelper
|
||||
import com.github.libretube.util.NavigationHelper
|
||||
|
||||
|
@ -9,13 +9,13 @@ import androidx.fragment.app.FragmentManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.github.libretube.api.RetrofitInstance
|
||||
import com.github.libretube.databinding.PlaylistRowBinding
|
||||
import com.github.libretube.sheets.VideoOptionsBottomSheet
|
||||
import com.github.libretube.extensions.TAG
|
||||
import com.github.libretube.extensions.setFormattedDuration
|
||||
import com.github.libretube.extensions.setWatchProgressLength
|
||||
import com.github.libretube.extensions.toID
|
||||
import com.github.libretube.obj.PlaylistId
|
||||
import com.github.libretube.obj.StreamItem
|
||||
import com.github.libretube.sheets.VideoOptionsBottomSheet
|
||||
import com.github.libretube.util.ImageHelper
|
||||
import com.github.libretube.util.NavigationHelper
|
||||
import com.github.libretube.util.PreferenceHelper
|
||||
|
@ -9,10 +9,10 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import com.github.libretube.R
|
||||
import com.github.libretube.api.RetrofitInstance
|
||||
import com.github.libretube.databinding.PlaylistsRowBinding
|
||||
import com.github.libretube.sheets.PlaylistOptionsBottomSheet
|
||||
import com.github.libretube.extensions.TAG
|
||||
import com.github.libretube.obj.PlaylistId
|
||||
import com.github.libretube.obj.Playlists
|
||||
import com.github.libretube.sheets.PlaylistOptionsBottomSheet
|
||||
import com.github.libretube.util.ImageHelper
|
||||
import com.github.libretube.util.NavigationHelper
|
||||
import com.github.libretube.util.PreferenceHelper
|
||||
|
@ -10,13 +10,13 @@ import com.github.libretube.api.SubscriptionHelper
|
||||
import com.github.libretube.databinding.ChannelRowBinding
|
||||
import com.github.libretube.databinding.PlaylistSearchRowBinding
|
||||
import com.github.libretube.databinding.VideoRowBinding
|
||||
import com.github.libretube.sheets.PlaylistOptionsBottomSheet
|
||||
import com.github.libretube.sheets.VideoOptionsBottomSheet
|
||||
import com.github.libretube.extensions.formatShort
|
||||
import com.github.libretube.extensions.setFormattedDuration
|
||||
import com.github.libretube.extensions.setWatchProgressLength
|
||||
import com.github.libretube.extensions.toID
|
||||
import com.github.libretube.obj.SearchItem
|
||||
import com.github.libretube.sheets.PlaylistOptionsBottomSheet
|
||||
import com.github.libretube.sheets.VideoOptionsBottomSheet
|
||||
import com.github.libretube.util.ImageHelper
|
||||
import com.github.libretube.util.NavigationHelper
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
|
@ -6,12 +6,12 @@ import android.view.ViewGroup
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.github.libretube.databinding.TrendingRowBinding
|
||||
import com.github.libretube.sheets.VideoOptionsBottomSheet
|
||||
import com.github.libretube.extensions.formatShort
|
||||
import com.github.libretube.extensions.setFormattedDuration
|
||||
import com.github.libretube.extensions.setWatchProgressLength
|
||||
import com.github.libretube.extensions.toID
|
||||
import com.github.libretube.obj.StreamItem
|
||||
import com.github.libretube.sheets.VideoOptionsBottomSheet
|
||||
import com.github.libretube.util.ImageHelper
|
||||
import com.github.libretube.util.NavigationHelper
|
||||
|
||||
|
@ -7,9 +7,9 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import com.github.libretube.databinding.WatchHistoryRowBinding
|
||||
import com.github.libretube.db.DatabaseHelper
|
||||
import com.github.libretube.db.obj.WatchHistoryItem
|
||||
import com.github.libretube.sheets.VideoOptionsBottomSheet
|
||||
import com.github.libretube.extensions.setFormattedDuration
|
||||
import com.github.libretube.extensions.setWatchProgressLength
|
||||
import com.github.libretube.sheets.VideoOptionsBottomSheet
|
||||
import com.github.libretube.util.ImageHelper
|
||||
import com.github.libretube.util.NavigationHelper
|
||||
|
||||
|
@ -14,10 +14,10 @@ import com.github.libretube.adapters.PlaylistAdapter
|
||||
import com.github.libretube.api.RetrofitInstance
|
||||
import com.github.libretube.constants.IntentData
|
||||
import com.github.libretube.databinding.FragmentPlaylistBinding
|
||||
import com.github.libretube.sheets.PlaylistOptionsBottomSheet
|
||||
import com.github.libretube.extensions.BaseFragment
|
||||
import com.github.libretube.extensions.TAG
|
||||
import com.github.libretube.extensions.toID
|
||||
import com.github.libretube.sheets.PlaylistOptionsBottomSheet
|
||||
import retrofit2.HttpException
|
||||
import java.io.IOException
|
||||
|
||||
|
@ -16,7 +16,6 @@ import com.github.libretube.constants.PreferenceKeys
|
||||
import com.github.libretube.databinding.FragmentSubscriptionsBinding
|
||||
import com.github.libretube.extensions.BaseFragment
|
||||
import com.github.libretube.models.SubscriptionsViewModel
|
||||
import com.github.libretube.obj.BottomSheetItem
|
||||
import com.github.libretube.util.PreferenceHelper
|
||||
import com.github.libretube.views.BottomSheet
|
||||
|
||||
|
@ -26,7 +26,6 @@ class VideoOptionsBottomSheet(
|
||||
) : BottomSheet() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
|
||||
// List that stores the different menu options. In the future could be add more options here.
|
||||
val optionsList = mutableListOf(
|
||||
context?.getString(R.string.playOnBackground)!!,
|
||||
|
@ -8,8 +8,6 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.github.libretube.adapters.BottomSheetAdapter
|
||||
import com.github.libretube.databinding.BottomSheetBinding
|
||||
import com.github.libretube.obj.BottomSheetItem
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
||||
|
||||
open class BottomSheet : BottomSheetDialogFragment() {
|
||||
@ -22,14 +20,6 @@ open class BottomSheet : BottomSheetDialogFragment() {
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
dialog!!.setOnShowListener { dialog ->
|
||||
val d = dialog as BottomSheetDialog
|
||||
val bottomSheetInternal =
|
||||
d.findViewById<View>(com.google.android.material.R.id.design_bottom_sheet)!!
|
||||
BottomSheetBehavior.from(bottomSheetInternal).state =
|
||||
BottomSheetBehavior.STATE_EXPANDED
|
||||
}
|
||||
|
||||
binding = BottomSheetBinding.inflate(layoutInflater)
|
||||
return binding.root
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user