mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-27 06:17:27 +00:00
Added preliminary googleMap to windFragment, did some redesigning
This commit is contained in:
1 parent
c362606dfe
commit
decda71fd3
5 files changed
+75
-50
No files matched your search
@@ -28,6 +28,8 @@
|
||||
<uses-feature android:name="android.hardware.camera" />
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" />
|
||||
|
||||
|
||||
|
||||
<application
|
||||
android:name=".RaceApplication"
|
||||
android:allowBackup="true"
|
||||
@@ -38,7 +40,9 @@
|
||||
<meta-data
|
||||
android:name="com.google.android.gms.version"
|
||||
android:value="@integer/google_play_services_version" />
|
||||
|
||||
<meta-data
|
||||
android:name="com.google.android.maps.v2.API_KEY"
|
||||
android:value="kVQfITLDsFnofOQpkUtuaMKxeqitPSBRHVNmGZSl"/>
|
||||
<activity
|
||||
android:name=".ui.activities.LoginActivity"
|
||||
android:finishOnTaskLaunch="true"
|
||||
|
||||
@@ -13,9 +13,10 @@
|
||||
android:layout_margin="12dp"
|
||||
android:layout_weight="0.6"
|
||||
android:background="@color/background_material_light"
|
||||
android:orientation="horizontal" >
|
||||
android:orientation="horizontal"
|
||||
android:baselineAligned="false" >
|
||||
|
||||
<LinearLayout
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
@@ -26,12 +27,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/enter_wind_direction"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/wind_direction_degrees" />
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextWindDirection"
|
||||
@@ -40,7 +36,7 @@
|
||||
android:hint="@string/in_degrees"
|
||||
android:inputType="numberDecimal"
|
||||
android:minWidth="200dp"
|
||||
android:textSize="24sp" />
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.sap.sailing.racecommittee.app.ui.views.CompassView
|
||||
android:id="@+id/compassView"
|
||||
@@ -56,7 +52,7 @@
|
||||
android:background="@color/white" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.33"
|
||||
@@ -67,12 +63,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/enter_wind_speed"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/wind_speed_knots" />
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextWindSpeed"
|
||||
@@ -91,23 +82,6 @@
|
||||
android:padding="10dp"
|
||||
android:progress="100" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="9dp"
|
||||
android:text="@string/check_all_data"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textWaitingForGPS"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/waiting_for_gps"
|
||||
android:textAppearance="@style/TextAppearance.Welter.TitleLabel"
|
||||
android:textColor="@color/welter_red"
|
||||
android:textSize="24sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -115,17 +89,53 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.3"
|
||||
android:layout_margin="12dp"
|
||||
android:orientation="horizontal">
|
||||
android:padding="8dp"
|
||||
android:background="@color/background_material_light"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="6dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:text="@string/enter_wind_gps"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textWaitingForGPS"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:text="@string/waiting_for_gps"
|
||||
android:textColor="@color/red"
|
||||
android:textSize="16sp"
|
||||
android:textAllCaps="true" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/windMap"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="fill_parent"
|
||||
|
||||
android:name="com.google.android.gms.maps.MapFragment"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/btn_wind_send"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.1"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="12dp"
|
||||
android:text="@string/store_wind" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_wind_send"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.1"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="8dp"
|
||||
android:text="@string/store_wind" />
|
||||
</LinearLayout>
|
||||
@@ -114,9 +114,9 @@
|
||||
<string name="results_mail_subject">[Race Committee] %s</string>
|
||||
<string name="results_mail_body">Ergebnislisten für Rennen %s sind angehängt.</string>
|
||||
<string name="wind_direction_degrees">Windrichtung (Grad)</string>
|
||||
<string name="wind_speed_knots">Windgeschwindigkeit (Knoten)</string>
|
||||
<string name="enter_wind_direction">1. Windrichtung eingeben</string>
|
||||
<string name="enter_wind_speed">2. Windgeschwindigkeit eingeben</string>
|
||||
<string name="enter_wind_direction">Windrichtung (kommt von)</string>
|
||||
<string name="enter_wind_speed">Geschwindigkeit (kn)</string>
|
||||
<string name="enter_wind_gps">Messposition</string>
|
||||
<string name="check_all_data">3. Eingaben prüfen</string>
|
||||
<string name="in_degrees">in Grad</string>
|
||||
<string name="in_knots">in Knoten</string>
|
||||
|
||||
@@ -116,9 +116,9 @@
|
||||
<string name="results_mail_subject">[Race Committee] %s</string>
|
||||
<string name="results_mail_body">Results for race %s are attached.</string>
|
||||
<string name="wind_direction_degrees">Wind direction from (degrees)</string>
|
||||
<string name="wind_speed_knots">Wind speed (knots)</string>
|
||||
<string name="enter_wind_direction">1. Enter the wind direction</string>
|
||||
<string name="enter_wind_speed">2. Enter the wind speed</string>
|
||||
<string name="enter_wind_direction">Direction (from)</string>
|
||||
<string name="enter_wind_speed">Speed (kts)</string>
|
||||
<string name="enter_wind_gps">Wind Measuring Position</string>
|
||||
<string name="check_all_data">3. Check all data</string>
|
||||
<string name="in_degrees">in degrees</string>
|
||||
<string name="in_knots">in knots</string>
|
||||
|
||||
+11
@@ -7,6 +7,7 @@ import java.util.Locale;
|
||||
|
||||
import android.app.Fragment;
|
||||
import android.app.FragmentManager.BackStackEntry;
|
||||
import android.app.FragmentTransaction;
|
||||
import android.content.Intent;
|
||||
import android.location.Location;
|
||||
import android.os.Bundle;
|
||||
@@ -188,6 +189,16 @@ public class WindFragment extends LoggableFragment implements CompassDirectionLi
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView()
|
||||
{
|
||||
super.onDestroyView();
|
||||
Fragment fragment = (getFragmentManager().findFragmentById(R.id.windMap));
|
||||
FragmentTransaction ft = getActivity().getFragmentManager().beginTransaction();
|
||||
ft.remove(fragment);
|
||||
ft.commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(Location location) {
|
||||
currentLocation = location;
|
||||
|
||||
Reference in new issue
Block a user