mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-28 23:07:11 +00:00
Applied code formatting.
Used code formatter provided by Siegmund. Applied code formatting to tracking app, buoy positioning app, android shared.
This commit is contained in:
1 parent
e28dec03fc
commit
8626f67187
168 files changed
+4791
-4971
No files matched your search
@@ -1,8 +1,10 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.sap.sailing.android.shared"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
package="com.sap.sailing.android.shared"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
|
||||
<uses-sdk
|
||||
android:minSdkVersion="14"
|
||||
android:targetSdkVersion="21"/>
|
||||
|
||||
</manifest>
|
||||
@@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.sap.sailing</groupId>
|
||||
<artifactId>mobile</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.sap.sailing.android.shared</artifactId>
|
||||
<packaging>apklib</packaging>
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.sap.sailing</groupId>
|
||||
<artifactId>mobile</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.sap.sailing.android.shared</artifactId>
|
||||
<packaging>apklib</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.sap.sailing</groupId>
|
||||
<artifactId>org.json.simple</artifactId>
|
||||
@@ -86,12 +86,12 @@
|
||||
<groupId>android</groupId>
|
||||
<artifactId>android</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
|
||||
<artifactId>android-maven-plugin</artifactId>
|
||||
@@ -101,6 +101,6 @@
|
||||
</sdk>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -1,5 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<gradient android:startColor="#FF216AA6" android:endColor="#FF184C77" android:angle="90"/>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:startColor="#FF216AA6"
|
||||
android:endColor="#FF184C77"
|
||||
android:angle="90"/>
|
||||
</shape>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="#00FFFFFF" />
|
||||
<solid android:color="#00FFFFFF"/>
|
||||
|
||||
<stroke
|
||||
android:width="0.5dip"
|
||||
android:color="#ffffff" />
|
||||
android:color="#ffffff"/>
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="5dip"
|
||||
android:bottomRightRadius="5dip"
|
||||
android:topLeftRadius="5dip"
|
||||
android:topRightRadius="5dip" />
|
||||
android:topRightRadius="5dip"/>
|
||||
|
||||
</shape>
|
||||
@@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="@color/white_less_transparent" />
|
||||
<solid android:color="@color/white_less_transparent"/>
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/white" />
|
||||
android:color="@color/white"/>
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="5dip"
|
||||
android:bottomRightRadius="5dip"
|
||||
android:topLeftRadius="5dip"
|
||||
android:topRightRadius="5dip" />
|
||||
android:topRightRadius="5dip"/>
|
||||
|
||||
</shape>
|
||||
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="@color/sap_yellow" />
|
||||
<solid android:color="@color/sap_yellow"/>
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="5dip"
|
||||
android:bottomRightRadius="5dip"
|
||||
android:topLeftRadius="5dip"
|
||||
android:topRightRadius="5dip" />
|
||||
android:topRightRadius="5dip"/>
|
||||
</shape>
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false"
|
||||
android:drawable="@drawable/spinner_disabled_holo_dark" />
|
||||
android:drawable="@drawable/spinner_disabled_holo_dark"/>
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/spinner_pressed_holo_dark" />
|
||||
android:drawable="@drawable/spinner_pressed_holo_dark"/>
|
||||
<item android:state_pressed="false" android:state_focused="true"
|
||||
android:drawable="@drawable/spinner_focused_holo_dark" />
|
||||
<item android:drawable="@drawable/spinner_default_holo_dark" />
|
||||
android:drawable="@drawable/spinner_focused_holo_dark"/>
|
||||
<item android:drawable="@drawable/spinner_default_holo_dark"/>
|
||||
</selector>
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:left="@dimen/tab_space"
|
||||
android:right="@dimen/tab_space">
|
||||
<shape android:shape="rectangle" >
|
||||
<shape android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="-90"
|
||||
android:endColor="@color/tabDark"
|
||||
android:startColor="@color/tabMedium" />
|
||||
android:startColor="@color/tabMedium"/>
|
||||
</shape>
|
||||
</item>
|
||||
<!--
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?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="horizontal" >
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<include
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
layout="@android:layout/simple_list_item_1" />
|
||||
layout="@android:layout/simple_list_item_1"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/array_remove_adapter_remove"
|
||||
@@ -17,6 +17,6 @@
|
||||
android:layout_weight="0"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_menu_delete_dark"
|
||||
android:contentDescription="@string/remove" />
|
||||
android:contentDescription="@string/remove"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,14 +1,14 @@
|
||||
<?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:padding="12dp" >
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
android:orientation="horizontal">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/edit_set_preference_input"
|
||||
@@ -17,21 +17,21 @@
|
||||
android:layout_weight="1"
|
||||
android:completionThreshold="1"
|
||||
android:hint="@string/enter_new_item"
|
||||
android:inputType="textNoSuggestions|textVisiblePassword" />
|
||||
android:inputType="textNoSuggestions|textVisiblePassword"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/edit_set_preference_add"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:text="@string/add" />
|
||||
android:text="@string/add"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/edit_set_preference_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/edit_set_preference_list_empty"
|
||||
@@ -40,6 +40,6 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="6dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/there_are_no_items_yet_" />
|
||||
android:text="@string/there_are_no_items_yet_"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,15 +1,16 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansToolbar
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar" >
|
||||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||
|
||||
<LinearLayout android:orientation="vertical"
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="10dp">
|
||||
@@ -30,7 +31,7 @@
|
||||
android:layout_gravity="center|start"
|
||||
android:lines="1"
|
||||
android:singleLine="true"
|
||||
android:textSize="12sp" />
|
||||
android:textSize="12sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -40,6 +41,6 @@
|
||||
android:id="@+id/content_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar" />
|
||||
android:layout_below="@id/toolbar"/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/homeBackground"
|
||||
@@ -11,7 +11,7 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:contentDescription="@string/empty"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/working_title" />
|
||||
android:src="@drawable/working_title"/>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
@@ -30,7 +30,7 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center"
|
||||
android:text="@string/scan_hint"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansButton
|
||||
@@ -46,7 +46,7 @@
|
||||
android:text="@string/scan_qr"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansButton
|
||||
android:id="@+id/noQrCode"
|
||||
@@ -60,7 +60,7 @@
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:text="@string/no_qr_code"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp" />
|
||||
android:textSize="18sp"/>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listRegatta"
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansToolbar
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar" >
|
||||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="0dp" >
|
||||
android:padding="0dp">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/toolbar_title"
|
||||
@@ -22,7 +22,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:lines="1"
|
||||
android:singleLine="true"
|
||||
android:textSize="16sp" />
|
||||
android:textSize="16sp"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/toolbar_subtitle"
|
||||
@@ -31,7 +31,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:lines="1"
|
||||
android:singleLine="true"
|
||||
android:textSize="12sp" />
|
||||
android:textSize="12sp"/>
|
||||
</LinearLayout>
|
||||
</com.sap.sailing.android.shared.ui.customviews.OpenSansToolbar>
|
||||
|
||||
@@ -40,14 +40,14 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/title_page_indicator"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:orientation="vertical" >
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/tracking_linear_layout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="0dp" >
|
||||
android:padding="0dp">
|
||||
</RelativeLayout>
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
@@ -55,33 +55,33 @@
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
android:layout_weight="1"/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.viewpagerindicator.CirclePageIndicator
|
||||
<com.viewpagerindicator.CirclePageIndicator
|
||||
android:id="@+id/title_page_indicator"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:paddingBottom="10dp"
|
||||
android:background="@color/black"
|
||||
android:paddingTop="10dp" />
|
||||
android:paddingTop="10dp"/>
|
||||
|
||||
|
||||
<!-- <FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar" >
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/content_frame"
|
||||
<!-- <FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar" >
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/hud_content_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</FrameLayout> -->
|
||||
<FrameLayout
|
||||
android:id="@+id/content_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/hud_content_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</FrameLayout> -->
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -5,14 +5,15 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansToolbar
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansToolbar
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar" >
|
||||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||
|
||||
<LinearLayout android:orientation="vertical"
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="10dp">
|
||||
@@ -33,21 +34,21 @@
|
||||
android:layout_gravity="center"
|
||||
android:lines="1"
|
||||
android:singleLine="true"
|
||||
android:textSize="12sp" />
|
||||
android:textSize="12sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.sap.sailing.android.shared.ui.customviews.OpenSansToolbar>
|
||||
|
||||
<View
|
||||
android:id="@+id/top_bar"
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="4dp"
|
||||
android:background="@color/sap_yellow" />
|
||||
android:background="@color/sap_yellow"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/content_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -5,7 +5,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/colorPrimary"
|
||||
tools:ignore="Overdraw" >
|
||||
tools:ignore="Overdraw">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/nextPage"
|
||||
@@ -20,7 +20,7 @@
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginRight="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/regattaName"
|
||||
@@ -34,6 +34,6 @@
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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:background="@color/colorPrimary"
|
||||
tools:ignore="Overdraw">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorPrimary"
|
||||
tools:ignore="Overdraw">
|
||||
|
||||
<View
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="4dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@color/sap_yellow" />
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="4dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@color/sap_yellow"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -21,6 +21,6 @@
|
||||
android:textSize="16sp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/your_regattas" />
|
||||
android:text="@string/your_regattas"/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,98 +1,99 @@
|
||||
<?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="fill_parent"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/system_information_application_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/application_information"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/system_information_application_identifier_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:text="@string/application_identifier"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
<TextView
|
||||
android:id="@+id/system_information_application_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/application_information"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/system_information_application_identifier"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/empty" />
|
||||
<TextView
|
||||
android:id="@+id/system_information_application_identifier_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:text="@string/application_identifier"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/system_information_application_version_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:text="@string/application_version"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
<TextView
|
||||
android:id="@+id/system_information_application_identifier"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/empty"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/system_information_application_version"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/empty" />
|
||||
<TextView
|
||||
android:id="@+id/system_information_application_version_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:text="@string/application_version"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/system_information_application_install_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:text="@string/application_install_date"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
<TextView
|
||||
android:id="@+id/system_information_application_version"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/empty"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/system_information_application_install"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/empty" />
|
||||
<TextView
|
||||
android:id="@+id/system_information_application_install_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:text="@string/application_install_date"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/system_information_persistence_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"
|
||||
android:text="@string/persistence_information"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
<TextView
|
||||
android:id="@+id/system_information_application_install"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/empty"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/system_information_persistence_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:text="@string/empty" />
|
||||
<TextView
|
||||
android:id="@+id/system_information_persistence_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"
|
||||
android:text="@string/persistence_information"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/system_information_persistence_waiting_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:text="@string/persistence_waiting_events"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
<TextView
|
||||
android:id="@+id/system_information_persistence_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:text="@string/empty"/>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/system_information_persistence_waiting"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"
|
||||
android:fadeScrollbars="false" />
|
||||
<TextView
|
||||
android:id="@+id/system_information_persistence_waiting_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:text="@string/persistence_waiting_events"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/system_information_persistence_clear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/persistence_waiting_clear_events"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
<ListView
|
||||
android:id="@+id/system_information_persistence_waiting"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"
|
||||
android:fadeScrollbars="false"/>
|
||||
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/system_information_persistence_clear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/persistence_waiting_clear_events"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"/>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto" >
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/options_menu_live"
|
||||
|
||||
@@ -20,15 +20,15 @@
|
||||
<!-- QR Code -->
|
||||
<string name="notify_user_db_operation_failed">Fehler: Datenbank-Operation ist fehlgeschlagen.</string>
|
||||
<string name="no_qr_code_popup_title">Kein QR-Code?</string>
|
||||
<string name="no_qr_code_popup_message">Bitte kontaktieren Sie die Rennleitung, falls Sie keinen QR-Code erhalten haben.</string>
|
||||
<string name="error_play_store_and_scanning_not_available">"PlayStore und BarcodeScanner-App nicht verfügbar."</string>
|
||||
<string name="scanning_cancelled">Scan abgebrochen</string>
|
||||
<string name="error_scanning_qrcode">Fehler beim Scannen des QR-Codes {result-code}</string>
|
||||
<string name="notify_user_api_call_failed">Bei der Kommunikation mit dem Server ist ein Fehler aufgetreten. Bitte versuchen Sie es noch einmal.</string>
|
||||
<string name="please_wait">Bitte warten</string>
|
||||
<string name="error_invalid_qr_code">Ungültiger QR-Code</string>
|
||||
<string name="no_qr_code_popup_message">Bitte kontaktieren Sie die Rennleitung, falls Sie keinen QR-Code erhalten haben.</string>
|
||||
<string name="error_play_store_and_scanning_not_available">"PlayStore und BarcodeScanner-App nicht verfügbar."</string>
|
||||
<string name="scanning_cancelled">Scan abgebrochen</string>
|
||||
<string name="error_scanning_qrcode">Fehler beim Scannen des QR-Codes {result-code}</string>
|
||||
<string name="notify_user_api_call_failed">Bei der Kommunikation mit dem Server ist ein Fehler aufgetreten. Bitte versuchen Sie es noch einmal.</string>
|
||||
<string name="please_wait">Bitte warten</string>
|
||||
<string name="error_invalid_qr_code">Ungültiger QR-Code</string>
|
||||
|
||||
<!-- Regatta -->
|
||||
<!-- Regatta -->
|
||||
<string name="your_regattas">Ihre Regattas:</string>
|
||||
<string name="options_refresh">Aktualisieren</string>
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<declare-styleable name="SignalQualityIndicatorView">
|
||||
<attr name="signalQuality" format="enum">
|
||||
<enum name="none" value="0"/>
|
||||
<enum name="poor" value="2"/>
|
||||
<enum name="good" value="3"/>
|
||||
<enum name="great" value="4"/>
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
<attr name="signalQuality" format="enum">
|
||||
<enum name="none" value="0"/>
|
||||
<enum name="poor" value="2"/>
|
||||
<enum name="good" value="3"/>
|
||||
<enum name="great" value="4"/>
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
@@ -27,20 +27,20 @@
|
||||
<color name="tabDark">#CBCBCC</color>
|
||||
-->
|
||||
<color name="tabMedium">#2B2B2B</color>
|
||||
<color name="tabDark">#000000</color>
|
||||
<color name="tabDark">#000000</color>
|
||||
|
||||
<color name="tabTransparent">#10ffffff</color>
|
||||
<color name="welter_red">#ffff0000</color>
|
||||
<color name="welter_yellow">#ffffff00</color>
|
||||
<color name="welter_green">#ff00ff00</color>
|
||||
<color name="welter_blue">#ff0000ff</color>
|
||||
<color name="tabTransparent">#10ffffff</color>
|
||||
<color name="welter_red">#ffff0000</color>
|
||||
<color name="welter_yellow">#ffffff00</color>
|
||||
<color name="welter_green">#ff00ff00</color>
|
||||
<color name="welter_blue">#ff0000ff</color>
|
||||
|
||||
<color name="black">#000000</color>
|
||||
<color name="black_transparent">#55000000</color>
|
||||
<color name="black">#000000</color>
|
||||
<color name="black_transparent">#55000000</color>
|
||||
<color name="black_slightly_transparent">#D8000000</color>
|
||||
<color name="white">#FFFFFF</color>
|
||||
<color name="white_less_transparent">#CCFFFFFF</color>
|
||||
<color name="sap_green">#8AB54E</color>
|
||||
<color name="white">#FFFFFF</color>
|
||||
<color name="white_less_transparent">#CCFFFFFF</color>
|
||||
<color name="sap_green">#8AB54E</color>
|
||||
<color name="sap_red">#E94A1B</color>
|
||||
<color name="sap_yellow">#EEAA29</color>
|
||||
<color name="gray">#333333</color>
|
||||
|
||||
@@ -35,15 +35,15 @@
|
||||
|
||||
<!-- QR Code -->
|
||||
<string name="notify_user_db_operation_failed">Error: Database operation has failed.</string>
|
||||
<string name="no_qr_code_popup_title">No QR-Code?</string>
|
||||
<string name="no_qr_code_popup_message">Please contact race management if you have not received a QR-Code.</string>
|
||||
<string name="error_play_store_and_scanning_not_available">"PlayStore and Scanning not available."</string>
|
||||
<string name="scanning_cancelled">Scanning cancelled</string>
|
||||
<string name="error_scanning_qrcode">Error scanning QR-Code {result-code}</string>
|
||||
<string name="notify_user_api_call_failed">An error occurred while contacting the server. Please try again.</string>
|
||||
<string name="please_wait">Please wait</string>
|
||||
<string name="error_invalid_qr_code">Invalid QR-Code</string>
|
||||
<string name="checkin_digest" translatable="false">CheckinDigest</string>
|
||||
<string name="leaderboard_name" translatable="false">leaderboard_name</string>
|
||||
<string name="mark_id" translatable="false">mark_id</string>
|
||||
<string name="no_qr_code_popup_title">No QR-Code?</string>
|
||||
<string name="no_qr_code_popup_message">Please contact race management if you have not received a QR-Code.</string>
|
||||
<string name="error_play_store_and_scanning_not_available">"PlayStore and Scanning not available."</string>
|
||||
<string name="scanning_cancelled">Scanning cancelled</string>
|
||||
<string name="error_scanning_qrcode">Error scanning QR-Code {result-code}</string>
|
||||
<string name="notify_user_api_call_failed">An error occurred while contacting the server. Please try again.</string>
|
||||
<string name="please_wait">Please wait</string>
|
||||
<string name="error_invalid_qr_code">Invalid QR-Code</string>
|
||||
<string name="checkin_digest" translatable="false">CheckinDigest</string>
|
||||
<string name="leaderboard_name" translatable="false">leaderboard_name</string>
|
||||
<string name="mark_id" translatable="false">mark_id</string>
|
||||
</resources>
|
||||
@@ -7,9 +7,9 @@
|
||||
</style>
|
||||
-->
|
||||
|
||||
<style name="MyDropDownNav" parent="@android:style/Widget.Holo.Light.Spinner">
|
||||
<item name="android:background">@drawable/spinner_background_holo_dark</item>
|
||||
</style>
|
||||
<style name="MyDropDownNav" parent="@android:style/Widget.Holo.Light.Spinner">
|
||||
<item name="android:background">@drawable/spinner_background_holo_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Welter.ActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
|
||||
<item name="android:background">@drawable/title_bar_bg</item>
|
||||
|
||||
+4
-3
@@ -32,10 +32,11 @@ public class LoggableApplication extends Application {
|
||||
super.onCreate();
|
||||
ExLog.i(this, TAG, "Application is starting.");
|
||||
|
||||
Thread.setDefaultUncaughtExceptionHandler(new LoggingExceptionHandler(Thread
|
||||
.getDefaultUncaughtExceptionHandler(), this));
|
||||
Thread.setDefaultUncaughtExceptionHandler(
|
||||
new LoggingExceptionHandler(Thread.getDefaultUncaughtExceptionHandler(), this));
|
||||
|
||||
LifecycleLogger.enableLifecycleLogging(PrefUtils.getBoolean(this, R.string.preference_enableLifecycleLogging_key,
|
||||
LifecycleLogger.enableLifecycleLogging(PrefUtils
|
||||
.getBoolean(this, R.string.preference_enableLifecycleLogging_key,
|
||||
R.bool.preference_enableLifecycleLogging_default));
|
||||
stringContext = new StringContext(new WeakReference<Context>(getApplicationContext()));
|
||||
}
|
||||
|
||||
+1
-2
@@ -19,8 +19,7 @@ public class StringContext {
|
||||
/**
|
||||
* Return a localized string from the application's package's default string table.
|
||||
*
|
||||
* @param resId
|
||||
* Resource id for the string
|
||||
* @param resId Resource id for the string
|
||||
* @return the string
|
||||
*/
|
||||
public final String getString(int resId) {
|
||||
|
||||
+4
-4
@@ -2,8 +2,8 @@ package com.sap.sailing.android.shared.data;
|
||||
|
||||
public class LeaderboardInfo {
|
||||
|
||||
public String name;
|
||||
public String checkinDigest;
|
||||
public int rowId;
|
||||
public String serverUrl;
|
||||
public String name;
|
||||
public String checkinDigest;
|
||||
public int rowId;
|
||||
public String serverUrl;
|
||||
}
|
||||
+1
-1
@@ -26,7 +26,7 @@ public class FileBasedHttpGetRequest extends HttpGetRequest {
|
||||
|
||||
@Override
|
||||
protected InputStream readAndCopyResponse(HttpURLConnection connection, BufferedInputStream inputStream)
|
||||
throws IOException {
|
||||
throws IOException {
|
||||
FileOutputStream outputStream = new FileOutputStream(outputFile);
|
||||
try {
|
||||
if (!readResponse(connection, inputStream, outputStream)) {
|
||||
|
||||
-2
@@ -18,8 +18,6 @@ public class HttpGetRequest extends HttpRequest {
|
||||
super(url, listener, context);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected BufferedInputStream doRequest(HttpURLConnection connection) throws IOException {
|
||||
InputStream stream = connection.getInputStream();
|
||||
|
||||
+4
-4
@@ -85,8 +85,8 @@ public abstract class HttpRequest {
|
||||
responseInputStream = doRequest(connection);
|
||||
} catch (FileNotFoundException fnfe) {
|
||||
// 404 errors...
|
||||
throw new FileNotFoundException(String.format(
|
||||
"(Request %d) %s\nHTTP response code: %d.\nHTTP response body: %s.", this.hashCode(),
|
||||
throw new FileNotFoundException(String
|
||||
.format("(Request %d) %s\nHTTP response code: %d.\nHTTP response body: %s.", this.hashCode(),
|
||||
fnfe.getMessage(), connection.getResponseCode(), connection.getResponseMessage()));
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ public abstract class HttpRequest {
|
||||
}
|
||||
|
||||
protected InputStream readAndCopyResponse(HttpURLConnection connection, BufferedInputStream inputStream)
|
||||
throws IOException {
|
||||
throws IOException {
|
||||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||
if (!readResponse(connection, inputStream, outputStream)) {
|
||||
return null;
|
||||
@@ -122,7 +122,7 @@ public abstract class HttpRequest {
|
||||
}
|
||||
|
||||
protected boolean readResponse(HttpURLConnection connection, BufferedInputStream inputStream,
|
||||
OutputStream outputStream) throws IOException {
|
||||
OutputStream outputStream) throws IOException {
|
||||
int fileLength = connection.getContentLength();
|
||||
byte data[] = new byte[4096];
|
||||
long total = 0;
|
||||
|
||||
+4
-5
@@ -13,14 +13,13 @@ import android.util.Log;
|
||||
|
||||
/**
|
||||
* Simple wrapper for logging to various targets.
|
||||
*
|
||||
* <p/>
|
||||
* Log by using {@link ExLog#i(String, String)}, {@link ExLog#w(String, String)} and {@link ExLog#e(String, String)}.
|
||||
* Activate a set of targets by using {@link ExLog#activate(Target)} or {@link ExLog#activate(EnumSet)}. Currently
|
||||
* available are logging to android.util.Log LogCat and logging to a file on SD-card.
|
||||
*
|
||||
* <p/>
|
||||
* The file logging in very defensive in a way that opening and writing to the file is secured by various exception
|
||||
* handlers trying to silence all possible errors.
|
||||
*
|
||||
*/
|
||||
public class ExLog {
|
||||
private final static String TAG = "ExLogInternal";
|
||||
@@ -46,8 +45,8 @@ public class ExLog {
|
||||
if (UNIQUE_ID == null) {
|
||||
UNIQUE_ID = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);
|
||||
}
|
||||
i(context, "ID: " + String.valueOf(eventID), System.currentTimeMillis() + ":" + (UNIQUE_ID == null ? "" : UNIQUE_ID)
|
||||
+ ":" + (msg == null ? "" : msg));
|
||||
i(context, "ID: " + String.valueOf(eventID),
|
||||
System.currentTimeMillis() + ":" + (UNIQUE_ID == null ? "" : UNIQUE_ID) + ":" + (msg == null ? "" : msg));
|
||||
}
|
||||
|
||||
public static String UNIQUE_ID = null;
|
||||
|
||||
+2
-3
@@ -57,9 +57,8 @@ public class FileLoggingTask implements Runnable {
|
||||
logWriter = new BufferedWriter(new FileWriter(logFile, true));
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
Log.w(TAG,
|
||||
String.format("Unable to open writer on file %s: %s", logFile.getAbsolutePath(),
|
||||
e.getMessage()));
|
||||
Log.w(TAG, String
|
||||
.format("Unable to open writer on file %s: %s", logFile.getAbsolutePath(), e.getMessage()));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
-1
@@ -2,7 +2,6 @@ package com.sap.sailing.android.shared.logging;
|
||||
|
||||
/**
|
||||
* Stolen from API Level 14.
|
||||
*
|
||||
*/
|
||||
public interface LifecycleCallbacks {
|
||||
void onCreate(Object activityOrFragment);
|
||||
|
||||
+2
-3
@@ -24,9 +24,8 @@ public class LifecycleLogger implements LifecycleCallbacks {
|
||||
context = ((Fragment) activityOrFragment).getActivity();
|
||||
}
|
||||
if (isLifecycleLoggingEnabled) {
|
||||
ExLog.i(context, TAG,
|
||||
String.format("%s %s %s", action, activityOrFragment.getClass().getSimpleName(),
|
||||
Integer.toHexString(System.identityHashCode(activityOrFragment))));
|
||||
ExLog.i(context, TAG, String.format("%s %s %s", action, activityOrFragment.getClass().getSimpleName(),
|
||||
Integer.toHexString(System.identityHashCode(activityOrFragment))));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+8
-5
@@ -16,7 +16,7 @@ import com.sap.sailing.android.shared.logging.ExLog;
|
||||
/**
|
||||
* Informs {@link MessageSendingService} whenever connectivity is restored, so that it can start sending
|
||||
* messages again.
|
||||
*
|
||||
* <p/>
|
||||
* Register in manifest:
|
||||
* <pre>{@code
|
||||
* <receiver android:name="com.sap.sailing.android.shared.services.sending.ConnectivityChangedReceiver" >
|
||||
@@ -35,8 +35,7 @@ public class ConnectivityChangedReceiver extends BroadcastReceiver {
|
||||
*/
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
ConnectivityManager cService = (ConnectivityManager)
|
||||
context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
ConnectivityManager cService = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
NetworkInfo networkInfo = (NetworkInfo) cService.getActiveNetworkInfo();
|
||||
if (!networkInfo.isConnected())
|
||||
return;
|
||||
@@ -47,23 +46,27 @@ public class ConnectivityChangedReceiver extends BroadcastReceiver {
|
||||
|
||||
/**
|
||||
* disables the Connectivity Changed Receiver as there is currently connectivity
|
||||
*
|
||||
* @param context the context to work on
|
||||
*/
|
||||
public static void disable(Context context) {
|
||||
ComponentName receiver = new ComponentName(context, ConnectivityChangedReceiver.class);
|
||||
PackageManager packageManager = context.getPackageManager();
|
||||
packageManager.setComponentEnabledSetting(receiver, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
|
||||
packageManager.setComponentEnabledSetting(receiver, PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
|
||||
PackageManager.DONT_KILL_APP);
|
||||
ExLog.w(context, TAG, "Regained connectivity. ConnectivityChangedReceiver disabled");
|
||||
}
|
||||
|
||||
/**
|
||||
* enables the Connectivity Changed Receiver to listen on connectivity changes as there is currently no connectivity
|
||||
*
|
||||
* @param context the context to work on
|
||||
*/
|
||||
public static void enable(Context context) {
|
||||
ComponentName receiver = new ComponentName(context, ConnectivityChangedReceiver.class);
|
||||
PackageManager packageManager = context.getPackageManager();
|
||||
packageManager.setComponentEnabledSetting(receiver, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
|
||||
packageManager.setComponentEnabledSetting(receiver, PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
|
||||
PackageManager.DONT_KILL_APP);
|
||||
ExLog.w(context, TAG, "Connectivity lost. ConnectivityChangedReceiver enabled");
|
||||
}
|
||||
|
||||
|
||||
+18
-14
@@ -48,7 +48,8 @@ public class MessagePersistenceManager {
|
||||
persistMessage(url, callbackPayload, payload, callbackClass);
|
||||
}
|
||||
|
||||
private void persistMessage(String url, String callbackPayload, String payload, String callbackClass) throws UnsupportedEncodingException {
|
||||
private void persistMessage(String url, String callbackPayload, String payload, String callbackClass)
|
||||
throws UnsupportedEncodingException {
|
||||
String messageLine = getSerializedIntentForPersistence(url, callbackPayload, payload, callbackClass);
|
||||
ExLog.i(context, TAG, String.format("Persisting message \"%s\".", messageLine));
|
||||
if (persistedMessages.contains(messageLine)) {
|
||||
@@ -62,11 +63,11 @@ public class MessagePersistenceManager {
|
||||
* @param payload will be URL-encoded to ensure that the resulting string does not contain newlines
|
||||
* @throws UnsupportedEncodingException
|
||||
*/
|
||||
private String getSerializedIntentForPersistence(String url, String callbackPayload,
|
||||
String payload, String callbackClass) throws UnsupportedEncodingException {
|
||||
String messageLine = String.format("%s;%s;%s;%s", callbackPayload, URLEncoder.encode(payload,
|
||||
MessageSendingService.charsetName),
|
||||
url, callbackClass);
|
||||
private String getSerializedIntentForPersistence(String url, String callbackPayload, String payload,
|
||||
String callbackClass) throws UnsupportedEncodingException {
|
||||
String messageLine = String
|
||||
.format("%s;%s;%s;%s", callbackPayload, URLEncoder.encode(payload, MessageSendingService.charsetName), url,
|
||||
callbackClass);
|
||||
return messageLine;
|
||||
}
|
||||
|
||||
@@ -79,7 +80,8 @@ public class MessagePersistenceManager {
|
||||
removeMessage(url, callbackPayload, payload, callbackClass);
|
||||
}
|
||||
|
||||
private void removeMessage(String url, String callbackPayload, String payload, String callbackClass) throws UnsupportedEncodingException {
|
||||
private void removeMessage(String url, String callbackPayload, String payload, String callbackClass)
|
||||
throws UnsupportedEncodingException {
|
||||
if (!persistedMessages.isEmpty()) {
|
||||
ExLog.i(context, TAG, String.format("Removing message \"%s\".", payload));
|
||||
String messageLine = getSerializedIntentForPersistence(url, callbackPayload, payload, callbackClass);
|
||||
@@ -125,11 +127,11 @@ public class MessagePersistenceManager {
|
||||
String callbackClassString = lineParts[3];
|
||||
|
||||
Class<? extends ServerReplyCallback> callbackClass = null;
|
||||
if (! "null".equals(callbackClassString)) {
|
||||
if (!"null".equals(callbackClassString)) {
|
||||
try {
|
||||
@SuppressWarnings("unchecked")
|
||||
Class<? extends ServerReplyCallback> tmp =
|
||||
(Class<? extends ServerReplyCallback>) Class.forName(callbackClassString);
|
||||
Class<? extends ServerReplyCallback> tmp = (Class<? extends ServerReplyCallback>) Class
|
||||
.forName(callbackClassString);
|
||||
callbackClass = tmp;
|
||||
} catch (ClassNotFoundException e) {
|
||||
ExLog.e(context, TAG, "Could not find class for callback name: " + callbackClassString);
|
||||
@@ -138,8 +140,8 @@ public class MessagePersistenceManager {
|
||||
|
||||
// We are passing no message id, because we know it used to suppress message sending and
|
||||
// we want this message to be sent.
|
||||
Intent messageIntent = MessageSendingService.createMessageIntent(context, url, callbackPayload,
|
||||
null, payload, callbackClass);
|
||||
Intent messageIntent = MessageSendingService
|
||||
.createMessageIntent(context, url, callbackPayload, null, payload, callbackClass);
|
||||
|
||||
if (messageRestorer != null) {
|
||||
messageRestorer.restoreMessage(context, messageIntent);
|
||||
@@ -166,7 +168,8 @@ public class MessagePersistenceManager {
|
||||
fileContent = FileHandlerUtils.convertStreamToString(inputStream, context);
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
ExLog.w(context, TAG, "In Method getFileContent(): " + e.getClass().getName()+" / "+e.getMessage() + " fileContent is empty");
|
||||
ExLog.w(context, TAG, "In Method getFileContent(): " + e.getClass().getName() + " / " + e.getMessage()
|
||||
+ " fileContent is empty");
|
||||
}
|
||||
return fileContent;
|
||||
}
|
||||
@@ -214,7 +217,8 @@ public class MessagePersistenceManager {
|
||||
outputStream.write(content.getBytes());
|
||||
outputStream.close();
|
||||
} catch (IOException e) {
|
||||
ExLog.e(context, TAG, "In Method writeToFile: " + e.getMessage() + " with content " + content + " and mode " + mode);
|
||||
ExLog.e(context, TAG,
|
||||
"In Method writeToFile: " + e.getMessage() + " with content " + content + " and mode " + mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -55,7 +55,8 @@ public class MessageSenderTask extends AsyncTask<Intent, Void, Util.Triple<Inten
|
||||
if (responseStream != null) {
|
||||
try {
|
||||
responseStream.close();
|
||||
} catch (IOException ie) { }
|
||||
} catch (IOException ie) {
|
||||
}
|
||||
}
|
||||
ExLog.e(context, TAG, String.format("Post not successful, exception occured: %s", e.toString()));
|
||||
result = new Util.Triple<Intent, Boolean, InputStream>(intent, false, null);
|
||||
|
||||
+29
-32
@@ -34,7 +34,7 @@ import com.sap.sailing.domain.common.racelog.RaceLogServletConstants;
|
||||
* Service that handles sending messages to a webservice. Deals with an offline setting
|
||||
* by buffering the messages in a file, so that they can be sent when the connection is
|
||||
* re-established.<br>
|
||||
*
|
||||
* <p/>
|
||||
* <b>Use in the following way:</b> Add the service declaration to your {@code AndroidManifest.xml},
|
||||
* and also specify your class implementing the {@link MessagePersistenceManager.MessageRestorer}
|
||||
* as a meta-data tag with the key {@code com.sap.sailing.android.shared.services.sending.messageRestorer}.
|
||||
@@ -48,8 +48,8 @@ import com.sap.sailing.domain.common.racelog.RaceLogServletConstants;
|
||||
* android:value="com.sap.sailing.racecommittee.app.services.sending.EventRestorer" />
|
||||
* </service>
|
||||
* }</pre>
|
||||
*
|
||||
*
|
||||
* <p/>
|
||||
* <p/>
|
||||
* Message sending example:
|
||||
* <pre>{@code
|
||||
* context.startService(MessageSendingService.createMessageIntent(
|
||||
@@ -132,9 +132,8 @@ public class MessageSendingService extends Service implements MessageSendingList
|
||||
serviceLogger.onMessageSentSuccessful();
|
||||
}
|
||||
|
||||
public static Intent createMessageIntent(Context context, String url,
|
||||
Serializable callbackPayload, Serializable messageId, String payload,
|
||||
Class<? extends ServerReplyCallback> callbackClass) {
|
||||
public static Intent createMessageIntent(Context context, String url, Serializable callbackPayload,
|
||||
Serializable messageId, String payload, Class<? extends ServerReplyCallback> callbackClass) {
|
||||
Intent messageIntent = new Intent(context, MessageSendingService.class);
|
||||
messageIntent.setAction(context.getString(R.string.intent_send_message));
|
||||
messageIntent.putExtra(CALLBACK_PAYLOAD, callbackPayload);
|
||||
@@ -167,24 +166,24 @@ public class MessageSendingService extends Service implements MessageSendingList
|
||||
Bundle data = getPackageManager().getServiceInfo(thisService, PackageManager.GET_META_DATA).metaData;
|
||||
if (data == null) {
|
||||
ExLog.w(this, TAG, "Could not find MessageRestorer. See documentation of MessageSendingService "
|
||||
+ "on how to register the restorer through the manifest.");
|
||||
+ "on how to register the restorer through the manifest.");
|
||||
} else {
|
||||
String className = data.getString("com.sap.sailing.android.shared.services.sending.messageRestorer");
|
||||
Class<?> clazz = Class.forName(className);
|
||||
if (!MessageRestorer.class.isAssignableFrom(clazz)) {
|
||||
ExLog.w(this, TAG, "Could not find MessageRestorer. See documentation of MessageSendingService "
|
||||
+ "on how to register the restorer through the manifest. Class " + clazz
|
||||
+ " does not conform to expected type " + MessageRestorer.class.getName());
|
||||
+ "on how to register the restorer through the manifest. Class " + clazz
|
||||
+ " does not conform to expected type " + MessageRestorer.class.getName());
|
||||
} else {
|
||||
@SuppressWarnings("unchecked")
|
||||
// checked above
|
||||
Class<MessageRestorer> castedClass = (Class<MessageRestorer>) clazz;
|
||||
Class<MessageRestorer> castedClass = (Class<MessageRestorer>) clazz;
|
||||
restorer = castedClass.getConstructor().newInstance();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExLog.w(this, TAG, "Could not find MessageRestorer. See documentation of MessageSendingService "
|
||||
+ "on how to register the restorer through the manifest. Error Message: " + e.getMessage());
|
||||
+ "on how to register the restorer through the manifest. Error Message: " + e.getMessage());
|
||||
}
|
||||
return new MessagePersistenceManager(this, restorer);
|
||||
}
|
||||
@@ -269,8 +268,8 @@ public class MessageSendingService extends Service implements MessageSendingList
|
||||
}
|
||||
|
||||
private void sendMessage(Intent intent) {
|
||||
boolean sendingActive = PrefUtils.getBoolean(this, R.string.preference_isSendingActive_key,
|
||||
R.bool.preference_isSendingActive_default);
|
||||
boolean sendingActive = PrefUtils
|
||||
.getBoolean(this, R.string.preference_isSendingActive_key, R.bool.preference_isSendingActive_default);
|
||||
if (!sendingActive) {
|
||||
ExLog.i(this, TAG, "Sending deactivated. Message will not be sent to server.");
|
||||
} else {
|
||||
@@ -287,12 +286,12 @@ public class MessageSendingService extends Service implements MessageSendingList
|
||||
|
||||
@Override
|
||||
public void onMessageSent(Intent intent, boolean success, InputStream inputStream) {
|
||||
ExLog.i(this, "MS", "on message sent");
|
||||
ExLog.i(this, "MS", "on message sent");
|
||||
int resendMillis = PrefUtils.getInt(this, R.string.preference_messageResendIntervalMillis_key,
|
||||
R.integer.preference_messageResendIntervalMillis_default);
|
||||
R.integer.preference_messageResendIntervalMillis_default);
|
||||
if (!success) {
|
||||
ExLog.i(this, "MS", "success");
|
||||
reportApiConnectivity(APIConnectivity.transmissionError);
|
||||
ExLog.i(this, "MS", "success");
|
||||
reportApiConnectivity(APIConnectivity.transmissionError);
|
||||
ExLog.w(this, TAG, "Error while posting intent to server. Will persist intent...");
|
||||
try {
|
||||
persistenceManager.persistIntent(intent);
|
||||
@@ -307,8 +306,8 @@ public class MessageSendingService extends Service implements MessageSendingList
|
||||
reportUnsentGPSFixesCount();
|
||||
serviceLogger.onMessageSentFailed();
|
||||
} else {
|
||||
ExLog.i(this, "MS", "!success");
|
||||
reportApiConnectivity(APIConnectivity.transmissionSuccess);
|
||||
ExLog.i(this, "MS", "!success");
|
||||
reportApiConnectivity(APIConnectivity.transmissionSuccess);
|
||||
ExLog.i(this, TAG, "Message successfully sent.");
|
||||
if (persistenceManager.areIntentsDelayed()) {
|
||||
try {
|
||||
@@ -335,7 +334,7 @@ public class MessageSendingService extends Service implements MessageSendingList
|
||||
callback.processResponse(this, inputStream, raceId);
|
||||
}
|
||||
ExLog.i(this, "MS", "report");
|
||||
reportUnsentGPSFixesCount() ;
|
||||
reportUnsentGPSFixesCount();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -358,24 +357,22 @@ public class MessageSendingService extends Service implements MessageSendingList
|
||||
public final static UUID uuid = UUID.randomUUID();
|
||||
|
||||
public static String getRaceLogEventSendAndReceiveUrl(Context context, final String raceGroupName,
|
||||
final String raceName, final String fleetName) throws UnsupportedEncodingException {
|
||||
String url = String.format("%s/sailingserver/rc/racelog?"+
|
||||
RaceLogServletConstants.PARAMS_LEADERBOARD_NAME+"=%s&"+
|
||||
RaceLogServletConstants.PARAMS_RACE_COLUMN_NAME+"=%s&"+
|
||||
RaceLogServletConstants.PARAMS_RACE_FLEET_NAME+"=%s&"+
|
||||
RaceLogServletConstants.PARAMS_CLIENT_UUID+"=%s",
|
||||
PrefUtils.getString(context, R.string.preference_server_url_key, R.string.preference_server_url_default),
|
||||
URLEncoder.encode(raceGroupName, charsetName),
|
||||
URLEncoder.encode(raceName, charsetName),
|
||||
URLEncoder.encode(fleetName, charsetName), uuid);
|
||||
final String raceName, final String fleetName) throws UnsupportedEncodingException {
|
||||
String url = String.format("%s/sailingserver/rc/racelog?" +
|
||||
RaceLogServletConstants.PARAMS_LEADERBOARD_NAME + "=%s&" +
|
||||
RaceLogServletConstants.PARAMS_RACE_COLUMN_NAME + "=%s&" +
|
||||
RaceLogServletConstants.PARAMS_RACE_FLEET_NAME + "=%s&" +
|
||||
RaceLogServletConstants.PARAMS_CLIENT_UUID + "=%s",
|
||||
PrefUtils.getString(context, R.string.preference_server_url_key, R.string.preference_server_url_default),
|
||||
URLEncoder.encode(raceGroupName, charsetName), URLEncoder.encode(raceName, charsetName),
|
||||
URLEncoder.encode(fleetName, charsetName), uuid);
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register listener for API-connectivity
|
||||
*
|
||||
* @param listener
|
||||
* class that wants to be notified of api-connectivity changes
|
||||
* @param listener class that wants to be notified of api-connectivity changes
|
||||
*/
|
||||
public void registerAPIConnectivityListener(APIConnectivityListener listener) {
|
||||
apiConnectivityListener = listener;
|
||||
|
||||
+2
-2
@@ -8,11 +8,11 @@ import android.content.Intent;
|
||||
/**
|
||||
* This callback is used to attach an operation to the sending of a message, so
|
||||
* that the server reply to the performed POST request can be evaluated.
|
||||
*
|
||||
* <p/>
|
||||
* Important: As the callback needs to be passed around in an {@link Intent} and also written
|
||||
* to a file, a default public constructor without parameters is required.
|
||||
* @author Fredrik Teschke
|
||||
*
|
||||
* @author Fredrik Teschke
|
||||
*/
|
||||
public interface ServerReplyCallback {
|
||||
/**
|
||||
|
||||
+9
-9
@@ -9,13 +9,13 @@ import android.support.v4.app.FragmentTransaction;
|
||||
|
||||
import com.sap.sailing.android.shared.logging.ExLog;
|
||||
|
||||
public abstract class AbstractBaseActivity extends SendingServiceAwareActivity{
|
||||
public abstract class AbstractBaseActivity extends SendingServiceAwareActivity {
|
||||
|
||||
private static final String TAG = AbstractBaseActivity.class.getName();
|
||||
private static final String TAG = AbstractBaseActivity.class.getName();
|
||||
|
||||
protected ProgressDialog progressDialog;
|
||||
|
||||
public void replaceFragment(int view, Fragment fragment) {
|
||||
public void replaceFragment(int view, Fragment fragment) {
|
||||
ExLog.i(this, TAG, "Set new Fragment: " + fragment.toString());
|
||||
|
||||
FragmentManager manager = getSupportFragmentManager();
|
||||
@@ -43,12 +43,12 @@ public abstract class AbstractBaseActivity extends SendingServiceAwareActivity{
|
||||
|
||||
public void showErrorPopup(String title, String message) {
|
||||
AlertDialog dialog = new AlertDialog.Builder(this).setTitle(title).setMessage(message)
|
||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
}).create();
|
||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
}).create();
|
||||
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
package com.sap.sailing.android.shared.ui.activities;
|
||||
|
||||
public abstract class AbstractRegattaActivity extends CheckinDataActivity{
|
||||
public abstract class AbstractRegattaActivity extends CheckinDataActivity {
|
||||
|
||||
}
|
||||
+1
-1
@@ -5,5 +5,5 @@ import android.support.v7.app.ActionBarActivity;
|
||||
public abstract class BaseActivity extends ActionBarActivity {
|
||||
|
||||
// TODO what is this planned for?
|
||||
// private static final String TAG = BaseActivity.class.getName();
|
||||
// private static final String TAG = BaseActivity.class.getName();
|
||||
}
|
||||
+20
-22
@@ -7,30 +7,28 @@ import com.sap.sailing.android.shared.R;
|
||||
import com.sap.sailing.android.shared.data.AbstractCheckinData;
|
||||
import com.sap.sailing.android.shared.util.CheckinDataHandler;
|
||||
|
||||
public abstract class CheckinDataActivity extends AbstractBaseActivity implements
|
||||
CheckinDataHandler {
|
||||
public abstract class CheckinDataActivity extends AbstractBaseActivity implements CheckinDataHandler {
|
||||
|
||||
@Override
|
||||
public abstract void onCheckinDataAvailable(AbstractCheckinData data);
|
||||
@Override
|
||||
public abstract void onCheckinDataAvailable(AbstractCheckinData data);
|
||||
|
||||
/**
|
||||
* Shows a pop-up-dialog that informs the user than an DB-operation has
|
||||
* failed.
|
||||
*/
|
||||
public void displayDatabaseError() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setMessage(getString(R.string.notify_user_db_operation_failed));
|
||||
builder.setCancelable(true);
|
||||
builder.setPositiveButton(getString(R.string.ok),
|
||||
new DialogInterface.OnClickListener() {
|
||||
/**
|
||||
* Shows a pop-up-dialog that informs the user than an DB-operation has
|
||||
* failed.
|
||||
*/
|
||||
public void displayDatabaseError() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setMessage(getString(R.string.notify_user_db_operation_failed));
|
||||
builder.setCancelable(true);
|
||||
builder.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.cancel();
|
||||
}
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.cancel();
|
||||
}
|
||||
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
}
|
||||
+7
-5
@@ -91,8 +91,9 @@ public abstract class SendingServiceAwareActivity extends ResilientActivity {
|
||||
if (errorCount > 0) {
|
||||
menuItemLive.setIcon(R.drawable.ic_menu_share_red);
|
||||
Date lastSuccessfulSend = this.sendingService.getLastSuccessfulSend();
|
||||
sendingServiceStatus = String.format("Currently %d events waiting to be sent.\nLast successful sent was at %s",
|
||||
errorCount, lastSuccessfulSend == null ? "never" : lastSuccessfulSend);
|
||||
sendingServiceStatus = String
|
||||
.format("Currently %d events waiting to be sent.\nLast successful sent was at %s", errorCount,
|
||||
lastSuccessfulSend == null ? "never" : lastSuccessfulSend);
|
||||
} else {
|
||||
menuItemLive.setIcon(R.drawable.ic_menu_share);
|
||||
sendingServiceStatus = String.format("Currently no event waiting to be sent.", errorCount);
|
||||
@@ -101,7 +102,7 @@ public abstract class SendingServiceAwareActivity extends ResilientActivity {
|
||||
|
||||
/**
|
||||
* @return the resource ID for the options menu, {@code 0} if none.
|
||||
* The menu item displaying the connection status is added automatically.
|
||||
* The menu item displaying the connection status is added automatically.
|
||||
*/
|
||||
protected abstract int getOptionsMenuResId();
|
||||
|
||||
@@ -134,7 +135,8 @@ public abstract class SendingServiceAwareActivity extends ResilientActivity {
|
||||
}
|
||||
|
||||
private String getLiveIconText() {
|
||||
return String.format("Connected to: %s\n%s", PrefUtils.getString(this, R.string.preference_server_url_key,
|
||||
R.string.preference_server_url_default), sendingServiceStatus);
|
||||
return String.format("Connected to: %s\n%s",
|
||||
PrefUtils.getString(this, R.string.preference_server_url_key, R.string.preference_server_url_default),
|
||||
sendingServiceStatus);
|
||||
}
|
||||
}
|
||||
+7
-6
@@ -34,12 +34,13 @@ public class SystemInformationActivityHelper {
|
||||
ListView waitingView = (ListView) activity.findViewById(R.id.system_information_persistence_waiting);
|
||||
if (activity.boundSendingService) {
|
||||
Date lastSuccessfulSend = activity.sendingService.getLastSuccessfulSend();
|
||||
statusView.setText(String.format("Currently %d events waiting to be sent.\nLast successful sent was at: %s.",
|
||||
activity.sendingService.getDelayedIntentsCount(), lastSuccessfulSend == null ? "never" : lastSuccessfulSend));
|
||||
statusView.setText(String
|
||||
.format("Currently %d events waiting to be sent.\nLast successful sent was at: %s.",
|
||||
activity.sendingService.getDelayedIntentsCount(),
|
||||
lastSuccessfulSend == null ? "never" : lastSuccessfulSend));
|
||||
|
||||
waitingView.setAdapter(new ArrayAdapter<String>(activity,
|
||||
android.R.layout.simple_list_item_1,
|
||||
activity.sendingService.getDelayedIntentsContent()));
|
||||
waitingView.setAdapter(new ArrayAdapter<String>(activity, android.R.layout.simple_list_item_1,
|
||||
activity.sendingService.getDelayedIntentsContent()));
|
||||
} else {
|
||||
statusView.setText(activity.getString(R.string.generic_error));
|
||||
}
|
||||
@@ -81,7 +82,7 @@ public class SystemInformationActivityHelper {
|
||||
} else {
|
||||
Date installDate = new Date(info.lastUpdateTime);
|
||||
installView.setText(String.format("%s - %s", DateFormat.getLongDateFormat(activity).format(installDate),
|
||||
DateFormat.getTimeFormat(activity).format(installDate)));
|
||||
DateFormat.getTimeFormat(activity).format(installDate)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-5
@@ -4,11 +4,10 @@ import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.support.v4.widget.ResourceCursorAdapter;
|
||||
|
||||
public abstract class AbstractRegattaAdapter extends ResourceCursorAdapter{
|
||||
public abstract class AbstractRegattaAdapter extends ResourceCursorAdapter {
|
||||
|
||||
public AbstractRegattaAdapter(Context context, int layout, Cursor c,
|
||||
int flags) {
|
||||
super(context, layout, c, flags);
|
||||
}
|
||||
public AbstractRegattaAdapter(Context context, int layout, Cursor c, int flags) {
|
||||
super(context, layout, c, flags);
|
||||
}
|
||||
|
||||
}
|
||||
+11
-11
@@ -6,18 +6,18 @@ import android.util.AttributeSet;
|
||||
|
||||
public class AutoResizeLightTextView extends AutoResizeTextView {
|
||||
|
||||
public AutoResizeLightTextView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
public AutoResizeLightTextView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public AutoResizeLightTextView(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
public AutoResizeLightTextView(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public AutoResizeLightTextView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
setTypeface(Typeface.createFromAsset(getContext().getAssets(), "fonts/OpenSans-Light.ttf"));
|
||||
mTextSize = getTextSize();
|
||||
}
|
||||
public AutoResizeLightTextView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
setTypeface(Typeface.createFromAsset(getContext().getAssets(), "fonts/OpenSans-Light.ttf"));
|
||||
mTextSize = getTextSize();
|
||||
}
|
||||
|
||||
}
|
||||
+264
-273
@@ -37,318 +37,309 @@ import android.widget.TextView;
|
||||
*/
|
||||
public class AutoResizeTextView extends TextView {
|
||||
|
||||
// Minimum text size for this text view
|
||||
public static final float MIN_TEXT_SIZE = 20;
|
||||
// Minimum text size for this text view
|
||||
public static final float MIN_TEXT_SIZE = 20;
|
||||
|
||||
// Interface for resize notifications
|
||||
public interface OnTextResizeListener {
|
||||
public void onTextResize(TextView textView, float oldSize, float newSize);
|
||||
}
|
||||
// Interface for resize notifications
|
||||
public interface OnTextResizeListener {
|
||||
public void onTextResize(TextView textView, float oldSize, float newSize);
|
||||
}
|
||||
|
||||
// Our ellipse string
|
||||
private static final String mEllipsis = "...";
|
||||
// Our ellipse string
|
||||
private static final String mEllipsis = "...";
|
||||
|
||||
// Registered resize listener
|
||||
private OnTextResizeListener mTextResizeListener;
|
||||
// Registered resize listener
|
||||
private OnTextResizeListener mTextResizeListener;
|
||||
|
||||
// Flag for text and/or size changes to force a resize
|
||||
private boolean mNeedsResize = false;
|
||||
// Flag for text and/or size changes to force a resize
|
||||
private boolean mNeedsResize = false;
|
||||
|
||||
// Text size that is set from code. This acts as a starting point for
|
||||
// resizing
|
||||
protected float mTextSize;
|
||||
// Text size that is set from code. This acts as a starting point for
|
||||
// resizing
|
||||
protected float mTextSize;
|
||||
|
||||
// Temporary upper bounds on the starting text size
|
||||
private float mMaxTextSize = 0;
|
||||
// Temporary upper bounds on the starting text size
|
||||
private float mMaxTextSize = 0;
|
||||
|
||||
// Lower bounds for text size
|
||||
private float mMinTextSize = MIN_TEXT_SIZE;
|
||||
// Lower bounds for text size
|
||||
private float mMinTextSize = MIN_TEXT_SIZE;
|
||||
|
||||
// Text view line spacing multiplier
|
||||
private float mSpacingMult = 1.0f;
|
||||
// Text view line spacing multiplier
|
||||
private float mSpacingMult = 1.0f;
|
||||
|
||||
// Text view additional line spacing
|
||||
private float mSpacingAdd = 0.0f;
|
||||
// Text view additional line spacing
|
||||
private float mSpacingAdd = 0.0f;
|
||||
|
||||
// Add ellipsis to text that overflows at the smallest text size
|
||||
private boolean mAddEllipsis = true;
|
||||
// Add ellipsis to text that overflows at the smallest text size
|
||||
private boolean mAddEllipsis = true;
|
||||
|
||||
// Default constructor override
|
||||
public AutoResizeTextView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
// Default constructor override
|
||||
public AutoResizeTextView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
// Default constructor when inflating from XML file
|
||||
public AutoResizeTextView(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
// Default constructor when inflating from XML file
|
||||
public AutoResizeTextView(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
// Default constructor override
|
||||
public AutoResizeTextView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
setTypeface(Typeface.createFromAsset(getContext().getAssets(), "fonts/OpenSans-Regular.ttf"));
|
||||
mTextSize = getTextSize();
|
||||
}
|
||||
// Default constructor override
|
||||
public AutoResizeTextView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
setTypeface(Typeface.createFromAsset(getContext().getAssets(), "fonts/OpenSans-Regular.ttf"));
|
||||
mTextSize = getTextSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* When text changes, set the force resize flag to true and reset the text
|
||||
* size.
|
||||
*/
|
||||
@Override
|
||||
protected void onTextChanged(final CharSequence text, final int start,
|
||||
final int before, final int after) {
|
||||
mNeedsResize = true;
|
||||
// Since this view may be reused, it is good to reset the text size
|
||||
resetTextSize();
|
||||
}
|
||||
/**
|
||||
* When text changes, set the force resize flag to true and reset the text
|
||||
* size.
|
||||
*/
|
||||
@Override
|
||||
protected void onTextChanged(final CharSequence text, final int start, final int before, final int after) {
|
||||
mNeedsResize = true;
|
||||
// Since this view may be reused, it is good to reset the text size
|
||||
resetTextSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* If the text view size changed, set the force resize flag to true
|
||||
*/
|
||||
@Override
|
||||
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
||||
if (w != oldw || h != oldh) {
|
||||
mNeedsResize = true;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* If the text view size changed, set the force resize flag to true
|
||||
*/
|
||||
@Override
|
||||
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
||||
if (w != oldw || h != oldh) {
|
||||
mNeedsResize = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register listener to receive resize notifications
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
public void setOnResizeListener(OnTextResizeListener listener) {
|
||||
mTextResizeListener = listener;
|
||||
}
|
||||
/**
|
||||
* Register listener to receive resize notifications
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
public void setOnResizeListener(OnTextResizeListener listener) {
|
||||
mTextResizeListener = listener;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the set text size to update our internal reference values
|
||||
*/
|
||||
@Override
|
||||
public void setTextSize(float size) {
|
||||
super.setTextSize(size);
|
||||
mTextSize = getTextSize();
|
||||
}
|
||||
/**
|
||||
* Override the set text size to update our internal reference values
|
||||
*/
|
||||
@Override
|
||||
public void setTextSize(float size) {
|
||||
super.setTextSize(size);
|
||||
mTextSize = getTextSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the set text size to update our internal reference values
|
||||
*/
|
||||
@Override
|
||||
public void setTextSize(int unit, float size) {
|
||||
super.setTextSize(unit, size);
|
||||
mTextSize = getTextSize();
|
||||
}
|
||||
/**
|
||||
* Override the set text size to update our internal reference values
|
||||
*/
|
||||
@Override
|
||||
public void setTextSize(int unit, float size) {
|
||||
super.setTextSize(unit, size);
|
||||
mTextSize = getTextSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the set line spacing to update our internal reference values
|
||||
*/
|
||||
@Override
|
||||
public void setLineSpacing(float add, float mult) {
|
||||
super.setLineSpacing(add, mult);
|
||||
mSpacingMult = mult;
|
||||
mSpacingAdd = add;
|
||||
}
|
||||
/**
|
||||
* Override the set line spacing to update our internal reference values
|
||||
*/
|
||||
@Override
|
||||
public void setLineSpacing(float add, float mult) {
|
||||
super.setLineSpacing(add, mult);
|
||||
mSpacingMult = mult;
|
||||
mSpacingAdd = add;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the upper text size limit and invalidate the view
|
||||
*
|
||||
* @param maxTextSize
|
||||
*/
|
||||
public void setMaxTextSize(float maxTextSize) {
|
||||
mMaxTextSize = maxTextSize;
|
||||
requestLayout();
|
||||
invalidate();
|
||||
}
|
||||
/**
|
||||
* Set the upper text size limit and invalidate the view
|
||||
*
|
||||
* @param maxTextSize
|
||||
*/
|
||||
public void setMaxTextSize(float maxTextSize) {
|
||||
mMaxTextSize = maxTextSize;
|
||||
requestLayout();
|
||||
invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return upper text size limit
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public float getMaxTextSize() {
|
||||
return mMaxTextSize;
|
||||
}
|
||||
/**
|
||||
* Return upper text size limit
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public float getMaxTextSize() {
|
||||
return mMaxTextSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the lower text size limit and invalidate the view
|
||||
*
|
||||
* @param minTextSize
|
||||
*/
|
||||
public void setMinTextSize(float minTextSize) {
|
||||
mMinTextSize = minTextSize;
|
||||
requestLayout();
|
||||
invalidate();
|
||||
}
|
||||
/**
|
||||
* Set the lower text size limit and invalidate the view
|
||||
*
|
||||
* @param minTextSize
|
||||
*/
|
||||
public void setMinTextSize(float minTextSize) {
|
||||
mMinTextSize = minTextSize;
|
||||
requestLayout();
|
||||
invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return lower text size limit
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public float getMinTextSize() {
|
||||
return mMinTextSize;
|
||||
}
|
||||
/**
|
||||
* Return lower text size limit
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public float getMinTextSize() {
|
||||
return mMinTextSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set flag to add ellipsis to text that overflows at the smallest text size
|
||||
*
|
||||
* @param addEllipsis
|
||||
*/
|
||||
public void setAddEllipsis(boolean addEllipsis) {
|
||||
mAddEllipsis = addEllipsis;
|
||||
}
|
||||
/**
|
||||
* Set flag to add ellipsis to text that overflows at the smallest text size
|
||||
*
|
||||
* @param addEllipsis
|
||||
*/
|
||||
public void setAddEllipsis(boolean addEllipsis) {
|
||||
mAddEllipsis = addEllipsis;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return flag to add ellipsis to text that overflows at the smallest text
|
||||
* size
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean getAddEllipsis() {
|
||||
return mAddEllipsis;
|
||||
}
|
||||
/**
|
||||
* Return flag to add ellipsis to text that overflows at the smallest text
|
||||
* size
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean getAddEllipsis() {
|
||||
return mAddEllipsis;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the text to the original size
|
||||
*/
|
||||
public void resetTextSize() {
|
||||
if (mTextSize > 0) {
|
||||
super.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextSize);
|
||||
mMaxTextSize = mTextSize;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Reset the text to the original size
|
||||
*/
|
||||
public void resetTextSize() {
|
||||
if (mTextSize > 0) {
|
||||
super.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextSize);
|
||||
mMaxTextSize = mTextSize;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Resize text after measuring
|
||||
*/
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int left, int top, int right,
|
||||
int bottom) {
|
||||
if (changed || mNeedsResize) {
|
||||
int widthLimit = (right - left) - getCompoundPaddingLeft()
|
||||
- getCompoundPaddingRight();
|
||||
int heightLimit = (bottom - top) - getCompoundPaddingBottom()
|
||||
- getCompoundPaddingTop();
|
||||
resizeText(widthLimit, heightLimit);
|
||||
}
|
||||
super.onLayout(changed, left, top, right, bottom);
|
||||
}
|
||||
/**
|
||||
* Resize text after measuring
|
||||
*/
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
||||
if (changed || mNeedsResize) {
|
||||
int widthLimit = (right - left) - getCompoundPaddingLeft() - getCompoundPaddingRight();
|
||||
int heightLimit = (bottom - top) - getCompoundPaddingBottom() - getCompoundPaddingTop();
|
||||
resizeText(widthLimit, heightLimit);
|
||||
}
|
||||
super.onLayout(changed, left, top, right, bottom);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resize the text size with default width and height
|
||||
*/
|
||||
public void resizeText() {
|
||||
/**
|
||||
* Resize the text size with default width and height
|
||||
*/
|
||||
public void resizeText() {
|
||||
|
||||
int heightLimit = getHeight() - getPaddingBottom() - getPaddingTop();
|
||||
int widthLimit = getWidth() - getPaddingLeft() - getPaddingRight();
|
||||
resizeText(widthLimit, heightLimit);
|
||||
}
|
||||
int heightLimit = getHeight() - getPaddingBottom() - getPaddingTop();
|
||||
int widthLimit = getWidth() - getPaddingLeft() - getPaddingRight();
|
||||
resizeText(widthLimit, heightLimit);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resize the text size with specified width and height
|
||||
*
|
||||
* @param width
|
||||
* @param height
|
||||
*/
|
||||
public void resizeText(int width, int height) {
|
||||
CharSequence text = getText();
|
||||
// Do not resize if the view does not have dimensions or there is no
|
||||
// text
|
||||
if (text == null || text.length() == 0 || height <= 0 || width <= 0
|
||||
|| mTextSize == 0) {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Resize the text size with specified width and height
|
||||
*
|
||||
* @param width
|
||||
* @param height
|
||||
*/
|
||||
public void resizeText(int width, int height) {
|
||||
CharSequence text = getText();
|
||||
// Do not resize if the view does not have dimensions or there is no
|
||||
// text
|
||||
if (text == null || text.length() == 0 || height <= 0 || width <= 0 || mTextSize == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (getTransformationMethod() != null) {
|
||||
text = getTransformationMethod().getTransformation(text, this);
|
||||
}
|
||||
if (getTransformationMethod() != null) {
|
||||
text = getTransformationMethod().getTransformation(text, this);
|
||||
}
|
||||
|
||||
// Get the text view's paint object
|
||||
TextPaint textPaint = getPaint();
|
||||
// Get the text view's paint object
|
||||
TextPaint textPaint = getPaint();
|
||||
|
||||
// Store the current text size
|
||||
float oldTextSize = textPaint.getTextSize();
|
||||
// If there is a max text size set, use the lesser of that and the
|
||||
// default text size
|
||||
float targetTextSize = mMaxTextSize > 0 ? Math.min(mTextSize,
|
||||
mMaxTextSize) : mTextSize;
|
||||
// Store the current text size
|
||||
float oldTextSize = textPaint.getTextSize();
|
||||
// If there is a max text size set, use the lesser of that and the
|
||||
// default text size
|
||||
float targetTextSize = mMaxTextSize > 0 ? Math.min(mTextSize, mMaxTextSize) : mTextSize;
|
||||
|
||||
// Get the required text height
|
||||
int textHeight = getTextHeight(text, textPaint, width, targetTextSize);
|
||||
// Get the required text height
|
||||
int textHeight = getTextHeight(text, textPaint, width, targetTextSize);
|
||||
|
||||
// Until we either fit within our text view or we had reached our min
|
||||
// text size, incrementally try smaller sizes
|
||||
while (textHeight > height && targetTextSize > mMinTextSize) {
|
||||
targetTextSize = Math.max(targetTextSize - 2, mMinTextSize);
|
||||
textHeight = getTextHeight(text, textPaint, width, targetTextSize);
|
||||
}
|
||||
// Until we either fit within our text view or we had reached our min
|
||||
// text size, incrementally try smaller sizes
|
||||
while (textHeight > height && targetTextSize > mMinTextSize) {
|
||||
targetTextSize = Math.max(targetTextSize - 2, mMinTextSize);
|
||||
textHeight = getTextHeight(text, textPaint, width, targetTextSize);
|
||||
}
|
||||
|
||||
// If we had reached our minimum text size and still don't fit, append
|
||||
// an ellipsis
|
||||
if (mAddEllipsis && targetTextSize == mMinTextSize
|
||||
&& textHeight > height) {
|
||||
// Draw using a static layout
|
||||
// modified: use a copy of TextPaint for measuring
|
||||
TextPaint paint = new TextPaint(textPaint);
|
||||
// Draw using a static layout
|
||||
StaticLayout layout = new StaticLayout(text, paint, width,
|
||||
Alignment.ALIGN_NORMAL, mSpacingMult, mSpacingAdd, false);
|
||||
// Check that we have a least one line of rendered text
|
||||
if (layout.getLineCount() > 0) {
|
||||
// Since the line at the specific vertical position would be cut
|
||||
// off,
|
||||
// we must trim up to the previous line
|
||||
int lastLine = layout.getLineForVertical(height) - 1;
|
||||
// If the text would not even fit on a single line, clear it
|
||||
if (lastLine < 0) {
|
||||
setText("");
|
||||
}
|
||||
// Otherwise, trim to the previous line and add an ellipsis
|
||||
else {
|
||||
int start = layout.getLineStart(lastLine);
|
||||
int end = layout.getLineEnd(lastLine);
|
||||
float lineWidth = layout.getLineWidth(lastLine);
|
||||
float ellipseWidth = textPaint.measureText(mEllipsis);
|
||||
// If we had reached our minimum text size and still don't fit, append
|
||||
// an ellipsis
|
||||
if (mAddEllipsis && targetTextSize == mMinTextSize && textHeight > height) {
|
||||
// Draw using a static layout
|
||||
// modified: use a copy of TextPaint for measuring
|
||||
TextPaint paint = new TextPaint(textPaint);
|
||||
// Draw using a static layout
|
||||
StaticLayout layout = new StaticLayout(text, paint, width, Alignment.ALIGN_NORMAL, mSpacingMult,
|
||||
mSpacingAdd, false);
|
||||
// Check that we have a least one line of rendered text
|
||||
if (layout.getLineCount() > 0) {
|
||||
// Since the line at the specific vertical position would be cut
|
||||
// off,
|
||||
// we must trim up to the previous line
|
||||
int lastLine = layout.getLineForVertical(height) - 1;
|
||||
// If the text would not even fit on a single line, clear it
|
||||
if (lastLine < 0) {
|
||||
setText("");
|
||||
}
|
||||
// Otherwise, trim to the previous line and add an ellipsis
|
||||
else {
|
||||
int start = layout.getLineStart(lastLine);
|
||||
int end = layout.getLineEnd(lastLine);
|
||||
float lineWidth = layout.getLineWidth(lastLine);
|
||||
float ellipseWidth = textPaint.measureText(mEllipsis);
|
||||
|
||||
// Trim characters off until we have enough room to draw the
|
||||
// ellipsis
|
||||
while (width < lineWidth + ellipseWidth) {
|
||||
lineWidth = textPaint.measureText(text.subSequence(
|
||||
start, --end + 1).toString());
|
||||
}
|
||||
setText(text.subSequence(0, end) + mEllipsis);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Trim characters off until we have enough room to draw the
|
||||
// ellipsis
|
||||
while (width < lineWidth + ellipseWidth) {
|
||||
lineWidth = textPaint.measureText(text.subSequence(start, --end + 1).toString());
|
||||
}
|
||||
setText(text.subSequence(0, end) + mEllipsis);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Some devices try to auto adjust line spacing, so force default line
|
||||
// spacing
|
||||
// and invalidate the layout as a side effect
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, targetTextSize);
|
||||
setLineSpacing(mSpacingAdd, mSpacingMult);
|
||||
// Some devices try to auto adjust line spacing, so force default line
|
||||
// spacing
|
||||
// and invalidate the layout as a side effect
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, targetTextSize);
|
||||
setLineSpacing(mSpacingAdd, mSpacingMult);
|
||||
|
||||
// Notify the listener if registered
|
||||
if (mTextResizeListener != null) {
|
||||
mTextResizeListener.onTextResize(this, oldTextSize, targetTextSize);
|
||||
}
|
||||
// Notify the listener if registered
|
||||
if (mTextResizeListener != null) {
|
||||
mTextResizeListener.onTextResize(this, oldTextSize, targetTextSize);
|
||||
}
|
||||
|
||||
// Reset force resize flag
|
||||
mNeedsResize = false;
|
||||
}
|
||||
// Reset force resize flag
|
||||
mNeedsResize = false;
|
||||
}
|
||||
|
||||
// Set the text size of the text paint object and use a static layout to
|
||||
// render text off screen before measuring
|
||||
private int getTextHeight(CharSequence source, TextPaint paint, int width,
|
||||
float textSize) {
|
||||
// modified: make a copy of the original TextPaint object for measuring
|
||||
// (apparently the object gets modified while measuring, see also the
|
||||
// docs for TextView.getPaint() (which states to access it read-only)
|
||||
TextPaint paintCopy = new TextPaint(paint);
|
||||
// Update the text paint object
|
||||
paintCopy.setTextSize(textSize);
|
||||
// Measure using a static layout
|
||||
StaticLayout layout = new StaticLayout(source, paintCopy, width,
|
||||
Alignment.ALIGN_NORMAL, mSpacingMult, mSpacingAdd, true);
|
||||
return layout.getHeight();
|
||||
}
|
||||
// Set the text size of the text paint object and use a static layout to
|
||||
// render text off screen before measuring
|
||||
private int getTextHeight(CharSequence source, TextPaint paint, int width, float textSize) {
|
||||
// modified: make a copy of the original TextPaint object for measuring
|
||||
// (apparently the object gets modified while measuring, see also the
|
||||
// docs for TextView.getPaint() (which states to access it read-only)
|
||||
TextPaint paintCopy = new TextPaint(paint);
|
||||
// Update the text paint object
|
||||
paintCopy.setTextSize(textSize);
|
||||
// Measure using a static layout
|
||||
StaticLayout layout = new StaticLayout(source, paintCopy, width, Alignment.ALIGN_NORMAL, mSpacingMult,
|
||||
mSpacingAdd, true);
|
||||
return layout.getHeight();
|
||||
}
|
||||
}
|
||||
+20
-22
@@ -9,31 +9,29 @@ import android.widget.Button;
|
||||
|
||||
public class OpenSansButton extends Button {
|
||||
|
||||
public OpenSansButton(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
public OpenSansButton(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
|
||||
public OpenSansButton(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
public OpenSansButton(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
|
||||
public OpenSansButton(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init();
|
||||
}
|
||||
public OpenSansButton(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init();
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
public OpenSansButton(Context context, AttributeSet attrs,
|
||||
int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
init();
|
||||
}
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
public OpenSansButton(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
init();
|
||||
}
|
||||
|
||||
protected void init()
|
||||
{
|
||||
setTypeface(Typeface.createFromAsset(getContext().getAssets(), "fonts/OpenSans-Regular.ttf"));
|
||||
}
|
||||
protected void init() {
|
||||
setTypeface(Typeface.createFromAsset(getContext().getAssets(), "fonts/OpenSans-Regular.ttf"));
|
||||
}
|
||||
|
||||
}
|
||||
+15
-15
@@ -7,23 +7,23 @@ import android.widget.TextView;
|
||||
|
||||
public class OpenSansLightTextView extends TextView {
|
||||
|
||||
public OpenSansLightTextView(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
public OpenSansLightTextView(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
|
||||
public OpenSansLightTextView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
public OpenSansLightTextView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
|
||||
public OpenSansLightTextView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
init();
|
||||
}
|
||||
public OpenSansLightTextView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
init();
|
||||
}
|
||||
|
||||
protected void init() {
|
||||
setTypeface(Typeface.createFromAsset(getContext().getAssets(), "fonts/OpenSans-Light.ttf"));
|
||||
}
|
||||
protected void init() {
|
||||
setTypeface(Typeface.createFromAsset(getContext().getAssets(), "fonts/OpenSans-Light.ttf"));
|
||||
}
|
||||
|
||||
}
|
||||
+15
-15
@@ -7,22 +7,22 @@ import android.widget.TextView;
|
||||
|
||||
public class OpenSansTextView extends TextView {
|
||||
|
||||
public OpenSansTextView(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
public OpenSansTextView(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
|
||||
public OpenSansTextView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
public OpenSansTextView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
|
||||
public OpenSansTextView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
init();
|
||||
}
|
||||
public OpenSansTextView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
init();
|
||||
}
|
||||
|
||||
protected void init() {
|
||||
setTypeface(Typeface.createFromAsset(getContext().getAssets(), "fonts/OpenSans-Regular.ttf"));
|
||||
}
|
||||
protected void init() {
|
||||
setTypeface(Typeface.createFromAsset(getContext().getAssets(), "fonts/OpenSans-Regular.ttf"));
|
||||
}
|
||||
}
|
||||
+35
-35
@@ -11,51 +11,51 @@ import com.sap.sailing.android.shared.R;
|
||||
|
||||
public class OpenSansToolbar extends Toolbar {
|
||||
|
||||
public OpenSansToolbar(Context context) {
|
||||
super(context);
|
||||
}
|
||||
public OpenSansToolbar(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public OpenSansToolbar(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
public OpenSansToolbar(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public OpenSansToolbar(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
public OpenSansToolbar(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTitle(int resId) {
|
||||
TextView titleTextView = (TextView)findViewById(R.id.toolbar_title);
|
||||
titleTextView.setText(resId);
|
||||
}
|
||||
@Override
|
||||
public void setTitle(int resId) {
|
||||
TextView titleTextView = (TextView) findViewById(R.id.toolbar_title);
|
||||
titleTextView.setText(resId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSubtitle(int resId) {
|
||||
TextView subtitleTextView = (TextView)findViewById(R.id.toolbar_subtitle);
|
||||
subtitleTextView.setText(resId);
|
||||
}
|
||||
@Override
|
||||
public void setSubtitle(int resId) {
|
||||
TextView subtitleTextView = (TextView) findViewById(R.id.toolbar_subtitle);
|
||||
subtitleTextView.setText(resId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTitle(CharSequence arg0) {
|
||||
TextView titleTextView = (TextView)findViewById(R.id.toolbar_title);
|
||||
titleTextView.setText(arg0);
|
||||
}
|
||||
@Override
|
||||
public void setTitle(CharSequence arg0) {
|
||||
TextView titleTextView = (TextView) findViewById(R.id.toolbar_title);
|
||||
titleTextView.setText(arg0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSubtitle(CharSequence arg0) {
|
||||
TextView subtitleTextView = (TextView)findViewById(R.id.toolbar_subtitle);
|
||||
subtitleTextView.setText(arg0);
|
||||
}
|
||||
@Override
|
||||
public void setSubtitle(CharSequence arg0) {
|
||||
TextView subtitleTextView = (TextView) findViewById(R.id.toolbar_subtitle);
|
||||
subtitleTextView.setText(arg0);
|
||||
}
|
||||
|
||||
public void hideSubtitle(){
|
||||
TextView titleTextView = (TextView)findViewById(R.id.toolbar_title);
|
||||
titleTextView.setPadding(0,6,0,0);
|
||||
TextView subtitleTextView = (TextView)findViewById(R.id.toolbar_subtitle);
|
||||
public void hideSubtitle() {
|
||||
TextView titleTextView = (TextView) findViewById(R.id.toolbar_title);
|
||||
titleTextView.setPadding(0, 6, 0, 0);
|
||||
TextView subtitleTextView = (TextView) findViewById(R.id.toolbar_subtitle);
|
||||
subtitleTextView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public void setTitleSize(float size){
|
||||
TextView titleTextView = (TextView)findViewById(R.id.toolbar_title);
|
||||
public void setTitleSize(float size) {
|
||||
TextView titleTextView = (TextView) findViewById(R.id.toolbar_title);
|
||||
titleTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, size);
|
||||
titleTextView.setTextColor(getResources().getColor(R.color.white));
|
||||
}
|
||||
|
||||
+126
-127
@@ -18,164 +18,163 @@ import com.sap.sailing.android.shared.R;
|
||||
* depending on the value passed for signal-quality;
|
||||
*
|
||||
* @author Lukas Zielinski
|
||||
*
|
||||
*/
|
||||
public class SignalQualityIndicatorView extends View {
|
||||
|
||||
private int signalQuality;
|
||||
private int signalQuality;
|
||||
|
||||
private Paint paint;
|
||||
private Paint paintDark;
|
||||
private Paint paint;
|
||||
private Paint paintDark;
|
||||
|
||||
private float height;
|
||||
private float width;
|
||||
private Rect rect;
|
||||
private float height;
|
||||
private float width;
|
||||
private Rect rect;
|
||||
|
||||
public SignalQualityIndicatorView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
public SignalQualityIndicatorView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
TypedArray a = context.getTheme().obtainStyledAttributes(attrs,
|
||||
R.styleable.SignalQualityIndicatorView, 0, 0);
|
||||
try {
|
||||
signalQuality = a.getInteger(R.styleable.SignalQualityIndicatorView_signalQuality, 0);
|
||||
} finally {
|
||||
a.recycle();
|
||||
}
|
||||
TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.SignalQualityIndicatorView, 0, 0);
|
||||
try {
|
||||
signalQuality = a.getInteger(R.styleable.SignalQualityIndicatorView_signalQuality, 0);
|
||||
} finally {
|
||||
a.recycle();
|
||||
}
|
||||
|
||||
setAccessibilityString();
|
||||
initPaint();
|
||||
}
|
||||
setAccessibilityString();
|
||||
initPaint();
|
||||
}
|
||||
|
||||
public Integer getSignalQuality() {
|
||||
return signalQuality;
|
||||
}
|
||||
public Integer getSignalQuality() {
|
||||
return signalQuality;
|
||||
}
|
||||
|
||||
private void setAccessibilityString()
|
||||
{
|
||||
if (this.signalQuality == 2)
|
||||
{
|
||||
this.setContentDescription(getContext().getString(R.string.signal_accuracy_indicator_view_description) + getContext().getString(R.string.poor));
|
||||
}
|
||||
else if (this.signalQuality == 3)
|
||||
{
|
||||
this.setContentDescription(getContext().getString(R.string.signal_accuracy_indicator_view_description) + getContext().getString(R.string.good));
|
||||
}
|
||||
else if (this.signalQuality == 4)
|
||||
{
|
||||
this.setContentDescription(getContext().getString(R.string.signal_accuracy_indicator_view_description) + getContext().getString(R.string.great));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.setContentDescription(getContext().getString(R.string.signal_accuracy_indicator_view_description) + getContext().getString(R.string.no_signal));
|
||||
}
|
||||
}
|
||||
private void setAccessibilityString() {
|
||||
if (this.signalQuality == 2) {
|
||||
this.setContentDescription(
|
||||
getContext().getString(R.string.signal_accuracy_indicator_view_description) + getContext()
|
||||
.getString(R.string.poor));
|
||||
} else if (this.signalQuality == 3) {
|
||||
this.setContentDescription(
|
||||
getContext().getString(R.string.signal_accuracy_indicator_view_description) + getContext()
|
||||
.getString(R.string.good));
|
||||
} else if (this.signalQuality == 4) {
|
||||
this.setContentDescription(
|
||||
getContext().getString(R.string.signal_accuracy_indicator_view_description) + getContext()
|
||||
.getString(R.string.great));
|
||||
} else {
|
||||
this.setContentDescription(
|
||||
getContext().getString(R.string.signal_accuracy_indicator_view_description) + getContext()
|
||||
.getString(R.string.no_signal));
|
||||
}
|
||||
}
|
||||
|
||||
private void initPaint() {
|
||||
paint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
paint.setColor(Color.parseColor("#8ab54e"));
|
||||
paintDark = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
paintDark.setColor(Color.parseColor("#455B27"));
|
||||
}
|
||||
private void initPaint() {
|
||||
paint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
paint.setColor(Color.parseColor("#8ab54e"));
|
||||
paintDark = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
paintDark.setColor(Color.parseColor("#455B27"));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
float boxHeight = this.height / 4;
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
float boxHeight = this.height / 4;
|
||||
|
||||
// first draw gray background
|
||||
// first draw gray background
|
||||
|
||||
rect.top = 0;
|
||||
rect.left = 0;
|
||||
rect.right = (int) this.width;
|
||||
rect.bottom = (int) this.height;
|
||||
canvas.drawRect(rect, paintDark);
|
||||
rect.top = 0;
|
||||
rect.left = 0;
|
||||
rect.right = (int) this.width;
|
||||
rect.bottom = (int) this.height;
|
||||
canvas.drawRect(rect, paintDark);
|
||||
|
||||
// then draw green box on top
|
||||
// then draw green box on top
|
||||
|
||||
rect.top = (int) (this.height - (signalQuality * boxHeight));
|
||||
rect.left = 0;
|
||||
rect.right = (int) this.width;
|
||||
rect.bottom = (int) this.height;
|
||||
canvas.drawRect(rect, paint);
|
||||
}
|
||||
rect.top = (int) (this.height - (signalQuality * boxHeight));
|
||||
rect.left = 0;
|
||||
rect.right = (int) this.width;
|
||||
rect.bottom = (int) this.height;
|
||||
canvas.drawRect(rect, paint);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
||||
super.onSizeChanged(w, h, oldw, oldh);
|
||||
@Override
|
||||
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
||||
super.onSizeChanged(w, h, oldw, oldh);
|
||||
|
||||
float boxWidth = w / 4.5f;
|
||||
float boxHeight = h;
|
||||
float boxWidth = w / 4.5f;
|
||||
float boxHeight = h;
|
||||
|
||||
rect = new Rect(0, 0, (int)boxWidth, (int)boxHeight);
|
||||
rect = new Rect(0, 0, (int) boxWidth, (int) boxHeight);
|
||||
|
||||
float xpad = (float)(getPaddingLeft() + getPaddingRight());
|
||||
float ypad = (float)(getPaddingTop() + getPaddingBottom());
|
||||
this.width = (float)w - xpad;
|
||||
this.height = (float)h - ypad;
|
||||
}
|
||||
float xpad = (float) (getPaddingLeft() + getPaddingRight());
|
||||
float ypad = (float) (getPaddingTop() + getPaddingBottom());
|
||||
this.width = (float) w - xpad;
|
||||
this.height = (float) h - ypad;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBaseline() {
|
||||
return getMeasuredHeight() - 10;
|
||||
}
|
||||
@Override
|
||||
public int getBaseline() {
|
||||
return getMeasuredHeight() - 10;
|
||||
}
|
||||
|
||||
/**
|
||||
* Must be 0,2,3 or 4, otherwise 1 will be set
|
||||
*
|
||||
* @param signalQuality
|
||||
*/
|
||||
public void setSignalQuality(Integer signalQuality) {
|
||||
Integer previousSingalQuality = this.signalQuality;
|
||||
/**
|
||||
* Must be 0,2,3 or 4, otherwise 1 will be set
|
||||
*
|
||||
* @param signalQuality
|
||||
*/
|
||||
public void setSignalQuality(Integer signalQuality) {
|
||||
Integer previousSingalQuality = this.signalQuality;
|
||||
|
||||
if (signalQuality == 0) {
|
||||
this.signalQuality = 0;
|
||||
} else if (signalQuality == 2) {
|
||||
this.signalQuality = 2;
|
||||
} else if (signalQuality == 3) {
|
||||
this.signalQuality = 3;
|
||||
} else if (signalQuality == 4) {
|
||||
this.signalQuality = 4;
|
||||
} else {
|
||||
this.signalQuality = 0;
|
||||
}
|
||||
if (signalQuality == 0) {
|
||||
this.signalQuality = 0;
|
||||
} else if (signalQuality == 2) {
|
||||
this.signalQuality = 2;
|
||||
} else if (signalQuality == 3) {
|
||||
this.signalQuality = 3;
|
||||
} else if (signalQuality == 4) {
|
||||
this.signalQuality = 4;
|
||||
} else {
|
||||
this.signalQuality = 0;
|
||||
}
|
||||
|
||||
if (this.signalQuality != previousSingalQuality)
|
||||
{
|
||||
sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED);
|
||||
}
|
||||
if (this.signalQuality != previousSingalQuality) {
|
||||
sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED);
|
||||
}
|
||||
|
||||
setAccessibilityString();
|
||||
setAccessibilityString();
|
||||
|
||||
invalidate();
|
||||
requestLayout();
|
||||
}
|
||||
invalidate();
|
||||
requestLayout();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
int minw = getPaddingLeft() + getPaddingRight() + 20;
|
||||
int w = resolveSizeAndState(minw, widthMeasureSpec, 1);
|
||||
int minh = 50;
|
||||
setMeasuredDimension(w, minh);
|
||||
}
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
int minw = getPaddingLeft() + getPaddingRight() + 20;
|
||||
int w = resolveSizeAndState(minw, widthMeasureSpec, 1);
|
||||
int minh = 50;
|
||||
setMeasuredDimension(w, minh);
|
||||
}
|
||||
|
||||
/**
|
||||
* generate some accessibility info
|
||||
*/
|
||||
public String getAccessibilityText()
|
||||
{
|
||||
if (this.signalQuality == 2) return "poor signal quality";
|
||||
if (this.signalQuality == 3) return "good signal quality";
|
||||
if (this.signalQuality == 4) return "great signal quality";
|
||||
return "no signal";
|
||||
}
|
||||
/**
|
||||
* generate some accessibility info
|
||||
*/
|
||||
public String getAccessibilityText() {
|
||||
if (this.signalQuality == 2)
|
||||
return "poor signal quality";
|
||||
if (this.signalQuality == 3)
|
||||
return "good signal quality";
|
||||
if (this.signalQuality == 4)
|
||||
return "great signal quality";
|
||||
return "no signal";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
|
||||
super.onPopulateAccessibilityEvent(event);
|
||||
@Override
|
||||
public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
|
||||
super.onPopulateAccessibilityEvent(event);
|
||||
|
||||
CharSequence text = getAccessibilityText();
|
||||
CharSequence text = getAccessibilityText();
|
||||
if (!TextUtils.isEmpty(text)) {
|
||||
event.getText().add(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-4
@@ -10,15 +10,14 @@ import com.sap.sailing.android.shared.util.AppUtils;
|
||||
public class AboutDialog {
|
||||
private Dialog dialog;
|
||||
|
||||
public AboutDialog(Context context){
|
||||
public AboutDialog(Context context) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
|
||||
builder.setMessage(AppUtils.getBuildInfo(context))
|
||||
.setTitle(context.getString(R.string.application_version));
|
||||
builder.setMessage(AppUtils.getBuildInfo(context)).setTitle(context.getString(R.string.application_version));
|
||||
dialog = builder.create();
|
||||
}
|
||||
|
||||
public void show(){
|
||||
public void show() {
|
||||
dialog.show();
|
||||
}
|
||||
}
|
||||
+5
-13
@@ -35,10 +35,7 @@ public class BasePreferenceFragment extends PreferenceFragment {
|
||||
if (preference instanceof ListPreference) {
|
||||
ListPreference listPreference = (ListPreference) preference;
|
||||
int index = listPreference.findIndexOfValue(stringValue);
|
||||
preference.setSummary(
|
||||
index >= 0
|
||||
? listPreference.getEntries()[index]
|
||||
: null);
|
||||
preference.setSummary(index >= 0 ? listPreference.getEntries()[index] : null);
|
||||
|
||||
} else if (preference instanceof MultiSelectListPreference || preference instanceof EditSetPreference) {
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -57,27 +54,22 @@ public class BasePreferenceFragment extends PreferenceFragment {
|
||||
addOnPreferenceChangeListener(preference, sBindPreferenceSummaryToValueListener);
|
||||
|
||||
sBindPreferenceSummaryToValueListener.onPreferenceChange(preference,
|
||||
PreferenceManager
|
||||
.getDefaultSharedPreferences(preference.getContext())
|
||||
.getString(preference.getKey(), ""));
|
||||
PreferenceManager.getDefaultSharedPreferences(preference.getContext()).getString(preference.getKey(), ""));
|
||||
}
|
||||
|
||||
protected static void bindPreferenceSummaryToInteger(Preference preference) {
|
||||
addOnPreferenceChangeListener(preference, sBindPreferenceSummaryToValueListener);
|
||||
|
||||
sBindPreferenceSummaryToValueListener.onPreferenceChange(preference,
|
||||
PreferenceManager
|
||||
.getDefaultSharedPreferences(preference.getContext())
|
||||
.getInt(preference.getKey(), 0));
|
||||
PreferenceManager.getDefaultSharedPreferences(preference.getContext()).getInt(preference.getKey(), 0));
|
||||
}
|
||||
|
||||
protected static void bindPreferenceSummaryToSet(Preference preference) {
|
||||
addOnPreferenceChangeListener(preference, sBindPreferenceSummaryToValueListener);
|
||||
|
||||
sBindPreferenceSummaryToValueListener.onPreferenceChange(preference,
|
||||
PreferenceManager
|
||||
.getDefaultSharedPreferences(preference.getContext())
|
||||
.getStringSet(preference.getKey(), new HashSet<String>()));
|
||||
PreferenceManager.getDefaultSharedPreferences(preference.getContext())
|
||||
.getStringSet(preference.getKey(), new HashSet<String>()));
|
||||
}
|
||||
|
||||
protected static void bindPreferenceToCheckbox(CheckBoxPreference checkboxPreference, final Preference target) {
|
||||
|
||||
-1
@@ -22,7 +22,6 @@ public class MultiplePreferenceChangeListener implements OnPreferenceChangeListe
|
||||
listeners.remove(listener);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
boolean result = true;
|
||||
|
||||
+6
-4
@@ -57,7 +57,8 @@ public class EditSetPreference extends DialogPreference {
|
||||
listView.setAdapter(adapter);
|
||||
|
||||
// setup inputView
|
||||
ArrayAdapter<String> autoCompleteAdapter = new ArrayAdapter<String>(view.getContext(), android.R.layout.simple_dropdown_item_1line, exampleValues);
|
||||
ArrayAdapter<String> autoCompleteAdapter = new ArrayAdapter<String>(view.getContext(),
|
||||
android.R.layout.simple_dropdown_item_1line, exampleValues);
|
||||
inputView.setAdapter(autoCompleteAdapter);
|
||||
inputView.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
@@ -67,10 +68,12 @@ public class EditSetPreference extends DialogPreference {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) { }
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
}
|
||||
});
|
||||
|
||||
// setup add button
|
||||
@@ -149,5 +152,4 @@ public class EditSetPreference extends DialogPreference {
|
||||
return value == null ? null : new ArrayList<String>(value);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+2
-4
@@ -19,13 +19,11 @@ public class BaseAppPreferences {
|
||||
return UniqueDeviceUuid.getUniqueId(context);
|
||||
}
|
||||
|
||||
public String getLastScannedQRCode()
|
||||
{
|
||||
public String getLastScannedQRCode() {
|
||||
return preferences.getString(context.getString(R.string.preference_last_scanned_qr_code), null);
|
||||
}
|
||||
|
||||
public void setLastScannedQRCode(String lastQRCode)
|
||||
{
|
||||
public void setLastScannedQRCode(String lastQRCode) {
|
||||
preferences.edit().putString(context.getString(R.string.preference_last_scanned_qr_code), lastQRCode).commit();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -3,5 +3,5 @@ package com.sap.sailing.android.shared.util;
|
||||
import com.sap.sailing.android.shared.data.AbstractCheckinData;
|
||||
|
||||
public interface CheckinDataHandler {
|
||||
public void onCheckinDataAvailable(AbstractCheckinData data);
|
||||
public void onCheckinDataAvailable(AbstractCheckinData data);
|
||||
}
|
||||
+4
-3
@@ -31,12 +31,14 @@ public class FileHandlerUtils {
|
||||
stringBuilder.append(line + "\n");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
ExLog.e(context, TAG, "In Method convertStreamToString while converting stream to string: " + e.getMessage());
|
||||
ExLog.e(context, TAG,
|
||||
"In Method convertStreamToString while converting stream to string: " + e.getMessage());
|
||||
} finally {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
ExLog.e(context, TAG, "In Method convertStreamToString while closing the input stream: " + e.getMessage());
|
||||
ExLog.e(context, TAG,
|
||||
"In Method convertStreamToString while closing the input stream: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
return stringBuilder.toString();
|
||||
@@ -57,5 +59,4 @@ public class FileHandlerUtils {
|
||||
return new File(context.getExternalCacheDir().getPath() + "/");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+3
-1
@@ -19,7 +19,9 @@ public class Lists {
|
||||
return list;
|
||||
}
|
||||
|
||||
/** Clones a SparseArray. */
|
||||
/**
|
||||
* Clones a SparseArray.
|
||||
*/
|
||||
public static <E> SparseArray<E> cloneSparseArray(SparseArray<E> orig) {
|
||||
SparseArray<E> result = new SparseArray<E>();
|
||||
for (int i = 0; i < orig.size(); i++) {
|
||||
|
||||
+87
-83
@@ -16,112 +16,116 @@ import com.sap.sailing.android.shared.logging.ExLog;
|
||||
|
||||
public class NetworkHelper {
|
||||
|
||||
private final static String TAG = NetworkHelper.class.getName();
|
||||
private final static String TAG = NetworkHelper.class.getName();
|
||||
|
||||
protected static NetworkHelper mInstance;
|
||||
protected static Context mContext;
|
||||
protected static NetworkHelper mInstance;
|
||||
protected static Context mContext;
|
||||
|
||||
public static NetworkHelper getInstance(Context context) {
|
||||
if (mInstance == null)
|
||||
{
|
||||
mInstance = new NetworkHelper();
|
||||
mContext = context.getApplicationContext();
|
||||
}
|
||||
public static NetworkHelper getInstance(Context context) {
|
||||
if (mInstance == null) {
|
||||
mInstance = new NetworkHelper();
|
||||
mContext = context.getApplicationContext();
|
||||
}
|
||||
|
||||
return mInstance;
|
||||
}
|
||||
|
||||
protected NetworkHelper(){
|
||||
super();
|
||||
return mInstance;
|
||||
}
|
||||
|
||||
public void executeHttpJsonRequestAsnchronously(HttpRequest request,
|
||||
NetworkHelperSuccessListener successListener, NetworkHelperFailureListener failureListener) {
|
||||
|
||||
NetworkRequestTask task = new NetworkRequestTask(successListener, failureListener);
|
||||
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, request);
|
||||
protected NetworkHelper() {
|
||||
super();
|
||||
}
|
||||
|
||||
private class NetworkRequestTask extends AsyncTask<HttpRequest, Void, Void>
|
||||
{
|
||||
private NetworkHelperSuccessListener successListener;
|
||||
private NetworkHelperFailureListener failureListener;
|
||||
public void executeHttpJsonRequestAsnchronously(HttpRequest request, NetworkHelperSuccessListener successListener,
|
||||
NetworkHelperFailureListener failureListener) {
|
||||
|
||||
private JSONObject response;
|
||||
private boolean isSuccess = false;
|
||||
private NetworkHelperError error;
|
||||
NetworkRequestTask task = new NetworkRequestTask(successListener, failureListener);
|
||||
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, request);
|
||||
}
|
||||
|
||||
public NetworkRequestTask(NetworkHelperSuccessListener successListener,
|
||||
NetworkHelperFailureListener failureListener) {
|
||||
this.successListener = successListener;
|
||||
this.failureListener = failureListener;
|
||||
}
|
||||
private class NetworkRequestTask extends AsyncTask<HttpRequest, Void, Void> {
|
||||
private NetworkHelperSuccessListener successListener;
|
||||
private NetworkHelperFailureListener failureListener;
|
||||
|
||||
@Override
|
||||
protected Void doInBackground(HttpRequest... params) {
|
||||
InputStream stream = null;
|
||||
HttpRequest request = params[0];
|
||||
try {
|
||||
stream = request.execute();
|
||||
String responseStr = readStream(stream);
|
||||
private JSONObject response;
|
||||
private boolean isSuccess = false;
|
||||
private NetworkHelperError error;
|
||||
|
||||
response = null;
|
||||
public NetworkRequestTask(NetworkHelperSuccessListener successListener,
|
||||
NetworkHelperFailureListener failureListener) {
|
||||
this.successListener = successListener;
|
||||
this.failureListener = failureListener;
|
||||
}
|
||||
|
||||
if (responseStr.length() > 0) {
|
||||
response = new JSONObject(responseStr);
|
||||
}
|
||||
@Override
|
||||
protected Void doInBackground(HttpRequest... params) {
|
||||
InputStream stream = null;
|
||||
HttpRequest request = params[0];
|
||||
try {
|
||||
stream = request.execute();
|
||||
String responseStr = readStream(stream);
|
||||
|
||||
isSuccess = true;
|
||||
} catch (IOException e) {
|
||||
error = new NetworkHelperError(e.getMessage());
|
||||
} catch (JSONException e) {
|
||||
error = new NetworkHelperError(e.getMessage());
|
||||
ExLog.e(mContext, TAG, "Failed to parse JSON: " + e.getMessage());
|
||||
}
|
||||
response = null;
|
||||
|
||||
return null;
|
||||
}
|
||||
if (responseStr.length() > 0) {
|
||||
response = new JSONObject(responseStr);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Void result) {
|
||||
if (isSuccess)
|
||||
{
|
||||
successListener.performAction(response);
|
||||
}
|
||||
else
|
||||
{
|
||||
failureListener.performAction(error);
|
||||
}
|
||||
}
|
||||
isSuccess = true;
|
||||
} catch (IOException e) {
|
||||
error = new NetworkHelperError(e.getMessage());
|
||||
} catch (JSONException e) {
|
||||
error = new NetworkHelperError(e.getMessage());
|
||||
ExLog.e(mContext, TAG, "Failed to parse JSON: " + e.getMessage());
|
||||
}
|
||||
|
||||
private String readStream(InputStream inputStream) throws IOException {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
byte[] buffer = new byte[1024];
|
||||
int length = 0;
|
||||
while ((length = inputStream.read(buffer)) != -1) {
|
||||
baos.write(buffer, 0, length);
|
||||
}
|
||||
return new String(baos.toByteArray(), Charset.defaultCharset());
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* perfomAction called in case of network request success
|
||||
*/
|
||||
public interface NetworkHelperSuccessListener { public void performAction(JSONObject response); }
|
||||
@Override
|
||||
protected void onPostExecute(Void result) {
|
||||
if (isSuccess) {
|
||||
successListener.performAction(response);
|
||||
} else {
|
||||
failureListener.performAction(error);
|
||||
}
|
||||
}
|
||||
|
||||
private String readStream(InputStream inputStream) throws IOException {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
byte[] buffer = new byte[1024];
|
||||
int length = 0;
|
||||
while ((length = inputStream.read(buffer)) != -1) {
|
||||
baos.write(buffer, 0, length);
|
||||
}
|
||||
return new String(baos.toByteArray(), Charset.defaultCharset());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* perfomAction called in case of network request failure
|
||||
*/
|
||||
public interface NetworkHelperFailureListener { public void performAction(NetworkHelperError e); }
|
||||
* perfomAction called in case of network request success
|
||||
*/
|
||||
public interface NetworkHelperSuccessListener {
|
||||
public void performAction(JSONObject response);
|
||||
}
|
||||
|
||||
/**
|
||||
* perfomAction called in case of network request failure
|
||||
*/
|
||||
public interface NetworkHelperFailureListener {
|
||||
public void performAction(NetworkHelperError e);
|
||||
}
|
||||
|
||||
/**
|
||||
* Error class for NetworkHelper
|
||||
*
|
||||
*/
|
||||
public class NetworkHelperError {
|
||||
String message;
|
||||
public NetworkHelperError(String message) { this.message = message; }
|
||||
public String getMessage() { return message; }
|
||||
String message;
|
||||
|
||||
public NetworkHelperError(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -123,8 +123,8 @@ public class SelectionBuilder {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SelectionBuilder[table=" + mTable + ", selection=" + getSelection() + ", selectionArgs="
|
||||
+ Arrays.toString(getSelectionArgs()) + " projectionMap = " + mProjectionMap + " ]";
|
||||
return "SelectionBuilder[table=" + mTable + ", selection=" + getSelection() + ", selectionArgs=" + Arrays
|
||||
.toString(getSelectionArgs()) + " projectionMap = " + mProjectionMap + " ]";
|
||||
}
|
||||
|
||||
public Cursor query(SQLiteDatabase db, String[] columns, String orderBy) {
|
||||
@@ -136,8 +136,8 @@ public class SelectionBuilder {
|
||||
if (columns != null)
|
||||
mapColumns(columns);
|
||||
ExLog.i(mContext, TAG, "query(columns=" + Arrays.toString(columns) + ", distinct=" + distinct + ") " + this);
|
||||
return db.query(distinct, mTable, columns, getSelection(), getSelectionArgs(), mGroupBy, mHaving, orderBy,
|
||||
limit);
|
||||
return db
|
||||
.query(distinct, mTable, columns, getSelection(), getSelectionArgs(), mGroupBy, mHaving, orderBy, limit);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+13
-13
@@ -7,15 +7,14 @@ import android.telephony.TelephonyManager;
|
||||
|
||||
/**
|
||||
* I'm picking a device id based on this reply on Stack Overflow: http://stackoverflow.com/a/2853253/3589281
|
||||
* @author lukas
|
||||
*
|
||||
* @author lukas
|
||||
*/
|
||||
public class UniqueDeviceUuid {
|
||||
|
||||
public static String getUniqueId(Context context)
|
||||
{
|
||||
public static String getUniqueId(Context context) {
|
||||
/*
|
||||
String existingDeviceIdentifier = prefs.getDeviceIdentifier();
|
||||
String existingDeviceIdentifier = prefs.getDeviceIdentifier();
|
||||
|
||||
if (existingDeviceIdentifier != null && existingDeviceIdentifier.length() > 0)
|
||||
{
|
||||
@@ -23,16 +22,17 @@ public class UniqueDeviceUuid {
|
||||
}
|
||||
*/
|
||||
|
||||
final TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||
final TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||
|
||||
final String tmDevice, tmSerial, androidId;
|
||||
tmDevice = "" + tm.getDeviceId();
|
||||
tmSerial = "" + tm.getSimSerialNumber();
|
||||
androidId = "" + android.provider.Settings.Secure.getString(context.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
|
||||
final String tmDevice, tmSerial, androidId;
|
||||
tmDevice = "" + tm.getDeviceId();
|
||||
tmSerial = "" + tm.getSimSerialNumber();
|
||||
androidId = "" + android.provider.Settings.Secure
|
||||
.getString(context.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
|
||||
|
||||
UUID deviceUuid = new UUID(androidId.hashCode(), ((long)tmDevice.hashCode() << 32) | tmSerial.hashCode());
|
||||
String deviceId = deviceUuid.toString();
|
||||
UUID deviceUuid = new UUID(androidId.hashCode(), ((long) tmDevice.hashCode() << 32) | tmSerial.hashCode());
|
||||
String deviceId = deviceUuid.toString();
|
||||
|
||||
return deviceId;
|
||||
}
|
||||
return deviceId;
|
||||
}
|
||||
}
|
||||
+103
-118
@@ -26,140 +26,125 @@ import com.sap.sailing.android.shared.ui.adapters.AbstractRegattaAdapter;
|
||||
import com.sap.sailing.android.shared.util.BaseAppPreferences;
|
||||
|
||||
public abstract class AbstractHomeFragment extends BaseFragment {
|
||||
private final static String TAG = AbstractHomeFragment.class.getName();
|
||||
protected AbstractRegattaAdapter adapter;
|
||||
protected final static int REGATTA_LOADER = 1;
|
||||
protected BaseAppPreferences prefs;
|
||||
protected int requestCodeQRCode = 442;
|
||||
private final static String TAG = AbstractHomeFragment.class.getName();
|
||||
protected AbstractRegattaAdapter adapter;
|
||||
protected final static int REGATTA_LOADER = 1;
|
||||
protected BaseAppPreferences prefs;
|
||||
protected int requestCodeQRCode = 442;
|
||||
|
||||
@SuppressLint("InflateParams")
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
super.onCreateView(inflater, container, savedInstanceState);
|
||||
@SuppressLint("InflateParams")
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
super.onCreateView(inflater, container, savedInstanceState);
|
||||
|
||||
View view = inflater.inflate(R.layout.fragment_home, container, false);
|
||||
View view = inflater.inflate(R.layout.fragment_home, container, false);
|
||||
|
||||
Button scanButton = (Button) view.findViewById(R.id.scanQr);
|
||||
if (scanButton != null) {
|
||||
scanButton.setOnClickListener(new ClickListener());
|
||||
}
|
||||
Button scanButton = (Button) view.findViewById(R.id.scanQr);
|
||||
if (scanButton != null) {
|
||||
scanButton.setOnClickListener(new ClickListener());
|
||||
}
|
||||
|
||||
Button noQrCodeButton = (Button) view.findViewById(R.id.noQrCode);
|
||||
if (noQrCodeButton != null) {
|
||||
noQrCodeButton.setOnClickListener(new ClickListener());
|
||||
}
|
||||
Button noQrCodeButton = (Button) view.findViewById(R.id.noQrCode);
|
||||
if (noQrCodeButton != null) {
|
||||
noQrCodeButton.setOnClickListener(new ClickListener());
|
||||
}
|
||||
|
||||
return view;
|
||||
}
|
||||
return view;
|
||||
}
|
||||
|
||||
private void showNoQRCodeMessage() {
|
||||
((AbstractStartActivity) getActivity()).showErrorPopup(
|
||||
R.string.no_qr_code_popup_title,
|
||||
R.string.no_qr_code_popup_message);
|
||||
}
|
||||
private void showNoQRCodeMessage() {
|
||||
((AbstractStartActivity) getActivity())
|
||||
.showErrorPopup(R.string.no_qr_code_popup_title, R.string.no_qr_code_popup_message);
|
||||
}
|
||||
|
||||
private boolean requestQRCodeScan() {
|
||||
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
|
||||
intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
|
||||
private boolean requestQRCodeScan() {
|
||||
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
|
||||
intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
|
||||
|
||||
PackageManager manager = getActivity().getPackageManager();
|
||||
List<ResolveInfo> infos = manager.queryIntentActivities(intent, 0);
|
||||
if (infos.size() != 0) {
|
||||
startActivityForResult(intent, requestCodeQRCode);
|
||||
return true;
|
||||
} else {
|
||||
Uri marketUri = Uri
|
||||
.parse("market://details?id=com.google.zxing.client.android");
|
||||
Intent marketIntent = new Intent(Intent.ACTION_VIEW, marketUri);
|
||||
infos = manager.queryIntentActivities(marketIntent, 0);
|
||||
if (infos.size() != 0) {
|
||||
startActivity(marketIntent);
|
||||
} else {
|
||||
Toast.makeText(
|
||||
getActivity(),
|
||||
getString(R.string.error_play_store_and_scanning_not_available),
|
||||
Toast.LENGTH_LONG).show();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
PackageManager manager = getActivity().getPackageManager();
|
||||
List<ResolveInfo> infos = manager.queryIntentActivities(intent, 0);
|
||||
if (infos.size() != 0) {
|
||||
startActivityForResult(intent, requestCodeQRCode);
|
||||
return true;
|
||||
} else {
|
||||
Uri marketUri = Uri.parse("market://details?id=com.google.zxing.client.android");
|
||||
Intent marketIntent = new Intent(Intent.ACTION_VIEW, marketUri);
|
||||
infos = manager.queryIntentActivities(marketIntent, 0);
|
||||
if (infos.size() != 0) {
|
||||
startActivity(marketIntent);
|
||||
} else {
|
||||
Toast.makeText(getActivity(), getString(R.string.error_play_store_and_scanning_not_available),
|
||||
Toast.LENGTH_LONG).show();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
String scanResult = data.getStringExtra("SCAN_RESULT");
|
||||
prefs.setLastScannedQRCode(scanResult);
|
||||
// handleQRCode is called in onResume()
|
||||
} else if (resultCode == Activity.RESULT_CANCELED) {
|
||||
Toast.makeText(getActivity(),
|
||||
getString(R.string.scanning_cancelled), Toast.LENGTH_LONG)
|
||||
.show();
|
||||
} else {
|
||||
String templateString = getString(R.string.error_scanning_qrcode);
|
||||
Toast.makeText(
|
||||
getActivity(),
|
||||
templateString.replace("{result-code}",
|
||||
String.valueOf(resultCode)), Toast.LENGTH_LONG)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
String scanResult = data.getStringExtra("SCAN_RESULT");
|
||||
prefs.setLastScannedQRCode(scanResult);
|
||||
// handleQRCode is called in onResume()
|
||||
} else if (resultCode == Activity.RESULT_CANCELED) {
|
||||
Toast.makeText(getActivity(), getString(R.string.scanning_cancelled), Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
String templateString = getString(R.string.error_scanning_qrcode);
|
||||
Toast.makeText(getActivity(), templateString.replace("{result-code}", String.valueOf(resultCode)),
|
||||
Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
protected void handleQRCode(String qrCode) {
|
||||
ExLog.i(getActivity(), TAG, "Parsing URI: " + qrCode);
|
||||
Uri uri = Uri.parse(qrCode);
|
||||
handleScannedOrUrlMatchedUri(uri);
|
||||
}
|
||||
protected void handleQRCode(String qrCode) {
|
||||
ExLog.i(getActivity(), TAG, "Parsing URI: " + qrCode);
|
||||
Uri uri = Uri.parse(qrCode);
|
||||
handleScannedOrUrlMatchedUri(uri);
|
||||
}
|
||||
|
||||
public abstract void handleScannedOrUrlMatchedUri(Uri uri);
|
||||
public abstract void handleScannedOrUrlMatchedUri(Uri uri);
|
||||
|
||||
/**
|
||||
* Display a confirmation-dialog in which the user confirms his full name
|
||||
* and sail-id.
|
||||
*
|
||||
* @param checkinData
|
||||
*/
|
||||
public abstract void displayUserConfirmationScreen(
|
||||
final AbstractCheckinData data);
|
||||
/**
|
||||
* Display a confirmation-dialog in which the user confirms his full name
|
||||
* and sail-id.
|
||||
*
|
||||
* @param checkinData
|
||||
*/
|
||||
public abstract void displayUserConfirmationScreen(final AbstractCheckinData data);
|
||||
|
||||
protected void clearScannedQRCodeInPrefs() {
|
||||
prefs.setLastScannedQRCode(null);
|
||||
}
|
||||
protected void clearScannedQRCodeInPrefs() {
|
||||
prefs.setLastScannedQRCode(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows a pop-up-dialog that informs the user than an API-call has failed
|
||||
* and recommends a retry.
|
||||
*/
|
||||
protected void displayAPIErrorRecommendRetry() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
builder.setMessage(getString(R.string.notify_user_api_call_failed));
|
||||
builder.setCancelable(true);
|
||||
builder.setPositiveButton(getString(R.string.ok),
|
||||
new DialogInterface.OnClickListener() {
|
||||
/**
|
||||
* Shows a pop-up-dialog that informs the user than an API-call has failed
|
||||
* and recommends a retry.
|
||||
*/
|
||||
protected void displayAPIErrorRecommendRetry() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
builder.setMessage(getString(R.string.notify_user_api_call_failed));
|
||||
builder.setCancelable(true);
|
||||
builder.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.cancel();
|
||||
}
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.cancel();
|
||||
}
|
||||
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
|
||||
private class ClickListener implements OnClickListener {
|
||||
private class ClickListener implements OnClickListener {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int id = v.getId();
|
||||
if(id == R.id.scanQr)
|
||||
{
|
||||
requestQRCodeScan();
|
||||
}
|
||||
else if(id == R.id.noQrCode)
|
||||
{
|
||||
showNoQRCodeMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int id = v.getId();
|
||||
if (id == R.id.scanQr) {
|
||||
requestQRCodeScan();
|
||||
} else if (id == R.id.noQrCode) {
|
||||
showNoQRCodeMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
-10
@@ -4,15 +4,13 @@ import android.support.v4.app.Fragment;
|
||||
|
||||
public abstract class BaseFragment extends Fragment {
|
||||
|
||||
protected float dpToPx(float dp)
|
||||
{
|
||||
float density = getActivity().getResources().getDisplayMetrics().density;
|
||||
return dp * density;
|
||||
}
|
||||
protected float dpToPx(float dp) {
|
||||
float density = getActivity().getResources().getDisplayMetrics().density;
|
||||
return dp * density;
|
||||
}
|
||||
|
||||
protected float pxToDp(float px)
|
||||
{
|
||||
float density = getActivity().getResources().getDisplayMetrics().density;
|
||||
return px / density;
|
||||
}
|
||||
protected float pxToDp(float px) {
|
||||
float density = getActivity().getResources().getDisplayMetrics().density;
|
||||
return px / density;
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.sap.sailing.android.tracking.app"
|
||||
android:versionCode="1"
|
||||
android:versionName="1 - Altitude" >
|
||||
package="com.sap.sailing.android.tracking.app"
|
||||
android:versionCode="1"
|
||||
android:versionName="1 - Altitude">
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="14"
|
||||
android:targetSdkVersion="22" />
|
||||
android:targetSdkVersion="22"/>
|
||||
|
||||
<permission
|
||||
android:name="com.sap.sailing.android.tracking.app.permission.C2D_MESSAGE"
|
||||
android:protectionLevel="signature" />
|
||||
android:protectionLevel="signature"/>
|
||||
|
||||
<!--<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />-->
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
||||
<uses-permission android:name="com.sap.sailing.android.tracking.app.permission.C2D_MESSAGE" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
|
||||
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
|
||||
<uses-permission android:name="com.sap.sailing.android.tracking.app.permission.C2D_MESSAGE"/>
|
||||
<uses-permission android:name="android.permission.CAMERA"/>
|
||||
|
||||
<application
|
||||
android:name="com.sap.sailing.android.shared.application.LoggableApplication"
|
||||
@@ -28,32 +28,34 @@
|
||||
android:hardwareAccelerated="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme" >
|
||||
android:theme="@style/AppTheme">
|
||||
<meta-data
|
||||
android:name="com.google.android.gms.version"
|
||||
android:value="@integer/google_play_services_version" />
|
||||
android:value="@integer/google_play_services_version"/>
|
||||
|
||||
<activity
|
||||
android:name=".ui.activities.StartActivity"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="unspecified" >
|
||||
android:screenOrientation="unspecified">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
|
||||
<data android:host="*"
|
||||
android:scheme="http"
|
||||
android:pathPattern=".*tracking/checkin.*"/>
|
||||
<data
|
||||
android:host="*"
|
||||
android:scheme="http"
|
||||
android:pathPattern=".*tracking/checkin.*"/>
|
||||
|
||||
<data android:host="*"
|
||||
<data
|
||||
android:host="*"
|
||||
android:scheme="http"
|
||||
android:pathPattern=".*tracking/checkin.*"/>
|
||||
</intent-filter>
|
||||
@@ -61,76 +63,77 @@
|
||||
<activity
|
||||
android:name=".ui.activities.LeaderboardWebViewActivity"
|
||||
android:label="@string/title_activity_webview"
|
||||
android:screenOrientation="unspecified" >
|
||||
android:screenOrientation="unspecified">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".ui.activities.LeaderboardWebViewActivity" />
|
||||
android:value=".ui.activities.LeaderboardWebViewActivity"/>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.activities.RegattaActivity"
|
||||
android:label="@string/title_activity_regatta"
|
||||
android:screenOrientation="unspecified" >
|
||||
android:screenOrientation="unspecified">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".ui.activities.StartActivity" />
|
||||
android:value=".ui.activities.StartActivity"/>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.activities.TrackingActivity"
|
||||
android:label="@string/title_activity_tracking"
|
||||
android:screenOrientation="unspecified" >
|
||||
android:screenOrientation="unspecified">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".ui.activities.StartActivity" />
|
||||
android:value=".ui.activities.StartActivity"/>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.activities.SettingsActivity"
|
||||
android:screenOrientation="unspecified" />
|
||||
android:screenOrientation="unspecified"/>
|
||||
|
||||
<service
|
||||
android:name=".services.TrackingService"
|
||||
android:exported="false"
|
||||
android:icon="@drawable/icon"
|
||||
android:label="@string/tracking_service" />
|
||||
<!-- <service
|
||||
android:name=".services.TransmittingService"
|
||||
android:exported="false"
|
||||
android:icon="@drawable/icon"
|
||||
android:label="@string/transmitting_service" /> -->
|
||||
android:label="@string/tracking_service"/>
|
||||
<!-- <service
|
||||
android:name=".services.TransmittingService"
|
||||
android:exported="false"
|
||||
android:icon="@drawable/icon"
|
||||
android:label="@string/transmitting_service" /> -->
|
||||
|
||||
<service
|
||||
android:name="com.sap.sailing.android.shared.services.sending.MessageSendingService"
|
||||
android:exported="false" >
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="com.sap.sailing.android.tracking.app.action.sendSavedIntents" />
|
||||
<action android:name="com.sap.sailing.android.tracking.app.action.sendMessage" />
|
||||
<action android:name="com.sap.sailing.android.tracking.app.action.sendSavedIntents"/>
|
||||
<action android:name="com.sap.sailing.android.tracking.app.action.sendMessage"/>
|
||||
</intent-filter>
|
||||
</service>
|
||||
<!--<service android:name=".service.GcmIntentService" />-->
|
||||
|
||||
<receiver android:name="com.sap.sailing.android.shared.services.sending.ConnectivityChangedReceiver" >
|
||||
<receiver android:name="com.sap.sailing.android.shared.services.sending.ConnectivityChangedReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
|
||||
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver
|
||||
android:name=".receiver.GcmBroadcastReceiver"
|
||||
android:permission="com.google.android.c2dm.permission.SEND" >
|
||||
android:permission="com.google.android.c2dm.permission.SEND">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
|
||||
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
|
||||
|
||||
<category android:name="com.sap.sailing.android.tracking.app" />
|
||||
<category android:name="com.sap.sailing.android.tracking.app"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".receiver.PowerConnectionReceiver" >
|
||||
<receiver android:name=".receiver.PowerConnectionReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
|
||||
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />
|
||||
<action android:name="android.intent.action.ACTION_POWER_CONNECTED"/>
|
||||
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<provider
|
||||
android:name="com.sap.sailing.android.tracking.app.provider.AnalyticsProvider"
|
||||
android:authorities="com.sap.sailing.android.tracking.app.provider.db"
|
||||
android:exported="false" />
|
||||
android:exported="false"/>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -95,7 +95,7 @@ clean.doLast {
|
||||
build.doLast {
|
||||
// Copy APK file
|
||||
copy {
|
||||
from ("build/outputs/apk") {
|
||||
from("build/outputs/apk") {
|
||||
include "**/*debug.apk"
|
||||
}
|
||||
into "../../java/com.sap.sailing.www/apps"
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<lint>
|
||||
<issue id="TypographyDashes">
|
||||
<ignore path="res/values/preferences.xml" />
|
||||
<ignore path="res/values/preferences.xml"/>
|
||||
</issue>
|
||||
|
||||
<!-- Reason: Don't want to use apply() instead of commit() -->
|
||||
<!-- Reason: Don't want to use apply() instead of commit() -->
|
||||
<issue id="CommitPrefEdits">
|
||||
<ignore path="src/com/sap/sailing/android/tracking/app/utils/AppPreferences.java" />
|
||||
<ignore path="src/com/sap/sailing/android/tracking/app/utils/AppPreferences.java"/>
|
||||
</issue>
|
||||
|
||||
<!-- Reason: Eclipse users don't get the override -->
|
||||
<!-- Reason: Eclipse users don't get the override -->
|
||||
<issue id="GradleOverrides">
|
||||
<ignore path="AndroidManifest.xml" />
|
||||
<ignore path="AndroidManifest.xml"/>
|
||||
</issue>
|
||||
|
||||
<!-- Reason: Yes, overlap possible, but can easily be caught by testers / also: not critical -->
|
||||
<!-- Reason: Yes, overlap possible, but can easily be caught by testers / also: not critical -->
|
||||
<issue id="RelativeOverlap">
|
||||
<ignore path="res/layout/fragment_tracking.xml" />
|
||||
<ignore path="res/layout-land/fragment_tracking.xml" />
|
||||
<ignore path="res/layout/fragment_tracking.xml"/>
|
||||
<ignore path="res/layout-land/fragment_tracking.xml"/>
|
||||
</issue>
|
||||
|
||||
<!-- Reason: Looks like it belongs to vpi__dark_theme -->
|
||||
<issue id="UnusedResources">
|
||||
<ignore path="res/color/vpi__light_theme.xml" />
|
||||
<ignore path="res/color/vpi__light_theme.xml"/>
|
||||
</issue>
|
||||
</lint>
|
||||
@@ -15,7 +15,8 @@
|
||||
|
||||
<properties>
|
||||
<!-- If you change this name, change in app too! -->
|
||||
<additional-deployment-version-file>com.sap.sailing.android.tracking.app.version</additional-deployment-version-file>
|
||||
<additional-deployment-version-file>com.sap.sailing.android.tracking.app.version
|
||||
</additional-deployment-version-file>
|
||||
<!-- passed by buildAndUpdateProduct.sh (parsed from AndroidManifest.xml) -->
|
||||
<app-version>${tracking-app-version}</app-version>
|
||||
</properties>
|
||||
@@ -26,14 +27,14 @@
|
||||
<artifactId>android</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>com.android.support</groupId>
|
||||
<artifactId>support-annotations</artifactId>
|
||||
<version>21.0.3</version>
|
||||
<type>aar</type>
|
||||
</dependency>
|
||||
-->
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>com.android.support</groupId>
|
||||
<artifactId>support-annotations</artifactId>
|
||||
<version>21.0.3</version>
|
||||
<type>aar</type>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
<dependency>
|
||||
<groupId>com.android.support</groupId>
|
||||
@@ -57,10 +58,10 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.sap.sailing</groupId>
|
||||
<artifactId>com.sap.sailing.android.shared</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<type>apklib</type>
|
||||
<groupId>com.sap.sailing</groupId>
|
||||
<artifactId>com.sap.sailing.android.shared</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<type>apklib</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -79,7 +80,7 @@
|
||||
</sdk>
|
||||
<release>true</release>
|
||||
<proguard>
|
||||
<!-- Someone needs to look into this - quite hard to find a configuration that doesnt break everything -->
|
||||
<!-- Someone needs to look into this - quite hard to find a configuration that doesnt break everything -->
|
||||
<skip>true</skip>
|
||||
<config>proguard-project.txt</config>
|
||||
<configs>
|
||||
|
||||
@@ -20,5 +20,6 @@
|
||||
<item android:state_pressed="true" android:color="@color/vpi__bright_foreground_holo_dark"/>
|
||||
<item android:state_selected="true" android:color="@color/vpi__bright_foreground_holo_dark"/>
|
||||
<!--item android:state_activated="true" android:color="@color/vpi__bright_foreground_holo_dark"/-->
|
||||
<item android:color="@color/vpi__bright_foreground_holo_dark"/> <!-- not selected -->
|
||||
<item android:color="@color/vpi__bright_foreground_holo_dark"/>
|
||||
<!-- not selected -->
|
||||
</selector>
|
||||
@@ -20,7 +20,8 @@
|
||||
<item android:state_pressed="true" android:color="@color/vpi__bright_foreground_holo_light"/>
|
||||
<item android:state_selected="true" android:color="@color/vpi__bright_foreground_holo_light"/>
|
||||
<!--item android:state_activated="true" android:color="@color/vpi__bright_foreground_holo_light"/-->
|
||||
<item android:color="@color/vpi__bright_foreground_holo_light"/> <!-- not selected -->
|
||||
<item android:color="@color/vpi__bright_foreground_holo_light"/>
|
||||
<!-- not selected -->
|
||||
|
||||
</selector>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle" >
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="#55ffffff" />
|
||||
<solid android:color="#55ffffff"/>
|
||||
|
||||
<stroke
|
||||
android:width="1dip"
|
||||
android:color="#ffffff" />
|
||||
android:color="#ffffff"/>
|
||||
|
||||
<corners android:radius="5dip" />
|
||||
<corners android:radius="5dip"/>
|
||||
|
||||
</shape>
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle" >
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="#00FFFFFF" />
|
||||
<solid android:color="#00FFFFFF"/>
|
||||
|
||||
<stroke
|
||||
android:width="0.5dip"
|
||||
android:color="#ffffff" />
|
||||
android:color="#ffffff"/>
|
||||
|
||||
<corners android:radius="5dip" />
|
||||
<corners android:radius="5dip"/>
|
||||
|
||||
</shape>
|
||||
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="@color/sap_green" />
|
||||
<solid android:color="@color/sap_green"/>
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="5dip"
|
||||
android:bottomRightRadius="5dip"
|
||||
android:topLeftRadius="5dip"
|
||||
android:topRightRadius="5dip" />
|
||||
android:topRightRadius="5dip"/>
|
||||
</shape>
|
||||
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="@color/sap_red" />
|
||||
<solid android:color="@color/sap_red"/>
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="5dip"
|
||||
android:bottomRightRadius="5dip"
|
||||
android:topLeftRadius="5dip"
|
||||
android:topRightRadius="5dip" />
|
||||
android:topRightRadius="5dip"/>
|
||||
</shape>
|
||||
@@ -16,19 +16,19 @@
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Non focused states -->
|
||||
<item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/vpi__tab_unselected_holo" />
|
||||
<item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/vpi__tab_selected_holo" />
|
||||
<item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/vpi__tab_unselected_holo"/>
|
||||
<item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/vpi__tab_selected_holo"/>
|
||||
|
||||
<!-- Focused states -->
|
||||
<item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/vpi__tab_unselected_focused_holo" />
|
||||
<item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/vpi__tab_selected_focused_holo" />
|
||||
<item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/vpi__tab_unselected_focused_holo"/>
|
||||
<item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/vpi__tab_selected_focused_holo"/>
|
||||
|
||||
<!-- Pressed -->
|
||||
<!-- Non focused states -->
|
||||
<item android:state_focused="false" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/vpi__tab_unselected_pressed_holo" />
|
||||
<item android:state_focused="false" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/vpi__tab_selected_pressed_holo" />
|
||||
<item android:state_focused="false" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/vpi__tab_unselected_pressed_holo"/>
|
||||
<item android:state_focused="false" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/vpi__tab_selected_pressed_holo"/>
|
||||
|
||||
<!-- Focused states -->
|
||||
<item android:state_focused="true" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/vpi__tab_unselected_pressed_holo" />
|
||||
<item android:state_focused="true" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/vpi__tab_selected_pressed_holo" />
|
||||
<item android:state_focused="true" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/vpi__tab_unselected_pressed_holo"/>
|
||||
<item android:state_focused="true" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/vpi__tab_selected_pressed_holo"/>
|
||||
</selector>
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
tools:ignore="Overdraw"
|
||||
android:background="@color/darker_gray" >
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
tools:ignore="Overdraw"
|
||||
android:background="@color/darker_gray">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/compass_bearing_header_text_view"
|
||||
@@ -28,6 +28,6 @@
|
||||
android:gravity="center"
|
||||
android:text="@string/initial_hyphen_degrees"
|
||||
android:layout_centerInParent="true"
|
||||
android:textSize="124sp" />
|
||||
android:textSize="124sp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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" >
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/homeBackground"
|
||||
@@ -11,7 +11,7 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:contentDescription="@string/empty"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/working_title" />
|
||||
android:src="@drawable/working_title"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/bottomLayout"
|
||||
@@ -30,7 +30,7 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center"
|
||||
android:text="@string/scan_hint"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -42,31 +42,31 @@
|
||||
android:layout_marginTop="10dp"
|
||||
>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansButton
|
||||
android:id="@+id/scanQr"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/rounded_btn_yellow"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/scan_qr" />
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansButton
|
||||
android:id="@+id/scanQr"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/rounded_btn_yellow"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/scan_qr"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansButton
|
||||
android:id="@+id/noQrCode"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:background="@drawable/rounded_btn_white"
|
||||
android:textColor="@color/black"
|
||||
android:text="@string/no_qr_code" />
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansButton
|
||||
android:id="@+id/noQrCode"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:background="@drawable/rounded_btn_white"
|
||||
android:textColor="@color/black"
|
||||
android:text="@string/no_qr_code"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
android:layout_above="@id/two_buttons_layout"
|
||||
android:layout_alignParentTop="true"
|
||||
android:divider="@android:color/white"
|
||||
android:dividerHeight="1dp"
|
||||
android:dividerHeight="1dp"
|
||||
>
|
||||
</ListView>
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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" >
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/top_bar"
|
||||
@@ -11,7 +11,7 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:background="@color/sap_yellow" />
|
||||
android:background="@color/sap_yellow"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/two_panels_layout"
|
||||
@@ -20,13 +20,13 @@
|
||||
android:layout_above="@id/start_tracking_box"
|
||||
android:layout_below="@id/top_bar"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal" >
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/image"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_weight="1" >
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/userImage"
|
||||
@@ -35,7 +35,7 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:contentDescription="@string/desc_regatta_user_image"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/picture" />
|
||||
android:src="@drawable/picture"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/add_photo"
|
||||
@@ -44,7 +44,7 @@
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@color/white_transparent"
|
||||
android:orientation="horizontal" >
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/add_photo_button"
|
||||
@@ -54,7 +54,7 @@
|
||||
android:contentDescription="@string/desc_add_photo_button"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:src="@drawable/ic_menu_camera" />
|
||||
android:src="@drawable/ic_menu_camera"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/add_photo_text"
|
||||
@@ -64,7 +64,7 @@
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:text="@string/add_team_photo"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -78,7 +78,7 @@
|
||||
android:baselineAligned="false"
|
||||
android:measureWithLargestChild="false"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp" >
|
||||
android:padding="10dp">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/competitor_name"
|
||||
@@ -89,7 +89,7 @@
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:text=""
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="10dp"
|
||||
@@ -98,9 +98,9 @@
|
||||
android:cropToPadding="true"
|
||||
android:gravity="end"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp" >
|
||||
android:paddingRight="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/flag_image"
|
||||
@@ -108,7 +108,7 @@
|
||||
android:layout_height="fill_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:contentDescription="@string/content_description_flag_icon"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
@@ -118,7 +118,7 @@
|
||||
android:gravity="end|center_vertical"
|
||||
android:padding="0dp"
|
||||
android:text=""
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -130,13 +130,13 @@
|
||||
android:layout_toEndOf="@+id/add_photo"
|
||||
android:background="@drawable/background_transparent_box"
|
||||
android:orientation="horizontal"
|
||||
android:padding="0dp" >
|
||||
android:padding="0dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/change_photo_button"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:background="@drawable/stift" />
|
||||
android:background="@drawable/stift"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/thank_you_layout"
|
||||
@@ -165,7 +165,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:measureWithLargestChild="false"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="invisible" >
|
||||
android:visibility="invisible">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/thank_you_note"
|
||||
@@ -175,7 +175,7 @@
|
||||
android:padding="5dp"
|
||||
android:text="@string/thank_you_you_successfully_participated"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -184,7 +184,7 @@
|
||||
android:layout_height="fill_parent"
|
||||
android:baselineAligned="false"
|
||||
android:measureWithLargestChild="false"
|
||||
android:orientation="horizontal" >
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/regatta_starts_in"
|
||||
@@ -196,7 +196,7 @@
|
||||
android:paddingTop="10dp"
|
||||
android:text="@string/regatta_starts_in"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/three_boxes_regatta_starts"
|
||||
@@ -207,7 +207,7 @@
|
||||
android:gravity="center"
|
||||
android:measureWithLargestChild="false"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp" >
|
||||
android:padding="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/three_boxes_days_box"
|
||||
@@ -219,7 +219,7 @@
|
||||
android:gravity="center"
|
||||
android:measureWithLargestChild="false"
|
||||
android:orientation="vertical"
|
||||
android:padding="0dp" >
|
||||
android:padding="0dp">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/starts_in_days"
|
||||
@@ -227,7 +227,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="0dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="40sp" />
|
||||
android:textSize="40sp"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.AutoResizeTextView
|
||||
android:id="@+id/starts_in_days_label"
|
||||
@@ -237,7 +237,7 @@
|
||||
android:padding="0dp"
|
||||
android:text="@string/days"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -250,7 +250,7 @@
|
||||
android:gravity="center"
|
||||
android:measureWithLargestChild="false"
|
||||
android:orientation="vertical"
|
||||
android:padding="0dp" >
|
||||
android:padding="0dp">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/starts_in_hours"
|
||||
@@ -258,7 +258,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="0dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="40sp" />
|
||||
android:textSize="40sp"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.AutoResizeTextView
|
||||
android:id="@+id/starts_in_hours_label"
|
||||
@@ -268,7 +268,7 @@
|
||||
android:padding="0dp"
|
||||
android:text="@string/hours"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -281,7 +281,7 @@
|
||||
android:gravity="center"
|
||||
android:measureWithLargestChild="false"
|
||||
android:orientation="vertical"
|
||||
android:padding="0dp" >
|
||||
android:padding="0dp">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/starts_in_minutes"
|
||||
@@ -289,7 +289,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="0dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="40sp" />
|
||||
android:textSize="40sp"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.AutoResizeTextView
|
||||
android:id="@+id/starts_in_minutes_label"
|
||||
@@ -299,7 +299,7 @@
|
||||
android:padding="0dp"
|
||||
android:text="@string/minutes"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
@@ -314,14 +314,14 @@
|
||||
android:layout_above="@+id/start_tracking_box"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:background="@color/sap_yellow" />
|
||||
android:background="@color/sap_yellow"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/start_tracking_box"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_above="@id/bottomLayout"
|
||||
android:background="@color/gray" >
|
||||
android:background="@color/gray">
|
||||
|
||||
<View
|
||||
android:id="@+id/white_bar"
|
||||
@@ -330,13 +330,13 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@color/white_transparent" />
|
||||
android:background="@color/white_transparent"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_below="@id/white_bar"
|
||||
android:orientation="horizontal" >
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansButton
|
||||
android:id="@+id/show_leaderboards_button"
|
||||
@@ -350,7 +350,7 @@
|
||||
android:padding="5dp"
|
||||
android:text="@string/show_leaderboard"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansButton
|
||||
android:id="@+id/start_tracking"
|
||||
@@ -364,7 +364,7 @@
|
||||
android:padding="5dp"
|
||||
android:text="@string/start_tracking"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -375,7 +375,7 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:background="@color/darker_gray" >
|
||||
android:background="@color/darker_gray">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/bottom_announcement"
|
||||
@@ -385,7 +385,7 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center"
|
||||
android:text="@string/please_listen_to_announcements"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
tools:ignore="Overdraw"
|
||||
android:background="@color/darker_gray" >
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
tools:ignore="Overdraw"
|
||||
android:background="@color/darker_gray">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/speed_header_text_view"
|
||||
@@ -17,13 +17,13 @@
|
||||
android:textSize="14sp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="15dp" />
|
||||
android:paddingTop="15dp"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="vertical" >
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.AutoResizeLightTextView
|
||||
android:id="@+id/speed_text_view"
|
||||
@@ -34,7 +34,7 @@
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/initial_hyphen"
|
||||
android:textSize="124sp"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.AutoResizeLightTextView
|
||||
android:id="@+id/speed_unit_text_view"
|
||||
@@ -46,7 +46,7 @@
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"/>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
+10
-10
@@ -1,19 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="Overdraw"
|
||||
android:background="@color/black" >
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="Overdraw"
|
||||
android:background="@color/black">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/stop_tracking_box"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="100dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/gray" >
|
||||
android:background="@color/gray">
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
@@ -21,7 +21,7 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@color/white_transparent" />
|
||||
android:background="@color/white_transparent"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansButton
|
||||
android:id="@+id/stop_tracking"
|
||||
@@ -34,7 +34,7 @@
|
||||
android:padding="10dp"
|
||||
android:text="@string/stop_tracking"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"/>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -10,12 +10,12 @@
|
||||
android:layout_gravity="center"
|
||||
android:isScrollContainer="true"
|
||||
android:orientation="vertical"
|
||||
android:scrollbars="vertical" >
|
||||
android:scrollbars="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/black" >
|
||||
android:background="@color/black">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/mode_label"
|
||||
@@ -27,7 +27,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/tracking_mode" />
|
||||
android:text="@string/tracking_mode"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/mode"
|
||||
@@ -40,7 +40,7 @@
|
||||
android:paddingRight="10dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:text="@string/tracking_mode_caching"
|
||||
android:textColor="@color/sap_green" />
|
||||
android:textColor="@color/sap_green"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/tracking_unsent_fixes_label"
|
||||
@@ -50,7 +50,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/tracking_unsent_fixes" />
|
||||
android:text="@string/tracking_unsent_fixes"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/tracking_unsent_fixes"
|
||||
@@ -62,7 +62,7 @@
|
||||
android:layout_alignParentEnd="true"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:text="@string/none" />
|
||||
android:text="@string/none"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/tracking_status_label"
|
||||
@@ -72,7 +72,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/tracking_status" />
|
||||
android:text="@string/tracking_status"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/tracking_status"
|
||||
@@ -85,7 +85,7 @@
|
||||
android:paddingRight="10dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:text="@string/tracking_status_tracking"
|
||||
android:textColor="@color/sap_green" />
|
||||
android:textColor="@color/sap_green"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/gps_quality"
|
||||
@@ -95,7 +95,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/tracking_gps_accuracy" />
|
||||
android:text="@string/tracking_gps_accuracy"/>
|
||||
|
||||
<!-- Separators -->
|
||||
|
||||
@@ -103,25 +103,25 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/mode_label"
|
||||
android:background="@android:color/darker_gray" />
|
||||
android:background="@android:color/darker_gray"/>
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/tracking_unsent_fixes_label"
|
||||
android:background="@android:color/darker_gray" />
|
||||
android:background="@android:color/darker_gray"/>
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/tracking_status_label"
|
||||
android:background="@android:color/darker_gray" />
|
||||
android:background="@android:color/darker_gray"/>
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/gps_quality"
|
||||
android:background="@android:color/darker_gray" />
|
||||
android:background="@android:color/darker_gray"/>
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
@@ -129,7 +129,7 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignTop="@+id/tracking_time_info_label"
|
||||
android:background="@android:color/darker_gray" />
|
||||
android:background="@android:color/darker_gray"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/tracking_time_info_label"
|
||||
@@ -141,7 +141,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/tracking_time" />
|
||||
android:text="@string/tracking_time"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.AutoResizeTextView
|
||||
tools:ignore="InconsistentLayout"
|
||||
@@ -155,16 +155,16 @@
|
||||
android:gravity="end"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/initial_timer_text_zerozero" />
|
||||
android:text="@string/initial_timer_text_zerozero"/>
|
||||
|
||||
<LinearLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/gps_quality_info_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="35dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:orientation="horizontal" >
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/gps_accuracy_label"
|
||||
@@ -172,7 +172,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="9dp"
|
||||
android:paddingLeft="9dp"
|
||||
android:text="" />
|
||||
android:text=""/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.SignalQualityIndicatorView
|
||||
android:id="@+id/gps_quality_indicator"
|
||||
@@ -182,7 +182,7 @@
|
||||
android:focusable="true"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingLeft="10dp"
|
||||
app:signalQuality="none" />
|
||||
app:signalQuality="none"/>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/compass_bearing_header_text_view"
|
||||
@@ -26,6 +26,6 @@
|
||||
android:gravity="center"
|
||||
android:text="@string/initial_hyphen_degrees"
|
||||
android:layout_centerInParent="true"
|
||||
android:textSize="124sp" />
|
||||
android:textSize="124sp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,12 +1,12 @@
|
||||
<?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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<WebView
|
||||
android:id="@+id/web_view"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" />
|
||||
android:layout_height="fill_parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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" >
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="215dp" >
|
||||
android:layout_height="215dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/userImage"
|
||||
@@ -16,7 +16,7 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:contentDescription="@string/desc_regatta_user_image"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/picture" />
|
||||
android:src="@drawable/picture"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/add_photo"
|
||||
@@ -25,7 +25,7 @@
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@color/white_transparent"
|
||||
android:orientation="horizontal" >
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/add_photo_button"
|
||||
@@ -35,7 +35,7 @@
|
||||
android:contentDescription="@string/desc_add_photo_button"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:src="@drawable/ic_menu_camera" />
|
||||
android:src="@drawable/ic_menu_camera"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/add_photo_text"
|
||||
@@ -45,7 +45,7 @@
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:text="@string/add_team_photo"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -59,7 +59,7 @@
|
||||
android:baselineAligned="false"
|
||||
android:measureWithLargestChild="false"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp" >
|
||||
android:padding="10dp">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/competitor_name"
|
||||
@@ -70,7 +70,7 @@
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:text="@string/empty"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="10dp"
|
||||
@@ -81,7 +81,7 @@
|
||||
android:paddingBottom="3dp"
|
||||
android:gravity="end"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp" >
|
||||
android:paddingRight="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/flag_image"
|
||||
@@ -89,17 +89,17 @@
|
||||
android:layout_height="fill_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:contentDescription="@string/content_description_flag_icon"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/sail_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end|center_vertical"
|
||||
android:padding="0dp"
|
||||
android:text="@string/empty"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -114,13 +114,13 @@
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@drawable/background_transparent_box"
|
||||
android:orientation="horizontal"
|
||||
android:padding="0dp" >
|
||||
android:padding="0dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/change_photo_button"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:background="@drawable/stift" />
|
||||
android:background="@drawable/stift"/>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
@@ -130,7 +130,7 @@
|
||||
android:layout_alignBottom="@+id/competitor_info_layout"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:background="@color/sap_yellow" />
|
||||
android:background="@color/sap_yellow"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/top_bar"
|
||||
@@ -139,7 +139,7 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@color/sap_yellow" />
|
||||
android:background="@color/sap_yellow"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<ScrollView
|
||||
@@ -152,11 +152,11 @@
|
||||
android:background="@color/black"
|
||||
android:isScrollContainer="true"
|
||||
android:orientation="vertical"
|
||||
android:scrollbars="vertical" >
|
||||
android:scrollbars="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/thank_you_layout"
|
||||
@@ -166,7 +166,7 @@
|
||||
android:measureWithLargestChild="false"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp"
|
||||
android:visibility="invisible" >
|
||||
android:visibility="invisible">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/thank_you_note"
|
||||
@@ -176,7 +176,7 @@
|
||||
android:padding="0dp"
|
||||
android:text="@string/thank_you_you_successfully_participated"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -185,7 +185,7 @@
|
||||
android:layout_height="fill_parent"
|
||||
android:measureWithLargestChild="false"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp" >
|
||||
android:padding="10dp">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/regatta_starts_in"
|
||||
@@ -197,7 +197,7 @@
|
||||
android:paddingTop="10dp"
|
||||
android:text="@string/regatta_starts_in"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/three_boxes_regatta_starts"
|
||||
@@ -208,7 +208,7 @@
|
||||
android:gravity="center"
|
||||
android:measureWithLargestChild="false"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp" >
|
||||
android:padding="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/three_boxes_days_box"
|
||||
@@ -220,7 +220,7 @@
|
||||
android:gravity="center"
|
||||
android:measureWithLargestChild="false"
|
||||
android:orientation="vertical"
|
||||
android:padding="0dp" >
|
||||
android:padding="0dp">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/starts_in_days"
|
||||
@@ -228,7 +228,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="0dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="40sp" />
|
||||
android:textSize="40sp"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/starts_in_days_label"
|
||||
@@ -238,7 +238,7 @@
|
||||
android:text="@string/days"
|
||||
android:singleLine="true"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -251,7 +251,7 @@
|
||||
android:gravity="center"
|
||||
android:measureWithLargestChild="false"
|
||||
android:orientation="vertical"
|
||||
android:padding="0dp" >
|
||||
android:padding="0dp">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/starts_in_hours"
|
||||
@@ -259,7 +259,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="0dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="40sp" />
|
||||
android:textSize="40sp"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/starts_in_hours_label"
|
||||
@@ -269,7 +269,7 @@
|
||||
android:text="@string/hours"
|
||||
android:singleLine="true"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -282,7 +282,7 @@
|
||||
android:gravity="center"
|
||||
android:measureWithLargestChild="false"
|
||||
android:orientation="vertical"
|
||||
android:padding="0dp" >
|
||||
android:padding="0dp">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/starts_in_minutes"
|
||||
@@ -290,7 +290,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="0dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="40sp" />
|
||||
android:textSize="40sp"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/starts_in_minutes_label"
|
||||
@@ -300,7 +300,7 @@
|
||||
android:text="@string/minutes"
|
||||
android:singleLine="true"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
@@ -310,56 +310,56 @@
|
||||
</ScrollView>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/start_tracking_box"
|
||||
android:id="@+id/start_tracking_box"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="100dp"
|
||||
android:layout_above="@id/bottomLayout"
|
||||
android:background="@color/gray">
|
||||
|
||||
<View
|
||||
android:id="@+id/white_bar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@color/white_transparent"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_below="@id/white_bar"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansButton
|
||||
android:id="@+id/show_leaderboards_button"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="100dp"
|
||||
android:layout_above="@id/bottomLayout"
|
||||
android:background="@color/gray" >
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_weight="0.50"
|
||||
android:background="@drawable/rounded_btn_yellow"
|
||||
android:padding="10dp"
|
||||
android:text="@string/show_leaderboard"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/white_bar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@color/white_transparent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_below="@id/white_bar"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansButton
|
||||
android:id="@+id/show_leaderboards_button"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_weight="0.50"
|
||||
android:background="@drawable/rounded_btn_yellow"
|
||||
android:padding="10dp"
|
||||
android:text="@string/show_leaderboard"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansButton
|
||||
android:id="@+id/start_tracking"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_weight="0.50"
|
||||
android:background="@drawable/rounded_btn_green"
|
||||
android:padding="10dp"
|
||||
android:text="@string/start_tracking"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansButton
|
||||
android:id="@+id/start_tracking"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_weight="0.50"
|
||||
android:background="@drawable/rounded_btn_green"
|
||||
android:padding="10dp"
|
||||
android:text="@string/start_tracking"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/bottomLayout"
|
||||
@@ -368,7 +368,7 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:background="@color/darker_gray" >
|
||||
android:background="@color/darker_gray">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/bottom_announcement"
|
||||
@@ -378,7 +378,7 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center"
|
||||
android:text="@string/please_listen_to_announcements"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/white"/>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/speed_header_text_view"
|
||||
@@ -15,13 +15,13 @@
|
||||
android:textSize="14sp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="15dp" />
|
||||
android:paddingTop="15dp"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="vertical" >
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.AutoResizeLightTextView
|
||||
android:id="@+id/speed_text_view"
|
||||
@@ -32,7 +32,7 @@
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/initial_hyphen"
|
||||
android:textSize="124sp"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.AutoResizeLightTextView
|
||||
android:id="@+id/speed_unit_text_view"
|
||||
@@ -44,7 +44,7 @@
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"/>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
@@ -12,7 +12,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_above="@+id/stop_tracking_box"
|
||||
android:baselineAligned="false"
|
||||
android:paddingTop="15dp" >
|
||||
android:paddingTop="15dp">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/tracking_time"
|
||||
@@ -21,7 +21,7 @@
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:text="@string/tracking_time" />
|
||||
android:text="@string/tracking_time"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.AutoResizeLightTextView
|
||||
tools:ignore="InconsistentLayout"
|
||||
@@ -34,7 +34,7 @@
|
||||
android:layout_marginBottom="0dp"
|
||||
android:text="@string/initial_timer_text_zerozero"
|
||||
android:gravity="bottom"
|
||||
android:textSize="100sp" />
|
||||
android:textSize="100sp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
android:id="@+id/stop_tracking_box"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="100dp"
|
||||
android:layout_alignParentBottom="true" >
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansButton
|
||||
android:id="@+id/stop_tracking"
|
||||
@@ -56,6 +56,6 @@
|
||||
android:padding="0dp"
|
||||
android:text="@string/stop_tracking"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"/>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
@@ -9,12 +9,12 @@
|
||||
android:layout_gravity="center"
|
||||
android:isScrollContainer="true"
|
||||
android:orientation="vertical"
|
||||
android:scrollbars="vertical" >
|
||||
android:scrollbars="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/black" >
|
||||
android:background="@color/black">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/mode_label"
|
||||
@@ -26,7 +26,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/tracking_mode" />
|
||||
android:text="@string/tracking_mode"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/mode"
|
||||
@@ -39,7 +39,7 @@
|
||||
android:paddingRight="10dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:text="@string/tracking_mode_caching"
|
||||
android:textColor="@color/sap_green" />
|
||||
android:textColor="@color/sap_green"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/tracking_unsent_fixes_label"
|
||||
@@ -49,7 +49,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:text="@string/tracking_unsent_fixes" />
|
||||
android:text="@string/tracking_unsent_fixes"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/tracking_unsent_fixes"
|
||||
@@ -61,7 +61,7 @@
|
||||
android:layout_alignParentEnd="true"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:text="@string/none" />
|
||||
android:text="@string/none"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/tracking_status_label"
|
||||
@@ -71,7 +71,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/tracking_status" />
|
||||
android:text="@string/tracking_status"/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/tracking_status"
|
||||
@@ -84,7 +84,7 @@
|
||||
android:paddingRight="10dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:text="@string/tracking_status_tracking"
|
||||
android:textColor="@color/sap_green" />
|
||||
android:textColor="@color/sap_green"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/gps_quality_info_layout"
|
||||
@@ -93,7 +93,7 @@
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
android:id="@+id/gps_accuracy_label"
|
||||
@@ -101,7 +101,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="9dp"
|
||||
android:paddingLeft="9dp"
|
||||
android:text="" />
|
||||
android:text=""/>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.SignalQualityIndicatorView
|
||||
android:id="@+id/gps_quality_indicator"
|
||||
@@ -111,7 +111,7 @@
|
||||
android:focusable="true"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingLeft="10dp"
|
||||
app:signalQuality="none" />
|
||||
app:signalQuality="none"/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansTextView
|
||||
@@ -122,7 +122,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/tracking_gps_accuracy" />
|
||||
android:text="@string/tracking_gps_accuracy"/>
|
||||
|
||||
<!-- Separators -->
|
||||
|
||||
@@ -130,30 +130,30 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/mode_label"
|
||||
android:background="@android:color/darker_gray" />
|
||||
android:background="@android:color/darker_gray"/>
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/tracking_status_label"
|
||||
android:background="@android:color/darker_gray" />
|
||||
android:background="@android:color/darker_gray"/>
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/tracking_unsent_fixes_label"
|
||||
android:background="@android:color/darker_gray" />
|
||||
android:background="@android:color/darker_gray"/>
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/gps_quality"
|
||||
android:background="@android:color/darker_gray" />
|
||||
android:background="@android:color/darker_gray"/>
|
||||
|
||||
<View
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/tracking_status_label"
|
||||
android:background="@android:color/darker_gray" />
|
||||
android:background="@android:color/darker_gray"/>
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
@@ -5,14 +5,15 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansToolbar
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansToolbar
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar" >
|
||||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||
|
||||
<LinearLayout android:orientation="vertical"
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="10dp">
|
||||
@@ -33,21 +34,21 @@
|
||||
android:layout_gravity="center"
|
||||
android:lines="1"
|
||||
android:singleLine="true"
|
||||
android:textSize="12sp" />
|
||||
android:textSize="12sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.sap.sailing.android.shared.ui.customviews.OpenSansToolbar>
|
||||
|
||||
<View
|
||||
android:id="@+id/top_bar"
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="4dp"
|
||||
android:background="@color/sap_yellow" />
|
||||
android:background="@color/sap_yellow"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/content_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto" >
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/options_menu_settings"
|
||||
@@ -10,6 +10,6 @@
|
||||
|
||||
<item
|
||||
android:id="@+id/options_menu_info"
|
||||
android:title="@string/about" />
|
||||
android:title="@string/about"/>
|
||||
|
||||
</menu>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto" >
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/options_menu_settings"
|
||||
@@ -26,5 +26,5 @@
|
||||
|
||||
<item
|
||||
android:id="@+id/options_menu_info"
|
||||
android:title="@string/about" />
|
||||
android:title="@string/about"/>
|
||||
</menu>
|
||||
@@ -2,8 +2,8 @@
|
||||
<resources>
|
||||
<string name="yes">Ja</string>
|
||||
<string name="no">Nein</string>
|
||||
<string name="empty"></string>
|
||||
<string name="tracking_time">Tracking Zeit</string>
|
||||
<string name="empty"></string>
|
||||
<string name="tracking_time">Tracking Zeit</string>
|
||||
<string name="app_name">SAP Sailing Tracking App</string>
|
||||
<string name="options_menu_settings">Einstellungen</string>
|
||||
<string name="options_menu_checkout">Checkout</string>
|
||||
@@ -56,20 +56,20 @@
|
||||
<string name="scan_qr">QR-Code scannen</string>
|
||||
<string name="close">Schließen</string>
|
||||
<string name="thank_you_you_successfully_participated">Vielen Dank, Sie haben erfolgreich an der Regatta teilgenommen.\n\nIhr SAP Sailing Team</string>
|
||||
<string name="tracking_colon">Tracke:</string>
|
||||
<string name="tracking_gps_accuracy">GPS Genauigkeit</string>
|
||||
<string name="regatta_in_progress">Die Regatta findet gerade statt.</string>
|
||||
<string name="heading">Kurs</string>
|
||||
<string name="course_over_ground">Course over Ground</string>
|
||||
<string name="tracking_colon">Tracke:</string>
|
||||
<string name="tracking_gps_accuracy">GPS Genauigkeit</string>
|
||||
<string name="regatta_in_progress">Die Regatta findet gerade statt.</string>
|
||||
<string name="heading">Kurs</string>
|
||||
<string name="course_over_ground">Course over Ground</string>
|
||||
<string name="speed_over_ground">Speed over Ground</string>
|
||||
<string name="none">Keine</string>
|
||||
<string name="show_leaderboard">Leaderboard</string>
|
||||
<string name="desc_regatta_user_image">Benutzerdefiniertes Bild für Regatta</string>
|
||||
<string name="desc_add_photo_button">Foto hinzufügen Button</string>
|
||||
<string name="error_while_receiving_server_data">Fehler beim Empfang vom Server</string>
|
||||
<string name="info_already_checked_in_this_qr_code">Bereits für diese Regatta eingecheckt</string>
|
||||
<string name="warning">Warnung</string>
|
||||
<string name="gps_turned_off">GPS ist nicht aktiviert. Bitte aktivieren Sie den Standortzugriff (GPS) in Ihren Android-Einstellungen!</string>
|
||||
<string name="none">Keine</string>
|
||||
<string name="show_leaderboard">Leaderboard</string>
|
||||
<string name="desc_regatta_user_image">Benutzerdefiniertes Bild für Regatta</string>
|
||||
<string name="desc_add_photo_button">Foto hinzufügen Button</string>
|
||||
<string name="error_while_receiving_server_data">Fehler beim Empfang vom Server</string>
|
||||
<string name="info_already_checked_in_this_qr_code">Bereits für diese Regatta eingecheckt</string>
|
||||
<string name="warning">Warnung</string>
|
||||
<string name="gps_turned_off">GPS ist nicht aktiviert. Bitte aktivieren Sie den Standortzugriff (GPS) in Ihren Android-Einstellungen!</string>
|
||||
<string name="knots">Knoten</string>
|
||||
<string name="preferences">Einstellungen</string>
|
||||
<string name="preferences">Einstellungen</string>
|
||||
</resources>
|
||||
@@ -9,6 +9,6 @@
|
||||
|
||||
<color name="colorPrimary">@color/gray</color>
|
||||
<color name="colorPrimaryDark">@color/colorPrimary</color>
|
||||
<color name="colorAccent">@color/green</color>
|
||||
<color name="colorAccent">@color/green</color>
|
||||
|
||||
</resources>
|
||||
@@ -17,45 +17,45 @@
|
||||
<string name="title_activity_tracking">Tracking</string>
|
||||
<string name="please_confirm">Please confirm</string>
|
||||
<string name="do_you_really_want_to_stop_tracking">Do you really want to stop tracking?</string>
|
||||
<string name="add_team_photo">Add Team Photo</string>
|
||||
<string name="do_you_want_to_choose_existing_img_or_take_a_new_one">Do you want to use an existing image or take a new one?</string>
|
||||
<string name="existing_image">Existing</string>
|
||||
<string name="take_photo">Take Photo</string>
|
||||
<string name="add_photo_select">Photo</string>
|
||||
<string name="checking_in">Checking in..</string>
|
||||
<string name="checking_out">Checking out..</string>
|
||||
<string name="getting_event">Getting event informatiopn..</string>
|
||||
<string name="getting_leaderboard">Getting leaderboard information..</string>
|
||||
<string name="getting_competitor">Getting competitor information..</string>
|
||||
<string name="error">Error</string>
|
||||
<string name="error_could_not_complete_operation_on_server_try_again">Could not complete operation on server. Please try again.</string>
|
||||
<string name="error_sending_team_image_to_server">Error: Could not send team image to server.</string>
|
||||
<string name="regatta_starts_in">Regatta starts in:</string>
|
||||
<string name="hours">Hours</string>
|
||||
<string name="minutes">Minutes</string>
|
||||
<string name="days">Days</string>
|
||||
<string name="hour">Hour</string>
|
||||
<string name="minute">Minute</string>
|
||||
<string name="day">Day</string>
|
||||
<string name="please_listen_to_announcements">Please listen to the announcements</string>
|
||||
<string name="close">Close</string>
|
||||
<string name="thank_you_you_successfully_participated">Thank you, you have successfully taken part in the regatta.\n\nYour SAP Sailing Team</string>
|
||||
<string name="tracking_colon">Tracking:</string>
|
||||
<string name="regatta_in_progress">The regatta is in progress.</string>
|
||||
<string name="heading">Heading</string>
|
||||
<string name="course_over_ground">Course over Ground</string>
|
||||
<string name="add_team_photo">Add Team Photo</string>
|
||||
<string name="do_you_want_to_choose_existing_img_or_take_a_new_one">Do you want to use an existing image or take a new one?</string>
|
||||
<string name="existing_image">Existing</string>
|
||||
<string name="take_photo">Take Photo</string>
|
||||
<string name="add_photo_select">Photo</string>
|
||||
<string name="checking_in">Checking in..</string>
|
||||
<string name="checking_out">Checking out..</string>
|
||||
<string name="getting_event">Getting event informatiopn..</string>
|
||||
<string name="getting_leaderboard">Getting leaderboard information..</string>
|
||||
<string name="getting_competitor">Getting competitor information..</string>
|
||||
<string name="error">Error</string>
|
||||
<string name="error_could_not_complete_operation_on_server_try_again">Could not complete operation on server. Please try again.</string>
|
||||
<string name="error_sending_team_image_to_server">Error: Could not send team image to server.</string>
|
||||
<string name="regatta_starts_in">Regatta starts in:</string>
|
||||
<string name="hours">Hours</string>
|
||||
<string name="minutes">Minutes</string>
|
||||
<string name="days">Days</string>
|
||||
<string name="hour">Hour</string>
|
||||
<string name="minute">Minute</string>
|
||||
<string name="day">Day</string>
|
||||
<string name="please_listen_to_announcements">Please listen to the announcements</string>
|
||||
<string name="close">Close</string>
|
||||
<string name="thank_you_you_successfully_participated">Thank you, you have successfully taken part in the regatta.\n\nYour SAP Sailing Team</string>
|
||||
<string name="tracking_colon">Tracking:</string>
|
||||
<string name="regatta_in_progress">The regatta is in progress.</string>
|
||||
<string name="heading">Heading</string>
|
||||
<string name="course_over_ground">Course over Ground</string>
|
||||
<string name="speed_over_ground">Speed over Ground</string>
|
||||
<string name="none">None</string>
|
||||
<string name="show_leaderboard">Leader board</string>
|
||||
<string name="error_while_receiving_server_data">Error while receiving server data</string>
|
||||
<string name="info_already_checked_in_this_qr_code">Already checked in to this regatta</string>
|
||||
<string name="warning">Warning</string>
|
||||
<string name="gps_turned_off">GPS is turned off. Please turn on location access (GPS) in your Android Settings!</string>
|
||||
<string name="knots">knots</string>
|
||||
<string name="preferences">Preferences</string>
|
||||
<string name="none">None</string>
|
||||
<string name="show_leaderboard">Leader board</string>
|
||||
<string name="error_while_receiving_server_data">Error while receiving server data</string>
|
||||
<string name="info_already_checked_in_this_qr_code">Already checked in to this regatta</string>
|
||||
<string name="warning">Warning</string>
|
||||
<string name="gps_turned_off">GPS is turned off. Please turn on location access (GPS) in your Android Settings!</string>
|
||||
<string name="knots">knots</string>
|
||||
<string name="preferences">Preferences</string>
|
||||
|
||||
<string name="initial_timer_text_zerozero" translatable="false">00:00:00</string>
|
||||
<string name="initial_hyphen" translatable="false">-</string>
|
||||
<string name="initial_hyphen_degrees" translatable="false">-°</string>
|
||||
<string name="content_description_flag_icon" translatable="false">flag icon</string>
|
||||
<string name="initial_timer_text_zerozero" translatable="false">00:00:00</string>
|
||||
<string name="initial_hyphen" translatable="false">-</string>
|
||||
<string name="initial_hyphen_degrees" translatable="false">-°</string>
|
||||
<string name="content_description_flag_icon" translatable="false">flag icon</string>
|
||||
</resources>
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
<string name="yes">Yes</string>
|
||||
<string name="no">No</string>
|
||||
<string name="confirm_data_hello_name">Hello {full_name}</string>
|
||||
<string name="confirm_data_you_are_signed_in_as_sail_id">You are signing in as {sail_id}</string>
|
||||
<string name="confirm_data_hello_name">Hello {full_name}</string>
|
||||
<string name="confirm_data_you_are_signed_in_as_sail_id">You are signing in as {sail_id}</string>
|
||||
<string name="confirm_data_is_correct">OK</string>
|
||||
<string name="decline_data_is_incorrect">That\'s not me!</string>
|
||||
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
<string name="no_qr_code">You got no QR-Code?</string>
|
||||
<string name="start_tracking">Start tracking</string>
|
||||
<string name="stop_tracking">Stop tracking</string>
|
||||
<string name="tracking_gps_accuracy">GPS Accuracy</string>
|
||||
<string name="tracking_mode">Mode</string>
|
||||
<string name="tracking_mode_live">Live</string>
|
||||
<string name="tracking_mode_battery_saving">Battery Saving</string>
|
||||
<string name="tracking_unsent_fixes">Unsent fixes</string>
|
||||
<string name="tracking_mode_caching">Offline</string>
|
||||
<string name="tracking_mode_api_error">API-Error</string>
|
||||
<string name="tracking_mode_offline">Offline</string>
|
||||
<string name="tracking_time">Tracking Time</string>
|
||||
<string name="tracking_status" translatable="false">Status</string>
|
||||
<string name="tracking_status_tracking">Tracking running</string>
|
||||
<string name="tracking_status_no_gps_signal">No GPS Signal!</string>
|
||||
<string name="desc_regatta_user_image">Regatta User Image</string>
|
||||
<string name="desc_add_photo_button">Add Photo Button</string>
|
||||
<string name="tracking_gps_accuracy">GPS Accuracy</string>
|
||||
<string name="tracking_mode">Mode</string>
|
||||
<string name="tracking_mode_live">Live</string>
|
||||
<string name="tracking_mode_battery_saving">Battery Saving</string>
|
||||
<string name="tracking_unsent_fixes">Unsent fixes</string>
|
||||
<string name="tracking_mode_caching">Offline</string>
|
||||
<string name="tracking_mode_api_error">API-Error</string>
|
||||
<string name="tracking_mode_offline">Offline</string>
|
||||
<string name="tracking_time">Tracking Time</string>
|
||||
<string name="tracking_status" translatable="false">Status</string>
|
||||
<string name="tracking_status_tracking">Tracking running</string>
|
||||
<string name="tracking_status_no_gps_signal">No GPS Signal!</string>
|
||||
<string name="desc_regatta_user_image">Regatta User Image</string>
|
||||
<string name="desc_add_photo_button">Add Photo Button</string>
|
||||
</resources>
|
||||
@@ -2,7 +2,7 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="AppTheme.Base" />
|
||||
<style name="AppTheme" parent="AppTheme.Base"/>
|
||||
|
||||
<style name="AppTheme.Base" parent="Theme.AppCompat">
|
||||
|
||||
|
||||
@@ -31,98 +31,98 @@
|
||||
<attr name="vpiUnderlinePageIndicatorStyle" format="reference"/>
|
||||
</declare-styleable>
|
||||
|
||||
<attr name="centered" format="boolean" />
|
||||
<attr name="selectedColor" format="color" />
|
||||
<attr name="strokeWidth" format="dimension" />
|
||||
<attr name="unselectedColor" format="color" />
|
||||
<attr name="centered" format="boolean"/>
|
||||
<attr name="selectedColor" format="color"/>
|
||||
<attr name="strokeWidth" format="dimension"/>
|
||||
<attr name="unselectedColor" format="color"/>
|
||||
|
||||
<declare-styleable name="CirclePageIndicator">
|
||||
<!-- Whether or not the indicators should be centered. -->
|
||||
<attr name="centered" />
|
||||
<attr name="centered"/>
|
||||
<!-- Color of the filled circle that represents the current page. -->
|
||||
<attr name="fillColor" format="color" />
|
||||
<attr name="fillColor" format="color"/>
|
||||
<!-- Color of the filled circles that represents pages. -->
|
||||
<attr name="pageColor" format="color" />
|
||||
<attr name="pageColor" format="color"/>
|
||||
<!-- Orientation of the indicator. -->
|
||||
<attr name="android:orientation"/>
|
||||
<!-- Radius of the circles. This is also the spacing between circles. -->
|
||||
<attr name="radius" format="dimension" />
|
||||
<attr name="radius" format="dimension"/>
|
||||
<!-- Whether or not the selected indicator snaps to the circles. -->
|
||||
<attr name="snap" format="boolean" />
|
||||
<attr name="snap" format="boolean"/>
|
||||
<!-- Color of the open circles. -->
|
||||
<attr name="strokeColor" format="color" />
|
||||
<attr name="strokeColor" format="color"/>
|
||||
<!-- Width of the stroke used to draw the circles. -->
|
||||
<attr name="strokeWidth" />
|
||||
<attr name="strokeWidth"/>
|
||||
<!-- View background -->
|
||||
<attr name="android:background"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="LinePageIndicator">
|
||||
<!-- Whether or not the indicators should be centered. -->
|
||||
<attr name="centered" />
|
||||
<attr name="centered"/>
|
||||
<!-- Color of the unselected lines that represent the pages. -->
|
||||
<attr name="unselectedColor" />
|
||||
<attr name="unselectedColor"/>
|
||||
<!-- Color of the selected line that represents the current page. -->
|
||||
<attr name="selectedColor" />
|
||||
<attr name="selectedColor"/>
|
||||
<!-- Width of each indicator line. -->
|
||||
<attr name="lineWidth" format="dimension" />
|
||||
<attr name="lineWidth" format="dimension"/>
|
||||
<!-- Width of each indicator line's stroke. -->
|
||||
<attr name="strokeWidth" />
|
||||
<attr name="strokeWidth"/>
|
||||
<!-- Width of the gap between each indicator line. -->
|
||||
<attr name="gapWidth" format="dimension" />
|
||||
<attr name="gapWidth" format="dimension"/>
|
||||
<!-- View background -->
|
||||
<attr name="android:background"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="TitlePageIndicator">
|
||||
<!-- Screen edge padding. -->
|
||||
<attr name="clipPadding" format="dimension" />
|
||||
<attr name="clipPadding" format="dimension"/>
|
||||
<!-- Color of the footer line and indicator. -->
|
||||
<attr name="footerColor" format="color" />
|
||||
<attr name="footerColor" format="color"/>
|
||||
<!-- Height of the footer line. -->
|
||||
<attr name="footerLineHeight" format="dimension" />
|
||||
<attr name="footerLineHeight" format="dimension"/>
|
||||
<!-- Style of the indicator. Default is triangle. -->
|
||||
<attr name="footerIndicatorStyle">
|
||||
<enum name="none" value="0" />
|
||||
<enum name="triangle" value="1" />
|
||||
<enum name="underline" value="2" />
|
||||
<enum name="none" value="0"/>
|
||||
<enum name="triangle" value="1"/>
|
||||
<enum name="underline" value="2"/>
|
||||
</attr>
|
||||
<!-- Height of the indicator above the footer line. -->
|
||||
<attr name="footerIndicatorHeight" format="dimension" />
|
||||
<attr name="footerIndicatorHeight" format="dimension"/>
|
||||
<!-- Left and right padding of the underline indicator. -->
|
||||
<attr name="footerIndicatorUnderlinePadding" format="dimension" />
|
||||
<attr name="footerIndicatorUnderlinePadding" format="dimension"/>
|
||||
<!-- Padding between the bottom of the title and the footer. -->
|
||||
<attr name="footerPadding" format="dimension" />
|
||||
<attr name="footerPadding" format="dimension"/>
|
||||
<!-- Position of the line. -->
|
||||
<attr name="linePosition">
|
||||
<enum name="bottom" value="0"/>
|
||||
<enum name="top" value="1"/>
|
||||
</attr>
|
||||
<!-- Color of the selected title. -->
|
||||
<attr name="selectedColor" />
|
||||
<attr name="selectedColor"/>
|
||||
<!-- Whether or not the selected item is displayed as bold. -->
|
||||
<attr name="selectedBold" format="boolean" />
|
||||
<attr name="selectedBold" format="boolean"/>
|
||||
<!-- Color of regular titles. -->
|
||||
<attr name="android:textColor" />
|
||||
<attr name="android:textColor"/>
|
||||
<!-- Size of title text. -->
|
||||
<attr name="android:textSize" />
|
||||
<attr name="android:textSize"/>
|
||||
<!-- Padding between titles when bumping into each other. -->
|
||||
<attr name="titlePadding" format="dimension" />
|
||||
<attr name="titlePadding" format="dimension"/>
|
||||
<!-- Padding between titles and the top of the View. -->
|
||||
<attr name="topPadding" format="dimension" />
|
||||
<attr name="topPadding" format="dimension"/>
|
||||
<!-- View background -->
|
||||
<attr name="android:background"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="UnderlinePageIndicator">
|
||||
<!-- Whether or not the selected indicator fades. -->
|
||||
<attr name="fades" format="boolean" />
|
||||
<attr name="fades" format="boolean"/>
|
||||
<!-- Length of the delay to fade the indicator. -->
|
||||
<attr name="fadeDelay" format="integer" />
|
||||
<attr name="fadeDelay" format="integer"/>
|
||||
<!-- Length of the indicator fade to transparent. -->
|
||||
<attr name="fadeLength" format="integer" />
|
||||
<attr name="fadeLength" format="integer"/>
|
||||
<!-- Color of the selected line that represents the current page. -->
|
||||
<attr name="selectedColor" />
|
||||
<attr name="selectedColor"/>
|
||||
<!-- View background -->
|
||||
<attr name="android:background"/>
|
||||
</declare-styleable>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
-->
|
||||
|
||||
<resources>
|
||||
|
||||
<style name="Theme.PageIndicatorDefaults" parent="android:Theme">
|
||||
<item name="vpiIconPageIndicatorStyle">@style/Widget.IconPageIndicator</item>
|
||||
<item name="vpiTabPageIndicatorStyle">@style/Widget.TabPageIndicator</item>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- Energy Saving -->
|
||||
<PreferenceCategory android:title="@string/settings_category_energy_saving" >
|
||||
<PreferenceCategory android:title="@string/settings_category_energy_saving">
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/preference_energy_saving_enabled_key"
|
||||
@@ -10,25 +10,26 @@
|
||||
android:switchTextOff="@string/preference_energy_saving_is_disabled"
|
||||
android:summaryOn="@string/prefrence_energy_saving_summary_is_enabled"
|
||||
android:summaryOff="@string/prefrence_energy_saving_summary_is_disabled"
|
||||
android:title="@string/energy_saving_enabled" />
|
||||
android:title="@string/energy_saving_enabled"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<!-- Connection -->
|
||||
<PreferenceCategory android:title="@string/settings_category_other" >
|
||||
<PreferenceCategory android:title="@string/settings_category_other">
|
||||
<EditTextPreference
|
||||
android:defaultValue="@string/preference_device_identifier_default"
|
||||
android:key="@string/preference_device_identifier_key"
|
||||
android:summary="@string/empty"
|
||||
android:title="@string/device_identifier" android:selectable="false"/>
|
||||
android:title="@string/device_identifier"
|
||||
android:selectable="false"/>
|
||||
|
||||
<SwitchPreference
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/preference_heading_with_declination_subtracted_key"
|
||||
android:switchTextOn="@string/preference_heading_with_declination_subtracted_is_enabled"
|
||||
android:switchTextOff="@string/preference_heading_with_declination_subtracted_is_disabled"
|
||||
android:summaryOn="@string/preference_heading_with_declination_subtracted_summary_is_enabled"
|
||||
android:summaryOff="@string/preference_heading_with_declination_subtracted_summary_is_disabled"
|
||||
android:title="@string/preference_heading_with_declination_subtracted_enabled" />
|
||||
android:title="@string/preference_heading_with_declination_subtracted_enabled"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
|
||||
Loaded 100 of 168 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user