Merge branch 'master' into ubilabs--tracking_app--develop

This commit is contained in:
Axel Uhl committed 2016-04-20 16:38:08 +02:00
commit 18e89d6e23
289 files changed
+28691 -10497

No files matched your search

@@ -11,11 +11,11 @@ import android.content.Context;
public class HttpGetRequest extends HttpRequest {
public HttpGetRequest(URL requestUrl, Context context) {
super(requestUrl, context);
super(context, requestUrl);
}
public HttpGetRequest(URL url, HttpRequestProgressListener listener, Context context) {
super(url, listener, context);
super(context, url, listener);
}
@Override
@@ -10,8 +10,8 @@ import android.content.Context;
public class HttpJsonGetRequest extends HttpRequest {
public final static String ContentType = "application/json;charset=UTF-8";
public HttpJsonGetRequest(URL requestUrl, Context context) {
super(requestUrl, context);
public HttpJsonGetRequest(Context context, URL requestUrl) {
super(context, requestUrl);
}
@Override
@@ -16,16 +16,16 @@ public class HttpJsonPostRequest extends HttpRequest {
private String requestBody;
private String accessToken;
public HttpJsonPostRequest(URL requestUrl, Context context) {
this(requestUrl, null, context, null);
public HttpJsonPostRequest(Context context, URL requestUrl) {
this(context, requestUrl, null, null);
}
public HttpJsonPostRequest(URL requestUrl, String body, Context context) {
this(requestUrl, body, context, null);
public HttpJsonPostRequest(Context context, URL requestUrl, String body) {
this(context, requestUrl, body, null);
}
public HttpJsonPostRequest(URL requestUrl, String body, Context context, String accessToken) {
super(requestUrl, context);
public HttpJsonPostRequest(Context context, URL requestUrl, String body, String accessToken) {
super(context, requestUrl);
this.requestBody = body;
this.accessToken = accessToken;
}
@@ -46,11 +46,11 @@ public abstract class HttpRequest {
private boolean isCancelled;
protected SharedPreferences pref;
public HttpRequest(URL url, Context context) {
this(url, null, context);
public HttpRequest(Context context, URL url) {
this(context, url, null);
}
public HttpRequest(URL url, HttpRequestProgressListener listener, Context context) {
public HttpRequest(Context context, URL url, HttpRequestProgressListener listener) {
this.url = url;
this.listener = listener;
this.isCancelled = false;
@@ -15,7 +15,7 @@ public class LoginGetRequest extends HttpRequest {
private final LoginData loginData;
public LoginGetRequest(URL url, Context context, LoginData login) {
super(url, context);
super(context, url);
loginData = login;
}
@@ -40,7 +40,7 @@ public class MessageSenderTask extends AsyncTask<Intent, Void, MessageSenderResu
InputStream responseStream = null;
try {
ExLog.i(context, TAG, "Posting message: " + payload);
HttpRequest post = new HttpJsonPostRequest(new URL(url), payload, context);
HttpRequest post = new HttpJsonPostRequest(context, new URL(url), payload);
responseStream = post.execute();
ExLog.i(context, TAG, "Post successful for the following message: " + payload);
result = new MessageSenderResult(intent, responseStream);
@@ -41,7 +41,7 @@ public class AuthCheckTask extends AsyncTask<Void, Void, Boolean> {
Boolean authenticated = false;
if (url != null) {
try {
HttpRequest request = new HttpJsonGetRequest(url, context);
HttpRequest request = new HttpJsonGetRequest(context, url);
InputStream responseStream = request.execute();
JSONParser parser = new JSONParser();
@@ -0,0 +1,19 @@
package com.sap.sailing.android.shared.util;
import org.json.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
/**
* Helps converting JSON objects coming from the {@code org.json.JSONObject} world, as used in the Android world,
* to the {@code org.json.simple.JSONObject} world. The approach works by naively {@link String}-serializing the
* {@link org.json.JSONObject} and then parsing this {@link String} again using a {@link JSONParser} from the
* {@code org.json.simple} world.
*/
public class JsonHelper {
public static org.json.simple.JSONObject convertToSimple(JSONObject jsonObject) throws ParseException {
String jsonString = jsonObject.toString();
JSONParser jsonParser = new JSONParser();
return (org.json.simple.JSONObject) jsonParser.parse(jsonString);
}
}
@@ -32,7 +32,7 @@ public class LogoutTask extends AsyncTask<String, Void, Void> {
@Override
protected Void doInBackground(String... params) {
if (url != null && params != null && params.length > 0) {
HttpRequest request = new HttpJsonGetRequest(url, context);
HttpRequest request = new HttpJsonGetRequest(context, url);
try {
request.execute();
} catch (IOException e) {
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sap.sailing.android.tracking.app"
android:versionCode="7"
android:versionName="1.5">
android:versionCode="8"
android:versionName="1.6">
<uses-sdk
android:minSdkVersion="14"
@@ -478,8 +478,7 @@ public class RegattaActivity extends AbstractRegattaActivity
}
try {
HttpJsonPostRequest request = new HttpJsonPostRequest(new URL(checkoutURLStr), checkoutData.toString(),
this);
HttpJsonPostRequest request = new HttpJsonPostRequest(this, new URL(checkoutURLStr), checkoutData.toString());
NetworkHelper.getInstance(this).executeHttpJsonRequestAsync(request,
new NetworkHelperSuccessListener() {
@@ -94,7 +94,7 @@ public class StartActivity extends AbstractStartActivity {
@Override
public void onCheckinDataAvailable(AbstractCheckinData data) {
if(data != null && data instanceof CheckinData) {
if (data != null && data instanceof CheckinData) {
CheckinData checkinData = (CheckinData) data;
if (!checkinData.isUpdate()) {
getHomeFragment().displayUserConfirmationScreen(data);
@@ -128,8 +128,8 @@ public class HomeFragment extends AbstractHomeFragment implements LoaderCallback
try {
JSONObject requestObject = CheckinHelper.getCheckinJson(checkinData.competitorId, checkinData.deviceUid,
"TODO push device ID!!", date.getTime());
HttpJsonPostRequest request = new HttpJsonPostRequest(new URL(checkinData.checkinURL),
requestObject.toString(), getActivity());
HttpJsonPostRequest request = new HttpJsonPostRequest(getActivity(), new URL(checkinData.checkinURL),
requestObject.toString());
NetworkHelper.getInstance(getActivity())
.executeHttpJsonRequestAsync(request, new CheckinListener(checkinData.checkinDigest),
new CheckinErrorListener(checkinData.checkinDigest));
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.sap.sailing.android.buoy.positioning.app"
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="7"
android:versionName="1.5">
android:versionCode="8"
android:versionName="1.6">
<uses-sdk
android:minSdkVersion="14"
@@ -1,18 +1,19 @@
package com.sap.sailing.android.buoy.positioning.app.adapter;
import java.text.DecimalFormat;
import java.util.List;
import android.content.Context;
import android.database.Cursor;
import android.support.v4.widget.ResourceCursorAdapter;
import android.view.View;
import android.widget.TextView;
import com.sap.sailing.android.buoy.positioning.app.R;
import com.sap.sailing.android.buoy.positioning.app.provider.AnalyticsContract;
import com.sap.sailing.android.buoy.positioning.app.util.DatabaseHelper;
import com.sap.sailing.android.buoy.positioning.app.valueobjects.MarkPingInfo;
import java.text.DecimalFormat;
import java.util.List;
public class MarkAdapter extends ResourceCursorAdapter {
public MarkAdapter(Context context, int layout, Cursor cursor, int flags) {
@@ -21,21 +22,19 @@ public class MarkAdapter extends ResourceCursorAdapter {
@Override
public void bindView(View view, Context context, Cursor cursor) {
TextView markName = (TextView) view.findViewById(R.id.mark_name);
TextView markSet = (TextView) view.findViewById(R.id.mark_set);
String name = cursor.getString(cursor.getColumnIndex(AnalyticsContract.Mark.MARK_NAME));
String markID = cursor.getString(cursor.getColumnIndex(AnalyticsContract.Mark.MARK_ID));
List<MarkPingInfo> markPings = DatabaseHelper.getInstance().getMarkPings(context, markID);
String setText = "";
final TextView markName = (TextView) view.findViewById(R.id.mark_name);
final TextView markSet = (TextView) view.findViewById(R.id.mark_set);
final String name = cursor.getString(cursor.getColumnIndex(AnalyticsContract.Mark.MARK_NAME));
final String markID = cursor.getString(cursor.getColumnIndex(AnalyticsContract.Mark.MARK_ID));
final List<MarkPingInfo> markPings = DatabaseHelper.getInstance().getMarkPings(context, markID);
final String setText;
if (markPings.isEmpty()) {
setText = context.getString(R.string.not_set);
} else {
DecimalFormat df = new DecimalFormat("#.##");
setText = context.getString(R.string.set);
double accuracy = markPings.get(0).getAccuracy();
String accuracyString = context.getString(R.string.mark_list_accuracy);
accuracyString = String.format(accuracyString, df.format(accuracy));
setText += " " + accuracyString;
final DecimalFormat df = new DecimalFormat("#.##");
final double accuracy = markPings.get(0).getAccuracy();
final String accuracyString = String.format(context.getString(R.string.mark_list_accuracy), df.format(accuracy));
setText = context.getString(R.string.set) + " " + accuracyString;
}
markName.setText(name);
markSet.setText(setText);
@@ -20,9 +20,6 @@ public class RegattaAdapter extends AbstractRegattaAdapter {
if (name != null) {
String text = cursor.getString(cursor.getColumnIndex(AnalyticsContract.Leaderboard.LEADERBOARD_NAME));
name.setText(text);
// String digestString =
// cursor.getString(cursor.getColumnIndex(AnalyticsContract.Leaderboard.LEADERBOARD_CHECKIN_DIGEST));
// System.out.println("BENNET: " + digestString);
}
}
}
@@ -27,12 +27,16 @@ public class MarkerService extends IntentService implements CheckinManager.Data
@Override
public void handleData(AbstractCheckinData data) {
try {
CheckinData checkinData = (CheckinData) data;
DatabaseHelper helper = DatabaseHelper.getInstance();
helper.updateMarks(this, checkinData.marks, checkinData.getLeaderboard());
} catch (DatabaseHelper.GeneralDatabaseHelperException e) {
Log.e(TAG, "Error trying to analyze mark checkin data", e);
if (data != null) {
try {
CheckinData checkinData = (CheckinData) data;
DatabaseHelper helper = DatabaseHelper.getInstance();
helper.updateMarks(this, checkinData.marks, checkinData.getLeaderboard());
} catch (DatabaseHelper.GeneralDatabaseHelperException e) {
Log.e(TAG, "Error trying to analyze mark checkin data", e);
}
} else {
Log.e(TAG, "checkin data was null");
}
}
@@ -23,7 +23,7 @@ public class PositioningActivity extends BaseActivity implements pingListener {
private MarkInfo markInfo;
private MarkPingInfo markPing;
private LeaderboardInfo leaderBoard;
private String markerID;
private String markIdAsString;
private String checkinDigest;
@Override
@@ -31,7 +31,7 @@ public class PositioningActivity extends BaseActivity implements pingListener {
super.onCreate(savedInstanceState);
setContentView(R.layout.fragment_container);
Intent intent = getIntent();
markerID = intent.getExtras().getString(getString(R.string.mark_id));
markIdAsString = intent.getExtras().getString(getString(R.string.mark_id));
checkinDigest = intent.getExtras().getString(getString(R.string.checkin_digest));
loadDataFromDatabase();
@@ -60,13 +60,13 @@ public class PositioningActivity extends BaseActivity implements pingListener {
List<MarkInfo> marks = DatabaseHelper.getInstance().getMarks(this, checkinDigest);
setLeaderBoard(DatabaseHelper.getInstance().getLeaderboard(this, checkinDigest));
for (MarkInfo mark : marks) {
if (mark.getId().equals(markerID)) {
if (mark.getId().toString().equals(markIdAsString)) {
setMarkInfo(mark);
break;
}
}
if (markInfo != null) {
setPingFromDatabase(markerID);
setPingFromDatabase(markIdAsString);
}
}
@@ -139,6 +139,6 @@ public class PositioningActivity extends BaseActivity implements pingListener {
@Override
public void updatePing() {
setPingFromDatabase(markInfo.getId());
setPingFromDatabase(markInfo.getId().toString());
}
}
@@ -145,18 +145,22 @@ public class RegattaActivity extends AbstractRegattaActivity {
@Override
public void onCheckinDataAvailable(AbstractCheckinData checkinData) {
CheckinData data = (CheckinData) checkinData;
try {
DatabaseHelper.getInstance().updateMarks(this, data.marks, data.getLeaderboard());
getRegattaFragment().getAdapter().notifyDataSetChanged();
} catch (DatabaseHelper.GeneralDatabaseHelperException e) {
ExLog.e(this, TAG, "Batch insert failed: " + e.getMessage());
displayDatabaseError();
return;
}
if (BuildConfig.DEBUG) {
ExLog.i(this, TAG, "Batch-insert of checkinData completed.");
if (checkinData != null) {
CheckinData data = (CheckinData) checkinData;
try {
DatabaseHelper.getInstance().updateMarks(this, data.marks, data.getLeaderboard());
getRegattaFragment().getAdapter().notifyDataSetChanged();
} catch (DatabaseHelper.GeneralDatabaseHelperException e) {
ExLog.e(this, TAG, "Batch insert failed: " + e.getMessage());
displayDatabaseError();
return;
}
if (BuildConfig.DEBUG) {
ExLog.i(this, TAG, "Batch-insert of checkinData completed.");
}
} else {
ExLog.i(this, TAG, "checkinData is null");
}
}
@@ -111,11 +111,9 @@ public class RegattaFragment extends BaseFragment implements LoaderCallbacks<Cur
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Cursor cursor = (Cursor) adapter.getItem(position);
String markerID = cursor.getString(cursor.getColumnIndex("mark_id"));
String checkinDigest = cursor.getString(cursor.getColumnIndex("mark_checkin_digest"));
String markerID = cursor.getString(cursor.getColumnIndex(AnalyticsContract.Mark.MARK_ID));
String checkinDigest = cursor.getString(cursor.getColumnIndex(AnalyticsContract.Mark.MARK_CHECKIN_DIGEST));
Intent intent = new Intent(getActivity(), PositioningActivity.class);
intent.putExtra(getString(R.string.mark_id), markerID);
intent.putExtra(getString(R.string.checkin_digest), checkinDigest);
@@ -21,10 +21,10 @@ public class AppPreferences extends BaseAppPreferences {
cleanLeaderBoardName);
}
public String getServerMarkPingPath(String leaderBoardName, String markID) {
public String getServerMarkPingPath(String leaderBoardName, String markIdAsString) {
String cleanLeaderBoardName = leaderBoardName.replaceAll(" ", "%20");
return context.getString(R.string.preference_server_gps_fixes_post_path)
.replace("{leaderboard_name}", cleanLeaderBoardName).replace("{mark-id}", markID);
.replace("{leaderboard_name}", cleanLeaderBoardName).replace("{mark-id}", markIdAsString);
}
public void setDataRefreshInterval(long interval){
@@ -13,13 +13,7 @@ import java.util.UUID;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.net.Uri;
import android.util.Log;
import android.widget.Toast;
import org.json.simple.parser.ParseException;
import com.sap.sailing.android.buoy.positioning.app.R;
import com.sap.sailing.android.buoy.positioning.app.valueobjects.CheckinData;
@@ -29,35 +23,58 @@ import com.sap.sailing.android.shared.data.AbstractCheckinData;
import com.sap.sailing.android.shared.data.http.HttpGetRequest;
import com.sap.sailing.android.shared.logging.ExLog;
import com.sap.sailing.android.shared.ui.activities.CheckinDataActivity;
import com.sap.sailing.android.shared.util.JsonHelper;
import com.sap.sailing.android.shared.util.NetworkHelper;
import com.sap.sailing.android.shared.util.NetworkHelper.NetworkHelperSuccessListener;
import com.sap.sailing.android.shared.util.UniqueDeviceUuid;
import com.sap.sailing.domain.base.SharedDomainFactory;
import com.sap.sailing.domain.base.impl.SharedDomainFactoryImpl;
import com.sap.sailing.domain.common.racelog.tracking.DeviceMappingConstants;
import com.sap.sailing.domain.common.tracking.GPSFix;
import com.sap.sailing.domain.racelogtracking.DeviceIdentifier;
import com.sap.sailing.domain.racelogtracking.impl.SmartphoneUUIDIdentifierImpl;
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
import com.sap.sailing.server.gateway.deserialization.coursedata.impl.MarkDeserializer;
import com.sap.sailing.server.gateway.deserialization.impl.FlatGPSFixJsonDeserializer;
import com.sap.sailing.server.gateway.serialization.coursedata.impl.MarkJsonSerializer;
import com.sap.sailing.server.gateway.serialization.impl.FlatGPSFixJsonSerializer;
import com.sap.sailing.server.gateway.serialization.impl.MarkJsonSerializerWithPosition;
public class CheckinManager {
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.net.Uri;
import android.util.Log;
import android.widget.Toast;
public class CheckinManager {
private final static String TAG = CheckinManager.class.getName();
private AbstractCheckinData checkinData;
private CheckinDataActivity activity;
private Context mContext;
private AppPreferences prefs;
private final CheckinDataActivity activity;
private final Context mContext;
private final AppPreferences prefs;
private String url;
private DataChangedListner dataChangedListner;
private final SharedDomainFactory sharedDomainFactory;
public CheckinManager(String url, Context context){
public CheckinManager(String url, Context context) {
this(url, context, /* context is not necessarily a CheckinDataActivity */ null);
}
private CheckinManager(String url, Context context, CheckinDataActivity activity) {
sharedDomainFactory = new SharedDomainFactoryImpl(/* race log resolver not needed in this app */ null);
this.url = url;
mContext = context;
prefs = new AppPreferences(context);
this.activity = activity;
}
public CheckinManager(String url, CheckinDataActivity activity) {
this.activity = activity;
this.url = url;
mContext = activity;
prefs = new AppPreferences(mContext);
this(url, activity, activity);
}
public SharedDomainFactory getSharedDomainFactory() {
return sharedDomainFactory;
}
public void callServerAndGenerateCheckinData() {
@@ -156,36 +173,33 @@ public class CheckinManager {
public void performAction(JSONObject response) {
try {
JSONArray markArray = response.getJSONArray("marks");
String checkinDigest = generateCheckindigest(urlData.uriStr);
List<MarkInfo> marks = new ArrayList<MarkInfo>();
List<MarkPingInfo> pings = new ArrayList<MarkPingInfo>();
String checkinDigest = generateCheckinDigest(urlData.uriStr);
List<MarkInfo> marks = new ArrayList<>();
List<MarkPingInfo> pings = new ArrayList<>();
for (int i = 0; i < markArray.length(); i++) {
JSONObject jsonMark = (JSONObject) markArray.get(i);
MarkInfo mark = new MarkInfo();
mark.setCheckinDigest(checkinDigest);
mark.setClassName(jsonMark.getString("@class"));
mark.setName(jsonMark.getString("name"));
mark.setId(jsonMark.getString("id"));
if (jsonMark.has("position")) {
if (!jsonMark.get("position").equals(null)) {
org.json.simple.JSONObject simpleMark;
simpleMark = JsonHelper.convertToSimple(jsonMark);
MarkDeserializer markDeserializer = new MarkDeserializer(getSharedDomainFactory());
MarkInfo mark = MarkInfo.create(markDeserializer.deserialize(simpleMark), jsonMark.getString(MarkJsonSerializer.FIELD_CLASS), checkinDigest);
if (jsonMark.has(MarkJsonSerializerWithPosition.FIELD_POSITION)) {
if (!jsonMark.get(MarkJsonSerializerWithPosition.FIELD_POSITION).equals(null)) {
JSONObject positionJson = jsonMark.getJSONObject(MarkJsonSerializerWithPosition.FIELD_POSITION);
MarkPingInfo ping = new MarkPingInfo();
ping.setLatitude(positionJson.getString("latitude"));
ping.setLongitude(positionJson.getString("longitude"));
ping.setTimestamp(positionJson.getInt("timestamp"));
ping.setAccuracy(positionJson.getDouble("accuracy"));
ping.setMarkId(mark.getId());
FlatGPSFixJsonDeserializer deserializer = new FlatGPSFixJsonDeserializer();
org.json.simple.JSONObject simplePosition;
simplePosition = JsonHelper.convertToSimple(positionJson);
GPSFix gpsFix = deserializer.deserialize(simplePosition);
MarkPingInfo ping = new MarkPingInfo(mark.getId(), gpsFix, positionJson.getDouble(FlatGPSFixJsonSerializer.FIELD_ACCURACY));
pings.add(ping);
}
}
mark.setType(jsonMark.getString("type"));
marks.add(mark);
}
urlData.marks = marks;
urlData.pings = pings;
saveCheckinDataAndNotifyListeners(urlData, leaderboardName);
} catch (JSONException e) {
} catch (JSONException | ParseException | JsonDeserializationException e) {
ExLog.e(mContext, TAG, "Error getting data from call on URL: " + urlData.getMarkUrl
+ ", Error: " + e.getMessage());
if (activity != null) {
@@ -244,8 +258,7 @@ public class CheckinManager {
checkinData = data;
if (activity != null) {
activity.onCheckinDataAvailable(getCheckinData());
}
else if (dataChangedListner != null){
} else if (dataChangedListner != null){
dataChangedListner.handleData(data);
}
}
@@ -282,7 +295,7 @@ public class CheckinManager {
setCheckinData(null);
}
private String generateCheckindigest(String url) {
private String generateCheckinDigest(String url) {
String checkinDigest = "";
try {
MessageDigest md = MessageDigest.getInstance("SHA-256");
@@ -1,19 +1,9 @@
package com.sap.sailing.android.buoy.positioning.app.util;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import android.content.ContentProviderOperation;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.OperationApplicationException;
import android.database.Cursor;
import android.os.RemoteException;
import android.provider.BaseColumns;
import android.support.v4.content.LocalBroadcastManager;
import com.sap.sailing.android.buoy.positioning.app.BuildConfig;
import com.sap.sailing.android.buoy.positioning.app.R;
import com.sap.sailing.android.buoy.positioning.app.provider.AnalyticsContract;
@@ -26,6 +16,19 @@ import com.sap.sailing.android.buoy.positioning.app.valueobjects.MarkPingInfo;
import com.sap.sailing.android.shared.data.CheckinUrlInfo;
import com.sap.sailing.android.shared.data.LeaderboardInfo;
import com.sap.sailing.android.shared.logging.ExLog;
import com.sap.sailing.domain.common.tracking.impl.GPSFixImpl;
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
import android.content.ContentProviderOperation;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.OperationApplicationException;
import android.database.Cursor;
import android.os.RemoteException;
import android.provider.BaseColumns;
import android.support.v4.content.LocalBroadcastManager;
public class DatabaseHelper {
@@ -85,12 +88,12 @@ public class DatabaseHelper {
if (mc != null) {
mc.moveToFirst();
while (!mc.isAfterLast()) {
MarkInfo markInfo = new MarkInfo();
markInfo.setCheckinDigest(mc.getString((mc.getColumnIndex(Mark.MARK_CHECKIN_DIGEST))));
markInfo.setId(mc.getString((mc.getColumnIndex(Mark.MARK_ID))));
markInfo.setName(mc.getString((mc.getColumnIndex(Mark.MARK_NAME))));
markInfo.setType(mc.getString((mc.getColumnIndex(Mark.MARK_TYPE))));
markInfo.setClassName(mc.getString((mc.getColumnIndex(Mark.MARK_CLASS_NAME))));
final String markName = mc.getString((mc.getColumnIndex(Mark.MARK_NAME)));
final String markIdAsString = mc.getString(mc.getColumnIndex(Mark.MARK_ID));
final Serializable markId = Helpers.tryUuidConversion(markIdAsString);
MarkInfo markInfo = new MarkInfo(markId, markName,
mc.getString((mc.getColumnIndex(Mark.MARK_CLASS_NAME))),
checkinDigest);
marks.add(markInfo);
mc.moveToNext();
}
@@ -106,12 +109,11 @@ public class DatabaseHelper {
if (mpc != null) {
mpc.moveToFirst();
while (!mpc.isAfterLast()) {
MarkPingInfo markPingInfo = new MarkPingInfo();
markPingInfo.setMarkId(markID);
markPingInfo.setTimestamp(mpc.getInt((mpc.getColumnIndex(MarkPing.MARK_PING_TIMESTAMP))));
markPingInfo.setLongitude(mpc.getString((mpc.getColumnIndex(MarkPing.MARK_PING_LONGITUDE))));
markPingInfo.setLatitude(mpc.getString((mpc.getColumnIndex(MarkPing.MARK_PING_LATITUDE))));
markPingInfo.setAccuracy(mpc.getDouble((mpc.getColumnIndex(MarkPing.MARK_PING_ACCURACY))));
long timeStamp = Long.parseLong(mpc.getString((mpc.getColumnIndex(MarkPing.MARK_PING_TIMESTAMP))));
double longitude = Double.parseDouble(mpc.getString((mpc.getColumnIndex(MarkPing.MARK_PING_LONGITUDE))));
double latitude = Double.parseDouble(mpc.getString((mpc.getColumnIndex(MarkPing.MARK_PING_LATITUDE))));
MarkPingInfo markPingInfo = new MarkPingInfo(markID, GPSFixImpl.create(longitude, latitude, timeStamp),
mpc.getDouble((mpc.getColumnIndex(MarkPing.MARK_PING_ACCURACY))));
marks.add(markPingInfo);
mpc.moveToNext();
}
@@ -120,12 +122,12 @@ public class DatabaseHelper {
return marks;
}
public void deletePingsFromDataBase(Context context, String markID) {
public void deletePingsFromDataBase(Context context, String markIdAsString) {
ContentResolver cr = context.getContentResolver();
int d1 = cr.delete(MarkPing.CONTENT_URI, MarkPing.MARK_ID + " = ?", new String[] { markID });
int d1 = cr.delete(MarkPing.CONTENT_URI, MarkPing.MARK_ID + " = ?", new String[] { markIdAsString });
if (BuildConfig.DEBUG) {
ExLog.i(context, TAG, "Checkout, number of markpings for mark: " + markID + " deleted: " + d1);
ExLog.i(context, TAG, "Checkout, number of markpings for mark: " + markIdAsString + " deleted: " + d1);
}
}
@@ -135,7 +137,7 @@ public class DatabaseHelper {
List<MarkInfo> marks = getMarks(context, checkinDigest);
for (MarkInfo mark : marks) {
deletePingsFromDataBase(context, mark.getId());
deletePingsFromDataBase(context, mark.getId().toString());
}
int d2 = cr.delete(Leaderboard.CONTENT_URI, Leaderboard.LEADERBOARD_CHECKIN_DIGEST + " = ?", new String[] { checkinDigest });
@@ -184,9 +186,9 @@ public class DatabaseHelper {
for (MarkInfo mark : markList) {
ContentValues cmv = new ContentValues();
cmv.put(Mark.MARK_CHECKIN_DIGEST, mark.getCheckinDigest());
cmv.put(Mark.MARK_ID, mark.getId());
cmv.put(Mark.MARK_ID, mark.getId().toString());
cmv.put(Mark.MARK_NAME, mark.getName());
cmv.put(Mark.MARK_TYPE, mark.getType());
cmv.put(Mark.MARK_TYPE, mark.getType().toString());
cmv.put(Mark.MARK_CLASS_NAME, mark.getClassName());
opList.add(ContentProviderOperation.newInsert(Mark.CONTENT_URI).withValues(cmv).build());
@@ -219,7 +221,7 @@ public class DatabaseHelper {
private void deleteMark(Context context, MarkInfo markInfo) {
ContentResolver cr = context.getContentResolver();
cr.delete(Mark.CONTENT_URI, Mark.MARK_ID + " = ?", new String[] { markInfo.getId() });
cr.delete(Mark.CONTENT_URI, Mark.MARK_ID + " = ?", new String[] { markInfo.getId().toString() });
if (BuildConfig.DEBUG) {
ExLog.i(context, TAG, "Deleted mark with id: " + markInfo.getId());
@@ -246,14 +248,14 @@ public class DatabaseHelper {
for (MarkInfo mark : markList) {
ContentValues cmv = new ContentValues();
cmv.put(Mark.MARK_CHECKIN_DIGEST, mark.getCheckinDigest());
cmv.put(Mark.MARK_ID, mark.getId());
cmv.put(Mark.MARK_ID, mark.getId().toString());
cmv.put(Mark.MARK_NAME, mark.getName());
cmv.put(Mark.MARK_TYPE, mark.getType());
cmv.put(Mark.MARK_TYPE, mark.getType().toString());
cmv.put(Mark.MARK_CLASS_NAME, mark.getClassName());
if (!dataBaseContainsMark(context, mark)) {
cr.insert(Mark.CONTENT_URI, cmv);
} else {
cr.update(Mark.CONTENT_URI, cmv, Mark.MARK_ID + " = ?", new String[] { mark.getId() });
cr.update(Mark.CONTENT_URI, cmv, Mark.MARK_ID + " = ?", new String[] { mark.getId().toString() });
}
}
LocalBroadcastManager.getInstance(context.getApplicationContext()).sendBroadcast(new Intent(context.getString(R.string.database_changed)));
@@ -261,7 +263,7 @@ public class DatabaseHelper {
private boolean dataBaseContainsMark(Context context, MarkInfo mark) {
Cursor contentResolver = context.getContentResolver().query(Mark.CONTENT_URI, null, Mark.MARK_CHECKIN_DIGEST + " = ?" +
" AND " + Mark.MARK_ID + " = ? ", new String[] { mark.getCheckinDigest(), mark.getId() }, "");
" AND " + Mark.MARK_ID + " = ? ", new String[] { mark.getCheckinDigest(), mark.getId().toString() }, "");
int count = 0;
if (contentResolver != null) {
count = contentResolver.getCount();
@@ -273,10 +275,10 @@ public class DatabaseHelper {
public void storeMarkPing(Context context, MarkPingInfo markPing) throws GeneralDatabaseHelperException {
ContentResolver cr = context.getContentResolver();
deletePingsFromDataBase(context, markPing.getMarkId());
deletePingsFromDataBase(context, markPing.getMarkId().toString());
ArrayList<ContentProviderOperation> opList = new ArrayList<>();
ContentValues mpcv = new ContentValues();
mpcv.put(MarkPing.MARK_ID, markPing.getMarkId());
mpcv.put(MarkPing.MARK_ID, markPing.getMarkId().toString());
mpcv.put(MarkPing.MARK_PING_LATITUDE, markPing.getLatitude());
mpcv.put(MarkPing.MARK_PING_LONGITUDE, markPing.getLongitude());
mpcv.put(MarkPing.MARK_PING_ACCURACY, markPing.getAccuracy());
@@ -1,14 +1,10 @@
package com.sap.sailing.android.buoy.positioning.app.util;
import java.util.Date;
import java.util.UUID;
import org.json.JSONException;
import org.json.JSONObject;
import android.content.Context;
import android.location.Location;
import com.sap.sailing.android.buoy.positioning.app.util.DatabaseHelper.GeneralDatabaseHelperException;
import com.sap.sailing.android.buoy.positioning.app.valueobjects.MarkInfo;
import com.sap.sailing.android.buoy.positioning.app.valueobjects.MarkPingInfo;
@@ -17,6 +13,10 @@ import com.sap.sailing.android.shared.logging.ExLog;
import com.sap.sailing.android.shared.services.sending.MessageSendingService;
import com.sap.sailing.android.shared.services.sending.ServerReplyCallback;
import com.sap.sailing.domain.common.tracking.impl.FlatSmartphoneUuidAndGPSFixMovingJsonSerializer;
import com.sap.sailing.domain.common.tracking.impl.GPSFixImpl;
import android.content.Context;
import android.location.Location;
public class PingHelper {
private static String TAG = PingHelper.class.getName();
@@ -25,13 +25,10 @@ public class PingHelper {
AppPreferences prefs = new AppPreferences(context);
try {
JSONObject fixJson = new JSONObject();
fixJson.put(FlatSmartphoneUuidAndGPSFixMovingJsonSerializer.TIME_MILLIS, new Date().getTime());
fixJson.put(FlatSmartphoneUuidAndGPSFixMovingJsonSerializer.TIME_MILLIS, location.getTime());
fixJson.put(FlatSmartphoneUuidAndGPSFixMovingJsonSerializer.LON_DEG, location.getLongitude());
fixJson.put(FlatSmartphoneUuidAndGPSFixMovingJsonSerializer.LAT_DEG, location.getLatitude());
String postUrlStr = leaderBoard.serverUrl + prefs.getServerMarkPingPath(leaderBoard.name, mark.getId());
String postUrlStr = leaderBoard.serverUrl + prefs.getServerMarkPingPath(leaderBoard.name, mark.getId().toString());
context.startService(MessageSendingService.createMessageIntent(context, postUrlStr, null,
UUID.randomUUID(), fixJson.toString(), callback));
@@ -41,12 +38,8 @@ public class PingHelper {
}
public Boolean storePingInDatabase(Context context, Location location, MarkInfo mark) {
MarkPingInfo pingInfo = new MarkPingInfo();
pingInfo.setMarkId(mark.getId());
pingInfo.setLatitude("" + location.getLatitude());
pingInfo.setLongitude("" + location.getLongitude());
pingInfo.setAccuracy(location.getAccuracy());
pingInfo.setTimestamp((int) location.getTime());
MarkPingInfo pingInfo = new MarkPingInfo(mark.getId(),
GPSFixImpl.create(location.getLongitude(), location.getLatitude(), location.getTime()), location.getAccuracy());
try {
DatabaseHelper.getInstance().storeMarkPing(context, pingInfo);
} catch (GeneralDatabaseHelperException e) {
@@ -1,53 +1,47 @@
package com.sap.sailing.android.buoy.positioning.app.valueobjects;
public class MarkInfo {
import java.io.Serializable;
private String markId;
private String name;
private String type;
private String className;
private String checkinDigest;
import com.sap.sailing.domain.base.Mark;
import com.sap.sailing.domain.base.impl.MarkImpl;
import com.sap.sailing.domain.common.MarkType;
public String getId() {
return markId;
public class MarkInfo extends MarkImpl {
private static final long serialVersionUID = 6139266956501048794L;
private final String className;
private final String checkinDigest;
public static MarkInfo create(Mark mark, String classname, String checkinDigest) {
return new MarkInfo(mark.getId(), mark.getName(), mark.getType(), mark.getColor(), mark.getShape(), mark.getPattern(), classname, checkinDigest);
}
public void setId(String id) {
this.markId = id;
public MarkInfo(String name) {
super(name);
className = null;
checkinDigest = null;
}
public String getName() {
return name;
public MarkInfo(Serializable id, String name, String classname, String checkinDigest) {
super(id, name);
this.className = classname;
this.checkinDigest = checkinDigest;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
public MarkInfo(Serializable id, String name, MarkType type, String color, String shape, String pattern, String classname, String checkinDigest) {
super(id, name, type, color, shape, pattern);
this.className = classname;
this.checkinDigest = checkinDigest;
}
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public String getCheckinDigest() {
return checkinDigest;
}
public void setCheckinDigest(String checkinDigest) {
this.checkinDigest = checkinDigest;
}
@Override
public boolean equals(Object o) {
if (this == o)
@@ -55,27 +49,23 @@ public class MarkInfo {
if (o == null || getClass() != o.getClass())
return false;
MarkInfo info = (MarkInfo) o;
MarkInfo markInfo = (MarkInfo) o;
if (markId != null ? !markId.equals(info.markId) : info.markId != null)
if(!super.equals(markInfo)) {
return false;
if (name != null ? !name.equals(info.name) : info.name != null)
}
if (!className.equals(markInfo.className))
return false;
if (type != null ? !type.equals(info.type) : info.type != null)
return false;
if (className != null ? !className.equals(info.className) : info.className != null)
return false;
return !(checkinDigest != null ? !checkinDigest.equals(info.checkinDigest) : info.checkinDigest != null);
return checkinDigest.equals(markInfo.checkinDigest);
}
@Override
public int hashCode() {
int result = markId != null ? markId.hashCode() : 0;
result = 31 * result + (name != null ? name.hashCode() : 0);
result = 31 * result + (type != null ? type.hashCode() : 0);
result = 31 * result + (className != null ? className.hashCode() : 0);
result = 31 * result + (checkinDigest != null ? checkinDigest.hashCode() : 0);
int result = super.hashCode();
result = 31 * result + className.hashCode();
result = 31 * result + checkinDigest.hashCode();
return result;
}
}
@@ -1,49 +1,38 @@
package com.sap.sailing.android.buoy.positioning.app.valueobjects;
public class MarkPingInfo {
private String markId;
private String longitude;
private String latitude;
private double accuracy;
private int timestamp;
import java.io.Serializable;
public String getMarkId() {
import com.sap.sailing.domain.common.tracking.GPSFix;
public class MarkPingInfo {
private final Serializable markId;
private final GPSFix gpsFix;
private final double accuracy;
public MarkPingInfo(Serializable markId, GPSFix gpsFix, double accuracy) {
super();
this.markId = markId;
this.gpsFix = gpsFix;
this.accuracy = accuracy;
}
public Serializable getMarkId() {
return markId;
}
public void setMarkId(String markId) {
this.markId = markId;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
return "" + gpsFix.getPosition().getLngDeg();
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
return "" + gpsFix.getPosition().getLatDeg();
}
public double getAccuracy() {
return accuracy;
}
public void setAccuracy(double accuracy) {
this.accuracy = accuracy;
}
public int getTimestamp() {
return timestamp;
}
public void setTimestamp(int timestamp) {
this.timestamp = timestamp;
public long getTimestamp() {
return gpsFix.getTimePoint().asMillis();
}
}
@@ -1,16 +1,15 @@
package com.sap.sailing.android.buoy.positioning.app.valueobjects;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class MarkInfoTest {
@Test
public void testMarkInfoName() {
MarkInfo markInfo = new MarkInfo();
String name = "test";
markInfo.setName(name);
MarkInfo markInfo = new MarkInfo(name);
assertEquals(markInfo.getName(), name);
}
}
@@ -1,33 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.sap.sailing.racecommittee.app"
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="13"
android:versionName="1.5">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sap.sailing.racecommittee.app"
android:versionCode="14"
android:versionName="1.6">
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="22"/>
android:targetSdkVersion="22" />
<permission
android:name="com.sap.sailing.racecommittee.app.MAPS_RECEIVE"
android:protectionLevel="signature"/>
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!--<uses-permission android:name="android.permission.CAMERA"/>-->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INTERNET" />
<!--<uses-permission android:name="android.permission.RECORD_AUDIO"/>-->
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="com.sap.sailing.racecommittee.app.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!--<uses-permission android:name="com.sap.sailing.racecommittee.app.MAPS_RECEIVE" />-->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
android:required="true" />
<uses-feature
android:name="android.hardware.camera"
android:required="false"/>
android:required="false" />
<application
android:name=".RaceApplication"
@@ -39,17 +39,16 @@
android:theme="@style/AppTheme.Light">
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
android:value="@integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDH-Dwy5yFlyBa2-VUgiZ3qGGUO8M_0MPY"/>
android:value="AIzaSyDH-Dwy5yFlyBa2-VUgiZ3qGGUO8M_0MPY" />
<activity
android:name=".ui.activities.LoginActivity">
<activity android:name=".ui.activities.LoginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
@@ -68,41 +67,43 @@
android:pathPattern="apps/com.sap.sailing.racecommittee.app.apk"/>
</intent-filter>
</activity>
<activity android:name=".ui.activities.RacingActivity"/>
<activity android:name=".ui.activities.PasswordActivity"/>
<activity android:name=".ui.activities.PreferenceActivity">
<activity android:name=".ui.activities.RacingActivity" />
<activity android:name=".ui.activities.PasswordActivity" />
<activity
android:name=".ui.activities.PreferenceActivity"
android:theme="@style/PreferenceTheme">
<intent-filter>
<action android:name="android.intent.action.MANAGE_NETWORK_USAGE"/>
<action android:name="android.intent.action.MANAGE_NETWORK_USAGE" />
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name=".ui.activities.SystemInformationActivity"/>
<activity android:name=".ui.activities.SystemInformationActivity" />
<service
android:name=".services.RaceStateService"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="com.sap.sailing.racecommittee.app.action.startProcedureSpecificAction"/>
<action android:name="com.sap.sailing.racecommittee.app.action.startProcedureSpecificAction" />
</intent-filter>
</service>
<service
android:name="com.sap.sailing.android.shared.services.sending.MessageSendingService"
android:exported="false">
<intent-filter>
<action android:name="com.sap.sailing.racecommittee.app.action.sendSavedIntents"/>
<action android:name="com.sap.sailing.racecommittee.app.action.sendMessage"/>
<action android:name="com.sap.sailing.racecommittee.app.action.sendSavedIntents" />
<action android:name="com.sap.sailing.racecommittee.app.action.sendMessage" />
</intent-filter>
<meta-data
android:name="com.sap.sailing.android.shared.services.sending.messageRestorer"
android:value="com.sap.sailing.racecommittee.app.services.sending.EventRestorer"/>
android:value="com.sap.sailing.racecommittee.app.services.sending.EventRestorer" />
</service>
<receiver android:name="com.sap.sailing.android.shared.services.sending.ConnectivityChangedReceiver">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
</application>
Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/dark_sap_gray">
<item android:drawable="@color/dark_sap_gray_black_30"/>
</ripple>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/light_sap_gray">
<item android:drawable="@color/light_sap_gray_black_30"/>
</ripple>
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/constant_light_gray_ripple">
<item android:drawable="@color/light_sap_gray_black_30"/>
</ripple>
Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 914 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1003 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- pressed -->
<item android:drawable="@color/dark_sap_gray" android:state_pressed="true" />
<!-- default -->
<item android:drawable="@color/dark_sap_gray_black_30" />
</selector>
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- pressed -->
<item android:drawable="@color/light_sap_gray" android:state_pressed="true" />
<!-- default -->
<item android:drawable="@color/light_sap_gray_black_30" />
</selector>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/constant_light_gray"/>
<padding
android:left="5dp"
android:right="5dp"
android:top="@dimen/thin_line"/>
<corners
android:bottomLeftRadius="3dp"
android:bottomRightRadius="3dp"/>
</shape>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/constant_black"/>
<padding
android:left="5dp"
android:right="5dp"
android:top="@dimen/thin_line"/>
<corners
android:bottomLeftRadius="3dp"
android:bottomRightRadius="3dp"/>
</shape>
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- pressed -->
<item android:drawable="@color/constant_light_gray_pressed" android:state_pressed="true" />
<!-- default -->
<item android:drawable="@color/light_sap_gray_black_30" />
</selector>
@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/sap_gray_black_30"
android:background="?attr/checkedItemBackground"
android:minHeight="@dimen/listView_row_min_height">
<ImageView
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/preference_item_height"
android:orientation="vertical"
android:background="@drawable/preference_background">
<TextView
android:id="@+id/preference_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="16dp"
android:drawablePadding="32dp"
android:ellipsize="end"
android:maxLines="1"
android:paddingRight="8dp"
tools:text="@string/settings_category_general" />
<View
android:id="@+id/preference_line"
android:layout_width="match_parent"
android:layout_height="@dimen/thin_line"
android:layout_alignParentBottom="true"
android:layout_marginLeft="@dimen/preference_line_margin"
android:background="@color/light_sap_gray" />
</RelativeLayout>
@@ -1,37 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="#e1e1e0"
android:orientation="vertical">
<Button
android:id="@+id/buttonGeneral"
<android.support.v7.widget.RecyclerView
android:id="@+id/preference_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:tag="com.sap.sailing.racecommittee.app.ui.fragments.preference.GeneralPreferenceFragment"
android:text="@string/settings_category_general" />
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/preference_side_margin"
android:layout_marginRight="@dimen/preference_side_margin" />
<Button
android:id="@+id/buttonRegattaDefault"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/buttonGeneral"
android:tag="com.sap.sailing.racecommittee.app.ui.fragments.preference.RegattaPreferenceFragment"
android:text="@string/settings_category_regatta_defaults" />
<Button
android:id="@+id/buttonRegatta"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/buttonRegattaDefault"
android:tag="com.sap.sailing.racecommittee.app.ui.fragments.preference.RegattaSpecificPreferenceFragment"
android:text="@string/settings_category_regattas" />
<Button
android:id="@+id/buttonCourseDesigner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/buttonRegatta"
android:tag="com.sap.sailing.racecommittee.app.ui.fragments.preference.CourseDesignerPreferenceFragment"
android:text="@string/settings_category_course_designer" />
</RelativeLayout>
</LinearLayout>
@@ -4,18 +4,16 @@
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:background="?attr/sap_gray_black_30">
android:background="@color/light_sap_gray_black_30">
<include
android:id="@+id/toolbar_layout"
layout="@layout/toolbar" />
layout="@layout/toolbar_pref" />
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/toolbar_layout"
android:layout_marginLeft="@dimen/preference_margin"
android:layout_marginRight="@dimen/preference_margin" />
android:layout_below="@id/toolbar_layout" />
</RelativeLayout>
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/sap_gray_black_30">
<com.sap.sailing.racecommittee.app.ui.layouts.HeaderLayout
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:headerText="@string/race_factor"/>
<RelativeLayout
android:id="@+id/button_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="center_vertical">
<Button
android:id="@+id/set_column_factor"
style="?attr/button"
android:layout_width="@dimen/default_button_width"
android:layout_height="@dimen/default_button_height"
android:layout_centerInParent="true"
android:layout_margin="@dimen/unscheduled_confirm_button_margin"
android:text="@string/set_column_factor"
android:textSize="@dimen/textSize_18"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/button_bar"
android:layout_below="@id/header">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_margin="@dimen/default_margin_twice">
<com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout
android:layout_width="200dp"
android:layout_height="wrap_content"
app:floatLabelPaddingLeft="@dimen/float_label_padding"
app:floatLabelTextAppearance="?attr/floatLabel">
<EditText
android:id="@+id/column_factor"
style="?attr/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_gravity="center_vertical"
android:hint="@string/race_factor"
android:inputType="numberDecimal"
android:textAppearance="?attr/textNormal"
android:textColor="?attr/white"/>
</com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/button_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="center_vertical"
android:background="?attr/sap_gray_black_30">
<Button
android:id="@+id/set_column_factor"
style="?attr/buttonSolidNormal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_margin="@dimen/unscheduled_confirm_button_margin"
android:text="@string/set_column_factor"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/button_bar"
android:background="?attr/sap_gray_black_30">
<com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
app:floatLabelPaddingLeft="@dimen/float_label_padding"
app:floatLabelTextAppearance="?attr/floatLabel">
<EditText
android:id="@+id/column_factor"
style="?attr/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:hint="@string/race_factor"
android:inputType="numberDecimal"
android:textAppearance="?attr/textNormal"
android:textColor="?attr/white"/>
</com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout>
</RelativeLayout>
</RelativeLayout>
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/navigation_drawer_cell_height">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/navigation_drawer_cell_height">
<RelativeLayout
android:id="@+id/panel_right"
@@ -24,7 +24,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textAppearance="?attr/textXLarge"
tools:text="13:36" />
tools:text="13:36"/>
<TextView
android:id="@+id/race_started"
@@ -32,7 +32,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/race_started"
android:textAppearance="?attr/textXSmall" />
android:textAppearance="?attr/textXSmall"/>
<TextView
android:id="@+id/race_finished"
@@ -40,7 +40,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/race_finished"
android:textAppearance="?attr/textXSmall" />
android:textAppearance="?attr/textXSmall"/>
</LinearLayout>
<TextView
@@ -51,7 +51,7 @@
android:text="@string/race_unscheduled"
android:textColor="?attr/sap_light_gray"
android:textSize="@dimen/textSize_18"
android:visibility="gone" />
android:visibility="gone"/>
<ImageView
android:id="@+id/update_badge"
@@ -62,7 +62,7 @@
android:scaleType="matrix"
android:src="@drawable/updated"
android:visibility="gone"
tools:visibility="visible" />
tools:visibility="visible"/>
</RelativeLayout>
<RelativeLayout
@@ -76,7 +76,7 @@
android:id="@+id/race_marker"
android:layout_width="@dimen/obesity_line"
android:layout_height="match_parent"
android:src="?attr/marker_race" />
android:src="?attr/marker_race"/>
<LinearLayout
android:id="@+id/additional_info"
@@ -93,7 +93,7 @@
android:layout_margin="5dp"
android:src="?attr/link_24dp"
android:visibility="gone"
tools:visibility="visible" />
tools:visibility="visible"/>
<LinearLayout
android:id="@+id/race_flag"
@@ -110,7 +110,7 @@
android:layout_height="25dp"
android:layout_gravity="center"
android:scaleType="centerInside"
tools:src="@drawable/flag_alpha_64dp" />
tools:src="@drawable/flag_alpha_64dp"/>
<TextView
android:id="@+id/flag_timer"
@@ -119,7 +119,7 @@
android:layout_gravity="center"
android:drawableLeft="?attr/arrow_down"
android:textAppearance="?attr/textXSmall"
tools:text="01:12" />
tools:text="01:12"/>
</LinearLayout>
</LinearLayout>
@@ -141,7 +141,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="?attr/textNormal"
tools:text="Race 3" />
tools:text="Race 3"/>
<TextView
android:id="@+id/depends_on"
@@ -152,13 +152,23 @@
android:textAppearance="?attr/textXSmall"
android:visibility="gone"
tools:text="5 minutes after ABC"
tools:visibility="visible" />
tools:visibility="visible"/>
</LinearLayout>
</RelativeLayout>
<TextView
android:id="@+id/explicit_factor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="?attr/factor_background"
android:textAppearance="?attr/textXSmall"
android:textColor="?attr/white_invert"
tools:text="x 3.5"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="@dimen/thin_line"
android:layout_alignParentBottom="true"
android:background="?attr/black" />
android:background="?attr/black"/>
</RelativeLayout>
@@ -26,7 +26,7 @@
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_margin="@dimen/default_margin"
android:src="@drawable/ic_change_role_white_48dp"/>
android:src="@drawable/ic_refresh_white_48dp"/>
<TextView
android:id="@+id/regatta_data"
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
@@ -10,6 +10,15 @@
android:baselineAligned="false"
android:orientation="horizontal">
<com.sap.sailing.racecommittee.app.ui.views.PanelButton
android:id="@+id/button_factor"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
app:buttonHeader="@string/race_factor"
app:buttonType="typeValue"
app:linePosition="right" />
<com.sap.sailing.racecommittee.app.ui.views.PanelButton
android:id="@+id/button_course"
android:layout_width="0dp"
@@ -17,7 +26,7 @@
android:layout_weight="1"
app:buttonHeader="@string/course"
app:buttonType="typeValue"
app:linePosition="right"/>
app:linePosition="right" />
<com.sap.sailing.racecommittee.app.ui.views.PanelButton
android:id="@+id/button_wind"
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -16,7 +15,7 @@
android:layout_height="0dp"
android:layout_weight="1"
app:buttonHeader="@string/start_procedure"
app:buttonType="typeValue"/>
app:buttonType="typeValue" />
<com.sap.sailing.racecommittee.app.ui.views.PanelButton
android:id="@+id/button_mode"
@@ -51,6 +50,14 @@
app:buttonSwitch=""
app:buttonType="typeSwitch" />
<com.sap.sailing.racecommittee.app.ui.views.PanelButton
android:id="@+id/button_factor"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
app:buttonHeader="@string/race_factor"
app:buttonType="typeValue" />
<com.sap.sailing.racecommittee.app.ui.views.PanelButton
android:id="@+id/button_course"
android:layout_width="match_parent"
@@ -66,7 +73,6 @@
android:layout_weight="1"
app:buttonHeader="@string/wind"
app:buttonType="typeValue" />
</LinearLayout>
<View
@@ -70,7 +70,8 @@
android:id="@+id/competitor_score"
android:layout_width="@dimen/competitor_edit_width"
android:layout_height="wrap_content"
android:inputType="numberDecimal"/>
android:inputType="numberDecimal"
android:textColor="?attr/white"/>
</LinearLayout>
<LinearLayout
@@ -158,6 +159,7 @@
android:id="@+id/competitor_comment"
android:layout_width="@dimen/competitor_edit_width"
android:layout_height="wrap_content"
android:inputType="text"/>
android:inputType="text"
android:textColor="?attr/white"/>
</LinearLayout>
</LinearLayout>
@@ -70,6 +70,7 @@
android:layout_height="wrap_content"
android:hint="@string/score"
android:inputType="numberDecimal"
android:textColor="?attr/white"
android:textColorHint="@color/dialog_color_text"/>
</com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout>
</LinearLayout>
@@ -161,6 +162,7 @@
android:layout_height="wrap_content"
android:hint="@string/comment"
android:inputType="text"
android:textColor="?attr/white"
android:textColorHint="@color/dialog_color_text"/>
</com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout>
</LinearLayout>
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/toolbar_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
app:theme="@style/ToolBarStyle"
app:popupTheme="@style/Theme.AppCompat.Light">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
tools:text="AUSWAHL"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:gravity="center"
android:minHeight="?attr/actionBarSize"
android:orientation="horizontal">
<ProgressBar
android:id="@+id/progress_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:indeterminate="true"
android:visibility="gone"/>
</LinearLayout>
</android.support.v7.widget.Toolbar>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/thick_line"
android:layout_below="@id/toolbar"
android:background="@color/sap_yellow"/>
</RelativeLayout>
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/toolbar_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
app:theme="@style/ToolBarRacingStyle"
app:popupTheme="@style/Theme.AppCompat.Light"
app:titleTextAppearance="@style/RacingToolBarTitle">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
tools:text="AUSWAHL"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:gravity="center"
android:minHeight="?attr/actionBarSize"
android:orientation="horizontal">
<ProgressBar
android:id="@+id/progress_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:indeterminate="true"
android:visibility="gone"/>
</LinearLayout>
</android.support.v7.widget.Toolbar>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/thick_line"
android:layout_below="@id/toolbar"
android:background="@color/sap_yellow"/>
</RelativeLayout>
@@ -3,17 +3,21 @@
<item
android:id="@+id/options_menu_reset"
android:title="@string/reset_race"/>
android:title="@string/reset_race" />
<item
android:id="@+id/options_menu_settings"
android:title="@string/options_menu_settings"/>
android:title="@string/options_menu_settings" />
<item
android:id="@+id/options_menu_info"
android:title="@string/options_menu_info"/>
android:title="@string/options_menu_info" />
<item
android:id="@+id/options_menu_role"
android:title="@string/options_menu_role" />
<item
android:id="@+id/options_menu_logout"
android:title="@string/logout"/>
android:title="@string/logout" />
</menu>
@@ -437,6 +437,8 @@
<string name="preference_allow_dependent_races_header">Relative Startzeit</string>
<string name="preference_allow_dependent_races_description">Aktiviert relative Startzeiten zwischen Rennen</string>
<string name="preference_dependent_races_offset_header">Standard Offset der relativen Startzeit (Minuten)</string>
<string name="preference_allow_edit_race_factor_header">Rennfaktor ändern</string>
<string name="preference_allow_edit_race_factor_description">Rennleiter können den Rennfaktor je Rennen ändern</string>
<string name="error_finished_time">Die ausgewählte Zielzeit liegt vor der Zeit, der ersten Schiffeinfahrt. Bitte überprüfe die Uhrzeit.</string>
<string name="error_finishing_time">Die ausgewählte Zeit is vor dem Rennstart. Bitte überprüfe die Uhrzeit.</string>
<string name="error_time_in_future">Die ausgewählte Zeit liegt in der Zukunft. Bitte überprüfe die Uhrzeit.</string>
@@ -500,9 +502,14 @@
<string name="preference_non_public_events_header">Zeige nicht öffentliche Events</string>
<string name="preference_non_public_events_summary">Lade alle Events, auch die nicht öffentlichen.</string>
<string name="race_factor">Faktor</string>
<string name="options_menu_role">Rolle wechseln</string>
<string name="reload_config">Konfiguration vom Server laden</string>
<string name="abort_title">Rennen abbrechen</string>
<string name="abort_hint">Welche laufenden Rennen möchten Sie abbrechen?</string>
<string name="abort_dismiss">Verwerfen</string>
<string name="set_column_factor">Setze Faktor</string>
<string name="set_factor_error">Beim Setzen des Faktors ist ein Fehler aufgetreten: %s</string>
</resources>
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item name="preference_columns" format="integer" type="integer">2</item>
<dimen name="navigation_drawer_width">500dp</dimen>
<dimen name="side_button_lockSize">16dp</dimen>
@@ -17,6 +17,10 @@
<dimen name="switch_height">40dp</dimen>
<dimen name="switch_padding">16dp</dimen>
<dimen name="preference_margin">16dp</dimen>
<dimen name="preference_line_margin">0dp</dimen>
<item name="preference_columns" format="integer" type="integer">1</item>
<!-- race state dependent -->
<!-- login -->
<dimen name="login_text_size_small">@dimen/textSize_22</dimen>
@@ -15,8 +15,6 @@
<dimen name="header_line">@dimen/thick_line</dimen>
<dimen name="preference_margin">0dp</dimen>
<dimen name="panel_text_padding">5dp</dimen>
<dimen name="textSize_14">14sp</dimen> <!-- XXSmall -->
@@ -48,6 +46,9 @@
<dimen name="flags">96dp</dimen>
<dimen name="preference_side_margin">72dp</dimen>
<item name="preference_columns" format="integer" type="integer">2</item>
<!-- custom dimens (float, integer) -->
<item name="picker_scale" format="float" type="integer">1.55</item>
<item name="flag_size" format="integer" type="integer">48</item>
@@ -14,8 +14,10 @@
<item name="race_panel_time" type="layout">@layout/race_panel_time_xlarge</item>
<item name="race_positioning" type="layout">@layout/race_tracking_list_normal</item>
<item name="race_schedule_button" type="layout">@layout/race_schedule_button_xlarge</item>
<item name="race_column_factor" type="layout">@layout/race_column_factor_normal</item>
<item name="race_schedule_procedure_pathfinder" type="layout">@layout/race_schedule_procedure_pathfinder_xlarge</item>
<item name="race_schedule_procedure_timing" type="layout">@layout/race_schedule_procedure_timing_xlarge</item>
<item name="toolbar" type="layout">@layout/toolbar_xlarge</item>
<item name="toolbar_pref" type="layout">@layout/toolbar_pref_xlarge</item>
</resources>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="PreferenceTheme" parent="PreferenceBase">
<item name="android:windowTranslucentStatus">true</item>
</style>
</resources>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="PreferenceTheme" parent="PreferenceBase">
<item name="android:colorPrimary">@color/light_colorPrimary</item>
<item name="android:colorPrimaryDark">@color/light_colorPrimaryDark</item>
<item name="android:colorAccent">@color/light_colorAccent</item>
<item name="android:windowTranslucentStatus">true</item>
</style>
</resources>
@@ -9,6 +9,8 @@
<item name="android:windowTranslucentStatus">true</item>
<item name="android:alertDialogTheme">@style/AppTheme.Dark.AlertDialog.v21</item>
<item name="checkedItemBackground">@drawable/checked_item_background_dark_ripple</item>
</style>
<style name="AppTheme.Dark.AlertDialog.v21" parent="Theme.AppCompat.Light.Dialog">
@@ -10,6 +10,8 @@
<item name="android:windowTranslucentStatus">true</item>
<item name="android:alertDialogTheme">@style/AppTheme.Light.AlertDialog.v21</item>
<item name="checkedItemBackground">@drawable/checked_item_background_light_ripple</item>
</style>
<style name="AppTheme.Light.AlertDialog.v21" parent="Theme.AppCompat.Light.Dialog">
@@ -21,6 +21,7 @@
<attr name="buttonSolidXSmall" format="reference"/>
<attr name="buttonSolidSmall" format="reference"/>
<attr name="buttonSolidNormal" format="reference"/>
<attr name="checkedItemBackground" format="reference"/>
<attr name="round" format="reference"/>
<attr name="round_transparent" format="reference"/>
<attr name="text" format="reference"/>
@@ -38,6 +39,8 @@
<attr name="editText" format="reference"/>
<attr name="floatLabel" format="reference"/>
<attr name="factor_background" format="reference"/>
<!-- drawable -->
<attr name="add" format="reference"/>
<attr name="access_time_18dp" format="reference"/>
@@ -16,8 +16,6 @@
<dimen name="header_line">@dimen/thin_line</dimen>
<dimen name="preference_margin">0dp</dimen>
<dimen name="panel_text_padding">5dp</dimen>
<dimen name="thin_line">1dp</dimen>
@@ -104,6 +102,12 @@
<dimen name="switch_height">32dp</dimen>
<dimen name="switch_padding">8dp</dimen>
<dimen name="preference_side_margin">0dp</dimen>
<dimen name="preference_margin">0dp</dimen>
<dimen name="preference_line_margin">72dp</dimen>
<dimen name="preference_item_height">72dp</dimen>
<item name="preference_columns" format="integer" type="integer">1</item>
<!-- race state dependent -->
<!-- login -->
<dimen name="login_text_size_small">@dimen/textSize_18</dimen>
@@ -97,6 +97,8 @@
<bool name="preference_allow_dependent_races_default">true</bool>
<string name="preference_dependent_races_offset_key" translatable="false">dependentRacesOffset</string>
<integer name="preference_dependent_races_offset_default">5</integer>
<string name="preference_allow_edit_race_factor_key" translatable="false">raceFactor</string>
<bool name="preference_allow_edit_race_factor_default">true</bool>
<string name="preference_allow_demo_key" translatable="false">allow_demo</string>
<bool name="preference_allow_demo_default">false</bool>
@@ -121,4 +123,8 @@
<string name="preference_non_public_events_key" translatable="false">show_non_public_events</string>
<bool name="preference_non_public_events_default">false</bool>
<string name="preference_config_needs_refresh_key" translatable="false">config_refresh</string>
<bool name="preference_config_needs_refresh_default" translatable="false">true</bool>
</resources>
@@ -10,6 +10,7 @@
<item name="login_listviews_button" type="layout">@layout/login_listviews_button_normal</item>
<item name="photo_list_button" type="layout">@layout/photo_list_button_normal</item>
<item name="photo_list_item" type="layout">@layout/photo_list_item_normal</item>
<item name="race_column_factor" type="layout">@layout/race_column_factor_normal</item>
<item name="race_finished" type="layout">@layout/race_finished_normal</item>
<item name="race_finished_buttons" type="layout">@layout/race_finished_buttons_hor</item>
<item name="race_finished_desc" type="layout">@layout/race_finished_desc_hor</item>
@@ -29,6 +30,7 @@
<item name="race_schedule_start_time" type="layout">@layout/race_schedule_start_time_normal</item>
<item name="race_time_picker" type="layout">@layout/race_time_picker_normal</item>
<item name="toolbar" type="layout">@layout/toolbar_normal</item>
<item name="toolbar_pref" type="layout">@layout/toolbar_pref_normal</item>
<item name="wind_view" type="layout">@layout/wind_view_normal</item>
<item name="system_information_view" type="layout">@layout/system_information_view_normal</item>
@@ -459,6 +459,8 @@
<string name="preference_allow_dependent_races_header">Relative Start Time (Minutes)</string>
<string name="preference_allow_dependent_races_description">Enable Relative Start Time between Races</string>
<string name="preference_dependent_races_offset_header">Default Relative Start Time Offset</string>
<string name="preference_allow_edit_race_factor_header">Race factor change</string>
<string name="preference_allow_edit_race_factor_description">Race managers can change the race factor per race</string>
<string name="error_finished_time">The given finish time is earlier than the first finisher time. Please recheck the time.</string>
<string name="error_finishing_time">The selected time is before the race start.</string>
<string name="error_time_in_future">The given time is in future. Please recheck the time.</string>
@@ -528,8 +530,14 @@
<string name="preference_non_public_events_header">Show Non Public Events</string>
<string name="preference_non_public_events_summary">Load all events including the no public one.</string>
<string name="race_factor">Factor</string>
<string name="options_menu_role">Change Regatta</string>
<string name="reload_config">Reload Configuration from Server</string>
<string name="abort_title">Abort Races</string>
<string name="abort_hint">Which running races do you want to abort?</string>
<string name="abort_dismiss">Dismiss</string>
<string name="race_factor_format" translatable="false">x #.####</string>
<string name="set_column_factor">Set Factor</string>
<string name="set_factor_error">There was an error while setting the factor: %s</string>
</resources>
Loaded 100 of 289 files, more files were not shown because too many files have changed in this diff. Show more