- 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>
100 lines
3.3 KiB
XML
100 lines
3.3 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="match_parent"
|
|
android:orientation="vertical"
|
|
android:gravity="center"
|
|
android:padding="24dp"
|
|
android:background="#000000">
|
|
|
|
<!-- Logo/Title Section -->
|
|
<TextView
|
|
android:id="@+id/tv_title"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="🏎️ REAL RACING 3 🏎️"
|
|
android:textSize="32sp"
|
|
android:textColor="#FFFFFF"
|
|
android:textStyle="bold"
|
|
android:layout_marginBottom="8dp"/>
|
|
|
|
<TextView
|
|
android:id="@+id/tv_subtitle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Community Edition"
|
|
android:textSize="18sp"
|
|
android:textColor="#AAAAAA"
|
|
android:layout_marginBottom="48dp"/>
|
|
|
|
<!-- Offline Mode Button -->
|
|
<LinearLayout
|
|
android:id="@+id/btn_offline"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:background="#1E1E1E"
|
|
android:padding="20dp"
|
|
android:layout_marginBottom="16dp"
|
|
android:clickable="true"
|
|
android:focusable="true">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="🏠 OFFLINE MODE"
|
|
android:textSize="22sp"
|
|
android:textColor="#FFFFFF"
|
|
android:textStyle="bold"
|
|
android:layout_marginBottom="8dp"/>
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Play with unlimited currency\nand custom content"
|
|
android:textSize="14sp"
|
|
android:textColor="#AAAAAA"/>
|
|
</LinearLayout>
|
|
|
|
<!-- Online Mode Button -->
|
|
<LinearLayout
|
|
android:id="@+id/btn_online"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:background="#1E1E1E"
|
|
android:padding="20dp"
|
|
android:layout_marginBottom="32dp"
|
|
android:clickable="true"
|
|
android:focusable="true">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="🌐 ONLINE MODE"
|
|
android:textSize="22sp"
|
|
android:textColor="#FFFFFF"
|
|
android:textStyle="bold"
|
|
android:layout_marginBottom="8dp"/>
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Connect to community server\nfor multiplayer and events"
|
|
android:textSize="14sp"
|
|
android:textColor="#AAAAAA"/>
|
|
</LinearLayout>
|
|
|
|
<!-- Help Link -->
|
|
<TextView
|
|
android:id="@+id/tv_help"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="First time? Click here for help"
|
|
android:textSize="12sp"
|
|
android:textColor="#4A90E2"
|
|
android:clickable="true"
|
|
android:focusable="true"/>
|
|
|
|
</LinearLayout>
|