diff options
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/AndroidManifest.xml | 18 | ||||
-rw-r--r-- | app/src/main/java/org/traccar/manager/MainActivity.java | 42 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_main.xml | 6 | ||||
-rw-r--r-- | app/src/main/res/mipmap-hdpi/ic_launcher.png | bin | 3418 -> 3361 bytes | |||
-rw-r--r-- | app/src/main/res/mipmap-mdpi/ic_launcher.png | bin | 2206 -> 2065 bytes | |||
-rw-r--r-- | app/src/main/res/mipmap-xhdpi/ic_launcher.png | bin | 4842 -> 4780 bytes | |||
-rw-r--r-- | app/src/main/res/mipmap-xxhdpi/ic_launcher.png | bin | 7718 -> 7703 bytes | |||
-rw-r--r-- | app/src/main/res/mipmap-xxxhdpi/ic_launcher.png | bin | 0 -> 11220 bytes | |||
-rw-r--r-- | app/src/main/res/values/google_maps_api.xml | 5 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 3 | ||||
-rw-r--r-- | app/src/main/res/values/styles.xml | 4 |
11 files changed, 26 insertions, 52 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 2f2c1cd..d4bd89b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,33 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="org.traccar.manager" > + package="org.traccar.manager"> <uses-permission android:name="android.permission.INTERNET" /> - <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> - <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> - <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /> - <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> - <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" - android:theme="@style/AppTheme" > - - <meta-data - android:name="com.google.android.geo.API_KEY" - android:value="@string/google_maps_key" /> + android:theme="@style/AppTheme"> <activity - android:name=".MainActivity" - android:label="@string/title_activity_main" > + android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> - <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> + </application> </manifest> diff --git a/app/src/main/java/org/traccar/manager/MainActivity.java b/app/src/main/java/org/traccar/manager/MainActivity.java index 68d5135..c8d202d 100644 --- a/app/src/main/java/org/traccar/manager/MainActivity.java +++ b/app/src/main/java/org/traccar/manager/MainActivity.java @@ -1,36 +1,30 @@ +/* + * Copyright 2016 Anton Tananaev (anton@traccar.org) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package org.traccar.manager; +import android.app.Activity; import android.os.Bundle; -import android.support.v4.app.FragmentActivity; -import com.google.android.gms.maps.CameraUpdateFactory; -import com.google.android.gms.maps.GoogleMap; -import com.google.android.gms.maps.OnMapReadyCallback; -import com.google.android.gms.maps.SupportMapFragment; -import com.google.android.gms.maps.model.LatLng; -import com.google.android.gms.maps.model.MarkerOptions; - -public class MainActivity extends FragmentActivity implements OnMapReadyCallback { - - private GoogleMap map; +public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - // Obtain the SupportMapFragment and get notified when the map is ready to be used. - SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager() - .findFragmentById(R.id.map); - mapFragment.getMapAsync(this); - } - - @Override - public void onMapReady(GoogleMap googleMap) { - map = googleMap; - - LatLng sydney = new LatLng(-34, 151); - map.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney")); - map.moveCamera(CameraUpdateFactory.newLatLng(sydney)); } } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 1e523d2..3d47df2 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,9 +1,7 @@ -<fragment +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:id="@+id/map" - android:name="com.google.android.gms.maps.SupportMapFragment" + android:id="@android:id/content" tools:context=".MainActivity" /> - diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png Binary files differindex cde69bc..56d818d 100644 --- a/app/src/main/res/mipmap-hdpi/ic_launcher.png +++ b/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png Binary files differindex c133a0c..dcb1f79 100644 --- a/app/src/main/res/mipmap-mdpi/ic_launcher.png +++ b/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png Binary files differindex bfa42f0..4c368f4 100644 --- a/app/src/main/res/mipmap-xhdpi/ic_launcher.png +++ b/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png Binary files differindex 324e72c..2bfb40b 100644 --- a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +++ b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000..edf7f6f --- /dev/null +++ b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/app/src/main/res/values/google_maps_api.xml b/app/src/main/res/values/google_maps_api.xml deleted file mode 100644 index 2c7a04f..0000000 --- a/app/src/main/res/values/google_maps_api.xml +++ /dev/null @@ -1,5 +0,0 @@ -<resources> - - <string name="google_maps_key" translatable="false" templateMergeStrategy="preserve">AIzaSyAMQYClXhA2tZdfCzu9EK9wUDWtCRQ6Bj0</string> - -</resources> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6b4abc1..482efed 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,4 +1,3 @@ <resources> - <string name="app_name">TraccarManager</string> - <string name="title_activity_main">Main</string> + <string name="app_name">Traccar Manager</string> </resources> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 766ab99..44ec70b 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,8 +1,6 @@ <resources> - <!-- Base application theme. --> - <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> - <!-- Customize your theme here. --> + <style name="AppTheme" parent="android:Theme.Light.NoTitleBar"> </style> </resources> |