Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
SettingsUi.preview(ctx, list, getString(R.string.k2go_settings_help), null);
SettingsUi.row(ctx, list, getString(R.string.k2go_settings_send_feedback), null, null, v -> openFeedback());
SettingsUi.row(ctx, list, getString(R.string.k2go_settings_about), null, versionName(), v -> openSub("about"));
// ADFA-4968: promote the System block (was inside Advanced) to the top level, below About.
SettingsUi.sectionHeader(ctx, list, getString(R.string.k2go_settings_sec_system));
SettingsUi.row(ctx, list, getString(R.string.k2go_settings_module_mgmt), getString(R.string.k2go_settings_module_mgmt_sub), null, v -> {
android.content.Intent i = new android.content.Intent(ctx, SetupLibraryActivity.class);
i.putExtra(SetupLibraryActivity.EXTRA_MODULE_MGMT, true);
ctx.startActivity(i);
});
SettingsUi.row(ctx, list, getString(R.string.k2go_settings_backups), getString(R.string.k2go_br_row_sub), null, v -> {
android.content.Intent i = new android.content.Intent(ctx, SetupLibraryActivity.class);
i.putExtra(SetupLibraryActivity.EXTRA_BACKUP_RESTORE, true);
ctx.startActivity(i);
});
SettingsUi.row(ctx, list, getString(R.string.k2go_settings_advanced), getString(R.string.k2go_settings_advanced_sub), null, v -> openSub("advanced"));

buildFooter(ctx, footer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,21 +204,9 @@ private void openTerminal(Context ctx) {

// ---- Advanced (power-user features — preview for now) ----
private void buildAdvanced(Context ctx, LinearLayout list) {
// ADFA-4968: System (Module management, Backups & recovery) moved to the Settings top level.
// With System gone the DEVELOPER header is redundant, so Advanced is just the developer tools.
SettingsUi.caption(ctx, list, getString(R.string.k2go_settings_power_users));
SettingsUi.sectionHeader(ctx, list, getString(R.string.k2go_settings_sec_system));
SettingsUi.row(ctx, list, getString(R.string.k2go_settings_module_mgmt), getString(R.string.k2go_settings_module_mgmt_sub), null, v -> {
// ADFA-4842: entry-point-agnostic launch of the module hub (also reachable from Get More).
android.content.Intent i = new android.content.Intent(ctx, SetupLibraryActivity.class);
i.putExtra(SetupLibraryActivity.EXTRA_MODULE_MGMT, true);
ctx.startActivity(i);
});
SettingsUi.row(ctx, list, getString(R.string.k2go_settings_backups), getString(R.string.k2go_br_row_sub), null, v -> {
// ADFA-4952: Backup & restore hub (SAF, one step per direction).
android.content.Intent i = new android.content.Intent(ctx, SetupLibraryActivity.class);
i.putExtra(SetupLibraryActivity.EXTRA_BACKUP_RESTORE, true);
ctx.startActivity(i);
});
SettingsUi.sectionHeader(ctx, list, getString(R.string.k2go_settings_sec_developer));
SettingsUi.preview(ctx, list, "ADB", null);
SettingsUi.row(ctx, list, getString(R.string.k2go_settings_network_dns), getString(R.string.setup_dns_hint), null, v -> openSub("dns"));
SettingsUi.row(ctx, list, "Terminal (Debian)", null, null, v -> openTerminal(ctx));
Expand Down
5 changes: 5 additions & 0 deletions controller/app/src/main/res/layout/fragment_k2go_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:background="@color/k2go_paper">

<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="@string/k2go_tab_settings"
android:paddingLeft="16dp" android:paddingRight="16dp" android:paddingTop="14dp" android:paddingBottom="6dp"
android:textAppearance="?attr/textAppearanceHeadlineSmall" android:textColor="@color/k2go_ink" />

<ScrollView android:layout_width="match_parent" android:layout_height="0dp"
android:layout_weight="1" android:fillViewport="true">
<LinearLayout android:id="@+id/k2go_settings_list" android:layout_width="match_parent"
Expand Down
2 changes: 1 addition & 1 deletion controller/app/src/main/res/values/strings_k2go.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<string name="k2go_settings_theme">Theme</string>
<string name="k2go_settings_help">Help</string>
<string name="k2go_settings_send_feedback">Send feedback</string>
<string name="k2go_settings_advanced_sub">System, backups, developer tools</string>
<string name="k2go_settings_advanced_sub">Developer tools</string>
<string name="k2go_theme_light">Light</string>
<string name="k2go_theme_system">Follow system</string>
<string name="k2go_theme_dark">Dark</string>
Expand Down
Loading