<commit_before>package com.marverenic.music.fragments;

import android.content.Context;
import android.content.res.Configuration;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.NinePatchDrawable;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.RecyclerView.ItemDecoration;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.marverenic.adapter.DragDropAdapter;
import com.marverenic.adapter.DragDropDecoration;
import com.marverenic.music.JockeyApplication;
import com.marverenic.music.R;
import com.marverenic.music.adapter.LibraryEmptyState;
import com.marverenic.music.adapter.QueueSection;
import com.marverenic.music.adapter.SpacerSingleton;
import com.marverenic.music.model.Song;
import com.marverenic.music.player.PlayerController;
import com.marverenic.music.view.DragBackgroundDecoration;
import com.marverenic.music.view.DragDividerDecoration;
import com.marverenic.music.view.InsetDecoration;
import com.marverenic.music.view.QueueAnimator;
import com.marverenic.music.view.SnappingScroller;
import com.trello.rxlifecycle.FragmentEvent;

import java.util.List;

import javax.inject.Inject;

import timber.log.Timber;

import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;

public class QueueFragment extends BaseFragment {

    @Inject PlayerController mPlayerController;

    private int lastPlayIndex;

    private RecyclerView mRecyclerView;
    private DragDropAdapter mAdapter;
    private QueueSection mQueueSection;
    private SpacerSingleton[] mBottomSpacers;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        JockeyApplication.getComponent(this).inject(this);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        View view = inflater.inflate(R.layout.list, container, false);
        mRecyclerView = (RecyclerView) view.findViewById(R.id.list);

        setupRecyclerView();<commit_msg>Prevent closing the now playing page by scrolling the queue in landscape<commit_after>package com.marverenic.music.fragments;

import android.content.Context;
import android.content.res.Configuration;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.NinePatchDrawable;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.RecyclerView.ItemDecoration;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.marverenic.adapter.DragDropAdapter;
import com.marverenic.adapter.DragDropDecoration;
import com.marverenic.music.JockeyApplication;
import com.marverenic.music.R;
import com.marverenic.music.adapter.LibraryEmptyState;
import com.marverenic.music.adapter.QueueSection;
import com.marverenic.music.adapter.SpacerSingleton;
import com.marverenic.music.model.Song;
import com.marverenic.music.player.PlayerController;
import com.marverenic.music.view.DragBackgroundDecoration;
import com.marverenic.music.view.DragDividerDecoration;
import com.marverenic.music.view.InsetDecoration;
import com.marverenic.music.view.QueueAnimator;
import com.marverenic.music.view.SnappingScroller;
import com.trello.rxlifecycle.FragmentEvent;

import java.util.List;

import javax.inject.Inject;

import timber.log.Timber;

import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;

public class QueueFragment extends BaseFragment {

    @Inject PlayerController mPlayerController;

    private int lastPlayIndex;

    private RecyclerView mRecyclerView;
    private DragDropAdapter mAdapter;
    private QueueSection mQueueSection;
    private SpacerSingleton[] mBottomSpacers;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        JockeyApplication.getComponent(this).inject(this);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        View view = inflater.inflate(R.layout.list, container, false);
        mRecyclerView = (RecyclerView) view.findViewById(R.id.list);

        boolean isLandscape = getContext().getResources().getConfiguration().orientation
                == ORIENTATION_LANDSCAPE;
        mRecyclerView.setNestedScrollingEnabled(!isLandscape);

        setupRecyclerView();
{'fraction_non_alphanumeric': 0.08499389995933307, 'fraction_numerical': 0.0016266775111834079, 'mean_word_length': 5.210858585858586, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5936606', 'n_tokens_mistral': 1494, 'n_tokens_neox': 1400, 'n_words': 251}