2014-07-03 07:48:39 +02:00
|
|
|
/*
|
|
|
|
* Twidere - Twitter client for Android
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package org.mariotaku.twidere.fragment;
|
|
|
|
|
2015-10-10 04:08:31 +02:00
|
|
|
import android.app.Activity;
|
2014-07-03 07:48:39 +02:00
|
|
|
import android.os.Bundle;
|
2016-03-13 16:30:49 +01:00
|
|
|
import android.support.v7.preference.PreferenceFragmentCompat;
|
2014-07-03 07:48:39 +02:00
|
|
|
|
|
|
|
import org.mariotaku.twidere.Constants;
|
2015-10-09 09:58:36 +02:00
|
|
|
import org.mariotaku.twidere.util.KeyboardShortcutsHandler;
|
|
|
|
import org.mariotaku.twidere.util.UserColorNameManager;
|
2015-12-31 09:32:27 +01:00
|
|
|
import org.mariotaku.twidere.util.dagger.GeneralComponentHelper;
|
2015-10-09 09:58:36 +02:00
|
|
|
|
|
|
|
import javax.inject.Inject;
|
2014-07-03 07:48:39 +02:00
|
|
|
|
2016-03-13 16:30:49 +01:00
|
|
|
public abstract class BasePreferenceFragment extends PreferenceFragmentCompat implements Constants {
|
2014-07-03 07:48:39 +02:00
|
|
|
|
2015-10-09 09:58:36 +02:00
|
|
|
@Inject
|
|
|
|
protected KeyboardShortcutsHandler mKeyboardShortcutHandler;
|
|
|
|
@Inject
|
|
|
|
protected UserColorNameManager mUserColorNameManager;
|
|
|
|
|
2015-10-10 04:08:31 +02:00
|
|
|
@SuppressWarnings("deprecated")
|
2015-10-09 09:58:36 +02:00
|
|
|
@Override
|
2015-10-10 04:08:31 +02:00
|
|
|
public void onAttach(Activity activity) {
|
|
|
|
super.onAttach(activity);
|
2015-12-31 09:32:27 +01:00
|
|
|
GeneralComponentHelper.build(activity).inject(this);
|
2015-10-09 09:58:36 +02:00
|
|
|
}
|
|
|
|
|
2014-07-28 12:42:48 +02:00
|
|
|
@Override
|
|
|
|
public void onActivityCreated(final Bundle savedInstanceState) {
|
|
|
|
super.onActivityCreated(savedInstanceState);
|
|
|
|
getPreferenceManager().setSharedPreferencesName(SHARED_PREFERENCES_NAME);
|
|
|
|
}
|
|
|
|
|
2014-07-03 07:48:39 +02:00
|
|
|
}
|