Search in sources :

Example 1 with HistoryRecordManager

use of org.schabi.newpipe.history.HistoryRecordManager in project NewPipe by TeamNewPipe.

the class StatisticsPlaylistFragment method onCreate.

// /////////////////////////////////////////////////////////////////////////
// Fragment LifeCycle - Creation
// /////////////////////////////////////////////////////////////////////////
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    recordManager = new HistoryRecordManager(getContext());
}
Also used : HistoryRecordManager(org.schabi.newpipe.history.HistoryRecordManager)

Example 2 with HistoryRecordManager

use of org.schabi.newpipe.history.HistoryRecordManager in project NewPipe by TeamNewPipe.

the class SearchFragment method onAttach.

/*//////////////////////////////////////////////////////////////////////////
    // Fragment's LifeCycle
    //////////////////////////////////////////////////////////////////////////*/
@Override
public void onAttach(Context context) {
    super.onAttach(context);
    suggestionListAdapter = new SuggestionListAdapter(activity);
    SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);
    isSearchHistoryEnabled = preferences.getBoolean(getString(R.string.enable_search_history_key), true);
    suggestionListAdapter.setShowSuggestionHistory(isSearchHistoryEnabled);
    historyRecordManager = new HistoryRecordManager(context);
}
Also used : HistoryRecordManager(org.schabi.newpipe.history.HistoryRecordManager) SharedPreferences(android.content.SharedPreferences)

Aggregations

HistoryRecordManager (org.schabi.newpipe.history.HistoryRecordManager)2 SharedPreferences (android.content.SharedPreferences)1