1

Unable to find TrackSelectionView .getDialog class on AndroidX. But v7Support Libraries normal working.

error: cannot find symbol method getDialog(Activity,CharSequence,DefaultTrackSelector,int)

    MappingTrackSelector.MappedTrackInfo mappedTrackInfo = trackSelector.getCurrentMappedTrackInfo();
    if (mappedTrackInfo != null)
    {
        CharSequence title = string;
        int rendererIndex = index;
       int rendererType = mappedTrackInfo.getRendererType(rendererIndex);
        boolean allowAdaptiveSelections =
                rendererType == C.TRACK_TYPE_VIDEO || (rendererType == C.TRACK_TYPE_AUDIO &&
                        mappedTrackInfo.getTypeSupport(C.TRACK_TYPE_VIDEO) == MappingTrackSelector.MappedTrackInfo.RENDERER_SUPPORT_NO_TRACKS);


        Pair<AlertDialog, TrackSelectionView> dialogPair = TrackSelectionView.getDialog((Activity) context, title, trackSelector, rendererIndex);
        dialogPair.second.setShowDisableOption(non);
        //dialogPair.second.setAllowAdaptiveSelections(allowAdaptiveSelections);
        //Set the dialog to not focusable (makes navigation ignore us adding the window)
        dialogPair.first.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);
        dialogPair.first.show();
        dialogPair.first.getWindow().getDecorView().setSystemUiVisibility(((Activity) context).getWindow().getDecorView().getSystemUiVisibility());
        //Clear the not focusable flag from the window
        dialogPair.first.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);
    }

Find exoplayer dialog track in the TrackSelectionView .getDialog

micron
  • 21
  • 5
  • TrackSelectionView.getDialog Deprecated in com.google.android.exoplayer:exoplayer:2.10.0 Not about AndroidX Libraries. – micron Jun 06 '19 at 17:11

0 Answers0