- NEW: ServerSelectionActivity as main launcher - Beautiful startup menu (Offline/Online modes) - URL input dialog with custom port support - Quick select presets (Official/Local/Custom) - 'Remember my choice' persistence - Help dialog for first-time users - NEW: ServerManager for Nimble SDK URL overrides - Automatically configures all EA endpoints - Supports custom ports (:8443, :3000, etc.) - Comprehensive error handling and logging - Modified MainActivity to read Intent extras - Reads mode (online/offline) from ServerSelectionActivity - Configures custom server before game init - Maintains backward compatibility - Modified AndroidManifest.xml - ServerSelectionActivity is now LAUNCHER - UnpackAssetsActivity no longer exports MAIN intent - Intent extras preserved through activity chain - Added XML layouts - activity_server_selection.xml (main menu UI) - dialog_server_input.xml (URL input dialog) - Server URL format: https://domain.com:port - SharedPreferences: rr3_server_config.xml Ready for Phase 2: Community server backend implementation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
87 lines
2.8 KiB
XML
87 lines
2.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="24dp">
|
|
|
|
<!-- Title -->
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="🌐 Enter Server Address"
|
|
android:textSize="20sp"
|
|
android:textStyle="bold"
|
|
android:layout_marginBottom="16dp"/>
|
|
|
|
<!-- Server URL Input -->
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Server URL:"
|
|
android:textSize="14sp"
|
|
android:layout_marginBottom="8dp"/>
|
|
|
|
<EditText
|
|
android:id="@+id/et_server_url"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="https://rr3.barrer.net:8443"
|
|
android:inputType="textUri"
|
|
android:padding="12dp"
|
|
android:background="#F0F0F0"
|
|
android:layout_marginBottom="16dp"/>
|
|
|
|
<!-- Quick Select Options -->
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Quick Select:"
|
|
android:textSize="14sp"
|
|
android:layout_marginBottom="8dp"/>
|
|
|
|
<RadioGroup
|
|
android:id="@+id/rg_server_preset"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="16dp">
|
|
|
|
<RadioButton
|
|
android:id="@+id/rb_official"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Official Community (rr3.barrer.net)"
|
|
android:checked="true"/>
|
|
|
|
<RadioButton
|
|
android:id="@+id/rb_local"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Local Server (localhost:3000)"/>
|
|
|
|
<RadioButton
|
|
android:id="@+id/rb_custom"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Custom Server"/>
|
|
</RadioGroup>
|
|
|
|
<!-- Remember Choice Checkbox -->
|
|
<CheckBox
|
|
android:id="@+id/cb_remember"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Remember my choice"
|
|
android:checked="true"
|
|
android:layout_marginBottom="16dp"/>
|
|
|
|
<!-- Info Text -->
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Note: Custom ports are supported (e.g., :8443)\nMake sure your server is running before connecting."
|
|
android:textSize="12sp"
|
|
android:textColor="#666666"/>
|
|
|
|
</LinearLayout>
|