Completely rewrite application
Этот коммит содержится в:
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginLeft="@dimen/about_margin"
|
||||
android:layout_marginTop="@dimen/about_margin"
|
||||
android:src="@drawable/ic_launcher"
|
||||
android:contentDescription="@string/app_logo" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_margin="@dimen/about_margin"
|
||||
android:layout_toRightOf="@+id/logo"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/about_spacing"
|
||||
android:text="@string/app_name"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/about_spacing"
|
||||
android:text="@string/about_description" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/about_spacing"
|
||||
android:text="@string/about_license" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/about_spacing"
|
||||
android:text="@string/about_web"
|
||||
android:autoLink="web" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,118 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:padding="20sp"
|
||||
>
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Server address"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/edit_address"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textUri"
|
||||
/>
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="10sp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Server port"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/edit_port"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
/>
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="10sp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Frequency in seconds"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/edit_period"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
/>
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="10sp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Device identifier"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/edit_device"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="none"
|
||||
android:editable="false"
|
||||
android:focusable="false"
|
||||
/>
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="10sp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Service status"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/edit_service"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="none"
|
||||
android:editable="false"
|
||||
android:focusable="false"
|
||||
/>
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="10sp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Connection status"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/edit_connection"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="none"
|
||||
android:editable="false"
|
||||
android:focusable="false"
|
||||
/>
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="20sp"
|
||||
/>
|
||||
<ToggleButton
|
||||
android:id="@+id/button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textOn="ON"
|
||||
android:textOff="OFF"
|
||||
android:onClick="onButtonClick"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<ListView
|
||||
android:id="@android:id/list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/about"
|
||||
android:title="@string/about_option"
|
||||
android:showAsAction="ifRoom" />
|
||||
</menu>
|
||||
|
||||
<item
|
||||
android:id="@+id/status"
|
||||
android:title="@string/menu_status"
|
||||
android:showAsAction="always" />
|
||||
|
||||
<item
|
||||
android:id="@+id/about"
|
||||
android:title="@string/menu_about"
|
||||
android:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/clear"
|
||||
android:title="@string/menu_clear"
|
||||
android:showAsAction="always" />
|
||||
|
||||
</menu>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="about_margin">20dp</dimen>
|
||||
<dimen name="about_spacing">15dp</dimen>
|
||||
</resources>
|
||||
@@ -1,8 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">Traccar Client</string>
|
||||
<string name="error_input">Invalid input parameters.</string>
|
||||
<string name="about_option">About</string>
|
||||
<string name="about_text">Android software GPS tracker. For more information visit:\n\nhttp://www.traccar.org</string>
|
||||
<string name="about_close">Close</string>
|
||||
<string name="app_logo">Traccar</string>
|
||||
|
||||
<string name="settings_id_title">Device identifier</string>
|
||||
<string name="settings_address_title">Server address</string>
|
||||
<string name="settings_address_summary">Domain name or IP address</string>
|
||||
<string name="settings_port_title">Server port</string>
|
||||
<string name="settings_port_summary">Tracking server TCP port</string>
|
||||
<string name="settings_interval_title">Frequency</string>
|
||||
<string name="settings_interval_summary">Messages interval in seconds</string>
|
||||
<string name="settings_debug_title">Debug mode</string>
|
||||
<string name="settings_debug_summary">Additional status messages</string>
|
||||
<string name="settings_status_title">Service status</string>
|
||||
<string name="settings_status_off">Start</string>
|
||||
<string name="settings_status_on">Stop</string>
|
||||
<string name="settings_status_off_summary">Service stopped</string>
|
||||
<string name="settings_status_on_summary">Service running</string>
|
||||
|
||||
<string name="menu_status">Status</string>
|
||||
<string name="menu_about">About</string>
|
||||
<string name="menu_clear">Clear</string>
|
||||
|
||||
<string name="about_description">Real time GPS tracker for Android devices. Compatible with Traccar Server and other tracking systems.</string>
|
||||
<string name="about_license">This application is free and open source, source code is licensed under Apache License Version 2.0 and available on GitHub.</string>
|
||||
<string name="about_web">For more information visit\nwww.traccar.org/client</string>
|
||||
|
||||
<string name="status_service_create">Service created</string>
|
||||
<string name="status_service_start">Service started</string>
|
||||
<string name="status_service_destroy">Service destroyed</string>
|
||||
<string name="status_connection_success">Connection succeeded</string>
|
||||
<string name="status_connection_fail">Connection failed</string>
|
||||
<string name="status_send_fail">Send failed</string>
|
||||
<string name="status_location_update">Location update</string>
|
||||
<string name="status_preference_update">Preference update</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<EditTextPreference
|
||||
android:key="id"
|
||||
android:title="@string/settings_id_title"
|
||||
android:enabled="false" />
|
||||
|
||||
<EditTextPreference
|
||||
android:key="address"
|
||||
android:title="@string/settings_address_title"
|
||||
android:summary="@string/settings_address_summary"
|
||||
android:defaultValue="193.193.165.166" />
|
||||
|
||||
<EditTextPreference
|
||||
android:key="port"
|
||||
android:title="@string/settings_port_title"
|
||||
android:summary="@string/settings_port_summary"
|
||||
android:numeric="integer"
|
||||
android:defaultValue="20100" />
|
||||
|
||||
<EditTextPreference
|
||||
android:key="interval"
|
||||
android:title="@string/settings_interval_title"
|
||||
android:summary="@string/settings_interval_summary"
|
||||
android:numeric="integer"
|
||||
android:defaultValue="60" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="debug"
|
||||
android:title="@string/settings_debug_title"
|
||||
android:summary="@string/settings_debug_summary"
|
||||
android:defaultValue="true"
|
||||
android:enabled="false" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="status"
|
||||
android:title="@string/settings_status_title"
|
||||
android:summaryOff="@string/settings_status_off_summary"
|
||||
android:summaryOn="@string/settings_status_on_summary"
|
||||
android:switchTextOff="@string/settings_status_off"
|
||||
android:switchTextOn="@string/settings_status_on"
|
||||
android:defaultValue="false" />
|
||||
|
||||
</PreferenceScreen>
|
||||
Ссылка в новой задаче
Block a user