Converted statistics to fragment
Also set title of all preferences pages
This commit is contained in:
parent
ea84dde76f
commit
71949ab1b7
|
@ -150,13 +150,6 @@
|
||||||
android:name="android.support.PARENT_ACTIVITY"
|
android:name="android.support.PARENT_ACTIVITY"
|
||||||
android:value="de.danoeh.antennapod.activity.PreferenceActivity"/>
|
android:value="de.danoeh.antennapod.activity.PreferenceActivity"/>
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
|
||||||
android:name=".activity.StatisticsActivity"
|
|
||||||
android:label="@string/statistics_label">
|
|
||||||
<meta-data
|
|
||||||
android:name="android.support.PARENT_ACTIVITY"
|
|
||||||
android:value="de.danoeh.antennapod.activity.PreferenceActivity"/>
|
|
||||||
</activity>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.ImportExportActivity"
|
android:name=".activity.ImportExportActivity"
|
||||||
android:label="@string/import_export">
|
android:label="@string/import_export">
|
||||||
|
|
|
@ -24,6 +24,7 @@ import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import de.danoeh.antennapod.R;
|
import de.danoeh.antennapod.R;
|
||||||
|
import de.danoeh.antennapod.activity.PreferenceActivity;
|
||||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||||
|
|
||||||
public class AutoDownloadPreferencesFragment extends PreferenceFragmentCompat {
|
public class AutoDownloadPreferencesFragment extends PreferenceFragmentCompat {
|
||||||
|
@ -46,6 +47,12 @@ public class AutoDownloadPreferencesFragment extends PreferenceFragmentCompat {
|
||||||
buildEpisodeCleanupPreference();
|
buildEpisodeCleanupPreference();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.auto_download_label);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
|
@ -9,6 +9,7 @@ import android.text.Html;
|
||||||
import android.text.format.DateUtils;
|
import android.text.format.DateUtils;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import de.danoeh.antennapod.R;
|
import de.danoeh.antennapod.R;
|
||||||
|
import de.danoeh.antennapod.activity.PreferenceActivity;
|
||||||
import de.danoeh.antennapod.core.preferences.GpodnetPreferences;
|
import de.danoeh.antennapod.core.preferences.GpodnetPreferences;
|
||||||
import de.danoeh.antennapod.core.service.GpodnetSyncService;
|
import de.danoeh.antennapod.core.service.GpodnetSyncService;
|
||||||
import de.danoeh.antennapod.dialog.AuthenticationDialog;
|
import de.danoeh.antennapod.dialog.AuthenticationDialog;
|
||||||
|
@ -29,6 +30,12 @@ public class GpodderPreferencesFragment extends PreferenceFragmentCompat {
|
||||||
setupGpodderScreen();
|
setupGpodderScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.gpodnet_main_label);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
|
@ -14,6 +14,12 @@ public class IntegrationsPreferencesFragment extends PreferenceFragmentCompat {
|
||||||
setupIntegrationsScreen();
|
setupIntegrationsScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.integrations_label);
|
||||||
|
}
|
||||||
|
|
||||||
private void setupIntegrationsScreen() {
|
private void setupIntegrationsScreen() {
|
||||||
findPreference(PREF_SCREEN_GPODDER).setOnPreferenceClickListener(preference -> {
|
findPreference(PREF_SCREEN_GPODDER).setOnPreferenceClickListener(preference -> {
|
||||||
((PreferenceActivity) getActivity()).openScreen(R.xml.preferences_gpodder);
|
((PreferenceActivity) getActivity()).openScreen(R.xml.preferences_gpodder);
|
||||||
|
|
|
@ -1,20 +1,15 @@
|
||||||
package de.danoeh.antennapod.fragment.preferences;
|
package de.danoeh.antennapod.fragment.preferences;
|
||||||
|
|
||||||
import android.content.ActivityNotFoundException;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.support.v7.preference.PreferenceFragmentCompat;
|
import android.support.v7.preference.PreferenceFragmentCompat;
|
||||||
import android.util.Log;
|
|
||||||
import android.widget.Toast;
|
|
||||||
import com.bytehamster.lib.preferencesearch.SearchConfiguration;
|
import com.bytehamster.lib.preferencesearch.SearchConfiguration;
|
||||||
import com.bytehamster.lib.preferencesearch.SearchPreference;
|
import com.bytehamster.lib.preferencesearch.SearchPreference;
|
||||||
import de.danoeh.antennapod.R;
|
import de.danoeh.antennapod.R;
|
||||||
import de.danoeh.antennapod.activity.AboutActivity;
|
import de.danoeh.antennapod.activity.AboutActivity;
|
||||||
import de.danoeh.antennapod.activity.BugReportActivity;
|
import de.danoeh.antennapod.activity.BugReportActivity;
|
||||||
import de.danoeh.antennapod.activity.PreferenceActivity;
|
import de.danoeh.antennapod.activity.PreferenceActivity;
|
||||||
import de.danoeh.antennapod.activity.StatisticsActivity;
|
|
||||||
import de.danoeh.antennapod.core.util.IntentUtils;
|
import de.danoeh.antennapod.core.util.IntentUtils;
|
||||||
|
|
||||||
public class MainPreferencesFragment extends PreferenceFragmentCompat {
|
public class MainPreferencesFragment extends PreferenceFragmentCompat {
|
||||||
|
@ -38,6 +33,12 @@ public class MainPreferencesFragment extends PreferenceFragmentCompat {
|
||||||
setupSearch();
|
setupSearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.settings_label);
|
||||||
|
}
|
||||||
|
|
||||||
private void setupMainScreen() {
|
private void setupMainScreen() {
|
||||||
findPreference(PREF_SCREEN_USER_INTERFACE).setOnPreferenceClickListener(preference -> {
|
findPreference(PREF_SCREEN_USER_INTERFACE).setOnPreferenceClickListener(preference -> {
|
||||||
((PreferenceActivity) getActivity()).openScreen(R.xml.preferences_user_interface);
|
((PreferenceActivity) getActivity()).openScreen(R.xml.preferences_user_interface);
|
||||||
|
@ -68,7 +69,8 @@ public class MainPreferencesFragment extends PreferenceFragmentCompat {
|
||||||
);
|
);
|
||||||
findPreference(STATISTICS).setOnPreferenceClickListener(
|
findPreference(STATISTICS).setOnPreferenceClickListener(
|
||||||
preference -> {
|
preference -> {
|
||||||
startActivity(new Intent(getActivity(), StatisticsActivity.class));
|
getFragmentManager().beginTransaction().replace(R.id.content, new StatisticsFragment())
|
||||||
|
.addToBackStack(getString(R.string.statistics_label)).commit();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -30,6 +30,12 @@ public class NetworkPreferencesFragment extends PreferenceFragmentCompat {
|
||||||
setupNetworkScreen();
|
setupNetworkScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.network_pref);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
|
@ -8,6 +8,7 @@ import android.support.v7.preference.ListPreference;
|
||||||
import android.support.v7.preference.PreferenceFragmentCompat;
|
import android.support.v7.preference.PreferenceFragmentCompat;
|
||||||
import de.danoeh.antennapod.R;
|
import de.danoeh.antennapod.R;
|
||||||
import de.danoeh.antennapod.activity.MediaplayerActivity;
|
import de.danoeh.antennapod.activity.MediaplayerActivity;
|
||||||
|
import de.danoeh.antennapod.activity.PreferenceActivity;
|
||||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||||
import de.danoeh.antennapod.core.util.gui.PictureInPictureUtil;
|
import de.danoeh.antennapod.core.util.gui.PictureInPictureUtil;
|
||||||
import de.danoeh.antennapod.dialog.VariableSpeedDialog;
|
import de.danoeh.antennapod.dialog.VariableSpeedDialog;
|
||||||
|
@ -27,6 +28,12 @@ public class PlaybackPreferencesFragment extends PreferenceFragmentCompat {
|
||||||
buildSmartMarkAsPlayedPreference();
|
buildSmartMarkAsPlayedPreference();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.playback_pref);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
|
@ -1,23 +1,27 @@
|
||||||
package de.danoeh.antennapod.activity;
|
package de.danoeh.antennapod.fragment.preferences;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.annotation.NonNull;
|
||||||
|
import android.support.annotation.Nullable;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import de.danoeh.antennapod.R;
|
import de.danoeh.antennapod.R;
|
||||||
|
import de.danoeh.antennapod.activity.PreferenceActivity;
|
||||||
import de.danoeh.antennapod.adapter.StatisticsListAdapter;
|
import de.danoeh.antennapod.adapter.StatisticsListAdapter;
|
||||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
|
||||||
import de.danoeh.antennapod.core.storage.DBReader;
|
import de.danoeh.antennapod.core.storage.DBReader;
|
||||||
import de.danoeh.antennapod.core.util.Converter;
|
import de.danoeh.antennapod.core.util.Converter;
|
||||||
import io.reactivex.Observable;
|
import io.reactivex.Observable;
|
||||||
|
@ -28,10 +32,8 @@ import io.reactivex.schedulers.Schedulers;
|
||||||
/**
|
/**
|
||||||
* Displays the 'statistics' screen
|
* Displays the 'statistics' screen
|
||||||
*/
|
*/
|
||||||
public class StatisticsActivity extends AppCompatActivity
|
public class StatisticsFragment extends Fragment implements AdapterView.OnItemClickListener {
|
||||||
implements AdapterView.OnItemClickListener {
|
private static final String TAG = StatisticsFragment.class.getSimpleName();
|
||||||
|
|
||||||
private static final String TAG = StatisticsActivity.class.getSimpleName();
|
|
||||||
private static final String PREF_NAME = "StatisticsActivityPrefs";
|
private static final String PREF_NAME = "StatisticsActivityPrefs";
|
||||||
private static final String PREF_COUNT_ALL = "countAll";
|
private static final String PREF_COUNT_ALL = "countAll";
|
||||||
|
|
||||||
|
@ -44,54 +46,51 @@ public class StatisticsActivity extends AppCompatActivity
|
||||||
private SharedPreferences prefs;
|
private SharedPreferences prefs;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
setTheme(UserPreferences.getTheme());
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
prefs = getContext().getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
|
||||||
setContentView(R.layout.statistics_activity);
|
|
||||||
|
|
||||||
prefs = getSharedPreferences(PREF_NAME, MODE_PRIVATE);
|
|
||||||
countAll = prefs.getBoolean(PREF_COUNT_ALL, false);
|
countAll = prefs.getBoolean(PREF_COUNT_ALL, false);
|
||||||
|
setHasOptionsMenu(true);
|
||||||
|
}
|
||||||
|
|
||||||
totalTimeTextView = findViewById(R.id.total_time);
|
@Nullable
|
||||||
feedStatisticsList = findViewById(R.id.statistics_list);
|
@Override
|
||||||
progressBar = findViewById(R.id.progressBar);
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
listAdapter = new StatisticsListAdapter(this);
|
View root = inflater.inflate(R.layout.statistics_activity, container, false);
|
||||||
|
totalTimeTextView = root.findViewById(R.id.total_time);
|
||||||
|
feedStatisticsList = root.findViewById(R.id.statistics_list);
|
||||||
|
progressBar = root.findViewById(R.id.progressBar);
|
||||||
|
listAdapter = new StatisticsListAdapter(getContext());
|
||||||
listAdapter.setCountAll(countAll);
|
listAdapter.setCountAll(countAll);
|
||||||
feedStatisticsList.setAdapter(listAdapter);
|
feedStatisticsList.setAdapter(listAdapter);
|
||||||
feedStatisticsList.setOnItemClickListener(this);
|
feedStatisticsList.setOnItemClickListener(this);
|
||||||
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onStart() {
|
||||||
super.onResume();
|
super.onStart();
|
||||||
|
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.statistics_label);
|
||||||
refreshStatistics();
|
refreshStatistics();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
super.onCreateOptionsMenu(menu);
|
|
||||||
MenuInflater inflater = getMenuInflater();
|
|
||||||
inflater.inflate(R.menu.statistics, menu);
|
inflater.inflate(R.menu.statistics, menu);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
if (item.getItemId() == android.R.id.home) {
|
if (item.getItemId() == R.id.statistics_mode) {
|
||||||
finish();
|
|
||||||
return true;
|
|
||||||
} else if (item.getItemId() == R.id.statistics_mode) {
|
|
||||||
selectStatisticsMode();
|
selectStatisticsMode();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
|
||||||
return super.onOptionsItemSelected(item);
|
|
||||||
}
|
}
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectStatisticsMode() {
|
private void selectStatisticsMode() {
|
||||||
View contentView = View.inflate(this, R.layout.statistics_mode_select_dialog, null);
|
View contentView = View.inflate(getContext(), R.layout.statistics_mode_select_dialog, null);
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
|
||||||
builder.setView(contentView);
|
builder.setView(contentView);
|
||||||
builder.setTitle(R.string.statistics_mode);
|
builder.setTitle(R.string.statistics_mode);
|
||||||
|
|
||||||
|
@ -126,8 +125,8 @@ public class StatisticsActivity extends AppCompatActivity
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(result -> {
|
.subscribe(result -> {
|
||||||
totalTimeTextView.setText(Converter
|
totalTimeTextView.setText(Converter.shortLocalizedDuration(getContext(),
|
||||||
.shortLocalizedDuration(this, countAll ? result.totalTimeCountAll : result.totalTime));
|
countAll ? result.totalTimeCountAll : result.totalTime));
|
||||||
listAdapter.update(result.feedTime);
|
listAdapter.update(result.feedTime);
|
||||||
progressBar.setVisibility(View.GONE);
|
progressBar.setVisibility(View.GONE);
|
||||||
totalTimeTextView.setVisibility(View.VISIBLE);
|
totalTimeTextView.setVisibility(View.VISIBLE);
|
||||||
|
@ -139,14 +138,13 @@ public class StatisticsActivity extends AppCompatActivity
|
||||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
DBReader.StatisticsItem stats = listAdapter.getItem(position);
|
DBReader.StatisticsItem stats = listAdapter.getItem(position);
|
||||||
|
|
||||||
AlertDialog.Builder dialog = new AlertDialog.Builder(this);
|
AlertDialog.Builder dialog = new AlertDialog.Builder(getContext());
|
||||||
dialog.setTitle(stats.feed.getTitle());
|
dialog.setTitle(stats.feed.getTitle());
|
||||||
dialog.setMessage(getString(R.string.statistics_details_dialog,
|
dialog.setMessage(getString(R.string.statistics_details_dialog,
|
||||||
countAll ? stats.episodesStartedIncludingMarked : stats.episodesStarted,
|
countAll ? stats.episodesStartedIncludingMarked : stats.episodesStarted,
|
||||||
stats.episodes,
|
stats.episodes, Converter.shortLocalizedDuration(getContext(),
|
||||||
Converter.shortLocalizedDuration(this, countAll ?
|
countAll ? stats.timePlayedCountAll : stats.timePlayed),
|
||||||
stats.timePlayedCountAll : stats.timePlayed),
|
Converter.shortLocalizedDuration(getContext(), stats.time)));
|
||||||
Converter.shortLocalizedDuration(this, stats.time)));
|
|
||||||
dialog.setPositiveButton(android.R.string.ok, null);
|
dialog.setPositiveButton(android.R.string.ok, null);
|
||||||
dialog.show();
|
dialog.show();
|
||||||
}
|
}
|
|
@ -23,6 +23,7 @@ import de.danoeh.antennapod.R;
|
||||||
import de.danoeh.antennapod.activity.DirectoryChooserActivity;
|
import de.danoeh.antennapod.activity.DirectoryChooserActivity;
|
||||||
import de.danoeh.antennapod.activity.ImportExportActivity;
|
import de.danoeh.antennapod.activity.ImportExportActivity;
|
||||||
import de.danoeh.antennapod.activity.OpmlImportFromPathActivity;
|
import de.danoeh.antennapod.activity.OpmlImportFromPathActivity;
|
||||||
|
import de.danoeh.antennapod.activity.PreferenceActivity;
|
||||||
import de.danoeh.antennapod.asynctask.DocumentFileExportWorker;
|
import de.danoeh.antennapod.asynctask.DocumentFileExportWorker;
|
||||||
import de.danoeh.antennapod.asynctask.ExportWorker;
|
import de.danoeh.antennapod.asynctask.ExportWorker;
|
||||||
import de.danoeh.antennapod.core.export.ExportWriter;
|
import de.danoeh.antennapod.core.export.ExportWriter;
|
||||||
|
@ -63,6 +64,12 @@ public class StoragePreferencesFragment extends PreferenceFragmentCompat {
|
||||||
setupStorageScreen();
|
setupStorageScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.storage_pref);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
|
@ -11,6 +11,7 @@ import android.widget.ListView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import de.danoeh.antennapod.R;
|
import de.danoeh.antennapod.R;
|
||||||
import de.danoeh.antennapod.activity.MainActivity;
|
import de.danoeh.antennapod.activity.MainActivity;
|
||||||
|
import de.danoeh.antennapod.activity.PreferenceActivity;
|
||||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
|
||||||
|
@ -25,6 +26,12 @@ public class UserInterfacePreferencesFragment extends PreferenceFragmentCompat {
|
||||||
setupInterfaceScreen();
|
setupInterfaceScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.user_interface_label);
|
||||||
|
}
|
||||||
|
|
||||||
private void setupInterfaceScreen() {
|
private void setupInterfaceScreen() {
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
|
||||||
|
|
Loading…
Reference in New Issue