mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-19 20:25:31 +00:00
Merge branch 'master' into bug3791
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/fiori_main_background">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/fiori_main_background">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/homeBackground"
|
||||
@@ -12,8 +12,7 @@
|
||||
android:layout_alignParentTop="true"
|
||||
android:contentDescription="@string/empty"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/working_title"/>
|
||||
|
||||
android:src="@drawable/working_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/scan_hint_text"
|
||||
@@ -21,9 +20,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="@dimen/home_land_margin"
|
||||
android:paddingBottom="@dimen/home_land_margin"
|
||||
android:text="@string/scan_hint"
|
||||
android:textColor="@color/fiori_text_color"/>
|
||||
android:textColor="@color/fiori_text_color" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/two_buttons_layout"
|
||||
@@ -32,13 +31,13 @@
|
||||
android:layout_above="@+id/scan_hint_text"
|
||||
android:layout_marginBottom="@dimen/home_land_margin"
|
||||
android:layout_marginTop="@dimen/home_land_margin"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/noQrCode"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/home_button_height"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/home_land_margin"
|
||||
android:layout_marginRight="@dimen/home_land_margin"
|
||||
android:layout_weight="0.4"
|
||||
@@ -46,24 +45,20 @@
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:text="@string/no_qr_code"
|
||||
android:textColor="@color/fiori_text_color"/>
|
||||
android:textColor="@color/fiori_text_color" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/scanQr"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/home_button_height"
|
||||
android:layout_marginLeft="@dimen/home_land_margin"
|
||||
android:layout_marginRight="@dimen/home_land_margin"
|
||||
android:layout_weight="0.6"
|
||||
android:background="@drawable/blue_button"
|
||||
android:text="@string/scan_qr"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listRegatta"
|
||||
android:layout_width="match_parent"
|
||||
@@ -71,8 +66,6 @@
|
||||
android:layout_above="@id/two_buttons_layout"
|
||||
android:layout_alignParentTop="true"
|
||||
android:divider="@color/separator_color"
|
||||
android:dividerHeight="1dp"
|
||||
>
|
||||
</ListView>
|
||||
android:dividerHeight="1dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,21 +1,20 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.OpenSansToolbar
|
||||
android:id="@+id/toolbar"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/toolbar_height"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/toolbar_height"
|
||||
android:theme="@style/AppTheme.Toolbar">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<TextView
|
||||
@@ -23,35 +22,32 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:lines="1"
|
||||
android:singleLine="true"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/toolbar_text_color"
|
||||
android:textSize="16sp"/>
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolbar_subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:lines="1"
|
||||
android:singleLine="true"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/toolbar_text_color"
|
||||
android:textSize="12sp"/>
|
||||
|
||||
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</com.sap.sailing.android.shared.ui.customviews.OpenSansToolbar>
|
||||
|
||||
<View
|
||||
android:id="@+id/toolbar_separator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/toolbar_separator_height"
|
||||
android:background="@color/separator_color"/>
|
||||
android:background="@color/separator_color" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/content_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/fiori_main_background">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/fiori_main_background">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/homeBackground"
|
||||
@@ -11,12 +11,12 @@
|
||||
android:layout_above="@+id/scanQr"
|
||||
android:contentDescription="@string/empty"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/working_title"/>
|
||||
android:src="@drawable/working_title" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/bottomLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
@@ -28,10 +28,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/scan_hint"
|
||||
android:textColor="@color/fiori_text_color"
|
||||
android:textSize="@dimen/default_text_size"/>
|
||||
android:textSize="@dimen/default_text_size" />
|
||||
</RelativeLayout>
|
||||
|
||||
<Button
|
||||
@@ -45,7 +46,7 @@
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/blue_button"
|
||||
android:text="@string/scan_qr"
|
||||
android:textSize="@dimen/highlight_text_size"/>
|
||||
android:textSize="@dimen/highlight_text_size" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/noQrCode"
|
||||
@@ -59,7 +60,7 @@
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:text="@string/no_qr_code"
|
||||
android:textColor="@color/fiori_text_color"
|
||||
android:textSize="@dimen/button_text_size"/>
|
||||
android:textSize="@dimen/button_text_size" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listRegatta"
|
||||
@@ -68,6 +69,6 @@
|
||||
android:layout_above="@id/scanQr"
|
||||
android:layout_alignParentTop="true"
|
||||
android:divider="@color/separator_color"
|
||||
android:dividerHeight="1dp"/>
|
||||
android:dividerHeight="1dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -3,4 +3,5 @@
|
||||
<dimen name="home_button_height">80dp</dimen>
|
||||
<dimen name="qr_code_label_height">50dp</dimen>
|
||||
<dimen name="home_land_margin">10dp</dimen>
|
||||
<dimen name="home_land_margin_half">5dp</dimen>
|
||||
</resources>
|
||||
@@ -37,6 +37,7 @@
|
||||
<dimen name="list_header_height">50dp</dimen>
|
||||
<dimen name="list_row_height">80dp</dimen>
|
||||
<dimen name="list_arrow_right_margin">10dp</dimen>
|
||||
<dimen name="list_side_margin">5dp</dimen>
|
||||
|
||||
<!-- Values for buttons -->
|
||||
<dimen name="about_button_top_bottom_margin">10dp</dimen>
|
||||
|
||||
+4
-7
@@ -7,7 +7,6 @@ import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
|
||||
import com.sap.sailing.android.shared.R;
|
||||
import com.sap.sailing.android.shared.logging.ExLog;
|
||||
|
||||
public abstract class AbstractBaseActivity extends SendingServiceAwareActivity {
|
||||
@@ -55,19 +54,17 @@ public abstract class AbstractBaseActivity extends SendingServiceAwareActivity {
|
||||
}
|
||||
|
||||
public void showErrorPopup(String title, String message) {
|
||||
new AlertDialog.Builder(this, R.style.AppTheme_AlertDialog)
|
||||
new AlertDialog.Builder(this)
|
||||
.setTitle(title)
|
||||
.setMessage(message)
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
}).create();
|
||||
|
||||
dialog.show();
|
||||
}).show();
|
||||
}
|
||||
|
||||
public void showErrorPopup(int string1Id, int string2Id) {
|
||||
showErrorPopup(getString(string1Id), getString(string2Id));
|
||||
public void showErrorPopup(int title, int message) {
|
||||
showErrorPopup(getString(title), getString(message));
|
||||
}
|
||||
}
|
||||
|
||||
+56
-29
@@ -19,6 +19,7 @@ import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
@@ -39,6 +40,7 @@ import com.sap.sailing.android.shared.data.BaseCheckinData;
|
||||
import com.sap.sailing.android.shared.data.CheckinUrlInfo;
|
||||
import com.sap.sailing.android.shared.data.LeaderboardInfo;
|
||||
import com.sap.sailing.android.shared.data.http.HttpGetRequest;
|
||||
import com.sap.sailing.android.shared.data.http.HttpJsonPostRequest;
|
||||
import com.sap.sailing.android.shared.logging.ExLog;
|
||||
import com.sap.sailing.android.shared.ui.activities.AbstractRegattaActivity;
|
||||
import com.sap.sailing.android.shared.util.BitmapHelper;
|
||||
@@ -46,6 +48,7 @@ import com.sap.sailing.android.shared.util.NetworkHelper;
|
||||
import com.sap.sailing.android.shared.util.NetworkHelper.NetworkHelperError;
|
||||
import com.sap.sailing.android.shared.util.NetworkHelper.NetworkHelperFailureListener;
|
||||
import com.sap.sailing.android.shared.util.NetworkHelper.NetworkHelperSuccessListener;
|
||||
import com.sap.sailing.android.shared.util.UniqueDeviceUuid;
|
||||
import com.sap.sailing.android.tracking.app.BuildConfig;
|
||||
import com.sap.sailing.android.tracking.app.R;
|
||||
import com.sap.sailing.android.tracking.app.ui.fragments.RegattaFragment;
|
||||
@@ -55,7 +58,6 @@ import com.sap.sailing.android.tracking.app.upload.UploadTeamImageTask;
|
||||
import com.sap.sailing.android.tracking.app.utils.AboutHelper;
|
||||
import com.sap.sailing.android.tracking.app.utils.AppPreferences;
|
||||
import com.sap.sailing.android.tracking.app.utils.CheckinManager;
|
||||
import com.sap.sailing.android.tracking.app.utils.CheckoutHelper;
|
||||
import com.sap.sailing.android.tracking.app.utils.DatabaseHelper;
|
||||
import com.sap.sailing.android.tracking.app.valueobjects.CheckinData;
|
||||
import com.sap.sailing.android.tracking.app.valueobjects.CompetitorCheckinData;
|
||||
@@ -66,8 +68,8 @@ public class RegattaActivity extends AbstractRegattaActivity
|
||||
implements RegattaFragment.FragmentWatcher, UploadResponseHandler {
|
||||
|
||||
private final static String TAG = RegattaActivity.class.getName();
|
||||
private final static String LEADERBOARD_IMAGE_FILENAME_PREFIX = "leaderboardImage_";
|
||||
private final static String FLAG_IMAGE_FILENAME_PREFIX = "flagImage_";
|
||||
private final static String COMPETITOR_IMAGE_FILENAME_PREFIX = "competitor_";
|
||||
private final static String FLAG_IMAGE_FILENAME_PREFIX = "flag_";
|
||||
|
||||
public EventInfo event;
|
||||
public CompetitorInfo competitor;
|
||||
@@ -105,7 +107,7 @@ public class RegattaActivity extends AbstractRegattaActivity
|
||||
if (toolbar != null) {
|
||||
setSupportActionBar(toolbar);
|
||||
}
|
||||
if (getSupportActionBar() != null) {
|
||||
if (toolbar != null && getSupportActionBar() != null) {
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
toolbar.setNavigationIcon(R.drawable.sap_logo_64dp);
|
||||
@@ -235,7 +237,7 @@ public class RegattaActivity extends AbstractRegattaActivity
|
||||
}
|
||||
|
||||
private void setTeamImage(ImageView imageView, int width, int height) {
|
||||
String fileName = getLeaderboardImageFileName(leaderboard.name);
|
||||
String fileName = getCompetitorImageFileName(competitor.id);
|
||||
Bitmap storedImage = getStoredImage(fileName, width, height);
|
||||
if (storedImage == null) {
|
||||
askServerAboutTeamImageUrl(imageView);
|
||||
@@ -305,7 +307,7 @@ public class RegattaActivity extends AbstractRegattaActivity
|
||||
* @param bitmap
|
||||
*/
|
||||
public void updateLeaderboardPictureChosenByUser(final Bitmap bitmap) {
|
||||
storeImageAndSendToServer(bitmap, getLeaderboardImageFileName(leaderboard.name), true);
|
||||
storeImageAndSendToServer(bitmap, getCompetitorImageFileName(competitor.id), true);
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -378,7 +380,7 @@ public class RegattaActivity extends AbstractRegattaActivity
|
||||
File mediaStorageDir = getMediaStorageDir();
|
||||
|
||||
File mediaFile;
|
||||
String mImageName = "MI_" + fileName + ".png";
|
||||
String mImageName = fileName + ".png";
|
||||
mediaFile = new File(mediaStorageDir.getPath() + File.separator + mImageName);
|
||||
return mediaFile;
|
||||
}
|
||||
@@ -387,7 +389,7 @@ public class RegattaActivity extends AbstractRegattaActivity
|
||||
File mediaStorageDir = getMediaStorageDir();
|
||||
|
||||
File mediaFile;
|
||||
String mImageName = "MI_" + fileName + ".png";
|
||||
String mImageName = fileName + ".png";
|
||||
mediaFile = new File(mediaStorageDir.getPath() + File.separator + mImageName);
|
||||
|
||||
return mediaFile.delete();
|
||||
@@ -441,8 +443,8 @@ public class RegattaActivity extends AbstractRegattaActivity
|
||||
setUpView();
|
||||
}
|
||||
|
||||
private String getLeaderboardImageFileName(String leaderboardName) {
|
||||
return LEADERBOARD_IMAGE_FILENAME_PREFIX + leaderboardName;
|
||||
private String getCompetitorImageFileName(String competitorId) {
|
||||
return COMPETITOR_IMAGE_FILENAME_PREFIX + competitorId;
|
||||
}
|
||||
|
||||
private String getFlagImageFileName(String countryCode) {
|
||||
@@ -467,23 +469,48 @@ public class RegattaActivity extends AbstractRegattaActivity
|
||||
* Check out from regatta;
|
||||
*/
|
||||
public void checkout() {
|
||||
CheckoutHelper checkoutHelper = new CheckoutHelper();
|
||||
checkoutHelper.checkoutCompetitor(this, leaderboard.name, event.server, competitor.id, new NetworkHelperSuccessListener() {
|
||||
@Override
|
||||
public void performAction(JSONObject response) {
|
||||
DatabaseHelper.getInstance().deleteRegattaFromDatabase(RegattaActivity.this, event.checkinDigest);
|
||||
deleteImageFile(getLeaderboardImageFileName(leaderboard.name));
|
||||
dismissProgressDialog();
|
||||
finish();
|
||||
}
|
||||
}, new NetworkHelperFailureListener() {
|
||||
@Override
|
||||
public void performAction(NetworkHelperError e) {
|
||||
dismissProgressDialog();
|
||||
showErrorPopup(R.string.error,
|
||||
R.string.error_could_not_complete_operation_on_server_try_again);
|
||||
}
|
||||
});
|
||||
final String checkoutURLStr = event.server
|
||||
+ prefs.getServerCheckoutPath().replace("{leaderboard-name}", Uri.encode(leaderboard.name));
|
||||
|
||||
showProgressDialog(R.string.please_wait, R.string.checking_out);
|
||||
|
||||
JSONObject checkoutData = new JSONObject();
|
||||
try {
|
||||
checkoutData.put("competitorId", competitor.id);
|
||||
checkoutData.put("deviceUuid", UniqueDeviceUuid.getUniqueId(this));
|
||||
checkoutData.put("toMillis", System.currentTimeMillis());
|
||||
} catch (JSONException e) {
|
||||
showErrorPopup(R.string.error, R.string.error_could_not_complete_operation_on_server_try_again);
|
||||
ExLog.e(this, TAG, "Error populating checkout-data: " + e.getMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
HttpJsonPostRequest request = new HttpJsonPostRequest(this, new URL(checkoutURLStr), checkoutData.toString());
|
||||
NetworkHelper.getInstance(this).executeHttpJsonRequestAsync(request,
|
||||
new NetworkHelperSuccessListener() {
|
||||
|
||||
@Override
|
||||
public void performAction(JSONObject response) {
|
||||
DatabaseHelper.getInstance().deleteRegattaFromDatabase(RegattaActivity.this,
|
||||
event.checkinDigest);
|
||||
deleteImageFile(getCompetitorImageFileName(competitor.id));
|
||||
dismissProgressDialog();
|
||||
finish();
|
||||
}
|
||||
}, new NetworkHelperFailureListener() {
|
||||
|
||||
@Override
|
||||
public void performAction(NetworkHelperError e) {
|
||||
dismissProgressDialog();
|
||||
showErrorPopup(R.string.error,
|
||||
R.string.error_could_not_complete_operation_on_server_try_again);
|
||||
}
|
||||
});
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
ExLog.w(this, TAG, "Error, can't check out, MalformedURLException: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -527,7 +554,7 @@ public class RegattaActivity extends AbstractRegattaActivity
|
||||
|
||||
public void retryUpload(View view) {
|
||||
if (prefs.hasFailedUpload(leaderboard.name)) {
|
||||
pictureFile = getImageFile(getLeaderboardImageFileName(leaderboard.name));
|
||||
pictureFile = getImageFile(getCompetitorImageFileName(competitor.id));
|
||||
}
|
||||
if (pictureFile != null) {
|
||||
sendTeamImageToServer(pictureFile);
|
||||
@@ -589,7 +616,7 @@ public class RegattaActivity extends AbstractRegattaActivity
|
||||
FileOutputStream outputStream = null;
|
||||
try {
|
||||
in = new java.net.URL(downloadUrl).openStream();
|
||||
imageFile = getImageFile(getLeaderboardImageFileName(leaderboard.name));
|
||||
imageFile = getImageFile(getCompetitorImageFileName(competitor.id));
|
||||
if (!imageFile.exists()) {
|
||||
imageFile.createNewFile();
|
||||
}
|
||||
|
||||
+29
-36
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/fiori_main_background"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/fiori_main_background"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -18,8 +18,7 @@
|
||||
android:id="@+id/map"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="@dimen/position_detail_bottom_margin"
|
||||
android:layout_weight="1"/>
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- Begin of detailed mark information -->
|
||||
|
||||
@@ -42,29 +41,27 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/fragment_side_margin"
|
||||
android:paddingTop="12dp">
|
||||
android:paddingTop="@dimen/list_side_margin">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/accuracy"
|
||||
android:textColor="@color/fiori_text_color"
|
||||
android:textSize="20sp"/>
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="12dp"
|
||||
android:paddingBottom="@dimen/list_side_margin"
|
||||
android:text="@string/accuracy_detail"
|
||||
android:textColor="@color/fiori_text_color"/>
|
||||
|
||||
android:textColor="@color/fiori_text_color" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/marker_gps_accuracy"
|
||||
@@ -73,21 +70,21 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textColor="@color/fiori_text_color"
|
||||
android:textSize="20sp"
|
||||
tools:text="ca. 13m"/>
|
||||
tools:text="ca. 13m" />
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.SignalQualityIndicatorView
|
||||
android:id="@+id/signal_quality_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/signal_quality_indicator_left_margin"
|
||||
android:layout_marginStart="@dimen/signal_quality_indicator_left_margin"
|
||||
android:layout_marginEnd="@dimen/fragment_side_margin"
|
||||
android:layout_marginRight="@dimen/fragment_side_margin"/>
|
||||
android:layout_marginLeft="@dimen/signal_quality_indicator_left_margin"
|
||||
android:layout_marginRight="@dimen/fragment_side_margin"
|
||||
android:layout_marginStart="@dimen/signal_quality_indicator_left_margin" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View style="@style/Divider"/>
|
||||
<View style="@style/Divider" />
|
||||
|
||||
<!-- Distance to old buoy -->
|
||||
<LinearLayout
|
||||
@@ -101,56 +98,55 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/fragment_side_margin"
|
||||
android:paddingTop="12dp">
|
||||
android:paddingTop="@dimen/list_side_margin">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/distance"
|
||||
android:textColor="@color/fiori_text_color"
|
||||
android:textSize="20sp"/>
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="12dp"
|
||||
android:paddingBottom="@dimen/list_side_margin"
|
||||
android:text="@string/distance_detail"
|
||||
android:textColor="@color/fiori_text_color"/>
|
||||
android:textColor="@color/fiori_text_color" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/marker_gps_distance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="@dimen/fragment_side_margin"
|
||||
android:layout_marginEnd="@dimen/fragment_side_margin"
|
||||
android:layout_marginRight="@dimen/fragment_side_margin"
|
||||
android:textColor="@color/fiori_text_color"
|
||||
android:textSize="20sp"
|
||||
tools:text="11,4m"/>
|
||||
tools:text="11,4m" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View style="@style/Divider"/>
|
||||
<View style="@style/Divider" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- Button -->
|
||||
|
||||
<Button
|
||||
android:id="@+id/marker_set_position_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginBottom="@dimen/position_detail_bottom_margin"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
@@ -158,10 +154,7 @@
|
||||
android:background="@drawable/position_send_button"
|
||||
android:text="@string/set_position"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"/>
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
+33
-28
@@ -1,18 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/fiori_main_background"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/fiori_main_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/map"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- Begin of detailed mark information -->
|
||||
|
||||
@@ -20,16 +18,19 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/list_item_background_color">
|
||||
|
||||
android:background="@color/list_item_background_color"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/list_header_height"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="@dimen/list_header_height"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="@dimen/list_side_margin"
|
||||
android:paddingLeft="@dimen/fragment_side_margin"
|
||||
android:paddingRight="@dimen/fragment_side_margin"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
android:paddingTop="@dimen/list_side_margin">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -37,7 +38,7 @@
|
||||
android:layout_weight="1"
|
||||
android:text="@string/accuracy"
|
||||
android:textColor="@color/fiori_text_color"
|
||||
android:textSize="20sp"/>
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/marker_gps_accuracy"
|
||||
@@ -45,34 +46,38 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/fiori_text_color"
|
||||
android:textSize="20sp"
|
||||
tools:text="ca. 13m"/>
|
||||
tools:text="ca. 13m" />
|
||||
|
||||
<com.sap.sailing.android.shared.ui.customviews.SignalQualityIndicatorView
|
||||
android:id="@+id/signal_quality_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="@dimen/signal_quality_indicator_left_margin"
|
||||
android:layout_marginStart="@dimen/signal_quality_indicator_left_margin"/>
|
||||
android:layout_marginStart="@dimen/signal_quality_indicator_left_margin" />
|
||||
</LinearLayout>
|
||||
|
||||
<View style="@style/Divider"/>
|
||||
<View style="@style/Divider" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Distance to old buoy -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/list_header_height"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/list_item_background_color">
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/list_item_background_color"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="@dimen/list_header_height"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="@dimen/list_side_margin"
|
||||
android:paddingLeft="@dimen/fragment_side_margin"
|
||||
android:paddingRight="@dimen/fragment_side_margin"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
android:paddingTop="@dimen/list_side_margin">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -80,7 +85,7 @@
|
||||
android:layout_weight="1"
|
||||
android:text="@string/distance"
|
||||
android:textColor="@color/fiori_text_color"
|
||||
android:textSize="20sp"/>
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/marker_gps_distance"
|
||||
@@ -89,10 +94,10 @@
|
||||
android:layout_marginLeft="5dp"
|
||||
android:textColor="@color/fiori_text_color"
|
||||
android:textSize="20sp"
|
||||
tools:text="11,4m"/>
|
||||
tools:text="11,4m" />
|
||||
</LinearLayout>
|
||||
|
||||
<View style="@style/Divider"/>
|
||||
<View style="@style/Divider" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -109,6 +114,6 @@
|
||||
android:background="@drawable/position_send_button"
|
||||
android:textAllCaps="false"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
+12
-11
@@ -1,9 +1,10 @@
|
||||
<?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:background="@drawable/fiori_main_background"
|
||||
android:orientation="vertical">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/fiori_main_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/list_header_height"
|
||||
@@ -12,21 +13,21 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/fragment_side_margin"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/fragment_side_margin"
|
||||
android:text="@string/marks"
|
||||
android:textSize="@dimen/list_header_text_size"
|
||||
android:textColor="@color/fiori_text_color"/>
|
||||
android:textColor="@color/fiori_text_color"
|
||||
android:textSize="@dimen/list_header_text_size" />
|
||||
</LinearLayout>
|
||||
|
||||
<View style="@style/Divider"/>
|
||||
<View style="@style/Divider" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listMarks"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:divider="@color/separator_color"
|
||||
android:dividerHeight="1dp"/>
|
||||
android:dividerHeight="1dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_marks"
|
||||
@@ -34,7 +35,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/no_marks_message"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/fiori_text_color"
|
||||
android:textSize="@dimen/buoy_overview_text_size"
|
||||
android:textColor="@color/fiori_text_color"/>
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/list_row_height"
|
||||
android:background="@color/list_item_background_color">
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/list_item_background_color"
|
||||
android:minHeight="@dimen/list_row_height">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginRight="@dimen/list_arrow_right_margin"
|
||||
android:layout_marginEnd="@dimen/list_arrow_right_margin"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginEnd="@dimen/list_arrow_right_margin"
|
||||
android:layout_marginRight="@dimen/list_arrow_right_margin"
|
||||
android:contentDescription="@string/empty"
|
||||
android:src="@drawable/white_arrow_right"
|
||||
android:textColor="@color/fiori_text_color"/>
|
||||
android:textColor="@color/fiori_text_color" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mark_name"
|
||||
@@ -26,12 +28,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginLeft="@dimen/fragment_side_margin"
|
||||
android:layout_marginTop="15dp"
|
||||
android:paddingRight="16dp"
|
||||
android:textSize="20sp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/fiori_text_color"/>
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/fiori_text_color"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mark_set"
|
||||
@@ -40,13 +42,13 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_below="@+id/mark_name"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_marginLeft="@dimen/fragment_side_margin"
|
||||
android:layout_marginTop="2dp"
|
||||
android:paddingRight="16dp"
|
||||
android:textSize="14sp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/fiori_text_color"/>
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/fiori_text_color"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user