Show Widget Settings if settings button was clicked

This commit is contained in:
serso
2016-01-06 15:07:08 +01:00
parent 640580a3d8
commit 926909a62d
8 changed files with 43 additions and 32 deletions

View File

@@ -51,13 +51,17 @@ public class PreferencesActivity extends BaseActivity implements SharedPreferenc
return preferences;
}
public static void start(@Nonnull Context context, @XmlRes int preference, @StringRes int title) {
public static void showPlotPreferences(@Nonnull Context context) {
start(context, R.xml.preferences_plot, R.string.prefs_graph_screen_title);
}
private static void start(@Nonnull Context context, @XmlRes int preference, @StringRes int title) {
final Intent intent = makeIntent(context, preference, title);
context.startActivity(intent);
}
@Nonnull
static Intent makeIntent(@Nonnull Context context, @XmlRes int preference, @StringRes int title) {
public static Intent makeIntent(@Nonnull Context context, @XmlRes int preference, @StringRes int title) {
final Intent intent = new Intent(context, PreferencesActivity.class);
intent.putExtra(EXTRA_PREFERENCE, preference);
if (title != 0) {