mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-30 15:57:11 +00:00
Merge branch 'racecommittee_integrated' of
ssh://armin@sapsailing.com/home/trac/git into racecommittee_integrated Conflicts: java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/AbstractSimpleLeaderboardImpl.java
This commit is contained in:
commit
b501d1ca6f
2382 files changed
+1283491
-1283408
No files matched your search
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="gen"/>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||
<classpathentry kind="output" path="bin/classes"/>
|
||||
</classpath>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="gen"/>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||
<classpathentry kind="output" path="bin/classes"/>
|
||||
</classpath>
|
||||
@@ -1,44 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.sap.sailing.racecommittee.app</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1359465261368</id>
|
||||
<name>src</name>
|
||||
<type>30</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-.svn</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.sap.sailing.racecommittee.app</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1359465261368</id>
|
||||
<name>src</name>
|
||||
<type>30</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-.svn</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
||||
@@ -54,6 +54,7 @@
|
||||
<intent-filter>
|
||||
<action android:name="com.sap.sailing.racecommittee.app.action.registerRace" />
|
||||
<action android:name="com.sap.sailing.racecommittee.app.action.alarmAction" />
|
||||
<action android:name="com.sap.sailing.racecommittee.app.action.automaticRaceEnd" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<lint>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<lint>
|
||||
</lint>
|
||||
@@ -1,20 +1,20 @@
|
||||
# To enable ProGuard in your project, edit project.properties
|
||||
# to define the proguard.config property as described in that file.
|
||||
#
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in ${sdk.dir}/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the ProGuard
|
||||
# include property in project.properties.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
# To enable ProGuard in your project, edit project.properties
|
||||
# to define the proguard.config property as described in that file.
|
||||
#
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in ${sdk.dir}/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the ProGuard
|
||||
# include property in project.properties.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
@@ -1,15 +1,15 @@
|
||||
# This file is automatically generated by Android Tools.
|
||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system edit
|
||||
# "ant.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
#
|
||||
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-13
|
||||
android.library.reference.1=../com.sap.sailing.racecommittee.glue
|
||||
# This file is automatically generated by Android Tools.
|
||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system edit
|
||||
# "ant.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
#
|
||||
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-13
|
||||
android.library.reference.1=../com.sap.sailing.racecommittee.glue
|
||||
@@ -1,28 +1,28 @@
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<alpha
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="1000"
|
||||
android:fromAlpha="1.0"
|
||||
android:startOffset="1000"
|
||||
android:toAlpha="0.5" />
|
||||
<alpha
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="1000"
|
||||
android:fromAlpha="0.5"
|
||||
android:toAlpha="1.0" />
|
||||
<alpha
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="1000"
|
||||
android:fromAlpha="1.0"
|
||||
android:startOffset="1000"
|
||||
android:toAlpha="0.5" />
|
||||
<alpha
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="1000"
|
||||
android:fromAlpha="0.5"
|
||||
android:toAlpha="1.0" />
|
||||
|
||||
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<alpha
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="1000"
|
||||
android:fromAlpha="1.0"
|
||||
android:startOffset="1000"
|
||||
android:toAlpha="0.5" />
|
||||
<alpha
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="1000"
|
||||
android:fromAlpha="0.5"
|
||||
android:toAlpha="1.0" />
|
||||
<alpha
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="1000"
|
||||
android:fromAlpha="1.0"
|
||||
android:startOffset="1000"
|
||||
android:toAlpha="0.5" />
|
||||
<alpha
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="1000"
|
||||
android:fromAlpha="0.5"
|
||||
android:toAlpha="1.0" />
|
||||
|
||||
|
||||
|
||||
</set>
|
||||
@@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:valueFrom="-800.0"
|
||||
android:valueTo="0"
|
||||
android:propertyName="translationX"
|
||||
android:duration="@android:integer/config_mediumAnimTime" />
|
||||
|
||||
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:valueFrom="0.0"
|
||||
android:valueTo="1.0"
|
||||
android:propertyName="alpha"
|
||||
android:duration="@android:integer/config_mediumAnimTime" />
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:valueFrom="-800.0"
|
||||
android:valueTo="0"
|
||||
android:propertyName="translationX"
|
||||
android:duration="@android:integer/config_mediumAnimTime" />
|
||||
|
||||
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:valueFrom="0.0"
|
||||
android:valueTo="1.0"
|
||||
android:propertyName="alpha"
|
||||
android:duration="@android:integer/config_mediumAnimTime" />
|
||||
|
||||
</set>
|
||||
@@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="800.0"
|
||||
android:propertyName="translationX"
|
||||
android:duration="@android:integer/config_mediumAnimTime" />
|
||||
|
||||
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:valueFrom="1.0"
|
||||
android:valueTo="0.0"
|
||||
android:propertyName="alpha"
|
||||
android:duration="@android:integer/config_mediumAnimTime" />
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="800.0"
|
||||
android:propertyName="translationX"
|
||||
android:duration="@android:integer/config_mediumAnimTime" />
|
||||
|
||||
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:valueFrom="1.0"
|
||||
android:valueTo="0.0"
|
||||
android:propertyName="alpha"
|
||||
android:duration="@android:integer/config_mediumAnimTime" />
|
||||
|
||||
</set>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:src="@drawable/back2"
|
||||
android:scaleType="fitXY"
|
||||
android:gravity="center"
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:src="@drawable/back2"
|
||||
android:scaleType="fitXY"
|
||||
android:gravity="center"
|
||||
android:tileMode="repeat" />
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:src="@drawable/white"
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:src="@drawable/white"
|
||||
android:tileMode="repeat" />
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
|
||||
<solid android:color="#ffffff" />
|
||||
<stroke android:width="5dip" android:color="#4fa5d5"/>
|
||||
</shape>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
|
||||
<solid android:color="#ffffff" />
|
||||
<stroke android:width="5dip" android:color="#4fa5d5"/>
|
||||
</shape>
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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">
|
||||
<gradient android:angle="270" android:startColor="#FFFDFDFD"
|
||||
android:endColor="#FFD2D2D2" />
|
||||
</shape>
|
||||
</item>
|
||||
<!-- <item android:top="1sp" android:bottom="26sp" > <shape android:shape="rectangle">
|
||||
<solid android:color="@color/tabTransparent"/> </shape> </item> -->
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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">
|
||||
<gradient android:angle="270" android:startColor="#FFFDFDFD"
|
||||
android:endColor="#FFD2D2D2" />
|
||||
</shape>
|
||||
</item>
|
||||
<!-- <item android:top="1sp" android:bottom="26sp" > <shape android:shape="rectangle">
|
||||
<solid android:color="@color/tabTransparent"/> </shape> </item> -->
|
||||
</layer-list>
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/list_selector_bg" android:state_focused="true" android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/list_selector_bg" android:state_focused="true" android:state_pressed="false"/>
|
||||
<item android:drawable="@drawable/list_selector_bg" android:state_focused="false" android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/list_selector_bg" android:state_activated="true"/>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/list_selector_bg" android:state_focused="true" android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/list_selector_bg" android:state_focused="true" android:state_pressed="false"/>
|
||||
<item android:drawable="@drawable/list_selector_bg" android:state_focused="false" android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/list_selector_bg" android:state_activated="true"/>
|
||||
|
||||
</selector>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?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>
|
||||
|
||||
<?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>
|
||||
|
||||
+7
-7
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!--
|
||||
<item android:id="@+android:id/background" android:drawable="@drawable/mi_star_gray" />
|
||||
<item android:id="@+android:id/secondaryProgress" android:drawable="@drawable/mi_star" />
|
||||
<item android:id="@+android:id/progress" android:drawable="@drawable/mi_star" />
|
||||
-->
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!--
|
||||
<item android:id="@+android:id/background" android:drawable="@drawable/mi_star_gray" />
|
||||
<item android:id="@+android:id/secondaryProgress" android:drawable="@drawable/mi_star" />
|
||||
<item android:id="@+android:id/progress" android:drawable="@drawable/mi_star" />
|
||||
-->
|
||||
</layer-list>
|
||||
@@ -1,24 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2008 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!--
|
||||
<item android:id="@+android:id/background" android:drawable="@drawable/welter_star_gray" />
|
||||
<item android:id="@+android:id/secondaryProgress" android:drawable="@drawable/welter_star_gray" />
|
||||
<item android:id="@+android:id/progress" android:drawable="@drawable/welter_star" />
|
||||
-->
|
||||
</layer-list>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2008 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!--
|
||||
<item android:id="@+android:id/background" android:drawable="@drawable/welter_star_gray" />
|
||||
<item android:id="@+android:id/secondaryProgress" android:drawable="@drawable/welter_star_gray" />
|
||||
<item android:id="@+android:id/progress" android:drawable="@drawable/welter_star" />
|
||||
-->
|
||||
</layer-list>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_pressed="true" android:color="@color/welter_white"/>
|
||||
<item android:state_selected="true" android:color="@color/welter_white"/>
|
||||
<item android:state_activated="true" android:color="@color/welter_white" />
|
||||
<item android:color="@color/welter_deep_gray"/>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_pressed="true" android:color="@color/welter_white"/>
|
||||
<item android:state_selected="true" android:color="@color/welter_white"/>
|
||||
<item android:state_activated="true" android:color="@color/welter_white" />
|
||||
<item android:color="@color/welter_deep_gray"/>
|
||||
|
||||
</selector>
|
||||
@@ -1,19 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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">
|
||||
|
||||
<gradient android:angle="-90" android:startColor="@color/tabMedium"
|
||||
android:endColor="@color/tabDark" />
|
||||
|
||||
</shape>
|
||||
</item>
|
||||
<!--
|
||||
<item android:top="1sp" android:bottom="26sp" >
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/tabTransparent"/>
|
||||
</shape>
|
||||
|
||||
</item> -->
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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">
|
||||
|
||||
<gradient android:angle="-90" android:startColor="@color/tabMedium"
|
||||
android:endColor="@color/tabDark" />
|
||||
|
||||
</shape>
|
||||
</item>
|
||||
<!--
|
||||
<item android:top="1sp" android:bottom="26sp" >
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/tabTransparent"/>
|
||||
</shape>
|
||||
|
||||
</item> -->
|
||||
</layer-list>
|
||||
@@ -1,24 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/compass_view_background"
|
||||
android:src="@drawable/compass_back_200dpi"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="Compass"
|
||||
android:layout_gravity="center"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/compass_view_needle"
|
||||
android:src="@drawable/compass_needle_200dpi_north"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="Needle"
|
||||
android:layout_gravity="center"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/compass_view_background"
|
||||
android:src="@drawable/compass_back_200dpi"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="Compass"
|
||||
android:layout_gravity="center"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/compass_view_needle"
|
||||
android:src="@drawable/compass_needle_200dpi_north"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="Needle"
|
||||
android:layout_gravity="center"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
</merge>
|
||||
@@ -1,130 +1,130 @@
|
||||
<?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" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="0.1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textVersionInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="0.1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textPendingEventsLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pending_events" android:padding="6dp"/>
|
||||
<TextView
|
||||
android:id="@+id/textPendingEvents"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/unknown" android:padding="6dp"/>
|
||||
<TextView
|
||||
android:id="@+id/textLastEventLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/last_sent" android:padding="6dp"/>
|
||||
<TextView
|
||||
android:id="@+id/textLastEvent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/unknown" android:padding="6dp"/>
|
||||
<Button
|
||||
android:id="@+id/btRefresh"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/check_pending_events"
|
||||
android:onClick="onBtnCheckEventsClick"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btCrash"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="CRASH APP"
|
||||
android:onClick="onBtnCheckEventsClick"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="500dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:paddingBottom="2dp"
|
||||
android:scaleType="fitXY"
|
||||
android:contentDescription="@string/empty"
|
||||
android:src="@android:drawable/divider_horizontal_textfield" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.2" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnRacesLoad"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/reload_data" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinnerRacesEventSelect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:prompt="@string/abort_running_race" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinnerRacesCourseSelect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:prompt="@string/abort_running_race" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinnerRacesRaceSelect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:prompt="@string/abort_running_race" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.6">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/textRacesView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/race_information" android:padding="6dp"/>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnRacesClear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/reset_race" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<?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" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="0.1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textVersionInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="0.1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textPendingEventsLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pending_events" android:padding="6dp"/>
|
||||
<TextView
|
||||
android:id="@+id/textPendingEvents"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/unknown" android:padding="6dp"/>
|
||||
<TextView
|
||||
android:id="@+id/textLastEventLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/last_sent" android:padding="6dp"/>
|
||||
<TextView
|
||||
android:id="@+id/textLastEvent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/unknown" android:padding="6dp"/>
|
||||
<Button
|
||||
android:id="@+id/btRefresh"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/check_pending_events"
|
||||
android:onClick="onBtnCheckEventsClick"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btCrash"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="CRASH APP"
|
||||
android:onClick="onBtnCheckEventsClick"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="500dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:paddingBottom="2dp"
|
||||
android:scaleType="fitXY"
|
||||
android:contentDescription="@string/empty"
|
||||
android:src="@android:drawable/divider_horizontal_textfield" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.2" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnRacesLoad"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/reload_data" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinnerRacesEventSelect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:prompt="@string/abort_running_race" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinnerRacesCourseSelect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:prompt="@string/abort_running_race" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinnerRacesRaceSelect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:prompt="@string/abort_running_race" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.6">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/textRacesView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/race_information" android:padding="6dp"/>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnRacesClear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/reset_race" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,52 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/loginLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:baselineAligned="false"
|
||||
android:background="@drawable/background" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="0.5"
|
||||
android:background="@color/welter_extralight_gray_transparent"
|
||||
>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/leftContainer"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="0.99"
|
||||
android:background="@color/welter_deep_gray">
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rightLayout"
|
||||
android:visibility="invisible"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="0.5"
|
||||
android:background="@color/welter_extralight_gray_transparent"
|
||||
>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/rightContainer"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/loginLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:baselineAligned="false"
|
||||
android:background="@drawable/background" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="0.5"
|
||||
android:background="@color/welter_extralight_gray_transparent"
|
||||
>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/leftContainer"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="0.99"
|
||||
android:background="@color/welter_deep_gray">
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rightLayout"
|
||||
android:visibility="invisible"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="0.5"
|
||||
android:background="@color/welter_extralight_gray_transparent"
|
||||
>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/rightContainer"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
+110
-110
@@ -1,111 +1,111 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textChooseAPModeTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:text="@string/choose_abort_mode"
|
||||
android:textSize="16pt"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/abortFlagOnly"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="300dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/flag_november"
|
||||
android:src="@drawable/november_flag" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/abortFlagOverHotel"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="300dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/flag_november"
|
||||
android:src="@drawable/november_over_hotel" />
|
||||
|
||||
<!--
|
||||
<ImageView
|
||||
android:id="@+id/flagHotel"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="100dp"
|
||||
android:contentDescription="@string/flag_november"
|
||||
android:src="@drawable/hotel_flag" />
|
||||
<Button
|
||||
android:id="@+id/abortOverHotelButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/choose" />
|
||||
-->
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/abortFlagOverAlpha"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="300dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/flag_november"
|
||||
android:src="@drawable/november_over_alpha" />
|
||||
|
||||
<!--
|
||||
<ImageView
|
||||
android:id="@+id/flagAlpha"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="100dp"
|
||||
android:contentDescription="@string/flag_november"
|
||||
android:src="@drawable/alpha_flag" />
|
||||
<Button
|
||||
android:id="@+id/abortOverAlphaButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/choose" />
|
||||
-->
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textChooseAPModeTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:text="@string/choose_abort_mode"
|
||||
android:textSize="16pt"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/abortFlagOnly"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="300dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/flag_november"
|
||||
android:src="@drawable/november_flag" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/abortFlagOverHotel"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="300dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/flag_november"
|
||||
android:src="@drawable/november_over_hotel" />
|
||||
|
||||
<!--
|
||||
<ImageView
|
||||
android:id="@+id/flagHotel"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="100dp"
|
||||
android:contentDescription="@string/flag_november"
|
||||
android:src="@drawable/hotel_flag" />
|
||||
<Button
|
||||
android:id="@+id/abortOverHotelButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/choose" />
|
||||
-->
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/abortFlagOverAlpha"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="300dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/flag_november"
|
||||
android:src="@drawable/november_over_alpha" />
|
||||
|
||||
<!--
|
||||
<ImageView
|
||||
android:id="@+id/flagAlpha"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="100dp"
|
||||
android:contentDescription="@string/flag_november"
|
||||
android:src="@drawable/alpha_flag" />
|
||||
<Button
|
||||
android:id="@+id/abortOverAlphaButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/choose" />
|
||||
-->
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
+65
-65
@@ -1,66 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textChooseAPNovemberTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:text="@string/choose_abort_flag_mode"
|
||||
android:textSize="16pt"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/choose_ap_flag_button"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="300dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/flag_ap"
|
||||
android:src="@drawable/ap_flag" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/choose_november_flag_button"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="300dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/flag_november"
|
||||
android:src="@drawable/november_flag" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textChooseAPNovemberTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:text="@string/choose_abort_flag_mode"
|
||||
android:textSize="16pt"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/choose_ap_flag_button"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="300dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/flag_ap"
|
||||
android:src="@drawable/ap_flag" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/choose_november_flag_button"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="300dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/flag_november"
|
||||
android:src="@drawable/november_flag" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
+37
-37
@@ -1,38 +1,38 @@
|
||||
<?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="10dip" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/lineOpeningTimeText"
|
||||
android:layout_width="150dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:text="@string/empty"
|
||||
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel" >
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/choose_line_open_min"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/chooseLineOpeningTimeButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/choose"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
</LinearLayout>
|
||||
|
||||
<?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="10dip" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/lineOpeningTimeText"
|
||||
android:layout_width="150dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:text="@string/empty"
|
||||
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel" >
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/choose_line_open_min"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/chooseLineOpeningTimeButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/choose"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
+63
-63
@@ -1,64 +1,64 @@
|
||||
<?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:padding="10dip"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="150dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel"
|
||||
android:text="Nationality"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="150dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel"
|
||||
android:text="Number"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/pathFinderNationality"
|
||||
android:layout_width="150dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel"
|
||||
android:text="@string/empty"
|
||||
android:inputType="textCapCharacters" >
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/pathFinderNumber"
|
||||
android:layout_width="200dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel"
|
||||
android:text="@string/empty"
|
||||
android:inputType="number" >
|
||||
</EditText>
|
||||
|
||||
<Button
|
||||
android:id="@+id/choosePathFinderButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel"
|
||||
android:text="@string/choose" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<?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:padding="10dip"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="150dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel"
|
||||
android:text="Nationality"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="150dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel"
|
||||
android:text="Number"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/pathFinderNationality"
|
||||
android:layout_width="150dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel"
|
||||
android:text="@string/empty"
|
||||
android:inputType="textCapCharacters" >
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/pathFinderNumber"
|
||||
android:layout_width="200dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel"
|
||||
android:text="@string/empty"
|
||||
android:inputType="number" >
|
||||
</EditText>
|
||||
|
||||
<Button
|
||||
android:id="@+id/choosePathFinderButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel"
|
||||
android:text="@string/choose" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
+30
-30
@@ -1,31 +1,31 @@
|
||||
<?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:padding="10dip"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/routesSpinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/numberOfRoundsEdit"
|
||||
android:layout_width="100dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel"
|
||||
android:text="@string/empty"
|
||||
android:inputType="number" >
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<Button
|
||||
android:id="@+id/chooseRunningCourseButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel"
|
||||
android:text="@string/choose" />
|
||||
|
||||
<?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:padding="10dip"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/routesSpinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/numberOfRoundsEdit"
|
||||
android:layout_width="100dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel"
|
||||
android:text="@string/empty"
|
||||
android:inputType="number" >
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<Button
|
||||
android:id="@+id/chooseRunningCourseButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel"
|
||||
android:text="@string/choose" />
|
||||
|
||||
</LinearLayout>
|
||||
+76
-76
@@ -1,77 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textChooseAPNovemberTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:text="@string/choose_running_course_lr"
|
||||
android:textSize="16pt"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/choose_unaone_button"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="150dp"
|
||||
android:contentDescription="@string/flag_ap"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/unaone" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lr_course_1"
|
||||
android:textSize="16pt" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/choose_bissotwo_button"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="150dp"
|
||||
android:contentDescription="@string/flag_november"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/bissotwo" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lr_course_2"
|
||||
android:textSize="16pt" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textChooseAPNovemberTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:text="@string/choose_running_course_lr"
|
||||
android:textSize="16pt"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/choose_unaone_button"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="150dp"
|
||||
android:contentDescription="@string/flag_ap"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/unaone" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lr_course_1"
|
||||
android:textSize="16pt" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/choose_bissotwo_button"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="150dp"
|
||||
android:contentDescription="@string/flag_november"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/bissotwo" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lr_course_2"
|
||||
android:textSize="16pt" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,97 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/InnerRelativeLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dip"
|
||||
android:layout_marginBottom="10dip"
|
||||
android:layout_marginRight="5dip"
|
||||
android:layout_marginLeft="5dip"
|
||||
android:gravity="fill_horizontal" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/regattaGroupInfoHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.TitleLabel" />
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
<TextView
|
||||
android:id="@+id/raceInfoHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/courseInfoHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="6dp"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabelLink" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_centerInParent="true">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnResetRace"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/reset_race"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/currentTimeLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/current_time"
|
||||
android:layout_marginRight="10dp"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<com.sap.sailing.racecommittee.app.ui.views.DigitalClock
|
||||
android:id="@+id/digitalClock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="0dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/infoContainer"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="0.1" >
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/InnerRelativeLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dip"
|
||||
android:layout_marginBottom="10dip"
|
||||
android:layout_marginRight="5dip"
|
||||
android:layout_marginLeft="5dip"
|
||||
android:gravity="fill_horizontal" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/regattaGroupInfoHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.TitleLabel" />
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
<TextView
|
||||
android:id="@+id/raceInfoHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/courseInfoHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="6dp"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabelLink" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_centerInParent="true">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnResetRace"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/reset_race"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/currentTimeLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/current_time"
|
||||
android:layout_marginRight="10dp"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<com.sap.sailing.racecommittee.app.ui.views.DigitalClock
|
||||
android:id="@+id/digitalClock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="0dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/infoContainer"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="0.1" >
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,29 +1,29 @@
|
||||
<?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" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="6dp"
|
||||
android:text="@string/race_reset_confirmation_header"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BoldBigTitleLabel" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textRaceResetRaceInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="6dp"
|
||||
android:layout_gravity="center"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="6dp"
|
||||
android:text="@string/race_reset_confirmation_warning"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BoldBigTitleLabel" />
|
||||
|
||||
<?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" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="6dp"
|
||||
android:text="@string/race_reset_confirmation_header"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BoldBigTitleLabel" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textRaceResetRaceInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="6dp"
|
||||
android:layout_gravity="center"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="6dp"
|
||||
android:text="@string/race_reset_confirmation_warning"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BoldBigTitleLabel" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,56 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/loginLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/background"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.70"
|
||||
android:background="@color/welter_extralight_gray_transparent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textListHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dip"
|
||||
android:layout_alignParentTop="true"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/races_and_details_left"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/textListHeader" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.99"
|
||||
android:background="@color/welter_deep_gray"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rightLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.30"
|
||||
android:background="@color/welter_extralight_gray_transparent"
|
||||
android:orientation="vertical"
|
||||
android:padding="6dip"
|
||||
android:visibility="invisible" >
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/races_and_details_right"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" />
|
||||
</LinearLayout>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/loginLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/background"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.70"
|
||||
android:background="@color/welter_extralight_gray_transparent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textListHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dip"
|
||||
android:layout_alignParentTop="true"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/races_and_details_left"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/textListHeader" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.99"
|
||||
android:background="@color/welter_deep_gray"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rightLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.30"
|
||||
android:background="@color/welter_extralight_gray_transparent"
|
||||
android:orientation="vertical"
|
||||
android:padding="6dip"
|
||||
android:visibility="invisible" >
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/races_and_details_right"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
+10
-10
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
<TextView
|
||||
android:id="@+id/textHeader"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" android:padding="6dip"/>
|
||||
</LinearLayout>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
<TextView
|
||||
android:id="@+id/textHeader"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" android:padding="6dip"/>
|
||||
</LinearLayout>
|
||||
@@ -1,40 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<PreferenceCategory android:title="@string/settings_category_general" >
|
||||
|
||||
<EditTextPreference
|
||||
android:name="@string/settings_general_manageareas_header"
|
||||
android:defaultValue="@string/settings_general_manageareas_default"
|
||||
android:key="courseAreasPref"
|
||||
android:summary="@string/settings_general_manageareas_description"
|
||||
android:title="@string/settings_general_manageareas_header" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/settings_category_race" >
|
||||
<!--
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="checkboxPrefGolf"
|
||||
android:summary="Check the box if the Golf flag should be automatically removed in a gate start race"
|
||||
android:title="Remove Golf Automatically" />
|
||||
-->
|
||||
<EditTextPreference
|
||||
android:defaultValue="30"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="edittextRaceTimeFrameAfterFinish"
|
||||
android:summary="@string/settings_time_frame_description"
|
||||
android:title="@string/settings_time_frame_header" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/settings_category_advanced" >
|
||||
|
||||
<EditTextPreference
|
||||
android:name="@string/settings_advanced_service_header"
|
||||
android:defaultValue="@string/settings_advanced_service_default"
|
||||
android:key="webserviceUrlPref"
|
||||
android:summary="@string/settings_advanced_service_description"
|
||||
android:title="@string/settings_advanced_service_header" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<PreferenceCategory android:title="@string/settings_category_general" >
|
||||
|
||||
<EditTextPreference
|
||||
android:name="@string/settings_general_manageareas_header"
|
||||
android:defaultValue="@string/settings_general_manageareas_default"
|
||||
android:key="courseAreasPref"
|
||||
android:summary="@string/settings_general_manageareas_description"
|
||||
android:title="@string/settings_general_manageareas_header" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/settings_category_race" >
|
||||
<!--
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="checkboxPrefGolf"
|
||||
android:summary="Check the box if the Golf flag should be automatically removed in a gate start race"
|
||||
android:title="Remove Golf Automatically" />
|
||||
-->
|
||||
<EditTextPreference
|
||||
android:defaultValue="30"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="edittextRaceTimeFrameAfterFinish"
|
||||
android:summary="@string/settings_time_frame_description"
|
||||
android:title="@string/settings_time_frame_header" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/settings_category_advanced" >
|
||||
|
||||
<EditTextPreference
|
||||
android:name="@string/settings_advanced_service_header"
|
||||
android:defaultValue="@string/settings_advanced_service_default"
|
||||
android:key="webserviceUrlPref"
|
||||
android:summary="@string/settings_advanced_service_description"
|
||||
android:title="@string/settings_advanced_service_header" />
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/spinnerTarget"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel"
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/spinnerTarget"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel"
|
||||
android:gravity="center"/>
|
||||
@@ -1,21 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout android:layout_width="wrap_content"
|
||||
android:layout_height="98dp" android:id="@+id/Welter.Cell.OneRowNoImage"
|
||||
android:gravity="center_vertical"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:background="@drawable/list_selector"
|
||||
>
|
||||
<!-- android:background="?android:attr/activatedBackgroundIndicator" -->
|
||||
|
||||
<RelativeLayout android:id="@+id/Welter.Cell.OneRowWithImage.TextContent"
|
||||
android:gravity="center_vertical" android:layout_width="fill_parent"
|
||||
android:layout_height="98dp" android:paddingLeft="6dip">
|
||||
<TextView android:id="@+id/Welter.Cell.OneRowNoImage.txtTitle"
|
||||
android:padding="5dp" android:textColor="@drawable/text_selector"
|
||||
android:textSize="10pt"
|
||||
android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true">
|
||||
</TextView>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout android:layout_width="wrap_content"
|
||||
android:layout_height="98dp" android:id="@+id/Welter.Cell.OneRowNoImage"
|
||||
android:gravity="center_vertical"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:background="@drawable/list_selector"
|
||||
>
|
||||
<!-- android:background="?android:attr/activatedBackgroundIndicator" -->
|
||||
|
||||
<RelativeLayout android:id="@+id/Welter.Cell.OneRowWithImage.TextContent"
|
||||
android:gravity="center_vertical" android:layout_width="fill_parent"
|
||||
android:layout_height="98dp" android:paddingLeft="6dip">
|
||||
<TextView android:id="@+id/Welter.Cell.OneRowNoImage.txtTitle"
|
||||
android:padding="5dp" android:textColor="@drawable/text_selector"
|
||||
android:textSize="10pt"
|
||||
android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true">
|
||||
</TextView>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
+31
-31
@@ -1,32 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/Welter.Cell.OneRowNoImageLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical" android:background="@color/welter_light_gray_transparent" >
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical" android:paddingLeft="5dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/Welter.Cell.OneRowNoImageLabel.txtTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="10pt" android:alpha="1" >
|
||||
</TextView>
|
||||
|
||||
<ImageButton android:id="@+id/Welter.Cell.OneRowNoImageLabel.btnJury"
|
||||
android:src="@drawable/bravo_mini"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/welter_red"
|
||||
android:textSize="10pt"
|
||||
android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/flag_jury"
|
||||
android:layout_centerVertical="true" android:layout_alignParentRight="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/Welter.Cell.OneRowNoImageLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical" android:background="@color/welter_light_gray_transparent" >
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical" android:paddingLeft="5dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/Welter.Cell.OneRowNoImageLabel.txtTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="10pt" android:alpha="1" >
|
||||
</TextView>
|
||||
|
||||
<ImageButton android:id="@+id/Welter.Cell.OneRowNoImageLabel.btnJury"
|
||||
android:src="@drawable/bravo_mini"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/welter_red"
|
||||
android:textSize="10pt"
|
||||
android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/flag_jury"
|
||||
android:layout_centerVertical="true" android:layout_alignParentRight="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,48 +1,48 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!-- hour -->
|
||||
<NumberPicker
|
||||
android:id="@+id/hour"
|
||||
android:layout_width="48dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="22dip"
|
||||
android:layout_marginRight="20dip"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
/>
|
||||
|
||||
<!-- divider -->
|
||||
<TextView
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
/>
|
||||
|
||||
<!-- minute -->
|
||||
<NumberPicker
|
||||
android:id="@+id/minute"
|
||||
android:layout_width="48dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dip"
|
||||
android:layout_marginRight="22dip"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
/>
|
||||
|
||||
<!-- AM / PM -->
|
||||
<NumberPicker
|
||||
android:id="@+id/amPm"
|
||||
android:layout_width="48dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="22dip"
|
||||
android:layout_marginRight="22dip"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
/>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!-- hour -->
|
||||
<NumberPicker
|
||||
android:id="@+id/hour"
|
||||
android:layout_width="48dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="22dip"
|
||||
android:layout_marginRight="20dip"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
/>
|
||||
|
||||
<!-- divider -->
|
||||
<TextView
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
/>
|
||||
|
||||
<!-- minute -->
|
||||
<NumberPicker
|
||||
android:id="@+id/minute"
|
||||
android:layout_width="48dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dip"
|
||||
android:layout_marginRight="22dip"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
/>
|
||||
|
||||
<!-- AM / PM -->
|
||||
<NumberPicker
|
||||
android:id="@+id/amPm"
|
||||
android:layout_width="48dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="22dip"
|
||||
android:layout_marginRight="22dip"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,51 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/Welter.Cell.OneRowNoImage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="75dp"
|
||||
android:background="@drawable/list_selector"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="75dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="12dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/Welter.Cell.TwoRowNoImage.lineOne"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Title of the first line"
|
||||
android:textColor="@drawable/text_selector"
|
||||
android:textSize="9pt" >
|
||||
</TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/Welter.Cell.TwoRowNoImage.lineTwo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@drawable/text_selector"
|
||||
android:paddingLeft="6pt"
|
||||
android:layout_below="@+id/Welter.Cell.TwoRowNoImage.lineOne"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Title of the second line"
|
||||
android:textSize="8pt" >
|
||||
</TextView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Welter.Cell.UpdateLabel"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:contentDescription="@string/updateIndicator"
|
||||
android:src="@drawable/updatelabel"
|
||||
android:visibility="gone" />
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/Welter.Cell.OneRowNoImage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="75dp"
|
||||
android:background="@drawable/list_selector"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="75dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="12dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/Welter.Cell.TwoRowNoImage.lineOne"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Title of the first line"
|
||||
android:textColor="@drawable/text_selector"
|
||||
android:textSize="9pt" >
|
||||
</TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/Welter.Cell.TwoRowNoImage.lineTwo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@drawable/text_selector"
|
||||
android:paddingLeft="6pt"
|
||||
android:layout_below="@+id/Welter.Cell.TwoRowNoImage.lineOne"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Title of the second line"
|
||||
android:textSize="8pt" >
|
||||
</TextView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Welter.Cell.UpdateLabel"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:contentDescription="@string/updateIndicator"
|
||||
android:src="@drawable/updatelabel"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,154 +1,154 @@
|
||||
<?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:descendantFocusability="beforeDescendants"
|
||||
android:focusableInTouchMode="true"
|
||||
android:background="@drawable/background" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_margin="18dp"
|
||||
android:background="@color/welter_extralight_gray_transparent">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="18dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1. Enter the wind direction"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<com.sap.sailing.racecommittee.app.utils.views.CompassView
|
||||
android:id="@+id/compassView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
</com.sap.sailing.racecommittee.app.utils.views.CompassView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="2. Enter the wind speed"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/sb_wind_speed"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:progress="100"
|
||||
android:max="400"
|
||||
android:padding="18dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="3. Obtain your position"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_wind_query_gps"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Query GPS"
|
||||
android:layout_gravity="center"
|
||||
android:padding="18dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="18dp"
|
||||
android:background="@color/welter_deep_gray">
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="18dp"
|
||||
android:layout_marginRight="26dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="9dp"
|
||||
android:text="4. Check all data"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Wind direction (degrees)" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_wind_direction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"
|
||||
android:hint="in degrees"
|
||||
android:minWidth="200dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Wind speed (knots)" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_wind_speed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"
|
||||
android:hint="in knots"
|
||||
android:minWidth="200dp">
|
||||
</EditText>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Your position" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_position_lat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="latitude"
|
||||
android:minWidth="200dp">
|
||||
</EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_position_lon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="longitude"
|
||||
android:minWidth="200dp">
|
||||
</EditText>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginBottom="9dp"
|
||||
android:text="5. Send data to server"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_wind_send"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Send"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<?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:descendantFocusability="beforeDescendants"
|
||||
android:focusableInTouchMode="true"
|
||||
android:background="@drawable/background" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_margin="18dp"
|
||||
android:background="@color/welter_extralight_gray_transparent">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="18dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1. Enter the wind direction"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<com.sap.sailing.racecommittee.app.utils.views.CompassView
|
||||
android:id="@+id/compassView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
</com.sap.sailing.racecommittee.app.utils.views.CompassView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="2. Enter the wind speed"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/sb_wind_speed"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:progress="100"
|
||||
android:max="400"
|
||||
android:padding="18dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="3. Obtain your position"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_wind_query_gps"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Query GPS"
|
||||
android:layout_gravity="center"
|
||||
android:padding="18dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="18dp"
|
||||
android:background="@color/welter_deep_gray">
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="18dp"
|
||||
android:layout_marginRight="26dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="9dp"
|
||||
android:text="4. Check all data"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Wind direction (degrees)" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_wind_direction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"
|
||||
android:hint="in degrees"
|
||||
android:minWidth="200dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Wind speed (knots)" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_wind_speed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"
|
||||
android:hint="in knots"
|
||||
android:minWidth="200dp">
|
||||
</EditText>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Your position" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_position_lat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="latitude"
|
||||
android:minWidth="200dp">
|
||||
</EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_position_lon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="longitude"
|
||||
android:minWidth="200dp">
|
||||
</EditText>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginBottom="9dp"
|
||||
android:text="5. Send data to server"
|
||||
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_wind_send"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Send"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,19 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/LiveIcon"
|
||||
android:icon="@drawable/ic_menu_share_local"
|
||||
android:title="Server"
|
||||
android:showAsAction="always" />
|
||||
<item android:id="@+id/WindLog"
|
||||
android:icon="@drawable/ic_menu_btn_wind"
|
||||
android:title="Add Wind Data"
|
||||
android:showAsAction="ifRoom" />
|
||||
<item android:id="@+id/SystemInfo"
|
||||
android:icon="@drawable/ic_menu_info_details"
|
||||
android:title="System Information"
|
||||
android:showAsAction="" />
|
||||
<item android:id="@+id/OptionsSettings"
|
||||
android:icon="@drawable/settings_grey"
|
||||
android:title="Settings"
|
||||
android:showAsAction="" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/LiveIcon"
|
||||
android:icon="@drawable/ic_menu_share_local"
|
||||
android:title="Server"
|
||||
android:showAsAction="always" />
|
||||
<item android:id="@+id/WindLog"
|
||||
android:icon="@drawable/ic_menu_btn_wind"
|
||||
android:title="Add Wind Data"
|
||||
android:showAsAction="ifRoom" />
|
||||
<item android:id="@+id/SystemInfo"
|
||||
android:icon="@drawable/ic_menu_info_details"
|
||||
android:title="System Information"
|
||||
android:showAsAction="" />
|
||||
<item android:id="@+id/OptionsSettings"
|
||||
android:icon="@drawable/settings_grey"
|
||||
android:title="Settings"
|
||||
android:showAsAction="" />
|
||||
</menu>
|
||||
@@ -1,5 +1,5 @@
|
||||
<resources>
|
||||
|
||||
<style name="AppTheme" parent="android:Theme.Holo.Light" />
|
||||
|
||||
<resources>
|
||||
|
||||
<style name="AppTheme" parent="android:Theme.Holo.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -1,37 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="welter_sap_gold">#fff0ab00</color>
|
||||
<color name="welter_selection_top">#ff0090d5</color>
|
||||
<color name="welter_selection_bottom">#ff0062a9</color>
|
||||
<color name="welter_extralight_gray">#ffe6e6e6</color>
|
||||
<color name="welter_extralight_gray_transparent">#eee6e6e6</color>
|
||||
|
||||
<color name="welter_light_gray">#ffcccccc</color>
|
||||
<color name="welter_light_gray_transparent">#eecccccc</color>
|
||||
|
||||
<color name="welter_medium_gray">#ff999999</color>
|
||||
<color name="welter_medium_darkgray">#ff808080</color>
|
||||
<color name="welter_dark_gray">#ff666666</color>
|
||||
<color name="welter_deep_gray">#ff333333</color>
|
||||
<color name="welter_white">#ffffffff</color>
|
||||
<color name="welter_offwhite">#fff3f3f3</color>
|
||||
<color name="welter_medium_blue">#ff226ca9</color>
|
||||
<color name="welter_black">#ff000000</color>
|
||||
<color name="welter_title_bar_background">#323232</color>
|
||||
|
||||
<color name="sapstore_background_gray">#FFD5D5D6</color>
|
||||
<color name="sapstore_background_light_gray">#FFF3F3F3</color>
|
||||
|
||||
<!--
|
||||
<color name="tabMedium">#D6D6D7</color>
|
||||
<color name="tabDark">#CBCBCC</color>
|
||||
-->
|
||||
<color name="tabMedium">#2B2B2B</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>
|
||||
</resources>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="welter_sap_gold">#fff0ab00</color>
|
||||
<color name="welter_selection_top">#ff0090d5</color>
|
||||
<color name="welter_selection_bottom">#ff0062a9</color>
|
||||
<color name="welter_extralight_gray">#ffe6e6e6</color>
|
||||
<color name="welter_extralight_gray_transparent">#eee6e6e6</color>
|
||||
|
||||
<color name="welter_light_gray">#ffcccccc</color>
|
||||
<color name="welter_light_gray_transparent">#eecccccc</color>
|
||||
|
||||
<color name="welter_medium_gray">#ff999999</color>
|
||||
<color name="welter_medium_darkgray">#ff808080</color>
|
||||
<color name="welter_dark_gray">#ff666666</color>
|
||||
<color name="welter_deep_gray">#ff333333</color>
|
||||
<color name="welter_white">#ffffffff</color>
|
||||
<color name="welter_offwhite">#fff3f3f3</color>
|
||||
<color name="welter_medium_blue">#ff226ca9</color>
|
||||
<color name="welter_black">#ff000000</color>
|
||||
<color name="welter_title_bar_background">#323232</color>
|
||||
|
||||
<color name="sapstore_background_gray">#FFD5D5D6</color>
|
||||
<color name="sapstore_background_light_gray">#FFF3F3F3</color>
|
||||
|
||||
<!--
|
||||
<color name="tabMedium">#D6D6D7</color>
|
||||
<color name="tabDark">#CBCBCC</color>
|
||||
-->
|
||||
<color name="tabMedium">#2B2B2B</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>
|
||||
</resources>
|
||||
@@ -1,25 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="Welter.PaddingLeft">7dip</dimen>
|
||||
<dimen name="Welter.TitleBarSize">27dip</dimen>
|
||||
<dimen name="Welter.DividerHeight">1dip</dimen>
|
||||
|
||||
<dimen name="Welter.TitleTextSize">15dip</dimen>
|
||||
<dimen name="Welter.RegularTextSize">16dip</dimen>
|
||||
<dimen name="Welter.BigTitleTextSize">23dip</dimen>
|
||||
<dimen name="Welter.VeryBigTitleTextSize">32dip</dimen>
|
||||
<dimen name="Welter.ExtraBigTitleTextSize">50dip</dimen>
|
||||
<dimen name="Welter.LabelTextSize">19dip</dimen>
|
||||
<dimen name="Welter.MenuButtonTextSize">13dip</dimen>
|
||||
<dimen name="Welter.DefaultTextSize">11dip</dimen>
|
||||
<dimen name="Welter.ProgressTextSize">14dip</dimen>
|
||||
|
||||
<dimen name="Welter.LabelWidth">87dip</dimen>
|
||||
|
||||
<dimen name="tab_space_top">4dp</dimen>
|
||||
<dimen name="tab_space">0dp</dimen>
|
||||
<dimen name="tab_space_plus1">3dp</dimen>
|
||||
<dimen name="tab_space_bottom_line">36sp</dimen>
|
||||
<dimen name="tab_space_unselected_top">6sp</dimen>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="Welter.PaddingLeft">7dip</dimen>
|
||||
<dimen name="Welter.TitleBarSize">27dip</dimen>
|
||||
<dimen name="Welter.DividerHeight">1dip</dimen>
|
||||
|
||||
<dimen name="Welter.TitleTextSize">15dip</dimen>
|
||||
<dimen name="Welter.RegularTextSize">16dip</dimen>
|
||||
<dimen name="Welter.BigTitleTextSize">23dip</dimen>
|
||||
<dimen name="Welter.VeryBigTitleTextSize">32dip</dimen>
|
||||
<dimen name="Welter.ExtraBigTitleTextSize">50dip</dimen>
|
||||
<dimen name="Welter.LabelTextSize">19dip</dimen>
|
||||
<dimen name="Welter.MenuButtonTextSize">13dip</dimen>
|
||||
<dimen name="Welter.DefaultTextSize">11dip</dimen>
|
||||
<dimen name="Welter.ProgressTextSize">14dip</dimen>
|
||||
|
||||
<dimen name="Welter.LabelWidth">87dip</dimen>
|
||||
|
||||
<dimen name="tab_space_top">4dp</dimen>
|
||||
<dimen name="tab_space">0dp</dimen>
|
||||
<dimen name="tab_space_plus1">3dp</dimen>
|
||||
<dimen name="tab_space_bottom_line">36sp</dimen>
|
||||
<dimen name="tab_space_unselected_top">6sp</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<item type="id" name="drag_handle" />
|
||||
<item type="id" name="fling_remove" />
|
||||
<item type="id" name="click_remove" />
|
||||
</resources>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<item type="id" name="drag_handle" />
|
||||
<item type="id" name="fling_remove" />
|
||||
<item type="id" name="click_remove" />
|
||||
</resources>
|
||||
@@ -8,6 +8,7 @@
|
||||
<string name="intentActionSendEvent">com.sap.sailing.racecommittee.app.action.sendEvent</string>
|
||||
<string name="intentActionAlarmAction">com.sap.sailing.racecommittee.app.action.alarmAction</string>
|
||||
<string name="intentActionIndividualRecallRemoval">com.sap.sailing.racecommittee.app.action.individualrecallremovalaction</string>
|
||||
<string name="intentActionAutomaticRaceEnd">com.sap.sailing.racecommittee.app.action.automaticRaceEnd</string>
|
||||
|
||||
<string name="hello">Hello World, RaceCommitteeActivity!</string>
|
||||
<string name="running_on_course">(on course %s)</string>
|
||||
|
||||
@@ -1,341 +1,341 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
<style name="Welter.TimePicker" parent="Widget.Holo.Light.TimePicker">
|
||||
<item name="android:layout">@layout/welter_timepicker</item>
|
||||
</style>
|
||||
-->
|
||||
|
||||
<style name="Widget.ActionBar" parent="@android:style/Widget.Holo.ActionBar">
|
||||
<item name="android:background">@drawable/title_bar_bg</item>
|
||||
<item name="android:titleTextStyle">@style/Welter.ActionBar.TitleTextStyle</item>
|
||||
</style>
|
||||
|
||||
<style name="Welter.ActionBar.TitleTextStyle" parent="android:style/TextAppearance.Holo.Widget.ActionBar.Title">
|
||||
<item name="android:textColor">@color/welter_sap_gold</item>
|
||||
</style>
|
||||
|
||||
<style name="Welter.FragmentBreadCrumbs" parent="@android:style/Widget.FragmentBreadCrumbs"></style>
|
||||
|
||||
<style name="WindowTitleBackground">
|
||||
<item name="android:background">@drawable/title_bar_bg</item>
|
||||
</style>
|
||||
|
||||
<style name="WindowTitleBackground.Welter" parent="WindowTitleBackground"></style>
|
||||
|
||||
<style name="TextAppearance.Welter.WindowTitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_sap_gold</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.FloatTextOnBackground" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.RegularText" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.TextOnBackground" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_light_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.LinkText" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_sap_gold</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.BigTitleLabel" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.BigTitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.BoldBigTitleLabel" parent="TextAppearance.Welter.BigTitleLabel">
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.BigTitleLabelLink" parent="TextAppearance.Welter.BigTitleLabel">
|
||||
<item name="android:textColor">@color/welter_sap_gold</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.TitleLabel" parent="TextAppearance.Welter.BigTitleLabel">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.VeryBigTitleLabel" parent="TextAppearance.Welter.BigTitleLabel">
|
||||
<item name="android:textSize">@dimen/Welter.VeryBigTitleTextSize</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ExtraBigTitleLabel" parent="TextAppearance.Welter.BigTitleLabel">
|
||||
<item name="android:textSize">@dimen/Welter.ExtraBigTitleTextSize</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.TextLabel" parent="TextAppearance.Welter.BigTitleLabel">
|
||||
<item name="android:textSize">@dimen/Welter.LabelTextSize</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.LargeFontLabel" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.LabelTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.OneRowCellTitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.LabelTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.TwoRowCellTitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.TwoRowCellSubtitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_dark_gray</item>
|
||||
</style>
|
||||
|
||||
<!-- Custom three row cell -->
|
||||
<style name="TextAppearance.Welter.ThreeRowCellTitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.DefaultTextSize</item>
|
||||
<item name="android:textColor">@color/welter_dark_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ThreeRowCellSubtitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ThreeRowCellNumberOfRatings" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.DefaultTextSize</item>
|
||||
<item name="android:textColor">@color/welter_dark_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ThreeRowCellSubtitleCover" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">13dip</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.List" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.BigTitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ListTitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.BigTitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.Hint" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.LabelTextSize</item>
|
||||
<item name="android:textColor">@color/welter_medium_darkgray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ButtonActive" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.DarkButtonActive" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ButtonPressed" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ButtonDisabled" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_extralight_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.HeaderTitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.MenuButtonPress" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.MenuButtonTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.MenuButtonInactive" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.MenuButtonTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.MenuButtonActive" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.MenuButtonTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.RegularTextLight" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.LinkTextLight" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_medium_blue</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.TabActive" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.TabPressed" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.TabInactive" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_light_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.DialogLabel" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.BigTitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_sap_gold</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.DialogText" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.LabelTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.MenuTitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.MenuItem" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.BigTitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.MenuItemSelected" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.BigTitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.CalloutTitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.CalloutText" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_medium_darkgray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.InputText" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.LabelTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ProgressIndicatorText" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.ProgressTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ProgressIndicatorPercentage" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.ProgressTextSize</item>
|
||||
<item name="android:textColor">@color/welter_medium_darkgray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ToggleOff" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_dark_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ToggleOn" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="WindowTitle">
|
||||
<item name="android:singleLine">true</item>
|
||||
<item name="android:textAppearance">@style/TextAppearance.Welter.WindowTitle</item>
|
||||
<item name="android:paddingLeft">@dimen/Welter.PaddingLeft</item>
|
||||
</style>
|
||||
|
||||
<style name="WindowTitleCustom">
|
||||
<item name="android:singleLine">true</item>
|
||||
<item name="android:textAppearance">@style/TextAppearance.Welter.WindowTitle</item>
|
||||
</style>
|
||||
|
||||
<style name="WindowTitle.Welter" parent="WindowTitle"></style>
|
||||
|
||||
<style name="TextAppearance.Welter.AppDescriptionText" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">20dip</item>
|
||||
<item name="android:textColor">@color/welter_black</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter" parent="@android:style/TextAppearance">
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
<item name="android:textColorHighlight">@color/welter_light_gray</item>
|
||||
<item name="android:textColorHint">@color/welter_medium_gray</item>
|
||||
<item name="android:textColorLink">@color/welter_sap_gold</item>
|
||||
<item name="android:textSize">@dimen/Welter.DefaultTextSize</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:typeface">sans</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.ListView.Welter" parent="@android:style/Widget.ListView">
|
||||
|
||||
<!-- <item name="android:background">@drawable/list_bg_gradient</item> -->
|
||||
<item name="android:listSelector">@drawable/list_selector_bg</item>
|
||||
<item name="android:divider">@color/welter_white</item>
|
||||
<!-- <item name="android:dividerHeight">@dimen/Welter.DividerHeight</item> -->
|
||||
<item name="android:dividerHeight">0px</item>
|
||||
<item name="android:textAppearance">@style/TextAppearance.Welter</item>
|
||||
</style>
|
||||
|
||||
<style name="SmallWelterRatingBar">
|
||||
<item name="android:indeterminateOnly">false</item>
|
||||
<item name="android:progressDrawable">@drawable/ratingbar_small_orange</item>
|
||||
<item name="android:indeterminateDrawable">@drawable/ratingbar_small_orange</item>
|
||||
<item name="android:minHeight">14dip</item>
|
||||
<item name="android:maxHeight">14dip</item>
|
||||
<item name="android:thumb">@null</item>
|
||||
<item name="android:isIndicator">true</item>
|
||||
</style>
|
||||
|
||||
<style name="WelterRatingBarSelectable">
|
||||
<item name="android:indeterminateOnly">false</item>
|
||||
<item name="android:progressDrawable">@drawable/ratingbar_sapstore_selectable</item>
|
||||
<item name="android:indeterminateDrawable">@drawable/ratingbar_sapstore_selectable</item>
|
||||
<item name="android:minHeight">57dip</item>
|
||||
<item name="android:maxHeight">57dip</item>
|
||||
<item name="android:thumb">@null</item>
|
||||
</style>
|
||||
|
||||
<style name="LightTabWidget" parent="@android:style/Widget.TabWidget">
|
||||
<item name="android:tabStripEnabled">false</item>
|
||||
</style>
|
||||
|
||||
<style name="ExplanationText">
|
||||
<item name="android:textSize">16px</item>
|
||||
<item name="android:paddingLeft">14dip</item>
|
||||
<item name="android:paddingTop">5dip</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="Subheading">
|
||||
<item name="android:textSize">22px</item>
|
||||
<item name="android:paddingLeft">14dip</item>
|
||||
<item name="android:paddingTop">10dip</item>
|
||||
<item name="android:textAppearance">@style/TextAppearance.Welter.FloatTextOnBackground</item>
|
||||
<item name="android:textColor">@color/welter_light_gray</item>
|
||||
</style>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
<style name="Welter.TimePicker" parent="Widget.Holo.Light.TimePicker">
|
||||
<item name="android:layout">@layout/welter_timepicker</item>
|
||||
</style>
|
||||
-->
|
||||
|
||||
<style name="Widget.ActionBar" parent="@android:style/Widget.Holo.ActionBar">
|
||||
<item name="android:background">@drawable/title_bar_bg</item>
|
||||
<item name="android:titleTextStyle">@style/Welter.ActionBar.TitleTextStyle</item>
|
||||
</style>
|
||||
|
||||
<style name="Welter.ActionBar.TitleTextStyle" parent="android:style/TextAppearance.Holo.Widget.ActionBar.Title">
|
||||
<item name="android:textColor">@color/welter_sap_gold</item>
|
||||
</style>
|
||||
|
||||
<style name="Welter.FragmentBreadCrumbs" parent="@android:style/Widget.FragmentBreadCrumbs"></style>
|
||||
|
||||
<style name="WindowTitleBackground">
|
||||
<item name="android:background">@drawable/title_bar_bg</item>
|
||||
</style>
|
||||
|
||||
<style name="WindowTitleBackground.Welter" parent="WindowTitleBackground"></style>
|
||||
|
||||
<style name="TextAppearance.Welter.WindowTitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_sap_gold</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.FloatTextOnBackground" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.RegularText" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.TextOnBackground" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_light_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.LinkText" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_sap_gold</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.BigTitleLabel" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.BigTitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.BoldBigTitleLabel" parent="TextAppearance.Welter.BigTitleLabel">
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.BigTitleLabelLink" parent="TextAppearance.Welter.BigTitleLabel">
|
||||
<item name="android:textColor">@color/welter_sap_gold</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.TitleLabel" parent="TextAppearance.Welter.BigTitleLabel">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.VeryBigTitleLabel" parent="TextAppearance.Welter.BigTitleLabel">
|
||||
<item name="android:textSize">@dimen/Welter.VeryBigTitleTextSize</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ExtraBigTitleLabel" parent="TextAppearance.Welter.BigTitleLabel">
|
||||
<item name="android:textSize">@dimen/Welter.ExtraBigTitleTextSize</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.TextLabel" parent="TextAppearance.Welter.BigTitleLabel">
|
||||
<item name="android:textSize">@dimen/Welter.LabelTextSize</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.LargeFontLabel" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.LabelTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.OneRowCellTitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.LabelTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.TwoRowCellTitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.TwoRowCellSubtitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_dark_gray</item>
|
||||
</style>
|
||||
|
||||
<!-- Custom three row cell -->
|
||||
<style name="TextAppearance.Welter.ThreeRowCellTitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.DefaultTextSize</item>
|
||||
<item name="android:textColor">@color/welter_dark_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ThreeRowCellSubtitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ThreeRowCellNumberOfRatings" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.DefaultTextSize</item>
|
||||
<item name="android:textColor">@color/welter_dark_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ThreeRowCellSubtitleCover" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">13dip</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.List" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.BigTitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ListTitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.BigTitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.Hint" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.LabelTextSize</item>
|
||||
<item name="android:textColor">@color/welter_medium_darkgray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ButtonActive" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.DarkButtonActive" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ButtonPressed" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ButtonDisabled" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_extralight_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.HeaderTitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.MenuButtonPress" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.MenuButtonTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.MenuButtonInactive" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.MenuButtonTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.MenuButtonActive" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.MenuButtonTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.RegularTextLight" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.LinkTextLight" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_medium_blue</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.TabActive" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.TabPressed" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.TabInactive" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_light_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.DialogLabel" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.BigTitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_sap_gold</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.DialogText" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.LabelTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.MenuTitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.MenuItem" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.BigTitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.MenuItemSelected" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.BigTitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.CalloutTitle" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.RegularTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.CalloutText" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_medium_darkgray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.InputText" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.LabelTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ProgressIndicatorText" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.ProgressTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ProgressIndicatorPercentage" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.ProgressTextSize</item>
|
||||
<item name="android:textColor">@color/welter_medium_darkgray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ToggleOff" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_dark_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter.ToggleOn" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">@dimen/Welter.TitleTextSize</item>
|
||||
<item name="android:textColor">@color/welter_deep_gray</item>
|
||||
</style>
|
||||
|
||||
<style name="WindowTitle">
|
||||
<item name="android:singleLine">true</item>
|
||||
<item name="android:textAppearance">@style/TextAppearance.Welter.WindowTitle</item>
|
||||
<item name="android:paddingLeft">@dimen/Welter.PaddingLeft</item>
|
||||
</style>
|
||||
|
||||
<style name="WindowTitleCustom">
|
||||
<item name="android:singleLine">true</item>
|
||||
<item name="android:textAppearance">@style/TextAppearance.Welter.WindowTitle</item>
|
||||
</style>
|
||||
|
||||
<style name="WindowTitle.Welter" parent="WindowTitle"></style>
|
||||
|
||||
<style name="TextAppearance.Welter.AppDescriptionText" parent="TextAppearance.Welter">
|
||||
<item name="android:textSize">20dip</item>
|
||||
<item name="android:textColor">@color/welter_black</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Welter" parent="@android:style/TextAppearance">
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
<item name="android:textColorHighlight">@color/welter_light_gray</item>
|
||||
<item name="android:textColorHint">@color/welter_medium_gray</item>
|
||||
<item name="android:textColorLink">@color/welter_sap_gold</item>
|
||||
<item name="android:textSize">@dimen/Welter.DefaultTextSize</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:typeface">sans</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.ListView.Welter" parent="@android:style/Widget.ListView">
|
||||
|
||||
<!-- <item name="android:background">@drawable/list_bg_gradient</item> -->
|
||||
<item name="android:listSelector">@drawable/list_selector_bg</item>
|
||||
<item name="android:divider">@color/welter_white</item>
|
||||
<!-- <item name="android:dividerHeight">@dimen/Welter.DividerHeight</item> -->
|
||||
<item name="android:dividerHeight">0px</item>
|
||||
<item name="android:textAppearance">@style/TextAppearance.Welter</item>
|
||||
</style>
|
||||
|
||||
<style name="SmallWelterRatingBar">
|
||||
<item name="android:indeterminateOnly">false</item>
|
||||
<item name="android:progressDrawable">@drawable/ratingbar_small_orange</item>
|
||||
<item name="android:indeterminateDrawable">@drawable/ratingbar_small_orange</item>
|
||||
<item name="android:minHeight">14dip</item>
|
||||
<item name="android:maxHeight">14dip</item>
|
||||
<item name="android:thumb">@null</item>
|
||||
<item name="android:isIndicator">true</item>
|
||||
</style>
|
||||
|
||||
<style name="WelterRatingBarSelectable">
|
||||
<item name="android:indeterminateOnly">false</item>
|
||||
<item name="android:progressDrawable">@drawable/ratingbar_sapstore_selectable</item>
|
||||
<item name="android:indeterminateDrawable">@drawable/ratingbar_sapstore_selectable</item>
|
||||
<item name="android:minHeight">57dip</item>
|
||||
<item name="android:maxHeight">57dip</item>
|
||||
<item name="android:thumb">@null</item>
|
||||
</style>
|
||||
|
||||
<style name="LightTabWidget" parent="@android:style/Widget.TabWidget">
|
||||
<item name="android:tabStripEnabled">false</item>
|
||||
</style>
|
||||
|
||||
<style name="ExplanationText">
|
||||
<item name="android:textSize">16px</item>
|
||||
<item name="android:paddingLeft">14dip</item>
|
||||
<item name="android:paddingTop">5dip</item>
|
||||
<item name="android:textColor">@color/welter_white</item>
|
||||
</style>
|
||||
|
||||
<style name="Subheading">
|
||||
<item name="android:textSize">22px</item>
|
||||
<item name="android:paddingLeft">14dip</item>
|
||||
<item name="android:paddingTop">10dip</item>
|
||||
<item name="android:textAppearance">@style/TextAppearance.Welter.FloatTextOnBackground</item>
|
||||
<item name="android:textColor">@color/welter_light_gray</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -1,49 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Theme.Welter" parent="android:Theme.Holo.Light">
|
||||
<item name="android:actionBarStyle">@style/Widget.ActionBar</item>
|
||||
|
||||
<item name="android:textColorPrimary">@color/welter_deep_gray</item>
|
||||
|
||||
<!--
|
||||
<item name="timePickerStyle">@style/Widget.TimePicker</item>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<item name="android:textColorSecondary">@color/welter_white</item>
|
||||
<item name="android:textColorTertiary">@color/welter_white</item>
|
||||
<item name="android:textColorPrimaryInverse">@color/welter_white</item>
|
||||
<item name="android:textColorSecondaryInverse">@color/welter_white</item>
|
||||
<item name="android:textColorTertiaryInverse">@color/welter_white</item>
|
||||
<item name="android:textColorPrimaryDisableOnly">@color/welter_white</item>
|
||||
<item name="android:textColorPrimaryInverseDisableOnly">@color/welter_white</item>
|
||||
<item name="android:textColorPrimaryNoDisable">@color/welter_white</item>
|
||||
<item name="android:textColorSecondaryNoDisable">@color/welter_white</item>
|
||||
<item name="android:textColorPrimaryInverseNoDisable">@color/welter_white</item>
|
||||
<item name="android:textColorSecondaryInverseNoDisable">@color/welter_white</item>
|
||||
<item name="android:textColorHint">@color/welter_white</item>
|
||||
<item name="android:textColorHintInverse">@color/welter_white</item>
|
||||
|
||||
<item name="android:textColorSearchUrl">@color/welter_white</item>
|
||||
|
||||
<item name="android:textColorHighlight">@color/welter_white</item>
|
||||
<item name="android:textColorHighlightInverse">@color/welter_white</item>
|
||||
<item name="android:textColorLink">@color/welter_white</item>
|
||||
<item name="android:textColorLinkInverse">@color/welter_white</item>
|
||||
<item name="android:textColorAlertDialogListItem">@color/welter_white</item>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<item name="android:windowTitleStyle">@style/WindowTitle.Welter</item>
|
||||
<item name="android:windowTitleSize">@dimen/Welter.TitleBarSize</item>
|
||||
<item name="android:windowTitleBackgroundStyle">@style/WindowTitleBackground.Welter</item>
|
||||
<item name="android:windowBackground">@color/welter_dark_gray</item>
|
||||
<item name="android:listViewStyle">@style/Widget.ListView.Welter</item>
|
||||
item name="android:windowNoTitle">true</item
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:tabWidgetStyle">@style/LightTabWidget</item>
|
||||
-->
|
||||
</style>
|
||||
<style name="Theme" parent="android:Theme.Light.NoTitleBar">
|
||||
</style>
|
||||
</resources>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Theme.Welter" parent="android:Theme.Holo.Light">
|
||||
<item name="android:actionBarStyle">@style/Widget.ActionBar</item>
|
||||
|
||||
<item name="android:textColorPrimary">@color/welter_deep_gray</item>
|
||||
|
||||
<!--
|
||||
<item name="timePickerStyle">@style/Widget.TimePicker</item>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<item name="android:textColorSecondary">@color/welter_white</item>
|
||||
<item name="android:textColorTertiary">@color/welter_white</item>
|
||||
<item name="android:textColorPrimaryInverse">@color/welter_white</item>
|
||||
<item name="android:textColorSecondaryInverse">@color/welter_white</item>
|
||||
<item name="android:textColorTertiaryInverse">@color/welter_white</item>
|
||||
<item name="android:textColorPrimaryDisableOnly">@color/welter_white</item>
|
||||
<item name="android:textColorPrimaryInverseDisableOnly">@color/welter_white</item>
|
||||
<item name="android:textColorPrimaryNoDisable">@color/welter_white</item>
|
||||
<item name="android:textColorSecondaryNoDisable">@color/welter_white</item>
|
||||
<item name="android:textColorPrimaryInverseNoDisable">@color/welter_white</item>
|
||||
<item name="android:textColorSecondaryInverseNoDisable">@color/welter_white</item>
|
||||
<item name="android:textColorHint">@color/welter_white</item>
|
||||
<item name="android:textColorHintInverse">@color/welter_white</item>
|
||||
|
||||
<item name="android:textColorSearchUrl">@color/welter_white</item>
|
||||
|
||||
<item name="android:textColorHighlight">@color/welter_white</item>
|
||||
<item name="android:textColorHighlightInverse">@color/welter_white</item>
|
||||
<item name="android:textColorLink">@color/welter_white</item>
|
||||
<item name="android:textColorLinkInverse">@color/welter_white</item>
|
||||
<item name="android:textColorAlertDialogListItem">@color/welter_white</item>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<item name="android:windowTitleStyle">@style/WindowTitle.Welter</item>
|
||||
<item name="android:windowTitleSize">@dimen/Welter.TitleBarSize</item>
|
||||
<item name="android:windowTitleBackgroundStyle">@style/WindowTitleBackground.Welter</item>
|
||||
<item name="android:windowBackground">@color/welter_dark_gray</item>
|
||||
<item name="android:listViewStyle">@style/Widget.ListView.Welter</item>
|
||||
item name="android:windowNoTitle">true</item
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:tabWidgetStyle">@style/LightTabWidget</item>
|
||||
-->
|
||||
</style>
|
||||
<style name="Theme" parent="android:Theme.Light.NoTitleBar">
|
||||
</style>
|
||||
</resources>
|
||||
+48
-48
@@ -1,48 +1,48 @@
|
||||
package com.sap.sailing.racecommittee.app;
|
||||
|
||||
import java.lang.Thread.UncaughtExceptionHandler;
|
||||
import java.util.Date;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.logging.FileLoggingTask;
|
||||
|
||||
import android.app.Application;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* Register a additional exception handler for uncaught exception to have
|
||||
* some crash logging.
|
||||
*/
|
||||
public class RaceApplication extends Application {
|
||||
|
||||
private final static String TAG = RaceApplication.class.getName();
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
Thread.setDefaultUncaughtExceptionHandler(
|
||||
new LoggingExceptionHandler(Thread.getDefaultUncaughtExceptionHandler()));
|
||||
}
|
||||
|
||||
private static class LoggingExceptionHandler implements UncaughtExceptionHandler {
|
||||
|
||||
private UncaughtExceptionHandler defaultHandler;
|
||||
|
||||
public LoggingExceptionHandler(UncaughtExceptionHandler defaultHandler) {
|
||||
this.defaultHandler = defaultHandler;
|
||||
}
|
||||
|
||||
public void uncaughtException(Thread thread, Throwable ex) {
|
||||
FileLoggingTask task = new FileLoggingTask();
|
||||
if (task.tryStartFileLogging("sap_rc_crash_%s.txt")) {
|
||||
task.log(String.format("%s - Exception occured on thread %s:", new Date(), thread.getId()));
|
||||
task.logException(ex);
|
||||
} else {
|
||||
Log.e(TAG, "Could not log uncaught exception to file.");
|
||||
}
|
||||
defaultHandler.uncaughtException(thread, ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app;
|
||||
|
||||
import java.lang.Thread.UncaughtExceptionHandler;
|
||||
import java.util.Date;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.logging.FileLoggingTask;
|
||||
|
||||
import android.app.Application;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* Register a additional exception handler for uncaught exception to have
|
||||
* some crash logging.
|
||||
*/
|
||||
public class RaceApplication extends Application {
|
||||
|
||||
private final static String TAG = RaceApplication.class.getName();
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
Thread.setDefaultUncaughtExceptionHandler(
|
||||
new LoggingExceptionHandler(Thread.getDefaultUncaughtExceptionHandler()));
|
||||
}
|
||||
|
||||
private static class LoggingExceptionHandler implements UncaughtExceptionHandler {
|
||||
|
||||
private UncaughtExceptionHandler defaultHandler;
|
||||
|
||||
public LoggingExceptionHandler(UncaughtExceptionHandler defaultHandler) {
|
||||
this.defaultHandler = defaultHandler;
|
||||
}
|
||||
|
||||
public void uncaughtException(Thread thread, Throwable ex) {
|
||||
FileLoggingTask task = new FileLoggingTask();
|
||||
if (task.tryStartFileLogging("sap_rc_crash_%s.txt")) {
|
||||
task.log(String.format("%s - Exception occured on thread %s:", new Date(), thread.getId()));
|
||||
task.logException(ex);
|
||||
} else {
|
||||
Log.e(TAG, "Could not log uncaught exception to file.");
|
||||
}
|
||||
defaultHandler.uncaughtException(thread, ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+21
-21
@@ -1,21 +1,21 @@
|
||||
package com.sap.sailing.racecommittee.app.data;
|
||||
|
||||
public class DataLoadingException extends Exception {
|
||||
private static final long serialVersionUID = 4787160523984332591L;
|
||||
|
||||
public DataLoadingException() {
|
||||
}
|
||||
|
||||
public DataLoadingException(String detailMessage) {
|
||||
super(detailMessage);
|
||||
}
|
||||
|
||||
public DataLoadingException(Throwable throwable) {
|
||||
super(throwable);
|
||||
}
|
||||
|
||||
public DataLoadingException(String detailMessage, Throwable throwable) {
|
||||
super(detailMessage, throwable);
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.data;
|
||||
|
||||
public class DataLoadingException extends Exception {
|
||||
private static final long serialVersionUID = 4787160523984332591L;
|
||||
|
||||
public DataLoadingException() {
|
||||
}
|
||||
|
||||
public DataLoadingException(String detailMessage) {
|
||||
super(detailMessage);
|
||||
}
|
||||
|
||||
public DataLoadingException(Throwable throwable) {
|
||||
super(throwable);
|
||||
}
|
||||
|
||||
public DataLoadingException(String detailMessage, Throwable throwable) {
|
||||
super(detailMessage, throwable);
|
||||
}
|
||||
|
||||
}
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
package com.sap.sailing.racecommittee.app.data.clients;
|
||||
|
||||
public interface LoadClient<T> {
|
||||
public void onLoadFailed(Exception reason);
|
||||
public void onLoadSucceded(T data);
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.data.clients;
|
||||
|
||||
public interface LoadClient<T> {
|
||||
public void onLoadFailed(Exception reason);
|
||||
public void onLoadSucceded(T data);
|
||||
}
|
||||
+22
-22
@@ -1,22 +1,22 @@
|
||||
package com.sap.sailing.racecommittee.app.data.handlers;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.data.OnlineDataManager;
|
||||
import com.sap.sailing.racecommittee.app.data.clients.LoadClient;
|
||||
|
||||
public abstract class DataHandler<T> {
|
||||
protected OnlineDataManager manager;
|
||||
protected LoadClient<T> client;
|
||||
|
||||
public DataHandler(OnlineDataManager manager, LoadClient<T> client) {
|
||||
this.manager = manager;
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
public void onLoaded(T data) {
|
||||
client.onLoadSucceded(data);
|
||||
}
|
||||
|
||||
public void onFailed(Exception reason) {
|
||||
client.onLoadFailed(reason);
|
||||
}
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.data.handlers;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.data.OnlineDataManager;
|
||||
import com.sap.sailing.racecommittee.app.data.clients.LoadClient;
|
||||
|
||||
public abstract class DataHandler<T> {
|
||||
protected OnlineDataManager manager;
|
||||
protected LoadClient<T> client;
|
||||
|
||||
public DataHandler(OnlineDataManager manager, LoadClient<T> client) {
|
||||
this.manager = manager;
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
public void onLoaded(T data) {
|
||||
client.onLoadSucceded(data);
|
||||
}
|
||||
|
||||
public void onFailed(Exception reason) {
|
||||
client.onLoadFailed(reason);
|
||||
}
|
||||
}
|
||||
+21
-21
@@ -1,21 +1,21 @@
|
||||
package com.sap.sailing.racecommittee.app.data.handlers;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import com.sap.sailing.domain.base.EventBase;
|
||||
import com.sap.sailing.racecommittee.app.data.OnlineDataManager;
|
||||
import com.sap.sailing.racecommittee.app.data.clients.LoadClient;
|
||||
|
||||
public class EventsDataHandler extends DataHandler<Collection<EventBase>> {
|
||||
|
||||
public EventsDataHandler(OnlineDataManager manager, LoadClient<Collection<EventBase>> client) {
|
||||
super(manager, client);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaded(Collection<EventBase> data) {
|
||||
super.onLoaded(data);
|
||||
manager.addEvents(data);
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.data.handlers;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import com.sap.sailing.domain.base.EventBase;
|
||||
import com.sap.sailing.racecommittee.app.data.OnlineDataManager;
|
||||
import com.sap.sailing.racecommittee.app.data.clients.LoadClient;
|
||||
|
||||
public class EventsDataHandler extends DataHandler<Collection<EventBase>> {
|
||||
|
||||
public EventsDataHandler(OnlineDataManager manager, LoadClient<Collection<EventBase>> client) {
|
||||
super(manager, client);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaded(Collection<EventBase> data) {
|
||||
super.onLoaded(data);
|
||||
manager.addEvents(data);
|
||||
}
|
||||
|
||||
}
|
||||
+20
-20
@@ -1,20 +1,20 @@
|
||||
package com.sap.sailing.racecommittee.app.data.http;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
|
||||
public class HttpGetRequest extends HttpRequest {
|
||||
|
||||
public HttpGetRequest(URI requestUri) throws MalformedURLException, IOException {
|
||||
super(requestUri.toURL());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream execute(HttpURLConnection connection) throws IOException {
|
||||
return new BufferedInputStream(connection.getInputStream());
|
||||
}
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.data.http;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
|
||||
public class HttpGetRequest extends HttpRequest {
|
||||
|
||||
public HttpGetRequest(URI requestUri) throws MalformedURLException, IOException {
|
||||
super(requestUri.toURL());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream execute(HttpURLConnection connection) throws IOException {
|
||||
return new BufferedInputStream(connection.getInputStream());
|
||||
}
|
||||
}
|
||||
+42
-42
@@ -1,42 +1,42 @@
|
||||
package com.sap.sailing.racecommittee.app.data.http;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
public class HttpJsonPostRequest extends HttpRequest {
|
||||
public final static String ContentType = "application/json;charset=UTF-8";
|
||||
|
||||
private String requestBody;
|
||||
|
||||
public HttpJsonPostRequest(URI requestUri, String body) throws MalformedURLException, IOException {
|
||||
super(requestUri.toURL());
|
||||
this.requestBody = body;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream execute(HttpURLConnection connection) throws IOException {
|
||||
// connection.setDoInput(true);
|
||||
connection.setDoOutput(true);
|
||||
connection.setChunkedStreamingMode(0);
|
||||
|
||||
connection.setRequestProperty("Content-Type", ContentType);
|
||||
connection.setRequestProperty("Accept", ContentType);
|
||||
|
||||
OutputStream outputStream = new BufferedOutputStream(connection.getOutputStream());
|
||||
sendBody(outputStream);
|
||||
outputStream.close();
|
||||
|
||||
return new BufferedInputStream(connection.getInputStream());
|
||||
}
|
||||
|
||||
private void sendBody(OutputStream outputStream) throws IOException {
|
||||
outputStream.write(requestBody.getBytes(Charset.forName("UTF-8")));
|
||||
}
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.data.http;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
public class HttpJsonPostRequest extends HttpRequest {
|
||||
public final static String ContentType = "application/json;charset=UTF-8";
|
||||
|
||||
private String requestBody;
|
||||
|
||||
public HttpJsonPostRequest(URI requestUri, String body) throws MalformedURLException, IOException {
|
||||
super(requestUri.toURL());
|
||||
this.requestBody = body;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream execute(HttpURLConnection connection) throws IOException {
|
||||
// connection.setDoInput(true);
|
||||
connection.setDoOutput(true);
|
||||
connection.setChunkedStreamingMode(0);
|
||||
|
||||
connection.setRequestProperty("Content-Type", ContentType);
|
||||
connection.setRequestProperty("Accept", ContentType);
|
||||
|
||||
OutputStream outputStream = new BufferedOutputStream(connection.getOutputStream());
|
||||
sendBody(outputStream);
|
||||
outputStream.close();
|
||||
|
||||
return new BufferedInputStream(connection.getInputStream());
|
||||
}
|
||||
|
||||
private void sendBody(OutputStream outputStream) throws IOException {
|
||||
outputStream.write(requestBody.getBytes(Charset.forName("UTF-8")));
|
||||
}
|
||||
}
|
||||
+56
-56
@@ -1,56 +1,56 @@
|
||||
package com.sap.sailing.racecommittee.app.data.http;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
|
||||
import org.apache.http.HttpStatus;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.logging.ExLog;
|
||||
|
||||
public abstract class HttpRequest {
|
||||
|
||||
private final static String TAG = HttpRequest.class.getName();
|
||||
|
||||
private final static int lowestOkCode = HttpStatus.SC_OK;
|
||||
private final static int lowestRedirectCode = HttpStatus.SC_MULTIPLE_CHOICES;
|
||||
|
||||
private static void validateHttpResponse(HttpURLConnection connection) throws IOException {
|
||||
int statusCode = connection.getResponseCode();
|
||||
if (statusCode != -1) {
|
||||
if (statusCode >= lowestOkCode && statusCode < lowestRedirectCode) {
|
||||
return;
|
||||
}
|
||||
throw new IOException(String.format("Request response had error code %d.", statusCode));
|
||||
}
|
||||
throw new IOException(String.format("Request response had no valid status."));
|
||||
}
|
||||
|
||||
private HttpURLConnection connection;
|
||||
|
||||
public HttpRequest(URL url) throws IOException {
|
||||
this((HttpURLConnection) url.openConnection());
|
||||
}
|
||||
|
||||
public HttpRequest(HttpURLConnection connection) {
|
||||
this.connection = connection;
|
||||
}
|
||||
|
||||
protected abstract InputStream execute(HttpURLConnection connection) throws IOException;
|
||||
|
||||
public InputStream execute() throws Exception {
|
||||
ExLog.i(TAG, String.format("Executing HTTP request on %s.", connection.getURL()));
|
||||
|
||||
connection.setConnectTimeout(5000);
|
||||
|
||||
InputStream stream = execute(connection);
|
||||
validateHttpResponse(connection);
|
||||
return stream;
|
||||
}
|
||||
|
||||
public void disconnect() {
|
||||
connection.disconnect();
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.data.http;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
|
||||
import org.apache.http.HttpStatus;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.logging.ExLog;
|
||||
|
||||
public abstract class HttpRequest {
|
||||
|
||||
private final static String TAG = HttpRequest.class.getName();
|
||||
|
||||
private final static int lowestOkCode = HttpStatus.SC_OK;
|
||||
private final static int lowestRedirectCode = HttpStatus.SC_MULTIPLE_CHOICES;
|
||||
|
||||
private static void validateHttpResponse(HttpURLConnection connection) throws IOException {
|
||||
int statusCode = connection.getResponseCode();
|
||||
if (statusCode != -1) {
|
||||
if (statusCode >= lowestOkCode && statusCode < lowestRedirectCode) {
|
||||
return;
|
||||
}
|
||||
throw new IOException(String.format("Request response had error code %d.", statusCode));
|
||||
}
|
||||
throw new IOException(String.format("Request response had no valid status."));
|
||||
}
|
||||
|
||||
private HttpURLConnection connection;
|
||||
|
||||
public HttpRequest(URL url) throws IOException {
|
||||
this((HttpURLConnection) url.openConnection());
|
||||
}
|
||||
|
||||
public HttpRequest(HttpURLConnection connection) {
|
||||
this.connection = connection;
|
||||
}
|
||||
|
||||
protected abstract InputStream execute(HttpURLConnection connection) throws IOException;
|
||||
|
||||
public InputStream execute() throws Exception {
|
||||
ExLog.i(TAG, String.format("Executing HTTP request on %s.", connection.getURL()));
|
||||
|
||||
connection.setConnectTimeout(5000);
|
||||
|
||||
InputStream stream = execute(connection);
|
||||
validateHttpResponse(connection);
|
||||
return stream;
|
||||
}
|
||||
|
||||
public void disconnect() {
|
||||
connection.disconnect();
|
||||
}
|
||||
|
||||
}
|
||||
+80
-80
@@ -1,80 +1,80 @@
|
||||
package com.sap.sailing.racecommittee.app.data.loaders;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.Reader;
|
||||
import java.io.StringWriter;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
|
||||
import android.content.AsyncTaskLoader;
|
||||
import android.content.Context;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.data.handlers.DataHandler;
|
||||
import com.sap.sailing.racecommittee.app.data.http.HttpGetRequest;
|
||||
import com.sap.sailing.racecommittee.app.data.http.HttpRequest;
|
||||
import com.sap.sailing.racecommittee.app.data.parsers.DataParser;
|
||||
import com.sap.sailing.racecommittee.app.logging.ExLog;
|
||||
|
||||
public class DataLoader<T> extends AsyncTaskLoader<T> {
|
||||
private static final String TAG = DataLoader.class.getName();
|
||||
|
||||
protected DataParser<T> dataParser;
|
||||
protected DataHandler<T> dataHandler;
|
||||
protected HttpRequest httpRequest;
|
||||
protected volatile Exception lastException;
|
||||
|
||||
public DataLoader(Context context, URI httpGetUri, DataParser<T> dataParser, DataHandler<T> dataHandler)
|
||||
throws MalformedURLException, IOException {
|
||||
this(context, new HttpGetRequest(httpGetUri), dataParser, dataHandler);
|
||||
}
|
||||
|
||||
public DataLoader(Context context, HttpRequest request, DataParser<T> dataParser, DataHandler<T> dataHandler) {
|
||||
super(context);
|
||||
this.httpRequest = request;
|
||||
this.dataParser = dataParser;
|
||||
this.dataHandler = dataHandler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public T loadInBackground() {
|
||||
lastException = null;
|
||||
try {
|
||||
return loadDataInBackground();
|
||||
} catch (Exception e) {
|
||||
lastException = e;
|
||||
ExLog.e(TAG, String.format("Exception while loading data:\n%s", e.toString()));
|
||||
StringWriter stringWriter = new StringWriter();
|
||||
PrintWriter stream = new PrintWriter(stringWriter);
|
||||
e.printStackTrace(stream);
|
||||
ExLog.e(TAG, stringWriter.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private T loadDataInBackground() throws Exception {
|
||||
Reader reader = null;
|
||||
try {
|
||||
InputStream inputStream = httpRequest.execute();
|
||||
reader = new InputStreamReader(inputStream);
|
||||
return dataParser.parse(reader);
|
||||
} finally {
|
||||
if (reader != null) {
|
||||
reader.close();
|
||||
}
|
||||
httpRequest.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deliverResult(T data) {
|
||||
if (data == null) {
|
||||
dataHandler.onFailed(lastException);
|
||||
} else {
|
||||
dataHandler.onLoaded(data);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.data.loaders;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.Reader;
|
||||
import java.io.StringWriter;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
|
||||
import android.content.AsyncTaskLoader;
|
||||
import android.content.Context;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.data.handlers.DataHandler;
|
||||
import com.sap.sailing.racecommittee.app.data.http.HttpGetRequest;
|
||||
import com.sap.sailing.racecommittee.app.data.http.HttpRequest;
|
||||
import com.sap.sailing.racecommittee.app.data.parsers.DataParser;
|
||||
import com.sap.sailing.racecommittee.app.logging.ExLog;
|
||||
|
||||
public class DataLoader<T> extends AsyncTaskLoader<T> {
|
||||
private static final String TAG = DataLoader.class.getName();
|
||||
|
||||
protected DataParser<T> dataParser;
|
||||
protected DataHandler<T> dataHandler;
|
||||
protected HttpRequest httpRequest;
|
||||
protected volatile Exception lastException;
|
||||
|
||||
public DataLoader(Context context, URI httpGetUri, DataParser<T> dataParser, DataHandler<T> dataHandler)
|
||||
throws MalformedURLException, IOException {
|
||||
this(context, new HttpGetRequest(httpGetUri), dataParser, dataHandler);
|
||||
}
|
||||
|
||||
public DataLoader(Context context, HttpRequest request, DataParser<T> dataParser, DataHandler<T> dataHandler) {
|
||||
super(context);
|
||||
this.httpRequest = request;
|
||||
this.dataParser = dataParser;
|
||||
this.dataHandler = dataHandler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public T loadInBackground() {
|
||||
lastException = null;
|
||||
try {
|
||||
return loadDataInBackground();
|
||||
} catch (Exception e) {
|
||||
lastException = e;
|
||||
ExLog.e(TAG, String.format("Exception while loading data:\n%s", e.toString()));
|
||||
StringWriter stringWriter = new StringWriter();
|
||||
PrintWriter stream = new PrintWriter(stringWriter);
|
||||
e.printStackTrace(stream);
|
||||
ExLog.e(TAG, stringWriter.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private T loadDataInBackground() throws Exception {
|
||||
Reader reader = null;
|
||||
try {
|
||||
InputStream inputStream = httpRequest.execute();
|
||||
reader = new InputStreamReader(inputStream);
|
||||
return dataParser.parse(reader);
|
||||
} finally {
|
||||
if (reader != null) {
|
||||
reader.close();
|
||||
}
|
||||
httpRequest.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deliverResult(T data) {
|
||||
if (data == null) {
|
||||
dataHandler.onFailed(lastException);
|
||||
} else {
|
||||
dataHandler.onLoaded(data);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+20
-20
@@ -1,20 +1,20 @@
|
||||
package com.sap.sailing.racecommittee.app.data.parsers;
|
||||
|
||||
public class DataParseException extends Exception {
|
||||
private static final long serialVersionUID = 3079074496188715438L;
|
||||
|
||||
public DataParseException() { }
|
||||
|
||||
public DataParseException(String detailMessage) {
|
||||
super(detailMessage);
|
||||
}
|
||||
|
||||
public DataParseException(Throwable throwable) {
|
||||
super(throwable);
|
||||
}
|
||||
|
||||
public DataParseException(String detailMessage, Throwable throwable) {
|
||||
super(detailMessage, throwable);
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.data.parsers;
|
||||
|
||||
public class DataParseException extends Exception {
|
||||
private static final long serialVersionUID = 3079074496188715438L;
|
||||
|
||||
public DataParseException() { }
|
||||
|
||||
public DataParseException(String detailMessage) {
|
||||
super(detailMessage);
|
||||
}
|
||||
|
||||
public DataParseException(Throwable throwable) {
|
||||
super(throwable);
|
||||
}
|
||||
|
||||
public DataParseException(String detailMessage, Throwable throwable) {
|
||||
super(detailMessage, throwable);
|
||||
}
|
||||
|
||||
}
|
||||
+9
-9
@@ -1,9 +1,9 @@
|
||||
package com.sap.sailing.racecommittee.app.data.parsers;
|
||||
|
||||
import java.io.Reader;
|
||||
|
||||
public interface DataParser<T> {
|
||||
|
||||
T parse(Reader reader) throws Exception;
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.data.parsers;
|
||||
|
||||
import java.io.Reader;
|
||||
|
||||
public interface DataParser<T> {
|
||||
|
||||
T parse(Reader reader) throws Exception;
|
||||
|
||||
}
|
||||
+23
-23
@@ -1,23 +1,23 @@
|
||||
package com.sap.sailing.racecommittee.app.data.parsers;
|
||||
|
||||
import java.io.Reader;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.json.simple.JSONValue;
|
||||
|
||||
import com.sap.sailing.domain.racelog.RaceLogEvent;
|
||||
import com.sap.sailing.racecommittee.app.domain.ManagedRace;
|
||||
|
||||
public class RaceLogsDataParser implements
|
||||
DataParser<Map<ManagedRace, Collection<RaceLogEvent>>> {
|
||||
|
||||
public Map<ManagedRace, Collection<RaceLogEvent>> parse(Reader reader)
|
||||
throws Exception {
|
||||
Object parsedResult = JSONValue.parse(reader);
|
||||
System.out.println(parsedResult);
|
||||
return new HashMap<ManagedRace, Collection<RaceLogEvent>>();
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.data.parsers;
|
||||
|
||||
import java.io.Reader;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.json.simple.JSONValue;
|
||||
|
||||
import com.sap.sailing.domain.racelog.RaceLogEvent;
|
||||
import com.sap.sailing.racecommittee.app.domain.ManagedRace;
|
||||
|
||||
public class RaceLogsDataParser implements
|
||||
DataParser<Map<ManagedRace, Collection<RaceLogEvent>>> {
|
||||
|
||||
public Map<ManagedRace, Collection<RaceLogEvent>> parse(Reader reader)
|
||||
throws Exception {
|
||||
Object parsedResult = JSONValue.parse(reader);
|
||||
System.out.println(parsedResult);
|
||||
return new HashMap<ManagedRace, Collection<RaceLogEvent>>();
|
||||
}
|
||||
|
||||
}
|
||||
+24
-24
@@ -1,24 +1,24 @@
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.base.SharedDomainFactory;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.serialization.impl.BoatClassJsonSerializer;
|
||||
|
||||
public class BoatClassJsonDeserializer implements JsonDeserializer<BoatClass> {
|
||||
|
||||
private SharedDomainFactory domainFactory;
|
||||
|
||||
public BoatClassJsonDeserializer(SharedDomainFactory factory) {
|
||||
this.domainFactory = factory;
|
||||
}
|
||||
|
||||
public BoatClass deserialize(JSONObject object) throws JsonDeserializationException {
|
||||
String name = object.get(BoatClassJsonSerializer.FIELD_NAME).toString();
|
||||
return domainFactory.getOrCreateBoatClass(name);
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.base.SharedDomainFactory;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.serialization.impl.BoatClassJsonSerializer;
|
||||
|
||||
public class BoatClassJsonDeserializer implements JsonDeserializer<BoatClass> {
|
||||
|
||||
private SharedDomainFactory domainFactory;
|
||||
|
||||
public BoatClassJsonDeserializer(SharedDomainFactory factory) {
|
||||
this.domainFactory = factory;
|
||||
}
|
||||
|
||||
public BoatClass deserialize(JSONObject object) throws JsonDeserializationException {
|
||||
String name = object.get(BoatClassJsonSerializer.FIELD_NAME).toString();
|
||||
return domainFactory.getOrCreateBoatClass(name);
|
||||
}
|
||||
|
||||
}
|
||||
+19
-19
@@ -1,20 +1,20 @@
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.common.Color;
|
||||
import com.sap.sailing.domain.common.impl.RGBColor;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
|
||||
public class ColorDeserializer implements JsonDeserializer<Color> {
|
||||
|
||||
public Color deserialize(JSONObject object)
|
||||
throws JsonDeserializationException {
|
||||
Number red = (Number) object.get("r");
|
||||
Number green = (Number) object.get("g");
|
||||
Number blue = (Number) object.get("b");
|
||||
return new RGBColor(red.intValue(), green.intValue(), blue.intValue());
|
||||
}
|
||||
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.common.Color;
|
||||
import com.sap.sailing.domain.common.impl.RGBColor;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
|
||||
public class ColorDeserializer implements JsonDeserializer<Color> {
|
||||
|
||||
public Color deserialize(JSONObject object)
|
||||
throws JsonDeserializationException {
|
||||
Number red = (Number) object.get("r");
|
||||
Number green = (Number) object.get("g");
|
||||
Number blue = (Number) object.get("b");
|
||||
return new RGBColor(red.intValue(), green.intValue(), blue.intValue());
|
||||
}
|
||||
|
||||
}
|
||||
+22
-22
@@ -1,22 +1,22 @@
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.base.CourseArea;
|
||||
import com.sap.sailing.domain.base.impl.CourseAreaImpl;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sailing.server.gateway.serialization.impl.CourseAreaJsonSerializer;
|
||||
|
||||
public class CourseAreaJsonDeserializer implements JsonDeserializer<CourseArea> {
|
||||
|
||||
public CourseArea deserialize(JSONObject object)
|
||||
throws JsonDeserializationException {
|
||||
String name = object.get(CourseAreaJsonSerializer.FIELD_NAME).toString();
|
||||
String id = object.get(CourseAreaJsonSerializer.FIELD_ID).toString();
|
||||
|
||||
return new CourseAreaImpl(name, Helpers.tryUuidConversion(id));
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.base.CourseArea;
|
||||
import com.sap.sailing.domain.base.impl.CourseAreaImpl;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sailing.server.gateway.serialization.impl.CourseAreaJsonSerializer;
|
||||
|
||||
public class CourseAreaJsonDeserializer implements JsonDeserializer<CourseArea> {
|
||||
|
||||
public CourseArea deserialize(JSONObject object)
|
||||
throws JsonDeserializationException {
|
||||
String name = object.get(CourseAreaJsonSerializer.FIELD_NAME).toString();
|
||||
String id = object.get(CourseAreaJsonSerializer.FIELD_ID).toString();
|
||||
|
||||
return new CourseAreaImpl(name, Helpers.tryUuidConversion(id));
|
||||
}
|
||||
|
||||
}
|
||||
+38
-38
@@ -1,38 +1,38 @@
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.base.EventBase;
|
||||
import com.sap.sailing.domain.base.Venue;
|
||||
import com.sap.sailing.domain.base.impl.EventBaseImpl;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sailing.server.gateway.serialization.impl.EventDataJsonSerializer;
|
||||
|
||||
public class EventDataJsonDeserializer implements JsonDeserializer<EventBase> {
|
||||
private JsonDeserializer<Venue> venueDeserializer;
|
||||
|
||||
public EventDataJsonDeserializer(JsonDeserializer<Venue> venueDeserializer) {
|
||||
this.venueDeserializer = venueDeserializer;
|
||||
}
|
||||
|
||||
public EventBase deserialize(JSONObject object) throws JsonDeserializationException {
|
||||
String id = object.get(EventDataJsonSerializer.FIELD_ID).toString();
|
||||
String name = object.get(EventDataJsonSerializer.FIELD_NAME).toString();
|
||||
String publicationUrl = object.get(EventDataJsonSerializer.FIELD_PUBLICATION_URL).toString();
|
||||
|
||||
JSONObject venueObject = Helpers.getNestedObjectSafe(
|
||||
object,
|
||||
EventDataJsonSerializer.FIELD_VENUE);
|
||||
Venue venue = venueDeserializer.deserialize(venueObject);
|
||||
|
||||
return new EventBaseImpl(
|
||||
name,
|
||||
venue,
|
||||
publicationUrl,
|
||||
true,
|
||||
Helpers.tryUuidConversion(id));
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.base.EventBase;
|
||||
import com.sap.sailing.domain.base.Venue;
|
||||
import com.sap.sailing.domain.base.impl.EventBaseImpl;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sailing.server.gateway.serialization.impl.EventDataJsonSerializer;
|
||||
|
||||
public class EventDataJsonDeserializer implements JsonDeserializer<EventBase> {
|
||||
private JsonDeserializer<Venue> venueDeserializer;
|
||||
|
||||
public EventDataJsonDeserializer(JsonDeserializer<Venue> venueDeserializer) {
|
||||
this.venueDeserializer = venueDeserializer;
|
||||
}
|
||||
|
||||
public EventBase deserialize(JSONObject object) throws JsonDeserializationException {
|
||||
String id = object.get(EventDataJsonSerializer.FIELD_ID).toString();
|
||||
String name = object.get(EventDataJsonSerializer.FIELD_NAME).toString();
|
||||
String publicationUrl = object.get(EventDataJsonSerializer.FIELD_PUBLICATION_URL).toString();
|
||||
|
||||
JSONObject venueObject = Helpers.getNestedObjectSafe(
|
||||
object,
|
||||
EventDataJsonSerializer.FIELD_VENUE);
|
||||
Venue venue = venueDeserializer.deserialize(venueObject);
|
||||
|
||||
return new EventBaseImpl(
|
||||
name,
|
||||
venue,
|
||||
publicationUrl,
|
||||
true,
|
||||
Helpers.tryUuidConversion(id));
|
||||
}
|
||||
|
||||
}
|
||||
+33
-33
@@ -1,33 +1,33 @@
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.impl.FleetImpl;
|
||||
import com.sap.sailing.domain.common.Color;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sailing.server.gateway.serialization.racegroup.impl.FleetJsonSerializer;
|
||||
|
||||
public class FleetDeserializer implements JsonDeserializer<Fleet> {
|
||||
|
||||
private JsonDeserializer<Color> colorDeserializer;
|
||||
|
||||
public FleetDeserializer(JsonDeserializer<Color> colorDeserializer) {
|
||||
this.colorDeserializer = colorDeserializer;
|
||||
}
|
||||
|
||||
public Fleet deserialize(JSONObject object)
|
||||
throws JsonDeserializationException {
|
||||
Color color = null;
|
||||
if (object.containsKey(FleetJsonSerializer.FIELD_COLOR)) {
|
||||
color = colorDeserializer.deserialize(Helpers.getNestedObjectSafe(object, FleetJsonSerializer.FIELD_COLOR));
|
||||
}
|
||||
String name = object.get(FleetJsonSerializer.FIELD_NAME).toString();
|
||||
Number ordering = (Number) object.get(FleetJsonSerializer.FIELD_ORDERING);
|
||||
|
||||
return new FleetImpl(name, ordering.intValue(), color);
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.impl.FleetImpl;
|
||||
import com.sap.sailing.domain.common.Color;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sailing.server.gateway.serialization.racegroup.impl.FleetJsonSerializer;
|
||||
|
||||
public class FleetDeserializer implements JsonDeserializer<Fleet> {
|
||||
|
||||
private JsonDeserializer<Color> colorDeserializer;
|
||||
|
||||
public FleetDeserializer(JsonDeserializer<Color> colorDeserializer) {
|
||||
this.colorDeserializer = colorDeserializer;
|
||||
}
|
||||
|
||||
public Fleet deserialize(JSONObject object)
|
||||
throws JsonDeserializationException {
|
||||
Color color = null;
|
||||
if (object.containsKey(FleetJsonSerializer.FIELD_COLOR)) {
|
||||
color = colorDeserializer.deserialize(Helpers.getNestedObjectSafe(object, FleetJsonSerializer.FIELD_COLOR));
|
||||
}
|
||||
String name = object.get(FleetJsonSerializer.FIELD_NAME).toString();
|
||||
Number ordering = (Number) object.get(FleetJsonSerializer.FIELD_ORDERING);
|
||||
|
||||
return new FleetImpl(name, ordering.intValue(), color);
|
||||
}
|
||||
|
||||
}
|
||||
+53
-53
@@ -1,54 +1,54 @@
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.base.CourseArea;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceGroup;
|
||||
import com.sap.sailing.domain.base.racegroup.SeriesWithRows;
|
||||
import com.sap.sailing.domain.base.racegroup.impl.RaceGroupImpl;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sailing.server.gateway.serialization.racegroup.impl.RaceGroupJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.racegroup.impl.SeriesWithRowsOfRaceGroupSerializer;
|
||||
|
||||
public class RaceGroupDeserializer implements JsonDeserializer<RaceGroup> {
|
||||
|
||||
private JsonDeserializer<BoatClass> boatClassDeserializer;
|
||||
private JsonDeserializer<SeriesWithRows> seriesDeserializer;
|
||||
|
||||
public RaceGroupDeserializer(
|
||||
JsonDeserializer<BoatClass> boatClassDeserializer,
|
||||
JsonDeserializer<SeriesWithRows> seriesDeserializer) {
|
||||
this.boatClassDeserializer = boatClassDeserializer;
|
||||
this.seriesDeserializer = seriesDeserializer;
|
||||
}
|
||||
|
||||
public RaceGroup deserialize(JSONObject object)
|
||||
throws JsonDeserializationException {
|
||||
String name = object.get(RaceGroupJsonSerializer.FIELD_NAME).toString();
|
||||
BoatClass boatClass = null;
|
||||
CourseArea courseArea = null;
|
||||
|
||||
if (object.containsKey(RaceGroupJsonSerializer.FIELD_COURSE_AREA)) {
|
||||
// TODO: deserialize CourseArea ...
|
||||
}
|
||||
if (object.containsKey(RaceGroupJsonSerializer.FIELD_BOAT_CLASS)) {
|
||||
boatClass = boatClassDeserializer.deserialize(
|
||||
Helpers.getNestedObjectSafe(object, RaceGroupJsonSerializer.FIELD_BOAT_CLASS));
|
||||
}
|
||||
|
||||
Collection<SeriesWithRows> series = new ArrayList<SeriesWithRows>();
|
||||
for (Object seriesObject : Helpers.getNestedArraySafe(
|
||||
object,
|
||||
SeriesWithRowsOfRaceGroupSerializer.FIELD_SERIES)) {
|
||||
JSONObject seriesJson = Helpers.toJSONObjectSafe(seriesObject);
|
||||
series.add(seriesDeserializer.deserialize(seriesJson));
|
||||
}
|
||||
return new RaceGroupImpl(name, boatClass, courseArea, series);
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.base.CourseArea;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceGroup;
|
||||
import com.sap.sailing.domain.base.racegroup.SeriesWithRows;
|
||||
import com.sap.sailing.domain.base.racegroup.impl.RaceGroupImpl;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sailing.server.gateway.serialization.racegroup.impl.RaceGroupJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.racegroup.impl.SeriesWithRowsOfRaceGroupSerializer;
|
||||
|
||||
public class RaceGroupDeserializer implements JsonDeserializer<RaceGroup> {
|
||||
|
||||
private JsonDeserializer<BoatClass> boatClassDeserializer;
|
||||
private JsonDeserializer<SeriesWithRows> seriesDeserializer;
|
||||
|
||||
public RaceGroupDeserializer(
|
||||
JsonDeserializer<BoatClass> boatClassDeserializer,
|
||||
JsonDeserializer<SeriesWithRows> seriesDeserializer) {
|
||||
this.boatClassDeserializer = boatClassDeserializer;
|
||||
this.seriesDeserializer = seriesDeserializer;
|
||||
}
|
||||
|
||||
public RaceGroup deserialize(JSONObject object)
|
||||
throws JsonDeserializationException {
|
||||
String name = object.get(RaceGroupJsonSerializer.FIELD_NAME).toString();
|
||||
BoatClass boatClass = null;
|
||||
CourseArea courseArea = null;
|
||||
|
||||
if (object.containsKey(RaceGroupJsonSerializer.FIELD_COURSE_AREA)) {
|
||||
// TODO: deserialize CourseArea ...
|
||||
}
|
||||
if (object.containsKey(RaceGroupJsonSerializer.FIELD_BOAT_CLASS)) {
|
||||
boatClass = boatClassDeserializer.deserialize(
|
||||
Helpers.getNestedObjectSafe(object, RaceGroupJsonSerializer.FIELD_BOAT_CLASS));
|
||||
}
|
||||
|
||||
Collection<SeriesWithRows> series = new ArrayList<SeriesWithRows>();
|
||||
for (Object seriesObject : Helpers.getNestedArraySafe(
|
||||
object,
|
||||
SeriesWithRowsOfRaceGroupSerializer.FIELD_SERIES)) {
|
||||
JSONObject seriesJson = Helpers.toJSONObjectSafe(seriesObject);
|
||||
series.add(seriesDeserializer.deserialize(seriesJson));
|
||||
}
|
||||
return new RaceGroupImpl(name, boatClass, courseArea, series);
|
||||
}
|
||||
}
|
||||
+39
-39
@@ -1,39 +1,39 @@
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.racelog.RaceLog;
|
||||
import com.sap.sailing.domain.racelog.RaceLogEvent;
|
||||
import com.sap.sailing.domain.racelog.impl.PassAwareRaceLogImpl;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sailing.server.gateway.serialization.racelog.impl.RaceLogSerializer;
|
||||
|
||||
public class RaceLogDeserializer implements JsonDeserializer<RaceLog> {
|
||||
|
||||
private final JsonDeserializer<RaceLogEvent> elementDeserializer;
|
||||
|
||||
public RaceLogDeserializer(JsonDeserializer<RaceLogEvent> raceLogEventDeserializer) {
|
||||
this.elementDeserializer = raceLogEventDeserializer;
|
||||
}
|
||||
|
||||
public RaceLog deserialize(JSONObject object) throws JsonDeserializationException {
|
||||
RaceLog result = new PassAwareRaceLogImpl();
|
||||
|
||||
if (object.get(RaceLogSerializer.FIELD_EVENTS) == null) {
|
||||
return result;
|
||||
}
|
||||
|
||||
JSONArray events = Helpers.getNestedArraySafe(object, RaceLogSerializer.FIELD_EVENTS);
|
||||
for (Object eventObject : events) {
|
||||
JSONObject eventJson = Helpers.toJSONObjectSafe(eventObject);
|
||||
RaceLogEvent event = elementDeserializer.deserialize(eventJson);
|
||||
result.add(event);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.racelog.RaceLog;
|
||||
import com.sap.sailing.domain.racelog.RaceLogEvent;
|
||||
import com.sap.sailing.domain.racelog.impl.PassAwareRaceLogImpl;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sailing.server.gateway.serialization.racelog.impl.RaceLogSerializer;
|
||||
|
||||
public class RaceLogDeserializer implements JsonDeserializer<RaceLog> {
|
||||
|
||||
private final JsonDeserializer<RaceLogEvent> elementDeserializer;
|
||||
|
||||
public RaceLogDeserializer(JsonDeserializer<RaceLogEvent> raceLogEventDeserializer) {
|
||||
this.elementDeserializer = raceLogEventDeserializer;
|
||||
}
|
||||
|
||||
public RaceLog deserialize(JSONObject object) throws JsonDeserializationException {
|
||||
RaceLog result = new PassAwareRaceLogImpl();
|
||||
|
||||
if (object.get(RaceLogSerializer.FIELD_EVENTS) == null) {
|
||||
return result;
|
||||
}
|
||||
|
||||
JSONArray events = Helpers.getNestedArraySafe(object, RaceLogSerializer.FIELD_EVENTS);
|
||||
for (Object eventObject : events) {
|
||||
JSONObject eventJson = Helpers.toJSONObjectSafe(eventObject);
|
||||
RaceLogEvent event = elementDeserializer.deserialize(eventJson);
|
||||
result.add(event);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
+43
-43
@@ -1,43 +1,43 @@
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceCell;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceRow;
|
||||
import com.sap.sailing.domain.base.racegroup.impl.RaceRowImpl;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sailing.server.gateway.serialization.racegroup.impl.RaceRowJsonSerializer;
|
||||
|
||||
public class RaceRowDeserializer implements JsonDeserializer<RaceRow> {
|
||||
|
||||
private JsonDeserializer<Fleet> fleetDeserializer;
|
||||
private JsonDeserializer<RaceCell> raceCellDeserializer;
|
||||
|
||||
public RaceRowDeserializer(JsonDeserializer<Fleet> fleetDeserializer,
|
||||
JsonDeserializer<RaceCell> raceCellDeserializer) {
|
||||
this.fleetDeserializer = fleetDeserializer;
|
||||
this.raceCellDeserializer = raceCellDeserializer;
|
||||
}
|
||||
|
||||
public RaceRow deserialize(JSONObject object) throws JsonDeserializationException {
|
||||
JSONObject fleetObject = Helpers.toJSONObjectSafe(object.get(RaceRowJsonSerializer.FIELD_FLEET));
|
||||
JSONArray cellsObject = Helpers.getNestedArraySafe(object, RaceRowJsonSerializer.FIELD_RACE_CELLS);
|
||||
|
||||
Collection<RaceCell> races = new ArrayList<RaceCell>();
|
||||
Fleet fleet = fleetDeserializer.deserialize(fleetObject);
|
||||
for (Object cellObject : cellsObject) {
|
||||
JSONObject cellJson = Helpers.toJSONObjectSafe(cellObject);
|
||||
races.add(raceCellDeserializer.deserialize(cellJson));
|
||||
}
|
||||
|
||||
return new RaceRowImpl(fleet, races);
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceCell;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceRow;
|
||||
import com.sap.sailing.domain.base.racegroup.impl.RaceRowImpl;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sailing.server.gateway.serialization.racegroup.impl.RaceRowJsonSerializer;
|
||||
|
||||
public class RaceRowDeserializer implements JsonDeserializer<RaceRow> {
|
||||
|
||||
private JsonDeserializer<Fleet> fleetDeserializer;
|
||||
private JsonDeserializer<RaceCell> raceCellDeserializer;
|
||||
|
||||
public RaceRowDeserializer(JsonDeserializer<Fleet> fleetDeserializer,
|
||||
JsonDeserializer<RaceCell> raceCellDeserializer) {
|
||||
this.fleetDeserializer = fleetDeserializer;
|
||||
this.raceCellDeserializer = raceCellDeserializer;
|
||||
}
|
||||
|
||||
public RaceRow deserialize(JSONObject object) throws JsonDeserializationException {
|
||||
JSONObject fleetObject = Helpers.toJSONObjectSafe(object.get(RaceRowJsonSerializer.FIELD_FLEET));
|
||||
JSONArray cellsObject = Helpers.getNestedArraySafe(object, RaceRowJsonSerializer.FIELD_RACE_CELLS);
|
||||
|
||||
Collection<RaceCell> races = new ArrayList<RaceCell>();
|
||||
Fleet fleet = fleetDeserializer.deserialize(fleetObject);
|
||||
for (Object cellObject : cellsObject) {
|
||||
JSONObject cellJson = Helpers.toJSONObjectSafe(cellObject);
|
||||
races.add(raceCellDeserializer.deserialize(cellJson));
|
||||
}
|
||||
|
||||
return new RaceRowImpl(fleet, races);
|
||||
}
|
||||
|
||||
}
|
||||
+39
-39
@@ -1,40 +1,40 @@
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.base.racegroup.RaceRow;
|
||||
import com.sap.sailing.domain.base.racegroup.SeriesWithRows;
|
||||
import com.sap.sailing.domain.base.racegroup.impl.SeriesWithRowsImpl;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sailing.server.gateway.serialization.racegroup.impl.RaceRowsOfSeriesWithRowsSerializer;
|
||||
|
||||
public class SeriesWithRowsDeserializer implements JsonDeserializer<SeriesWithRows> {
|
||||
|
||||
private JsonDeserializer<RaceRow> raceRowDeserializer;
|
||||
|
||||
public SeriesWithRowsDeserializer(JsonDeserializer<RaceRow> raceRowDeserializer) {
|
||||
this.raceRowDeserializer = raceRowDeserializer;
|
||||
}
|
||||
|
||||
public SeriesWithRows deserialize(JSONObject object)
|
||||
throws JsonDeserializationException {
|
||||
String name = object.get("name").toString();
|
||||
boolean isMedal = (Boolean) object.get("isMedal");
|
||||
|
||||
Collection<RaceRow> rows = new ArrayList<RaceRow>();
|
||||
for (Object fleetObject : Helpers.getNestedArraySafe(
|
||||
object,
|
||||
RaceRowsOfSeriesWithRowsSerializer.FIELD_FLEETS)) {
|
||||
JSONObject fleetJson = Helpers.toJSONObjectSafe(fleetObject);
|
||||
rows.add(raceRowDeserializer.deserialize(fleetJson));
|
||||
}
|
||||
|
||||
return new SeriesWithRowsImpl(name, isMedal, rows);
|
||||
}
|
||||
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.base.racegroup.RaceRow;
|
||||
import com.sap.sailing.domain.base.racegroup.SeriesWithRows;
|
||||
import com.sap.sailing.domain.base.racegroup.impl.SeriesWithRowsImpl;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sailing.server.gateway.serialization.racegroup.impl.RaceRowsOfSeriesWithRowsSerializer;
|
||||
|
||||
public class SeriesWithRowsDeserializer implements JsonDeserializer<SeriesWithRows> {
|
||||
|
||||
private JsonDeserializer<RaceRow> raceRowDeserializer;
|
||||
|
||||
public SeriesWithRowsDeserializer(JsonDeserializer<RaceRow> raceRowDeserializer) {
|
||||
this.raceRowDeserializer = raceRowDeserializer;
|
||||
}
|
||||
|
||||
public SeriesWithRows deserialize(JSONObject object)
|
||||
throws JsonDeserializationException {
|
||||
String name = object.get("name").toString();
|
||||
boolean isMedal = (Boolean) object.get("isMedal");
|
||||
|
||||
Collection<RaceRow> rows = new ArrayList<RaceRow>();
|
||||
for (Object fleetObject : Helpers.getNestedArraySafe(
|
||||
object,
|
||||
RaceRowsOfSeriesWithRowsSerializer.FIELD_FLEETS)) {
|
||||
JSONObject fleetJson = Helpers.toJSONObjectSafe(fleetObject);
|
||||
rows.add(raceRowDeserializer.deserialize(fleetJson));
|
||||
}
|
||||
|
||||
return new SeriesWithRowsImpl(name, isMedal, rows);
|
||||
}
|
||||
|
||||
}
|
||||
+38
-38
@@ -1,38 +1,38 @@
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.base.CourseArea;
|
||||
import com.sap.sailing.domain.base.Venue;
|
||||
import com.sap.sailing.domain.base.impl.VenueImpl;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sailing.server.gateway.serialization.impl.VenueJsonSerializer;
|
||||
|
||||
public class VenueJsonDeserializer implements JsonDeserializer<Venue> {
|
||||
private JsonDeserializer<CourseArea> courseAreaDeserializer;
|
||||
|
||||
public VenueJsonDeserializer(JsonDeserializer<CourseArea> courseAreaDeserializer) {
|
||||
this.courseAreaDeserializer = courseAreaDeserializer;
|
||||
}
|
||||
|
||||
public Venue deserialize(JSONObject object)
|
||||
throws JsonDeserializationException {
|
||||
|
||||
String name = object.get(VenueJsonSerializer.FIELD_NAME).toString();
|
||||
Venue venue = new VenueImpl(name);
|
||||
|
||||
JSONArray courseAreaArray = Helpers.getNestedArraySafe(
|
||||
object,
|
||||
VenueJsonSerializer.FIELD_COURSE_AREAS);
|
||||
for (Object element : courseAreaArray) {
|
||||
JSONObject courseAreaObject = Helpers.toJSONObjectSafe(element);
|
||||
venue.addCourseArea(courseAreaDeserializer.deserialize(courseAreaObject));
|
||||
}
|
||||
|
||||
return venue;
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.deserialization.impl;
|
||||
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.base.CourseArea;
|
||||
import com.sap.sailing.domain.base.Venue;
|
||||
import com.sap.sailing.domain.base.impl.VenueImpl;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sailing.server.gateway.serialization.impl.VenueJsonSerializer;
|
||||
|
||||
public class VenueJsonDeserializer implements JsonDeserializer<Venue> {
|
||||
private JsonDeserializer<CourseArea> courseAreaDeserializer;
|
||||
|
||||
public VenueJsonDeserializer(JsonDeserializer<CourseArea> courseAreaDeserializer) {
|
||||
this.courseAreaDeserializer = courseAreaDeserializer;
|
||||
}
|
||||
|
||||
public Venue deserialize(JSONObject object)
|
||||
throws JsonDeserializationException {
|
||||
|
||||
String name = object.get(VenueJsonSerializer.FIELD_NAME).toString();
|
||||
Venue venue = new VenueImpl(name);
|
||||
|
||||
JSONArray courseAreaArray = Helpers.getNestedArraySafe(
|
||||
object,
|
||||
VenueJsonSerializer.FIELD_COURSE_AREAS);
|
||||
for (Object element : courseAreaArray) {
|
||||
JSONObject courseAreaObject = Helpers.toJSONObjectSafe(element);
|
||||
venue.addCourseArea(courseAreaDeserializer.deserialize(courseAreaObject));
|
||||
}
|
||||
|
||||
return venue;
|
||||
}
|
||||
|
||||
}
|
||||
+18
-18
@@ -1,18 +1,18 @@
|
||||
package com.sap.sailing.racecommittee.app.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.SeriesBase;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceGroup;
|
||||
|
||||
public interface FleetIdentifier {
|
||||
|
||||
public Fleet getFleet();
|
||||
|
||||
public SeriesBase getSeries();
|
||||
|
||||
public RaceGroup getRaceGroup();
|
||||
|
||||
public Serializable getId();
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.SeriesBase;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceGroup;
|
||||
|
||||
public interface FleetIdentifier {
|
||||
|
||||
public Fleet getFleet();
|
||||
|
||||
public SeriesBase getSeries();
|
||||
|
||||
public RaceGroup getRaceGroup();
|
||||
|
||||
public Serializable getId();
|
||||
}
|
||||
+8
-8
@@ -1,8 +1,8 @@
|
||||
package com.sap.sailing.racecommittee.app.domain;
|
||||
|
||||
|
||||
public interface ManagedRaceIdentifier extends FleetIdentifier {
|
||||
|
||||
public String getRaceName();
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.domain;
|
||||
|
||||
|
||||
public interface ManagedRaceIdentifier extends FleetIdentifier {
|
||||
|
||||
public String getRaceName();
|
||||
|
||||
}
|
||||
+37
-37
@@ -1,37 +1,37 @@
|
||||
package com.sap.sailing.racecommittee.app.domain.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.SeriesBase;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceGroup;
|
||||
import com.sap.sailing.racecommittee.app.domain.FleetIdentifier;
|
||||
import com.sap.sailing.racecommittee.app.domain.ManagedRaceIdentifier;
|
||||
|
||||
public class ManagedRaceIdentifierImpl extends FleetIdentifierImpl implements ManagedRaceIdentifier {
|
||||
|
||||
private String raceName;
|
||||
|
||||
public ManagedRaceIdentifierImpl(
|
||||
String raceName,
|
||||
Fleet fleetWithRaceNames,
|
||||
SeriesBase series,
|
||||
RaceGroup raceGroup) {
|
||||
super(fleetWithRaceNames, series, raceGroup);
|
||||
this.raceName = raceName;
|
||||
}
|
||||
|
||||
public ManagedRaceIdentifierImpl(String raceName, FleetIdentifier identifier) {
|
||||
this(raceName, identifier.getFleet(), identifier.getSeries(), identifier.getRaceGroup());
|
||||
}
|
||||
|
||||
public String getRaceName() {
|
||||
return raceName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Serializable getId() {
|
||||
return String.format("%s.%s", super.getId(), getRaceName());
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.domain.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.SeriesBase;
|
||||
import com.sap.sailing.domain.base.racegroup.RaceGroup;
|
||||
import com.sap.sailing.racecommittee.app.domain.FleetIdentifier;
|
||||
import com.sap.sailing.racecommittee.app.domain.ManagedRaceIdentifier;
|
||||
|
||||
public class ManagedRaceIdentifierImpl extends FleetIdentifierImpl implements ManagedRaceIdentifier {
|
||||
|
||||
private String raceName;
|
||||
|
||||
public ManagedRaceIdentifierImpl(
|
||||
String raceName,
|
||||
Fleet fleetWithRaceNames,
|
||||
SeriesBase series,
|
||||
RaceGroup raceGroup) {
|
||||
super(fleetWithRaceNames, series, raceGroup);
|
||||
this.raceName = raceName;
|
||||
}
|
||||
|
||||
public ManagedRaceIdentifierImpl(String raceName, FleetIdentifier identifier) {
|
||||
this(raceName, identifier.getFleet(), identifier.getSeries(), identifier.getRaceGroup());
|
||||
}
|
||||
|
||||
public String getRaceName() {
|
||||
return raceName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Serializable getId() {
|
||||
return String.format("%s.%s", super.getId(), getRaceName());
|
||||
}
|
||||
|
||||
}
|
||||
+7
-7
@@ -1,7 +1,7 @@
|
||||
package com.sap.sailing.racecommittee.app.domain.racelog;
|
||||
|
||||
import com.sap.sailing.domain.racelog.RaceLogEvent;
|
||||
|
||||
public interface RaceLogChangedListener {
|
||||
public void eventAdded(RaceLogEvent event);
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.domain.racelog;
|
||||
|
||||
import com.sap.sailing.domain.racelog.RaceLogEvent;
|
||||
|
||||
public interface RaceLogChangedListener {
|
||||
public void eventAdded(RaceLogEvent event);
|
||||
}
|
||||
+2
@@ -31,6 +31,8 @@ public interface StartProcedure {
|
||||
|
||||
void setFinishing(TimePoint eventTime);
|
||||
|
||||
void dispatchAutomaticRaceEndEvent(TimePoint eventTime);
|
||||
|
||||
void setFinished(TimePoint eventTime);
|
||||
|
||||
void setPostponed(TimePoint eventTime, Flags lowerFlag);
|
||||
|
||||
+2
@@ -11,6 +11,8 @@ public interface StartProcedureRaceStateChangedListener {
|
||||
|
||||
void onRaceFinishing(TimePoint now);
|
||||
|
||||
void onRaceFinishing(TimePoint now, TimePoint automaticRaceEnd);
|
||||
|
||||
void onRaceFinished(TimePoint now);
|
||||
|
||||
void onIndividualRecall(TimePoint eventTime);
|
||||
|
||||
+17
-2
@@ -12,9 +12,12 @@ import com.sap.sailing.domain.base.impl.MillisecondsTimePoint;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.common.impl.Util.Pair;
|
||||
import com.sap.sailing.domain.common.racelog.Flags;
|
||||
import com.sap.sailing.domain.common.racelog.RaceLogRaceStatus;
|
||||
import com.sap.sailing.domain.racelog.PassAwareRaceLog;
|
||||
import com.sap.sailing.domain.racelog.RaceLogEvent;
|
||||
import com.sap.sailing.domain.racelog.RaceLogEventFactory;
|
||||
import com.sap.sailing.domain.racelog.analyzing.impl.RaceStatusAnalyzer;
|
||||
import com.sap.sailing.domain.racelog.analyzing.impl.StartTimeFinder;
|
||||
import com.sap.sailing.racecommittee.app.R;
|
||||
import com.sap.sailing.racecommittee.app.domain.startprocedure.StartProcedure;
|
||||
import com.sap.sailing.racecommittee.app.domain.startprocedure.StartProcedureRaceStateChangedListener;
|
||||
@@ -31,6 +34,8 @@ public class ExtremeSailingSeriesStartProcedure implements StartProcedure {
|
||||
|
||||
private final static long individualRecallRemovalInterval = 4 * 60 * 1000; // minutes * seconds * milliseconds
|
||||
|
||||
private final static double essAutomaticRaceFinishMultiplyer = 0.75;
|
||||
|
||||
private List<Long> startProcedureEventIntervals;
|
||||
private PassAwareRaceLog raceLog;
|
||||
private StartProcedureRaceStateChangedListener raceStateChangedListener;
|
||||
@@ -176,12 +181,22 @@ public class ExtremeSailingSeriesStartProcedure implements StartProcedure {
|
||||
raceLog.getCurrentPassId(), Flags.BLUE, Flags.NONE, /*isDisplayed*/true);
|
||||
raceLog.add(event);
|
||||
|
||||
//TODO compute and set ESS time limit
|
||||
StartTimeFinder startTimeFinder = new StartTimeFinder(raceLog);
|
||||
long raceDuration = eventTime.asMillis()-startTimeFinder.getStartTime().asMillis();
|
||||
|
||||
TimePoint automaticRaceEnd = eventTime.plus((long) (raceDuration*essAutomaticRaceFinishMultiplyer));
|
||||
|
||||
if (raceStateChangedListener != null) {
|
||||
raceStateChangedListener.onRaceFinishing(eventTime);
|
||||
raceStateChangedListener.onRaceFinishing(eventTime, automaticRaceEnd);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatchAutomaticRaceEndEvent(TimePoint automaticRaceEnd) {
|
||||
RaceStatusAnalyzer analyzer = new RaceStatusAnalyzer(raceLog);
|
||||
if(analyzer.getStatus().equals(RaceLogRaceStatus.FINISHING))
|
||||
setFinished(automaticRaceEnd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFinished(TimePoint eventTime) {
|
||||
|
||||
+2
@@ -12,4 +12,6 @@ public interface RaceStateChangedListener {
|
||||
void onIndividualRecallDisplayed(TimePoint individualRecallRemovalFireTimePoint);
|
||||
|
||||
void onIndividualRecallRemoval();
|
||||
|
||||
void onAutomaticRaceEnd(TimePoint automaticRaceEnd);
|
||||
}
|
||||
+13
@@ -182,6 +182,19 @@ public class RaceStateImpl implements RaceState, RaceLogChangedListener {
|
||||
RaceLogEvent statusEvent = RaceLogEventFactory.INSTANCE.createRaceStatusEvent(eventTime, raceLog.getCurrentPassId(), RaceLogRaceStatus.FINISHING);
|
||||
this.raceLog.add(statusEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRaceFinishing(TimePoint eventTime, TimePoint automaticRaceEnd) {
|
||||
onRaceFinishing(eventTime);
|
||||
notifyListenersAboutAutomaticRaceEnd(automaticRaceEnd);
|
||||
}
|
||||
|
||||
private void notifyListenersAboutAutomaticRaceEnd(TimePoint automaticRaceEnd) {
|
||||
for (RaceStateChangedListener listener : stateChangedListeners) {
|
||||
listener.onAutomaticRaceEnd(automaticRaceEnd);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRaceFinished(TimePoint eventTime) {
|
||||
|
||||
+217
-217
@@ -1,217 +1,217 @@
|
||||
package com.sap.sailing.racecommittee.app.logging;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.EnumSet;
|
||||
import java.util.concurrent.ArrayBlockingQueue;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
|
||||
import android.content.Context;
|
||||
import android.provider.Settings.Secure;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* Simple wrapper for logging to various targets.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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 {
|
||||
|
||||
// events 1-200: user triggered events
|
||||
public final static int LOGIN_BUTTON_POSITIVE = 1;
|
||||
public final static int LOGIN_BUTTON_NEGATIVE = 2;
|
||||
public final static int EVENT_SELECTED = 3;
|
||||
public final static int COURSE_SELECTED = 4;
|
||||
public final static int RACE_SELECTED_ELEMENT = 5;
|
||||
public final static int RACE_SELECTED_TITLE = 6;
|
||||
public final static int FLAG_XRAY_SET = 7;
|
||||
public final static int FLAG_XRAY_REMOVE = 8;
|
||||
public final static int FLAG_FIRST_SUBSTITUTE = 9;
|
||||
public final static int FLAG_BLUE_SET = 10;
|
||||
public final static int FLAG_BLUE_REMOVE = 11;
|
||||
public final static int FLAG_NOVEMBER = 12;
|
||||
public final static int RACE_START_PHASE_BUTTON_START_PHASE = 13;
|
||||
public final static int RACE_START_PHASE_BUTTON_AP = 14;
|
||||
public final static int RACE_START_PHASE_BUTTON_RESET_TIME = 15;
|
||||
public final static int RACE_SET_TIME = 16;
|
||||
public final static int RACE_RESET_TIME = 17;
|
||||
public final static int RACE_RUNNING_GENERAL_RECALL_YES = 18;
|
||||
public final static int RACE_RUNNING_GENERAL_RECALL_NO = 19;
|
||||
public final static int RACE_CHOOSE_START_MODE_PAPA = 20;
|
||||
public final static int RACE_CHOOSE_START_MODE_ZULU = 21;
|
||||
public final static int RACE_CHOOSE_START_MODE_BLACK = 22;
|
||||
public final static int RACE_CHOOSE_START_MODE_INDIA = 23;
|
||||
public final static int RACE_CHOOSE_ABORT_ALPHA = 24;
|
||||
public final static int RACE_CHOOSE_ABORT_HOTEL = 25;
|
||||
public final static int RACE_CHOOSE_ABORT_NONE = 26;
|
||||
public final static int FLAG_BLUE_SET_NO = 27;
|
||||
public final static int FLAG_BLUE_REMOVE_NO = 28;
|
||||
public final static int RACE_RESET_DIALOG_BUTTON = 29;
|
||||
public final static int RACE_RESET_YES = 30;
|
||||
public final static int RACE_RESET_NO = 31;
|
||||
// added 180612
|
||||
public final static int RACE_SET_RACE_RUNNING_COURSE = 32;
|
||||
public final static int RACE_SET_RACE_RUNNING_COURSE_FAIL = 33;
|
||||
public final static int RACE_SET_RACE_RUNNING_COURSE_REMINDER = 34;
|
||||
public final static int RACE_SET_RACE_RUNNING_COURSE_REMINDER_FAIL = 35;
|
||||
|
||||
public final static int RACE_SET_TIME_BUTTON_AP = 36;
|
||||
public final static int RACE_CHOOSE_ABORT_AP = 37;
|
||||
public final static int RACE_CHOOSE_ABORT_NOVEMBER = 38;
|
||||
|
||||
public final static int RACE_RUNNING_REMOVE_GOLF_YES = 39;
|
||||
public final static int RACE_RUNNING_REMOVE_GOLF_NO = 40;
|
||||
|
||||
public final static int RACE_START_PHASE_BUTTON_PATHFINDER = 41;
|
||||
public final static int RACE_SET_PATHFINDER = 42;
|
||||
// added 110712
|
||||
public final static int FLAG_GOLF_REMOVED = 43;
|
||||
|
||||
public final static int RACE_START_PHASE_BUTTON_LINEOPENINGTIME = 44;
|
||||
public final static int RACE_SET_GATELINE_OPENING_TIME = 45;
|
||||
|
||||
// events > 200: implicitly triggered events
|
||||
public final static int STATUS_SET_XRAY = 201;
|
||||
public final static int STATUS_SET_BLUE = 202;
|
||||
public final static int STATUS_SET_XRAY_COUNTDOWN = 203;
|
||||
public final static int RACE_START_PHASE_FLAG_BLACK = 204;
|
||||
public final static int RACE_START_PHASE_FLAG_INDIA = 205;
|
||||
public final static int RACE_START_PHASE_FLAG_PAPA = 206;
|
||||
public final static int RACE_START_PHASE_FLAG_ZULU = 207;
|
||||
// added 110712
|
||||
public final static int STATUS_SET_GOLF = 208;
|
||||
public final static int STATUS_UNSET_GOLF = 209;
|
||||
|
||||
|
||||
private final static String TAG = "ExLogInternal";
|
||||
private static EnumSet<Target> activeLoggingTargets;
|
||||
|
||||
static {
|
||||
activeLoggingTargets = EnumSet.of(Target.LOGCAT, Target.FILE);
|
||||
}
|
||||
|
||||
public enum Target {
|
||||
NONE, LOGCAT, FILE
|
||||
}
|
||||
|
||||
public synchronized static void activate(EnumSet<Target> targetSet) {
|
||||
activeLoggingTargets = targetSet;
|
||||
}
|
||||
|
||||
public synchronized static void activate(Target target) {
|
||||
activate(EnumSet.of(target));
|
||||
}
|
||||
|
||||
public synchronized static void i(int eventID, String msg, Context context) {
|
||||
if (UNIQUE_ID == null) {
|
||||
UNIQUE_ID = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);
|
||||
}
|
||||
i("ID: " + String.valueOf(eventID), System.currentTimeMillis() + ":" + (UNIQUE_ID == null ? "" : UNIQUE_ID) + ":" + (msg == null ? "" : msg));
|
||||
}
|
||||
|
||||
public static String UNIQUE_ID = null;
|
||||
|
||||
public synchronized static void i(String tag, String msg) {
|
||||
getInstance().info(tag, msg);
|
||||
}
|
||||
|
||||
public synchronized static void w(String tag, String msg) {
|
||||
getInstance().warning(tag, msg);
|
||||
}
|
||||
|
||||
public synchronized static void e(String tag, String msg) {
|
||||
getInstance().error(tag, msg);
|
||||
}
|
||||
|
||||
private final static String logMsgTemplate = "%s - %s - %s : %s";
|
||||
|
||||
private enum LogLevel {
|
||||
INFORMATION, WARNING, ERROR, DISABLED
|
||||
}
|
||||
|
||||
private static ExLog instance;
|
||||
private static ExLog getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new ExLog();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
private static final int LogBufferCapacity = 20;
|
||||
private BlockingQueue<String> logBuffer;
|
||||
|
||||
private FileLoggingTask fileTask;
|
||||
|
||||
private boolean logToFile;
|
||||
private boolean fileLoggingTaskInitialized;
|
||||
|
||||
public ExLog() {
|
||||
logToFile = false;
|
||||
fileLoggingTaskInitialized = false;
|
||||
}
|
||||
|
||||
private void info(String tag, String msg) {
|
||||
if (isTargetActive(Target.LOGCAT))
|
||||
Log.i(tag, msg);
|
||||
|
||||
if (isTargetActive(Target.FILE))
|
||||
logToFile(LogLevel.INFORMATION, tag, msg);
|
||||
}
|
||||
|
||||
private void warning(String tag, String msg) {
|
||||
if (isTargetActive(Target.LOGCAT))
|
||||
Log.w(tag, msg);
|
||||
|
||||
if (isTargetActive(Target.FILE))
|
||||
logToFile(LogLevel.WARNING, tag, msg);
|
||||
}
|
||||
|
||||
private void error(String tag, String msg) {
|
||||
if (isTargetActive(Target.LOGCAT))
|
||||
Log.e(tag, msg);
|
||||
|
||||
if (isTargetActive(Target.FILE))
|
||||
logToFile(LogLevel.ERROR, tag, msg);
|
||||
}
|
||||
|
||||
private boolean isTargetActive(Target logcat) {
|
||||
return activeLoggingTargets.contains(logcat);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void logToFile(LogLevel level, String tag, String msg) {
|
||||
|
||||
initializeFileLoggingTask();
|
||||
|
||||
if (logToFile) {
|
||||
try {
|
||||
logBuffer.put(String.format(logMsgTemplate, new Date().toString(), level.toString(), tag, msg));
|
||||
} catch (InterruptedException ie) { }
|
||||
}
|
||||
}
|
||||
|
||||
private void initializeFileLoggingTask() {
|
||||
if (fileLoggingTaskInitialized)
|
||||
return;
|
||||
|
||||
fileLoggingTaskInitialized = true;
|
||||
logBuffer = new ArrayBlockingQueue<String>(LogBufferCapacity);
|
||||
fileTask = new FileLoggingTask(logBuffer);
|
||||
logToFile = fileTask.tryStartFileLogging();
|
||||
if (logToFile) {
|
||||
Log.i(TAG, String.format("Logging to file %s.", fileTask.getLogFilePath()));
|
||||
new Thread(fileTask).start();
|
||||
} else {
|
||||
Log.w(TAG, "Logging to file couldn't be enabled.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.logging;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.EnumSet;
|
||||
import java.util.concurrent.ArrayBlockingQueue;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
|
||||
import android.content.Context;
|
||||
import android.provider.Settings.Secure;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* Simple wrapper for logging to various targets.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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 {
|
||||
|
||||
// events 1-200: user triggered events
|
||||
public final static int LOGIN_BUTTON_POSITIVE = 1;
|
||||
public final static int LOGIN_BUTTON_NEGATIVE = 2;
|
||||
public final static int EVENT_SELECTED = 3;
|
||||
public final static int COURSE_SELECTED = 4;
|
||||
public final static int RACE_SELECTED_ELEMENT = 5;
|
||||
public final static int RACE_SELECTED_TITLE = 6;
|
||||
public final static int FLAG_XRAY_SET = 7;
|
||||
public final static int FLAG_XRAY_REMOVE = 8;
|
||||
public final static int FLAG_FIRST_SUBSTITUTE = 9;
|
||||
public final static int FLAG_BLUE_SET = 10;
|
||||
public final static int FLAG_BLUE_REMOVE = 11;
|
||||
public final static int FLAG_NOVEMBER = 12;
|
||||
public final static int RACE_START_PHASE_BUTTON_START_PHASE = 13;
|
||||
public final static int RACE_START_PHASE_BUTTON_AP = 14;
|
||||
public final static int RACE_START_PHASE_BUTTON_RESET_TIME = 15;
|
||||
public final static int RACE_SET_TIME = 16;
|
||||
public final static int RACE_RESET_TIME = 17;
|
||||
public final static int RACE_RUNNING_GENERAL_RECALL_YES = 18;
|
||||
public final static int RACE_RUNNING_GENERAL_RECALL_NO = 19;
|
||||
public final static int RACE_CHOOSE_START_MODE_PAPA = 20;
|
||||
public final static int RACE_CHOOSE_START_MODE_ZULU = 21;
|
||||
public final static int RACE_CHOOSE_START_MODE_BLACK = 22;
|
||||
public final static int RACE_CHOOSE_START_MODE_INDIA = 23;
|
||||
public final static int RACE_CHOOSE_ABORT_ALPHA = 24;
|
||||
public final static int RACE_CHOOSE_ABORT_HOTEL = 25;
|
||||
public final static int RACE_CHOOSE_ABORT_NONE = 26;
|
||||
public final static int FLAG_BLUE_SET_NO = 27;
|
||||
public final static int FLAG_BLUE_REMOVE_NO = 28;
|
||||
public final static int RACE_RESET_DIALOG_BUTTON = 29;
|
||||
public final static int RACE_RESET_YES = 30;
|
||||
public final static int RACE_RESET_NO = 31;
|
||||
// added 180612
|
||||
public final static int RACE_SET_RACE_RUNNING_COURSE = 32;
|
||||
public final static int RACE_SET_RACE_RUNNING_COURSE_FAIL = 33;
|
||||
public final static int RACE_SET_RACE_RUNNING_COURSE_REMINDER = 34;
|
||||
public final static int RACE_SET_RACE_RUNNING_COURSE_REMINDER_FAIL = 35;
|
||||
|
||||
public final static int RACE_SET_TIME_BUTTON_AP = 36;
|
||||
public final static int RACE_CHOOSE_ABORT_AP = 37;
|
||||
public final static int RACE_CHOOSE_ABORT_NOVEMBER = 38;
|
||||
|
||||
public final static int RACE_RUNNING_REMOVE_GOLF_YES = 39;
|
||||
public final static int RACE_RUNNING_REMOVE_GOLF_NO = 40;
|
||||
|
||||
public final static int RACE_START_PHASE_BUTTON_PATHFINDER = 41;
|
||||
public final static int RACE_SET_PATHFINDER = 42;
|
||||
// added 110712
|
||||
public final static int FLAG_GOLF_REMOVED = 43;
|
||||
|
||||
public final static int RACE_START_PHASE_BUTTON_LINEOPENINGTIME = 44;
|
||||
public final static int RACE_SET_GATELINE_OPENING_TIME = 45;
|
||||
|
||||
// events > 200: implicitly triggered events
|
||||
public final static int STATUS_SET_XRAY = 201;
|
||||
public final static int STATUS_SET_BLUE = 202;
|
||||
public final static int STATUS_SET_XRAY_COUNTDOWN = 203;
|
||||
public final static int RACE_START_PHASE_FLAG_BLACK = 204;
|
||||
public final static int RACE_START_PHASE_FLAG_INDIA = 205;
|
||||
public final static int RACE_START_PHASE_FLAG_PAPA = 206;
|
||||
public final static int RACE_START_PHASE_FLAG_ZULU = 207;
|
||||
// added 110712
|
||||
public final static int STATUS_SET_GOLF = 208;
|
||||
public final static int STATUS_UNSET_GOLF = 209;
|
||||
|
||||
|
||||
private final static String TAG = "ExLogInternal";
|
||||
private static EnumSet<Target> activeLoggingTargets;
|
||||
|
||||
static {
|
||||
activeLoggingTargets = EnumSet.of(Target.LOGCAT, Target.FILE);
|
||||
}
|
||||
|
||||
public enum Target {
|
||||
NONE, LOGCAT, FILE
|
||||
}
|
||||
|
||||
public synchronized static void activate(EnumSet<Target> targetSet) {
|
||||
activeLoggingTargets = targetSet;
|
||||
}
|
||||
|
||||
public synchronized static void activate(Target target) {
|
||||
activate(EnumSet.of(target));
|
||||
}
|
||||
|
||||
public synchronized static void i(int eventID, String msg, Context context) {
|
||||
if (UNIQUE_ID == null) {
|
||||
UNIQUE_ID = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);
|
||||
}
|
||||
i("ID: " + String.valueOf(eventID), System.currentTimeMillis() + ":" + (UNIQUE_ID == null ? "" : UNIQUE_ID) + ":" + (msg == null ? "" : msg));
|
||||
}
|
||||
|
||||
public static String UNIQUE_ID = null;
|
||||
|
||||
public synchronized static void i(String tag, String msg) {
|
||||
getInstance().info(tag, msg);
|
||||
}
|
||||
|
||||
public synchronized static void w(String tag, String msg) {
|
||||
getInstance().warning(tag, msg);
|
||||
}
|
||||
|
||||
public synchronized static void e(String tag, String msg) {
|
||||
getInstance().error(tag, msg);
|
||||
}
|
||||
|
||||
private final static String logMsgTemplate = "%s - %s - %s : %s";
|
||||
|
||||
private enum LogLevel {
|
||||
INFORMATION, WARNING, ERROR, DISABLED
|
||||
}
|
||||
|
||||
private static ExLog instance;
|
||||
private static ExLog getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new ExLog();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
private static final int LogBufferCapacity = 20;
|
||||
private BlockingQueue<String> logBuffer;
|
||||
|
||||
private FileLoggingTask fileTask;
|
||||
|
||||
private boolean logToFile;
|
||||
private boolean fileLoggingTaskInitialized;
|
||||
|
||||
public ExLog() {
|
||||
logToFile = false;
|
||||
fileLoggingTaskInitialized = false;
|
||||
}
|
||||
|
||||
private void info(String tag, String msg) {
|
||||
if (isTargetActive(Target.LOGCAT))
|
||||
Log.i(tag, msg);
|
||||
|
||||
if (isTargetActive(Target.FILE))
|
||||
logToFile(LogLevel.INFORMATION, tag, msg);
|
||||
}
|
||||
|
||||
private void warning(String tag, String msg) {
|
||||
if (isTargetActive(Target.LOGCAT))
|
||||
Log.w(tag, msg);
|
||||
|
||||
if (isTargetActive(Target.FILE))
|
||||
logToFile(LogLevel.WARNING, tag, msg);
|
||||
}
|
||||
|
||||
private void error(String tag, String msg) {
|
||||
if (isTargetActive(Target.LOGCAT))
|
||||
Log.e(tag, msg);
|
||||
|
||||
if (isTargetActive(Target.FILE))
|
||||
logToFile(LogLevel.ERROR, tag, msg);
|
||||
}
|
||||
|
||||
private boolean isTargetActive(Target logcat) {
|
||||
return activeLoggingTargets.contains(logcat);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void logToFile(LogLevel level, String tag, String msg) {
|
||||
|
||||
initializeFileLoggingTask();
|
||||
|
||||
if (logToFile) {
|
||||
try {
|
||||
logBuffer.put(String.format(logMsgTemplate, new Date().toString(), level.toString(), tag, msg));
|
||||
} catch (InterruptedException ie) { }
|
||||
}
|
||||
}
|
||||
|
||||
private void initializeFileLoggingTask() {
|
||||
if (fileLoggingTaskInitialized)
|
||||
return;
|
||||
|
||||
fileLoggingTaskInitialized = true;
|
||||
logBuffer = new ArrayBlockingQueue<String>(LogBufferCapacity);
|
||||
fileTask = new FileLoggingTask(logBuffer);
|
||||
logToFile = fileTask.tryStartFileLogging();
|
||||
if (logToFile) {
|
||||
Log.i(TAG, String.format("Logging to file %s.", fileTask.getLogFilePath()));
|
||||
new Thread(fileTask).start();
|
||||
} else {
|
||||
Log.w(TAG, "Logging to file couldn't be enabled.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
+124
-124
@@ -1,124 +1,124 @@
|
||||
package com.sap.sailing.racecommittee.app.logging;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.text.Format;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.AppConstants;
|
||||
|
||||
import android.os.Environment;
|
||||
import android.util.Log;
|
||||
|
||||
public class FileLoggingTask implements Runnable {
|
||||
|
||||
private final static String TAG = FileLoggingTask.class.getName();
|
||||
|
||||
private final static String logFileTemplate = "sap_rc_log_%s.txt";
|
||||
private final static String logFileDateFormat = "yyyyMMdd";
|
||||
|
||||
private final BlockingQueue<String> queue;
|
||||
|
||||
private String logFileName;
|
||||
private File logFile;
|
||||
private BufferedWriter logWriter;
|
||||
|
||||
public FileLoggingTask(BlockingQueue<String> queue) {
|
||||
this.queue = queue;
|
||||
}
|
||||
|
||||
public FileLoggingTask() {
|
||||
this.queue = null;
|
||||
}
|
||||
|
||||
public boolean tryStartFileLogging() {
|
||||
return tryStartFileLogging(FileLoggingTask.logFileTemplate);
|
||||
}
|
||||
|
||||
public boolean tryStartFileLogging(String template) {
|
||||
try {
|
||||
Format format = new SimpleDateFormat(logFileDateFormat, Locale.US);
|
||||
logFileName = String.format(template, format.format(new Date()));
|
||||
|
||||
File loggingDirectory = new File(Environment.getExternalStorageDirectory() + AppConstants.LogFolder);
|
||||
loggingDirectory.mkdirs();
|
||||
logFile = new File(loggingDirectory, logFileName);
|
||||
|
||||
if (prepareFile(logFile)) {
|
||||
try {
|
||||
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()));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Throwable e) {
|
||||
Log.w(TAG, "Error trying to setup file logging: " + e.getMessage());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getLogFilePath() {
|
||||
return logFile.getAbsolutePath();
|
||||
}
|
||||
|
||||
public void run() {
|
||||
while (true) {
|
||||
String logMessage;
|
||||
try {
|
||||
logMessage = queue.take();
|
||||
log(logMessage);
|
||||
} catch (InterruptedException e) { }
|
||||
}
|
||||
}
|
||||
|
||||
public void log(String logMessage) {
|
||||
try {
|
||||
logWriter.append(logMessage);
|
||||
logWriter.newLine();
|
||||
logWriter.flush();
|
||||
} catch (Exception e) { }
|
||||
}
|
||||
|
||||
public void logException(Throwable ex) {
|
||||
PrintWriter writer = new PrintWriter(logWriter);
|
||||
ex.printStackTrace(writer);
|
||||
writer.println();
|
||||
writer.flush();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
super.finalize();
|
||||
try {
|
||||
logWriter.close();
|
||||
} catch (Throwable e) { }
|
||||
}
|
||||
|
||||
|
||||
private static boolean prepareFile(File file) {
|
||||
if (file == null) {
|
||||
Log.i(TAG, "Log file couldn't be opened.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// create the file (if not exists)
|
||||
try {
|
||||
file.createNewFile();
|
||||
} catch (IOException e) {
|
||||
Log.w(TAG, String.format("Couldn't create file %s : %s", file.getAbsolutePath(), e.getMessage()));
|
||||
return false;
|
||||
}
|
||||
|
||||
return file.canWrite();
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.logging;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.text.Format;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.AppConstants;
|
||||
|
||||
import android.os.Environment;
|
||||
import android.util.Log;
|
||||
|
||||
public class FileLoggingTask implements Runnable {
|
||||
|
||||
private final static String TAG = FileLoggingTask.class.getName();
|
||||
|
||||
private final static String logFileTemplate = "sap_rc_log_%s.txt";
|
||||
private final static String logFileDateFormat = "yyyyMMdd";
|
||||
|
||||
private final BlockingQueue<String> queue;
|
||||
|
||||
private String logFileName;
|
||||
private File logFile;
|
||||
private BufferedWriter logWriter;
|
||||
|
||||
public FileLoggingTask(BlockingQueue<String> queue) {
|
||||
this.queue = queue;
|
||||
}
|
||||
|
||||
public FileLoggingTask() {
|
||||
this.queue = null;
|
||||
}
|
||||
|
||||
public boolean tryStartFileLogging() {
|
||||
return tryStartFileLogging(FileLoggingTask.logFileTemplate);
|
||||
}
|
||||
|
||||
public boolean tryStartFileLogging(String template) {
|
||||
try {
|
||||
Format format = new SimpleDateFormat(logFileDateFormat, Locale.US);
|
||||
logFileName = String.format(template, format.format(new Date()));
|
||||
|
||||
File loggingDirectory = new File(Environment.getExternalStorageDirectory() + AppConstants.LogFolder);
|
||||
loggingDirectory.mkdirs();
|
||||
logFile = new File(loggingDirectory, logFileName);
|
||||
|
||||
if (prepareFile(logFile)) {
|
||||
try {
|
||||
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()));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Throwable e) {
|
||||
Log.w(TAG, "Error trying to setup file logging: " + e.getMessage());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getLogFilePath() {
|
||||
return logFile.getAbsolutePath();
|
||||
}
|
||||
|
||||
public void run() {
|
||||
while (true) {
|
||||
String logMessage;
|
||||
try {
|
||||
logMessage = queue.take();
|
||||
log(logMessage);
|
||||
} catch (InterruptedException e) { }
|
||||
}
|
||||
}
|
||||
|
||||
public void log(String logMessage) {
|
||||
try {
|
||||
logWriter.append(logMessage);
|
||||
logWriter.newLine();
|
||||
logWriter.flush();
|
||||
} catch (Exception e) { }
|
||||
}
|
||||
|
||||
public void logException(Throwable ex) {
|
||||
PrintWriter writer = new PrintWriter(logWriter);
|
||||
ex.printStackTrace(writer);
|
||||
writer.println();
|
||||
writer.flush();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
super.finalize();
|
||||
try {
|
||||
logWriter.close();
|
||||
} catch (Throwable e) { }
|
||||
}
|
||||
|
||||
|
||||
private static boolean prepareFile(File file) {
|
||||
if (file == null) {
|
||||
Log.i(TAG, "Log file couldn't be opened.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// create the file (if not exists)
|
||||
try {
|
||||
file.createNewFile();
|
||||
} catch (IOException e) {
|
||||
Log.w(TAG, String.format("Couldn't create file %s : %s", file.getAbsolutePath(), e.getMessage()));
|
||||
return false;
|
||||
}
|
||||
|
||||
return file.canWrite();
|
||||
}
|
||||
|
||||
}
|
||||
+5
@@ -40,4 +40,9 @@ public class RaceStateListener implements RaceStateChangedListener {
|
||||
public void onIndividualRecallRemoval() {
|
||||
service.handleIndividualRecallRemoved(race);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutomaticRaceEnd(TimePoint automaticRaceEnd) {
|
||||
service.handleAutomaticRaceEnd(race, automaticRaceEnd);
|
||||
}
|
||||
}
|
||||
+7
@@ -169,6 +169,8 @@ public class RaceStateService extends Service {
|
||||
return;
|
||||
} else if (getString(R.string.intentActionIndividualRecallRemoval).equals(action)) {
|
||||
race.getState().getStartProcedure().dispatchFiredIndividualRecallRemovalEvent(race.getState().getIndividualRecallDisplayedTime(), eventTime);
|
||||
} else if (getString(R.string.intentActionAutomaticRaceEnd).equals(action)) {
|
||||
race.getState().getStartProcedure().dispatchAutomaticRaceEndEvent(eventTime);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,4 +298,9 @@ public class RaceStateService extends Service {
|
||||
clearAlarms(race.getId());
|
||||
}
|
||||
|
||||
public void handleAutomaticRaceEnd(ManagedRace race, TimePoint automaticRaceEnd) {
|
||||
String action = getString(R.string.intentActionAutomaticRaceEnd);
|
||||
scheduleEventTime(action, race, automaticRaceEnd);
|
||||
}
|
||||
|
||||
}
|
||||
+64
-64
@@ -1,64 +1,64 @@
|
||||
package com.sap.sailing.racecommittee.app.services.sending;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.net.URI;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.util.Pair;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.AppConstants;
|
||||
import com.sap.sailing.racecommittee.app.data.http.HttpJsonPostRequest;
|
||||
import com.sap.sailing.racecommittee.app.data.http.HttpRequest;
|
||||
import com.sap.sailing.racecommittee.app.logging.ExLog;
|
||||
|
||||
public class EventSenderTask extends AsyncTask<Intent, Void, Pair<Intent, Integer>> {
|
||||
|
||||
public interface EventSendingListener {
|
||||
public void onResult(Intent intent, boolean success);
|
||||
}
|
||||
|
||||
private EventSendingListener listener;
|
||||
|
||||
public EventSenderTask(EventSendingListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Pair<Intent, Integer> doInBackground(Intent... params) {
|
||||
|
||||
Intent intent = params[0];
|
||||
if (intent == null) {
|
||||
return Pair.create(intent, -1);
|
||||
}
|
||||
|
||||
Bundle extras = intent.getExtras();
|
||||
Serializable serializedEvent = extras.getSerializable(AppConstants.EXTRAS_JSON_KEY);
|
||||
String url = extras.getString(AppConstants.EXTRAS_URL);
|
||||
if (serializedEvent == null || url == null) {
|
||||
return Pair.create(intent, -1);
|
||||
}
|
||||
|
||||
try {
|
||||
HttpRequest post = new HttpJsonPostRequest(URI.create(url), serializedEvent.toString());
|
||||
try {
|
||||
post.execute().close();
|
||||
} finally {
|
||||
post.disconnect();
|
||||
}
|
||||
ExLog.i(getClass().getName(), "Post request issued for the following Event: " + serializedEvent);
|
||||
} catch (Exception e) {
|
||||
ExLog.e(getClass().getName(), e.toString());
|
||||
return Pair.create(intent, -1);
|
||||
}
|
||||
return Pair.create(intent, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Pair<Intent, Integer> resultPair) {
|
||||
super.onPostExecute(resultPair);
|
||||
listener.onResult(resultPair.first, resultPair.second == 0);
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.services.sending;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.net.URI;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.util.Pair;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.AppConstants;
|
||||
import com.sap.sailing.racecommittee.app.data.http.HttpJsonPostRequest;
|
||||
import com.sap.sailing.racecommittee.app.data.http.HttpRequest;
|
||||
import com.sap.sailing.racecommittee.app.logging.ExLog;
|
||||
|
||||
public class EventSenderTask extends AsyncTask<Intent, Void, Pair<Intent, Integer>> {
|
||||
|
||||
public interface EventSendingListener {
|
||||
public void onResult(Intent intent, boolean success);
|
||||
}
|
||||
|
||||
private EventSendingListener listener;
|
||||
|
||||
public EventSenderTask(EventSendingListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Pair<Intent, Integer> doInBackground(Intent... params) {
|
||||
|
||||
Intent intent = params[0];
|
||||
if (intent == null) {
|
||||
return Pair.create(intent, -1);
|
||||
}
|
||||
|
||||
Bundle extras = intent.getExtras();
|
||||
Serializable serializedEvent = extras.getSerializable(AppConstants.EXTRAS_JSON_KEY);
|
||||
String url = extras.getString(AppConstants.EXTRAS_URL);
|
||||
if (serializedEvent == null || url == null) {
|
||||
return Pair.create(intent, -1);
|
||||
}
|
||||
|
||||
try {
|
||||
HttpRequest post = new HttpJsonPostRequest(URI.create(url), serializedEvent.toString());
|
||||
try {
|
||||
post.execute().close();
|
||||
} finally {
|
||||
post.disconnect();
|
||||
}
|
||||
ExLog.i(getClass().getName(), "Post request issued for the following Event: " + serializedEvent);
|
||||
} catch (Exception e) {
|
||||
ExLog.e(getClass().getName(), e.toString());
|
||||
return Pair.create(intent, -1);
|
||||
}
|
||||
return Pair.create(intent, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Pair<Intent, Integer> resultPair) {
|
||||
super.onPostExecute(resultPair);
|
||||
listener.onResult(resultPair.first, resultPair.second == 0);
|
||||
}
|
||||
|
||||
}
|
||||
+207
-207
@@ -1,207 +1,207 @@
|
||||
package com.sap.sailing.racecommittee.app.services.sending;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.os.Binder;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.AppConstants;
|
||||
import com.sap.sailing.racecommittee.app.R;
|
||||
import com.sap.sailing.racecommittee.app.data.DataManager;
|
||||
import com.sap.sailing.racecommittee.app.data.ReadonlyDataManager;
|
||||
import com.sap.sailing.racecommittee.app.domain.ManagedRace;
|
||||
import com.sap.sailing.racecommittee.app.logging.ExLog;
|
||||
import com.sap.sailing.racecommittee.app.services.sending.EventSenderTask.EventSendingListener;
|
||||
|
||||
/*
|
||||
* Sending an event to the webservice
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* Intent i = new Intent(AppConstants.SEND_EVENT_ACTION);
|
||||
* i.putExtra(AppConstants.EXTRAS_JSON_KEY, JsonUtils.getObjectAsString('someEventObject'));
|
||||
* i.putExtra(AppConstants.RACE_UUID_KEY, 'raceuuid');
|
||||
* context.startService(i);
|
||||
*/
|
||||
public class EventSendingService extends Service implements EventSendingListener {
|
||||
|
||||
protected final static String TAG = EventSendingService.class.getName();
|
||||
|
||||
private ConnectivityManager connectivityManager;
|
||||
private Handler handler;
|
||||
private final IBinder mBinder = new EventSendingBinder();
|
||||
private EventPersistenceManager persistenceManager;
|
||||
private boolean isHandlerSet;
|
||||
|
||||
public class EventSendingBinder extends Binder {
|
||||
public EventSendingService getService() {
|
||||
return EventSendingService.this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent arg0) {
|
||||
return mBinder;
|
||||
}
|
||||
|
||||
private Date lastSuccessfulSend;
|
||||
|
||||
public int getDelayedIntentsCount() {
|
||||
return persistenceManager.getEventCount();
|
||||
}
|
||||
|
||||
public Date getLastSuccessfulSend() {
|
||||
return lastSuccessfulSend;
|
||||
}
|
||||
|
||||
/**
|
||||
* creates an intent that contains the event to be sent and the race id which shall be sent to the backend
|
||||
*
|
||||
* @param context
|
||||
* the context of the app
|
||||
* @param race
|
||||
* the race for which the event was created
|
||||
* @param serializedEvent
|
||||
* the event serizalized to JSON
|
||||
* @return the intent that shall be sent to the EventSendingService
|
||||
*/
|
||||
public static Intent createEventIntent(Context context, ManagedRace race, Serializable serializedEvent) {
|
||||
String url = String.format(
|
||||
"%s/sailingserver/rc/racelog?leaderboard=%s&raceColumn=%s&fleet=%s",
|
||||
AppConstants.getServerBaseURL(context),
|
||||
URLEncoder.encode(race.getRaceGroup().getName()),
|
||||
URLEncoder.encode(race.getName()),
|
||||
URLEncoder.encode(race.getFleet().getName()));
|
||||
|
||||
Intent eventIntent = new Intent(context.getString(R.string.intentActionSendEvent));
|
||||
eventIntent.putExtra(AppConstants.RACE_ID_KEY, race.getId());
|
||||
eventIntent.putExtra(AppConstants.EXTRAS_JSON_KEY, serializedEvent);
|
||||
eventIntent.putExtra(AppConstants.EXTRAS_URL, url);
|
||||
ExLog.i(TAG, "Created event " + eventIntent + " for sending to backend");
|
||||
return eventIntent;
|
||||
}
|
||||
|
||||
public static Intent createEventIntent(Context context, Serializable raceId, Serializable serializedEvent) {
|
||||
ReadonlyDataManager data = DataManager.create(context);
|
||||
ManagedRace race = data.getDataStore().getRace(raceId);
|
||||
if (race == null) {
|
||||
ExLog.e(TAG, "There is no race with id " + raceId);
|
||||
return null;
|
||||
}
|
||||
return createEventIntent(context, race, serializedEvent);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see android.app.Service#onCreate()
|
||||
*/
|
||||
@Override
|
||||
public void onCreate() {
|
||||
connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
persistenceManager = new EventPersistenceManager(this);
|
||||
|
||||
handler = new Handler();
|
||||
isHandlerSet = false;
|
||||
|
||||
if (persistenceManager.areIntentsDelayed()) {
|
||||
handleDelayedEvents();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
if (intent == null) {
|
||||
ExLog.i(TAG, "Service is restarted.");
|
||||
return START_STICKY;
|
||||
}
|
||||
|
||||
ExLog.i(TAG, "Service is called by following intent: " + intent.getAction());
|
||||
handleCommand(intent, startId);
|
||||
// We want this service to continue running until it is explicitly
|
||||
// stopped, so return sticky.
|
||||
return START_STICKY;
|
||||
}
|
||||
|
||||
private void handleCommand(Intent intent, int startId) {
|
||||
String action = intent.getAction();
|
||||
if (action.equals(getString(R.string.intentActionSendSavedIntents))) {
|
||||
handleDelayedEvents();
|
||||
} else if (action.equals(getString(R.string.intentActionSendEvent))) {
|
||||
handleSendEvents(intent);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleSendEvents(Intent intent) {
|
||||
if (!isConnected()) {
|
||||
persistenceManager.persistIntent(intent);
|
||||
//ConnectivityChangedReceiver.enable(this);
|
||||
} else {
|
||||
sendEvent(intent);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleDelayedEvents() {
|
||||
isHandlerSet = false;
|
||||
if (!isConnected())
|
||||
return;
|
||||
|
||||
sendDelayedEvents();
|
||||
}
|
||||
|
||||
private void sendDelayedEvents() {
|
||||
List<Intent> delayedIntents = persistenceManager.restoreEvents();
|
||||
ExLog.i(TAG, String.format("Trying to resend %d waiting events", delayedIntents.size()));
|
||||
for (Intent intent : delayedIntents)
|
||||
sendEvent(intent);
|
||||
}
|
||||
|
||||
private void sendEvent(Intent intent) {
|
||||
if (!AppConstants.isSendingActive(this)) {
|
||||
ExLog.i(TAG, "Sending deactivated. Event will not be sent to server.");
|
||||
} else {
|
||||
EventSenderTask task = new EventSenderTask(this);
|
||||
task.execute(intent);
|
||||
}
|
||||
}
|
||||
|
||||
public void onResult(Intent intent, boolean success) {
|
||||
if (!success) {
|
||||
ExLog.w(TAG, "Could not POST intent to server.");
|
||||
persistenceManager.persistIntent(intent);
|
||||
if (!isHandlerSet) {
|
||||
SendDelayedEventsCaller delayedCaller = new SendDelayedEventsCaller(this);
|
||||
handler.postDelayed(delayedCaller, 1000 * 60 * 1);
|
||||
isHandlerSet = true;
|
||||
}
|
||||
} else {
|
||||
ExLog.i(TAG, "Event successfully send. " + intent.getStringExtra(AppConstants.EXTRAS_JSON_KEY));
|
||||
persistenceManager.removeIntent(intent);
|
||||
lastSuccessfulSend = Calendar.getInstance().getTime();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* checks if there is network connectivity
|
||||
*
|
||||
* @return connectivity check value
|
||||
*/
|
||||
private boolean isConnected() {
|
||||
NetworkInfo activeNetwork = connectivityManager.getActiveNetworkInfo();
|
||||
if (activeNetwork == null)
|
||||
return false;
|
||||
boolean isConnected = activeNetwork.isConnected();
|
||||
return isConnected;
|
||||
}
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.services.sending;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.os.Binder;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.AppConstants;
|
||||
import com.sap.sailing.racecommittee.app.R;
|
||||
import com.sap.sailing.racecommittee.app.data.DataManager;
|
||||
import com.sap.sailing.racecommittee.app.data.ReadonlyDataManager;
|
||||
import com.sap.sailing.racecommittee.app.domain.ManagedRace;
|
||||
import com.sap.sailing.racecommittee.app.logging.ExLog;
|
||||
import com.sap.sailing.racecommittee.app.services.sending.EventSenderTask.EventSendingListener;
|
||||
|
||||
/*
|
||||
* Sending an event to the webservice
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* Intent i = new Intent(AppConstants.SEND_EVENT_ACTION);
|
||||
* i.putExtra(AppConstants.EXTRAS_JSON_KEY, JsonUtils.getObjectAsString('someEventObject'));
|
||||
* i.putExtra(AppConstants.RACE_UUID_KEY, 'raceuuid');
|
||||
* context.startService(i);
|
||||
*/
|
||||
public class EventSendingService extends Service implements EventSendingListener {
|
||||
|
||||
protected final static String TAG = EventSendingService.class.getName();
|
||||
|
||||
private ConnectivityManager connectivityManager;
|
||||
private Handler handler;
|
||||
private final IBinder mBinder = new EventSendingBinder();
|
||||
private EventPersistenceManager persistenceManager;
|
||||
private boolean isHandlerSet;
|
||||
|
||||
public class EventSendingBinder extends Binder {
|
||||
public EventSendingService getService() {
|
||||
return EventSendingService.this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent arg0) {
|
||||
return mBinder;
|
||||
}
|
||||
|
||||
private Date lastSuccessfulSend;
|
||||
|
||||
public int getDelayedIntentsCount() {
|
||||
return persistenceManager.getEventCount();
|
||||
}
|
||||
|
||||
public Date getLastSuccessfulSend() {
|
||||
return lastSuccessfulSend;
|
||||
}
|
||||
|
||||
/**
|
||||
* creates an intent that contains the event to be sent and the race id which shall be sent to the backend
|
||||
*
|
||||
* @param context
|
||||
* the context of the app
|
||||
* @param race
|
||||
* the race for which the event was created
|
||||
* @param serializedEvent
|
||||
* the event serizalized to JSON
|
||||
* @return the intent that shall be sent to the EventSendingService
|
||||
*/
|
||||
public static Intent createEventIntent(Context context, ManagedRace race, Serializable serializedEvent) {
|
||||
String url = String.format(
|
||||
"%s/sailingserver/rc/racelog?leaderboard=%s&raceColumn=%s&fleet=%s",
|
||||
AppConstants.getServerBaseURL(context),
|
||||
URLEncoder.encode(race.getRaceGroup().getName()),
|
||||
URLEncoder.encode(race.getName()),
|
||||
URLEncoder.encode(race.getFleet().getName()));
|
||||
|
||||
Intent eventIntent = new Intent(context.getString(R.string.intentActionSendEvent));
|
||||
eventIntent.putExtra(AppConstants.RACE_ID_KEY, race.getId());
|
||||
eventIntent.putExtra(AppConstants.EXTRAS_JSON_KEY, serializedEvent);
|
||||
eventIntent.putExtra(AppConstants.EXTRAS_URL, url);
|
||||
ExLog.i(TAG, "Created event " + eventIntent + " for sending to backend");
|
||||
return eventIntent;
|
||||
}
|
||||
|
||||
public static Intent createEventIntent(Context context, Serializable raceId, Serializable serializedEvent) {
|
||||
ReadonlyDataManager data = DataManager.create(context);
|
||||
ManagedRace race = data.getDataStore().getRace(raceId);
|
||||
if (race == null) {
|
||||
ExLog.e(TAG, "There is no race with id " + raceId);
|
||||
return null;
|
||||
}
|
||||
return createEventIntent(context, race, serializedEvent);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see android.app.Service#onCreate()
|
||||
*/
|
||||
@Override
|
||||
public void onCreate() {
|
||||
connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
persistenceManager = new EventPersistenceManager(this);
|
||||
|
||||
handler = new Handler();
|
||||
isHandlerSet = false;
|
||||
|
||||
if (persistenceManager.areIntentsDelayed()) {
|
||||
handleDelayedEvents();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
if (intent == null) {
|
||||
ExLog.i(TAG, "Service is restarted.");
|
||||
return START_STICKY;
|
||||
}
|
||||
|
||||
ExLog.i(TAG, "Service is called by following intent: " + intent.getAction());
|
||||
handleCommand(intent, startId);
|
||||
// We want this service to continue running until it is explicitly
|
||||
// stopped, so return sticky.
|
||||
return START_STICKY;
|
||||
}
|
||||
|
||||
private void handleCommand(Intent intent, int startId) {
|
||||
String action = intent.getAction();
|
||||
if (action.equals(getString(R.string.intentActionSendSavedIntents))) {
|
||||
handleDelayedEvents();
|
||||
} else if (action.equals(getString(R.string.intentActionSendEvent))) {
|
||||
handleSendEvents(intent);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleSendEvents(Intent intent) {
|
||||
if (!isConnected()) {
|
||||
persistenceManager.persistIntent(intent);
|
||||
//ConnectivityChangedReceiver.enable(this);
|
||||
} else {
|
||||
sendEvent(intent);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleDelayedEvents() {
|
||||
isHandlerSet = false;
|
||||
if (!isConnected())
|
||||
return;
|
||||
|
||||
sendDelayedEvents();
|
||||
}
|
||||
|
||||
private void sendDelayedEvents() {
|
||||
List<Intent> delayedIntents = persistenceManager.restoreEvents();
|
||||
ExLog.i(TAG, String.format("Trying to resend %d waiting events", delayedIntents.size()));
|
||||
for (Intent intent : delayedIntents)
|
||||
sendEvent(intent);
|
||||
}
|
||||
|
||||
private void sendEvent(Intent intent) {
|
||||
if (!AppConstants.isSendingActive(this)) {
|
||||
ExLog.i(TAG, "Sending deactivated. Event will not be sent to server.");
|
||||
} else {
|
||||
EventSenderTask task = new EventSenderTask(this);
|
||||
task.execute(intent);
|
||||
}
|
||||
}
|
||||
|
||||
public void onResult(Intent intent, boolean success) {
|
||||
if (!success) {
|
||||
ExLog.w(TAG, "Could not POST intent to server.");
|
||||
persistenceManager.persistIntent(intent);
|
||||
if (!isHandlerSet) {
|
||||
SendDelayedEventsCaller delayedCaller = new SendDelayedEventsCaller(this);
|
||||
handler.postDelayed(delayedCaller, 1000 * 60 * 1);
|
||||
isHandlerSet = true;
|
||||
}
|
||||
} else {
|
||||
ExLog.i(TAG, "Event successfully send. " + intent.getStringExtra(AppConstants.EXTRAS_JSON_KEY));
|
||||
persistenceManager.removeIntent(intent);
|
||||
lastSuccessfulSend = Calendar.getInstance().getTime();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* checks if there is network connectivity
|
||||
*
|
||||
* @return connectivity check value
|
||||
*/
|
||||
private boolean isConnected() {
|
||||
NetworkInfo activeNetwork = connectivityManager.getActiveNetworkInfo();
|
||||
if (activeNetwork == null)
|
||||
return false;
|
||||
boolean isConnected = activeNetwork.isConnected();
|
||||
return isConnected;
|
||||
}
|
||||
}
|
||||
+30
-30
@@ -1,30 +1,30 @@
|
||||
package com.sap.sailing.racecommittee.app.services.sending;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import android.app.Service;
|
||||
|
||||
import com.sap.sailing.domain.racelog.RaceLogEvent;
|
||||
import com.sap.sailing.racecommittee.app.domain.ManagedRace;
|
||||
import com.sap.sailing.racecommittee.app.domain.racelog.RaceLogChangedListener;
|
||||
import com.sap.sailing.server.gateway.serialization.JsonSerializer;
|
||||
|
||||
public class RaceEventSender implements RaceLogChangedListener {
|
||||
|
||||
private final Service service;
|
||||
private final JsonSerializer<RaceLogEvent> serializer;
|
||||
private final ManagedRace race;
|
||||
|
||||
public RaceEventSender(Service context, JsonSerializer<RaceLogEvent> serializer, ManagedRace race) {
|
||||
this.service = context;
|
||||
this.serializer = serializer;
|
||||
this.race = race;
|
||||
}
|
||||
|
||||
public void eventAdded(RaceLogEvent event) {
|
||||
JSONObject serializedEvent = serializer.serialize(event);
|
||||
service.startService(
|
||||
EventSendingService.createEventIntent(service, race, serializedEvent.toJSONString()));
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.services.sending;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import android.app.Service;
|
||||
|
||||
import com.sap.sailing.domain.racelog.RaceLogEvent;
|
||||
import com.sap.sailing.racecommittee.app.domain.ManagedRace;
|
||||
import com.sap.sailing.racecommittee.app.domain.racelog.RaceLogChangedListener;
|
||||
import com.sap.sailing.server.gateway.serialization.JsonSerializer;
|
||||
|
||||
public class RaceEventSender implements RaceLogChangedListener {
|
||||
|
||||
private final Service service;
|
||||
private final JsonSerializer<RaceLogEvent> serializer;
|
||||
private final ManagedRace race;
|
||||
|
||||
public RaceEventSender(Service context, JsonSerializer<RaceLogEvent> serializer, ManagedRace race) {
|
||||
this.service = context;
|
||||
this.serializer = serializer;
|
||||
this.race = race;
|
||||
}
|
||||
|
||||
public void eventAdded(RaceLogEvent event) {
|
||||
JSONObject serializedEvent = serializer.serialize(event);
|
||||
service.startService(
|
||||
EventSendingService.createEventIntent(service, race, serializedEvent.toJSONString()));
|
||||
}
|
||||
|
||||
}
|
||||
+23
-23
@@ -1,23 +1,23 @@
|
||||
package com.sap.sailing.racecommittee.app.services.sending;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.R;
|
||||
import com.sap.sailing.racecommittee.app.logging.ExLog;
|
||||
|
||||
public class SendDelayedEventsCaller implements Runnable {
|
||||
|
||||
private final static String TAG = "SendDelayedEventsCaller";
|
||||
private Context context;
|
||||
|
||||
public SendDelayedEventsCaller(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
ExLog.i(TAG, "The Event Sending Service is called to send possibly delayed intents");
|
||||
Intent sendSavedIntent = new Intent(context.getString(R.string.intentActionSendSavedIntents));
|
||||
context.startService(sendSavedIntent);
|
||||
}
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.services.sending;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.R;
|
||||
import com.sap.sailing.racecommittee.app.logging.ExLog;
|
||||
|
||||
public class SendDelayedEventsCaller implements Runnable {
|
||||
|
||||
private final static String TAG = "SendDelayedEventsCaller";
|
||||
private Context context;
|
||||
|
||||
public SendDelayedEventsCaller(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
ExLog.i(TAG, "The Event Sending Service is called to send possibly delayed intents");
|
||||
Intent sendSavedIntent = new Intent(context.getString(R.string.intentActionSendSavedIntents));
|
||||
context.startService(sendSavedIntent);
|
||||
}
|
||||
}
|
||||
+89
-89
@@ -1,89 +1,89 @@
|
||||
package com.sap.sailing.racecommittee.app.ui.activities;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.AppConstants;
|
||||
import com.sap.sailing.racecommittee.app.R;
|
||||
import com.sap.sailing.racecommittee.app.logging.ExLog;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.Toast;
|
||||
|
||||
/**
|
||||
* Base activity for all race committee cockpit activities enabling basic menu functionality.
|
||||
*/
|
||||
public abstract class BaseActivity extends Activity {
|
||||
|
||||
protected MenuItem menuItemLive;
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.options_menu, menu);
|
||||
menuItemLive = menu.findItem(R.id.LiveIcon);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle item selection
|
||||
switch (item.getItemId()) {
|
||||
/*
|
||||
* case R.id.SystemInfo: fadeActivity(InformationActivity.class); return true;
|
||||
*/
|
||||
case R.id.OptionsSettings:
|
||||
fadeActivity(SettingsActivity.class);
|
||||
return true;
|
||||
case R.id.LiveIcon:
|
||||
Toast.makeText(this, AppConstants.getServerBaseURL(this), Toast.LENGTH_SHORT).show();
|
||||
return true;
|
||||
case R.id.WindLog: // fadeActivity(WindActivity.class); return false;
|
||||
case android.R.id.home:
|
||||
return onHomeClicked();
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean onHomeClicked() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
updateLiveIcon();
|
||||
return super.onPrepareOptionsMenu(menu);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
updateLiveIcon();
|
||||
}
|
||||
|
||||
private void updateLiveIcon() {
|
||||
if (menuItemLive == null)
|
||||
return;
|
||||
|
||||
ExLog.i("OptionsMenu", "Querying remote status.");
|
||||
if (AppConstants.getServerBaseURL(this).indexOf("sapsailing.com") != -1) {
|
||||
ExLog.i("OptionsMenu", "It's remote.");
|
||||
menuItemLive.setIcon(R.drawable.ic_menu_share_sapsailing);
|
||||
} else {
|
||||
ExLog.i("OptionsMenu", "It's local.");
|
||||
menuItemLive.setIcon(R.drawable.ic_menu_share_local);
|
||||
}
|
||||
}
|
||||
|
||||
protected void fadeActivity(Class<?> activity) {
|
||||
Intent intent = new Intent(getBaseContext(), activity);
|
||||
fadeActivity(intent);
|
||||
}
|
||||
|
||||
protected void fadeActivity(Intent intent) {
|
||||
startActivity(intent);
|
||||
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
|
||||
}
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.ui.activities;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.AppConstants;
|
||||
import com.sap.sailing.racecommittee.app.R;
|
||||
import com.sap.sailing.racecommittee.app.logging.ExLog;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.Toast;
|
||||
|
||||
/**
|
||||
* Base activity for all race committee cockpit activities enabling basic menu functionality.
|
||||
*/
|
||||
public abstract class BaseActivity extends Activity {
|
||||
|
||||
protected MenuItem menuItemLive;
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.options_menu, menu);
|
||||
menuItemLive = menu.findItem(R.id.LiveIcon);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle item selection
|
||||
switch (item.getItemId()) {
|
||||
/*
|
||||
* case R.id.SystemInfo: fadeActivity(InformationActivity.class); return true;
|
||||
*/
|
||||
case R.id.OptionsSettings:
|
||||
fadeActivity(SettingsActivity.class);
|
||||
return true;
|
||||
case R.id.LiveIcon:
|
||||
Toast.makeText(this, AppConstants.getServerBaseURL(this), Toast.LENGTH_SHORT).show();
|
||||
return true;
|
||||
case R.id.WindLog: // fadeActivity(WindActivity.class); return false;
|
||||
case android.R.id.home:
|
||||
return onHomeClicked();
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean onHomeClicked() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
updateLiveIcon();
|
||||
return super.onPrepareOptionsMenu(menu);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
updateLiveIcon();
|
||||
}
|
||||
|
||||
private void updateLiveIcon() {
|
||||
if (menuItemLive == null)
|
||||
return;
|
||||
|
||||
ExLog.i("OptionsMenu", "Querying remote status.");
|
||||
if (AppConstants.getServerBaseURL(this).indexOf("sapsailing.com") != -1) {
|
||||
ExLog.i("OptionsMenu", "It's remote.");
|
||||
menuItemLive.setIcon(R.drawable.ic_menu_share_sapsailing);
|
||||
} else {
|
||||
ExLog.i("OptionsMenu", "It's local.");
|
||||
menuItemLive.setIcon(R.drawable.ic_menu_share_local);
|
||||
}
|
||||
}
|
||||
|
||||
protected void fadeActivity(Class<?> activity) {
|
||||
Intent intent = new Intent(getBaseContext(), activity);
|
||||
fadeActivity(intent);
|
||||
}
|
||||
|
||||
protected void fadeActivity(Intent intent) {
|
||||
startActivity(intent);
|
||||
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
|
||||
}
|
||||
}
|
||||
+19
-19
@@ -1,19 +1,19 @@
|
||||
package com.sap.sailing.racecommittee.app.ui.activities;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.R;
|
||||
|
||||
/**
|
||||
* @author Basil Hess (basil.hess@sap.com)
|
||||
*
|
||||
*/
|
||||
public class SettingsActivity extends PreferenceActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.layout.settings_view);
|
||||
}
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.ui.activities;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.R;
|
||||
|
||||
/**
|
||||
* @author Basil Hess (basil.hess@sap.com)
|
||||
*
|
||||
*/
|
||||
public class SettingsActivity extends PreferenceActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.layout.settings_view);
|
||||
}
|
||||
}
|
||||
+34
-34
@@ -1,34 +1,34 @@
|
||||
package com.sap.sailing.racecommittee.app.ui.activities;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.R;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
/**
|
||||
* A two-pane activity - saves the visibility state of the right pane.
|
||||
*/
|
||||
public class TwoPaneActivity extends BaseActivity {
|
||||
|
||||
private final static String VisibilityTag = TwoPaneActivity.class.getName() + ".rightlayoutvisibility";
|
||||
|
||||
@Override
|
||||
protected void onRestoreInstanceState(Bundle savedInstanceState) {
|
||||
super.onRestoreInstanceState(savedInstanceState);
|
||||
if (savedInstanceState != null) {
|
||||
if (savedInstanceState.getBoolean(VisibilityTag)) {
|
||||
getRightLayout().setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putBoolean(VisibilityTag, getRightLayout().getVisibility() == View.VISIBLE);
|
||||
}
|
||||
|
||||
protected View getRightLayout() {
|
||||
return findViewById(R.id.rightLayout);
|
||||
}
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.ui.activities;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.R;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
/**
|
||||
* A two-pane activity - saves the visibility state of the right pane.
|
||||
*/
|
||||
public class TwoPaneActivity extends BaseActivity {
|
||||
|
||||
private final static String VisibilityTag = TwoPaneActivity.class.getName() + ".rightlayoutvisibility";
|
||||
|
||||
@Override
|
||||
protected void onRestoreInstanceState(Bundle savedInstanceState) {
|
||||
super.onRestoreInstanceState(savedInstanceState);
|
||||
if (savedInstanceState != null) {
|
||||
if (savedInstanceState.getBoolean(VisibilityTag)) {
|
||||
getRightLayout().setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putBoolean(VisibilityTag, getRightLayout().getVisibility() == View.VISIBLE);
|
||||
}
|
||||
|
||||
protected View getRightLayout() {
|
||||
return findViewById(R.id.rightLayout);
|
||||
}
|
||||
}
|
||||
+42
-42
@@ -1,42 +1,42 @@
|
||||
package com.sap.sailing.racecommittee.app.ui.adapters;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.sap.sailing.domain.common.Named;
|
||||
import com.sap.sailing.racecommittee.app.R;
|
||||
|
||||
/**
|
||||
* @author D053502
|
||||
*
|
||||
*/
|
||||
public class NamedArrayAdapter<T extends Named> extends ArrayAdapter<T> {
|
||||
|
||||
public NamedArrayAdapter(Context context, int textViewResourceId, List<T> namedList) {
|
||||
super(context, textViewResourceId, namedList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
View view = convertView;
|
||||
if (convertView == null) {
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
view = inflater.inflate(R.layout.welter_one_row_no_image, /* view group */ null);
|
||||
}
|
||||
|
||||
T item = getItem(position);
|
||||
TextView title = (TextView) view.findViewById(R.id.Welter_Cell_OneRowNoImage_txtTitle);
|
||||
title.setText(item.getName());
|
||||
title.setAlpha(isEnabled(position) ? 1.0f : 0.2f);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.ui.adapters;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.sap.sailing.domain.common.Named;
|
||||
import com.sap.sailing.racecommittee.app.R;
|
||||
|
||||
/**
|
||||
* @author D053502
|
||||
*
|
||||
*/
|
||||
public class NamedArrayAdapter<T extends Named> extends ArrayAdapter<T> {
|
||||
|
||||
public NamedArrayAdapter(Context context, int textViewResourceId, List<T> namedList) {
|
||||
super(context, textViewResourceId, namedList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
View view = convertView;
|
||||
if (convertView == null) {
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
view = inflater.inflate(R.layout.welter_one_row_no_image, /* view group */ null);
|
||||
}
|
||||
|
||||
T item = getItem(position);
|
||||
TextView title = (TextView) view.findViewById(R.id.Welter_Cell_OneRowNoImage_txtTitle);
|
||||
title.setText(item.getName());
|
||||
title.setAlpha(isEnabled(position) ? 1.0f : 0.2f);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
}
|
||||
+56
-56
@@ -1,56 +1,56 @@
|
||||
package com.sap.sailing.racecommittee.app.ui.adapters.racelist;
|
||||
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.SeriesBase;
|
||||
|
||||
public class BoatClassSeriesDataFleet {
|
||||
|
||||
private BoatClass boatClass;
|
||||
private SeriesBase series;
|
||||
private Fleet fleet;
|
||||
|
||||
public BoatClassSeriesDataFleet(BoatClass boatClass, SeriesBase series, Fleet fleet) {
|
||||
this.boatClass = boatClass;
|
||||
this.series = series;
|
||||
this.fleet = fleet;
|
||||
}
|
||||
|
||||
public String getBoatClassName() {
|
||||
return boatClass.getName();
|
||||
}
|
||||
|
||||
public String getFleetName() {
|
||||
return fleet.getName();
|
||||
}
|
||||
|
||||
public String getSeriesName() {
|
||||
return series.getName();
|
||||
}
|
||||
|
||||
public BoatClass getBoatClass() {
|
||||
return boatClass;
|
||||
}
|
||||
|
||||
public SeriesBase getSeries() {
|
||||
return series;
|
||||
}
|
||||
|
||||
public Fleet getFleet() {
|
||||
return fleet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
BoatClassSeriesDataFleet other = (BoatClassSeriesDataFleet) obj;
|
||||
return getBoatClassName().equals(other.getBoatClassName())
|
||||
&& getSeriesName().equals(other.getSeriesName())
|
||||
&& getFleetName().equals(other.getFleetName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
/// TODO: Check implementation of equals/hashCode on BoatGroupAndSeries
|
||||
return 123;
|
||||
}
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.ui.adapters.racelist;
|
||||
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.SeriesBase;
|
||||
|
||||
public class BoatClassSeriesDataFleet {
|
||||
|
||||
private BoatClass boatClass;
|
||||
private SeriesBase series;
|
||||
private Fleet fleet;
|
||||
|
||||
public BoatClassSeriesDataFleet(BoatClass boatClass, SeriesBase series, Fleet fleet) {
|
||||
this.boatClass = boatClass;
|
||||
this.series = series;
|
||||
this.fleet = fleet;
|
||||
}
|
||||
|
||||
public String getBoatClassName() {
|
||||
return boatClass.getName();
|
||||
}
|
||||
|
||||
public String getFleetName() {
|
||||
return fleet.getName();
|
||||
}
|
||||
|
||||
public String getSeriesName() {
|
||||
return series.getName();
|
||||
}
|
||||
|
||||
public BoatClass getBoatClass() {
|
||||
return boatClass;
|
||||
}
|
||||
|
||||
public SeriesBase getSeries() {
|
||||
return series;
|
||||
}
|
||||
|
||||
public Fleet getFleet() {
|
||||
return fleet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
BoatClassSeriesDataFleet other = (BoatClassSeriesDataFleet) obj;
|
||||
return getBoatClassName().equals(other.getBoatClassName())
|
||||
&& getSeriesName().equals(other.getSeriesName())
|
||||
&& getFleetName().equals(other.getFleetName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
/// TODO: Check implementation of equals/hashCode on BoatGroupAndSeries
|
||||
return 123;
|
||||
}
|
||||
}
|
||||
+12
-12
@@ -1,12 +1,12 @@
|
||||
package com.sap.sailing.racecommittee.app.ui.adapters.racelist;
|
||||
|
||||
|
||||
/*
|
||||
* author: I065873
|
||||
*
|
||||
* Data Type for displaying the Race list in the left part of the second activity
|
||||
*/
|
||||
public abstract class RaceListDataType {
|
||||
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.ui.adapters.racelist;
|
||||
|
||||
|
||||
/*
|
||||
* author: I065873
|
||||
*
|
||||
* Data Type for displaying the Race list in the left part of the second activity
|
||||
*/
|
||||
public abstract class RaceListDataType {
|
||||
|
||||
|
||||
}
|
||||
+34
-34
@@ -1,34 +1,34 @@
|
||||
package com.sap.sailing.racecommittee.app.ui.adapters.racelist;
|
||||
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.SeriesBase;
|
||||
|
||||
public class RaceListDataTypeTitle extends RaceListDataType {
|
||||
|
||||
private BoatClassSeriesDataFleet data;
|
||||
|
||||
public RaceListDataTypeTitle(BoatClassSeriesDataFleet data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public BoatClassSeriesDataFleet getBoatClassSeriesDataFleet() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public BoatClass getBoatClass() {
|
||||
return data.getBoatClass();
|
||||
}
|
||||
|
||||
public SeriesBase getSeries() {
|
||||
return data.getSeries();
|
||||
}
|
||||
|
||||
public Fleet getFleet() {
|
||||
return data.getFleet();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return getBoatClass().getName() + " - " + getSeries().getName() + " - " + getFleet().getName();
|
||||
}
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.ui.adapters.racelist;
|
||||
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.SeriesBase;
|
||||
|
||||
public class RaceListDataTypeTitle extends RaceListDataType {
|
||||
|
||||
private BoatClassSeriesDataFleet data;
|
||||
|
||||
public RaceListDataTypeTitle(BoatClassSeriesDataFleet data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public BoatClassSeriesDataFleet getBoatClassSeriesDataFleet() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public BoatClass getBoatClass() {
|
||||
return data.getBoatClass();
|
||||
}
|
||||
|
||||
public SeriesBase getSeries() {
|
||||
return data.getSeries();
|
||||
}
|
||||
|
||||
public Fleet getFleet() {
|
||||
return data.getFleet();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return getBoatClass().getName() + " - " + getSeries().getName() + " - " + getFleet().getName();
|
||||
}
|
||||
}
|
||||
+13
-13
@@ -1,13 +1,13 @@
|
||||
package com.sap.sailing.racecommittee.app.ui.comparators;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import com.sap.sailing.domain.common.Named;
|
||||
|
||||
public class NamedComparator implements Comparator<Named> {
|
||||
|
||||
public int compare(Named lhs, Named rhs) {
|
||||
return lhs.getName().compareTo(rhs.getName());
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.ui.comparators;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import com.sap.sailing.domain.common.Named;
|
||||
|
||||
public class NamedComparator implements Comparator<Named> {
|
||||
|
||||
public int compare(Named lhs, Named rhs) {
|
||||
return lhs.getName().compareTo(rhs.getName());
|
||||
}
|
||||
|
||||
}
|
||||
+17
-17
@@ -1,17 +1,17 @@
|
||||
package com.sap.sailing.racecommittee.app.ui.comparators;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import com.sap.sailing.domain.common.Named;
|
||||
|
||||
public class NamedRaceComparator extends RaceNameComparator implements Comparator<Named> {
|
||||
|
||||
public int compare(Named lhs, Named rhs) {
|
||||
|
||||
String left = lhs.getName();
|
||||
String right = rhs.getName();
|
||||
|
||||
return compareRaceNames(left, right);
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.ui.comparators;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import com.sap.sailing.domain.common.Named;
|
||||
|
||||
public class NamedRaceComparator extends RaceNameComparator implements Comparator<Named> {
|
||||
|
||||
public int compare(Named lhs, Named rhs) {
|
||||
|
||||
String left = lhs.getName();
|
||||
String right = rhs.getName();
|
||||
|
||||
return compareRaceNames(left, right);
|
||||
}
|
||||
|
||||
}
|
||||
+16
-16
@@ -1,16 +1,16 @@
|
||||
package com.sap.sailing.racecommittee.app.ui.comparators;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.ui.adapters.racelist.RaceListDataTypeElement;
|
||||
|
||||
public class RaceListDataTypeElementComparator extends RaceNameComparator implements Comparator<RaceListDataTypeElement> {
|
||||
|
||||
public int compare(RaceListDataTypeElement lhs, RaceListDataTypeElement rhs) {
|
||||
String leftRaceName = lhs.getRaceName();
|
||||
String rightRaceName = rhs.getRaceName();
|
||||
|
||||
return compareRaceNames(leftRaceName, rightRaceName);
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.ui.comparators;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.ui.adapters.racelist.RaceListDataTypeElement;
|
||||
|
||||
public class RaceListDataTypeElementComparator extends RaceNameComparator implements Comparator<RaceListDataTypeElement> {
|
||||
|
||||
public int compare(RaceListDataTypeElement lhs, RaceListDataTypeElement rhs) {
|
||||
String leftRaceName = lhs.getRaceName();
|
||||
String rightRaceName = rhs.getRaceName();
|
||||
|
||||
return compareRaceNames(leftRaceName, rightRaceName);
|
||||
}
|
||||
|
||||
}
|
||||
+33
-33
@@ -1,33 +1,33 @@
|
||||
package com.sap.sailing.racecommittee.app.ui.comparators;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.ui.adapters.racelist.RaceListDataTypeTitle;
|
||||
|
||||
|
||||
public class RaceListDataTypeTitleComparator implements Comparator<RaceListDataTypeTitle> {
|
||||
|
||||
public int compare(RaceListDataTypeTitle left, RaceListDataTypeTitle right) {
|
||||
|
||||
if (left.getBoatClass().getName() == null || right.getBoatClass().getName() == null)
|
||||
return 0;
|
||||
|
||||
int boatClassResult = left.getBoatClass().getName().compareTo(right.getBoatClass().getName());
|
||||
if (boatClassResult != 0)
|
||||
return boatClassResult;
|
||||
|
||||
if (left.getSeries().getName() == null || right.getSeries().getName() == null)
|
||||
return 0;
|
||||
|
||||
/*int seriesResult = left.getSeries().getOrderNumber().compareTo(right.getSeries().getOrderNumber());
|
||||
if (seriesResult != 0)
|
||||
return seriesResult;*/
|
||||
|
||||
if (left.getFleet().getName() == null || right.getFleet().getName() == null)
|
||||
return 0;
|
||||
|
||||
int groupResult = left.getFleet().getName().compareTo(right.getFleet().getName());
|
||||
return groupResult;
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.ui.comparators;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.ui.adapters.racelist.RaceListDataTypeTitle;
|
||||
|
||||
|
||||
public class RaceListDataTypeTitleComparator implements Comparator<RaceListDataTypeTitle> {
|
||||
|
||||
public int compare(RaceListDataTypeTitle left, RaceListDataTypeTitle right) {
|
||||
|
||||
if (left.getBoatClass().getName() == null || right.getBoatClass().getName() == null)
|
||||
return 0;
|
||||
|
||||
int boatClassResult = left.getBoatClass().getName().compareTo(right.getBoatClass().getName());
|
||||
if (boatClassResult != 0)
|
||||
return boatClassResult;
|
||||
|
||||
if (left.getSeries().getName() == null || right.getSeries().getName() == null)
|
||||
return 0;
|
||||
|
||||
/*int seriesResult = left.getSeries().getOrderNumber().compareTo(right.getSeries().getOrderNumber());
|
||||
if (seriesResult != 0)
|
||||
return seriesResult;*/
|
||||
|
||||
if (left.getFleet().getName() == null || right.getFleet().getName() == null)
|
||||
return 0;
|
||||
|
||||
int groupResult = left.getFleet().getName().compareTo(right.getFleet().getName());
|
||||
return groupResult;
|
||||
}
|
||||
|
||||
}
|
||||
+24
-24
@@ -1,25 +1,25 @@
|
||||
package com.sap.sailing.racecommittee.app.ui.comparators;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.utils.AlphanumComparator;
|
||||
|
||||
public abstract class RaceNameComparator {
|
||||
|
||||
private Comparator<String> comparator;
|
||||
|
||||
public RaceNameComparator() {
|
||||
this.comparator = new AlphanumComparator();
|
||||
}
|
||||
|
||||
/**
|
||||
* compares two race names and returns the ordinal comparison result
|
||||
* @param leftRaceName
|
||||
* @param rightRaceName
|
||||
* @return the comparison result (see String.compareTo)
|
||||
*/
|
||||
protected int compareRaceNames(String leftRaceName, String rightRaceName) {
|
||||
return comparator.compare(leftRaceName, rightRaceName);
|
||||
}
|
||||
|
||||
package com.sap.sailing.racecommittee.app.ui.comparators;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.utils.AlphanumComparator;
|
||||
|
||||
public abstract class RaceNameComparator {
|
||||
|
||||
private Comparator<String> comparator;
|
||||
|
||||
public RaceNameComparator() {
|
||||
this.comparator = new AlphanumComparator();
|
||||
}
|
||||
|
||||
/**
|
||||
* compares two race names and returns the ordinal comparison result
|
||||
* @param leftRaceName
|
||||
* @param rightRaceName
|
||||
* @return the comparison result (see String.compareTo)
|
||||
*/
|
||||
protected int compareRaceNames(String leftRaceName, String rightRaceName) {
|
||||
return comparator.compare(leftRaceName, rightRaceName);
|
||||
}
|
||||
|
||||
}
|
||||
+17
-17
@@ -1,17 +1,17 @@
|
||||
package com.sap.sailing.racecommittee.app.ui.comparators;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.ui.adapters.racelist.BoatClassSeriesDataFleet;
|
||||
|
||||
public class SeriesComparator implements Comparator<BoatClassSeriesDataFleet> {
|
||||
|
||||
public int compare(BoatClassSeriesDataFleet lhs, BoatClassSeriesDataFleet rhs) {
|
||||
//int result = lhs.getSeries().getOrderNumber().compareTo(rhs.getSeries().getOrderNumber());
|
||||
//if (result == 0) {
|
||||
return lhs.getFleetName().compareTo(rhs.getFleetName());
|
||||
//}
|
||||
//return result;
|
||||
}
|
||||
|
||||
}
|
||||
package com.sap.sailing.racecommittee.app.ui.comparators;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import com.sap.sailing.racecommittee.app.ui.adapters.racelist.BoatClassSeriesDataFleet;
|
||||
|
||||
public class SeriesComparator implements Comparator<BoatClassSeriesDataFleet> {
|
||||
|
||||
public int compare(BoatClassSeriesDataFleet lhs, BoatClassSeriesDataFleet rhs) {
|
||||
//int result = lhs.getSeries().getOrderNumber().compareTo(rhs.getSeries().getOrderNumber());
|
||||
//if (result == 0) {
|
||||
return lhs.getFleetName().compareTo(rhs.getFleetName());
|
||||
//}
|
||||
//return result;
|
||||
}
|
||||
|
||||
}
|
||||
+6
@@ -233,4 +233,10 @@ public class RaceInfoFragment extends RaceFragment implements RaceStateChangedLi
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutomaticRaceEnd(TimePoint automaticRaceEnd) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loaded 100 of 2382 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user