forked from upstream-mirrors/OpenTracks
merge heads
This commit is contained in:
@@ -14,127 +14,118 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="vertical">
|
||||
<ScrollView
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="fill_parent">
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_width="fill_parent" >
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
<!-- Google Maps result -->
|
||||
<LinearLayout
|
||||
android:id="@+id/upload_result_maps_result"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Header -->
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
<ImageView
|
||||
android:contentDescription="@string/generic_success_title"
|
||||
android:id="@+id/upload_result_maps_result_icon"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/send_google_result_header"
|
||||
style="?android:attr/textAppearanceLarge"/>
|
||||
|
||||
<!-- Google Maps result -->
|
||||
android:layout_width="wrap_content"
|
||||
android:src="@drawable/success" />
|
||||
<LinearLayout
|
||||
android:id="@+id/upload_result_maps_result"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/upload_result_maps_result_icon"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="8dp" >
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:src="@drawable/success"/>
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:text="@string/send_google_maps"
|
||||
style="?android:attr/textAppearanceMedium"/>
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:text="@string/send_google_maps_url"
|
||||
style="?android:attr/textAppearanceSmall"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Google Fusion Tables result -->
|
||||
<LinearLayout
|
||||
android:id="@+id/upload_result_fusion_tables_result"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/upload_result_fusion_tables_result_icon"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@string/send_google_maps"
|
||||
style="@android:style/TextAppearance.DeviceDefault.Medium" />
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:src="@drawable/success"/>
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:text="@string/send_google_fusion_tables"
|
||||
style="?android:attr/textAppearanceMedium"/>
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:text="@string/send_google_fusion_tables_url"
|
||||
style="?android:attr/textAppearanceSmall"/>
|
||||
</LinearLayout>
|
||||
android:text="@string/send_google_maps_url"
|
||||
style="@android:style/TextAppearance.DeviceDefault.Small" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Google Docs result -->
|
||||
<LinearLayout
|
||||
android:id="@+id/upload_result_docs_result"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/upload_result_docs_result_icon"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:src="@drawable/success"/>
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:text="@string/send_google_docs"
|
||||
style="?android:attr/textAppearanceMedium"/>
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:text="@string/send_google_docs_url"
|
||||
style="?android:attr/textAppearanceSmall"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Footer -->
|
||||
<TextView
|
||||
android:id="@+id/upload_result_success_footer"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:text="@string/send_google_success_footer"
|
||||
style="?android:attr/textAppearanceSmall"/>
|
||||
<TextView
|
||||
android:id="@+id/upload_result_error_footer"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:text="@string/send_google_error"
|
||||
style="?android:attr/textAppearanceLarge"/>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
<!-- Google Fusion Tables result -->
|
||||
<LinearLayout
|
||||
android:id="@+id/upload_result_fusion_tables_result"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
<ImageView
|
||||
android:contentDescription="@string/generic_success_title"
|
||||
android:id="@+id/upload_result_fusion_tables_result_icon"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:src="@drawable/success" />
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="8dp" >
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/send_google_fusion_tables"
|
||||
style="@android:style/TextAppearance.DeviceDefault.Medium" />
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/send_google_fusion_tables_url"
|
||||
style="@android:style/TextAppearance.DeviceDefault.Small" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<!-- Google Docs result -->
|
||||
<LinearLayout
|
||||
android:id="@+id/upload_result_docs_result"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
<ImageView
|
||||
android:contentDescription="@string/generic_success_title"
|
||||
android:id="@+id/upload_result_docs_result_icon"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:src="@drawable/success" />
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="8dp" >
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/send_google_docs"
|
||||
style="@android:style/TextAppearance.DeviceDefault.Medium" />
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/send_google_docs_url"
|
||||
style="@android:style/TextAppearance.DeviceDefault.Small" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<!-- Footer -->
|
||||
<TextView
|
||||
android:id="@+id/upload_result_success_footer"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:text="@string/send_google_success_footer"
|
||||
style="@android:style/TextAppearance.DeviceDefault.Small" />
|
||||
<TextView
|
||||
android:id="@+id/upload_result_error_footer"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:text="@string/send_google_error"
|
||||
style="@android:style/TextAppearance.DeviceDefault.Medium" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@@ -1301,13 +1301,6 @@ limitations under the License.
|
||||
%1$s: service name. 'Google Maps', 'Google Fusion Tables', or 'Google Docs'.">
|
||||
Sending to %1$s. Please wait...
|
||||
</string>
|
||||
<string name="send_google_result_header"
|
||||
translation_description="When sending a track to Google, the header on the top of the result
|
||||
page.
|
||||
|
||||
Screenshot: send_google_success.png">
|
||||
Upload status:
|
||||
</string>
|
||||
<string name="send_google_result_share_url"
|
||||
translation_description="When sending a track to Google, in the result dialog, the button on
|
||||
the bottom to share with friends the URL of the uploaded track.
|
||||
|
||||
+17
-16
@@ -82,9 +82,7 @@ public class UploadResultActivity extends Activity {
|
||||
protected Dialog onCreateDialog(int id) {
|
||||
switch (id) {
|
||||
case RESULT_DIALOG:
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
View view = getLayoutInflater().inflate(R.layout.upload_result, null);
|
||||
builder.setView(view);
|
||||
|
||||
LinearLayout mapsResult = (LinearLayout) view.findViewById(R.id.upload_result_maps_result);
|
||||
LinearLayout fusionTablesResult = (LinearLayout) view.findViewById(
|
||||
@@ -107,6 +105,7 @@ public class UploadResultActivity extends Activity {
|
||||
} else {
|
||||
if (!sendRequest.isMapsSuccess()) {
|
||||
mapsResultIcon.setImageResource(R.drawable.failure);
|
||||
mapsResultIcon.setContentDescription(getString(R.string.generic_error_title));
|
||||
hasError = true;
|
||||
}
|
||||
}
|
||||
@@ -116,6 +115,7 @@ public class UploadResultActivity extends Activity {
|
||||
} else {
|
||||
if (!sendRequest.isFusionTablesSuccess()) {
|
||||
fusionTablesResultIcon.setImageResource(R.drawable.failure);
|
||||
fusionTablesResultIcon.setContentDescription(getString(R.string.generic_error_title));
|
||||
hasError = true;
|
||||
}
|
||||
}
|
||||
@@ -125,29 +125,28 @@ public class UploadResultActivity extends Activity {
|
||||
} else {
|
||||
if (!sendRequest.isDocsSuccess()) {
|
||||
docsResultIcon.setImageResource(R.drawable.failure);
|
||||
docsResultIcon.setContentDescription(getString(R.string.generic_error_title));
|
||||
hasError = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasError) {
|
||||
builder.setTitle(R.string.generic_error_title);
|
||||
builder.setIcon(android.R.drawable.ic_dialog_alert);
|
||||
successFooter.setVisibility(View.GONE);
|
||||
} else {
|
||||
builder.setTitle(R.string.generic_success_title);
|
||||
builder.setIcon(android.R.drawable.ic_dialog_info);
|
||||
errorFooter.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
builder.setCancelable(true);
|
||||
builder.setOnCancelListener(new DialogInterface.OnCancelListener() {
|
||||
@Override
|
||||
public void onCancel(DialogInterface dialog) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
builder.setPositiveButton(
|
||||
getString(R.string.generic_ok), new DialogInterface.OnClickListener() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this)
|
||||
.setCancelable(true)
|
||||
.setIcon(hasError ? android.R.drawable.ic_dialog_alert
|
||||
: android.R.drawable.ic_dialog_info)
|
||||
.setOnCancelListener(new DialogInterface.OnCancelListener() {
|
||||
@Override
|
||||
public void onCancel(DialogInterface dialog) {
|
||||
finish();
|
||||
}
|
||||
})
|
||||
.setPositiveButton(R.string.generic_ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (!sendRequest.isShowAll() && shareUrl != null) {
|
||||
@@ -155,7 +154,9 @@ public class UploadResultActivity extends Activity {
|
||||
}
|
||||
finish();
|
||||
}
|
||||
});
|
||||
})
|
||||
.setTitle(hasError ? R.string.generic_error_title : R.string.generic_success_title)
|
||||
.setView(view);
|
||||
|
||||
// Add a Share URL button if showing all the options and a shareUrl
|
||||
// exists
|
||||
|
||||
Reference in New Issue
Block a user