|
|
|
|
@ -10,6 +10,7 @@ import androidx.fragment.app.FragmentActivity; |
|
|
|
|
import androidx.media3.common.Tracks; |
|
|
|
|
import androidx.viewbinding.ViewBinding; |
|
|
|
|
|
|
|
|
|
import com.fongmi.android.tv.App; |
|
|
|
|
import com.fongmi.android.tv.bean.Track; |
|
|
|
|
import com.fongmi.android.tv.databinding.DialogTrackBinding; |
|
|
|
|
import com.fongmi.android.tv.player.Players; |
|
|
|
|
@ -65,9 +66,9 @@ public final class TrackDialog extends BaseDialog implements TrackAdapter.OnClic |
|
|
|
|
@Override |
|
|
|
|
protected void initView() { |
|
|
|
|
binding.recycler.setHasFixedSize(true); |
|
|
|
|
binding.recycler.addItemDecoration(new SpaceItemDecoration(1, 16)); |
|
|
|
|
binding.recycler.setAdapter(adapter.addAll(getTrack())); |
|
|
|
|
binding.recycler.scrollToPosition(adapter.getSelected()); |
|
|
|
|
binding.recycler.addItemDecoration(new SpaceItemDecoration(1, 16)); |
|
|
|
|
App.post(() -> binding.recycler.scrollToPosition(adapter.getSelected()), 16); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private List<Track> getTrack() { |
|
|
|
|
|