forked from upstream-mirrors/OpenTracks
Activity with progress and summary for import all option. Fixes #471.
ErrorListDialog shared by ExportActivity and ImportActivity.
This commit is contained in:
@@ -0,0 +1,135 @@
|
||||
<?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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/toolbar" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/import_progress_done"
|
||||
style="@style/TextMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="48dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/import_progress_slash"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/import_progress_slash"
|
||||
style="@style/TextMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/generic_separator_done_total"
|
||||
app:layout_constraintBottom_toBottomOf="@id/import_progress_done"
|
||||
app:layout_constraintEnd_toStartOf="@id/import_progress_total"
|
||||
app:layout_constraintStart_toEndOf="@id/import_progress_done"
|
||||
app:layout_constraintTop_toTopOf="@id/import_progress_done" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/import_progress_total"
|
||||
style="@style/TextMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="24dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/import_progress_slash"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/import_progress_slash"
|
||||
app:layout_constraintTop_toTopOf="@id/import_progress_slash"
|
||||
tools:text="10" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/import_progress_bar"
|
||||
style="@style/ProgressBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginRight="24dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/import_progress_done"
|
||||
tools:progress="25" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/import_progress_summary"
|
||||
style="@style/TextMedium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="24dp"
|
||||
android:text="@string/import_progress_review"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/import_progress_bar" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/import_progress_alert_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintBottom_toBottomOf="@id/import_progress_alert_msg"
|
||||
app:layout_constraintEnd_toStartOf="@id/import_progress_alert_msg"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/import_progress_alert_msg"
|
||||
app:srcCompat="@drawable/ic_report_problem_24" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/import_progress_alert_msg"
|
||||
style="@style/TextMedium"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/import_progress_alert_icon"
|
||||
app:layout_constraintTop_toBottomOf="@id/import_progress_summary"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="The file already exists" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<View style="@style/BottomButtonDivider" />
|
||||
|
||||
<LinearLayout style="@style/BottomButtonBar">
|
||||
|
||||
<Button
|
||||
android:id="@+id/import_progress_left_button"
|
||||
style="@style/BottomButton"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/generic_show_errors"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/import_progress_right_button"
|
||||
style="@style/BottomButton"
|
||||
android:layout_gravity="right"
|
||||
android:text="@string/generic_ok"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -217,14 +217,7 @@ limitations under the License.
|
||||
<string name="export_success">Exported %1$s to %2$s</string>
|
||||
<string name="export_title">Export to…</string>
|
||||
<string name="export_track_already_exists_msg">The track %1$s already exists at the destination directory.</string>
|
||||
<plurals name="export_all_end_with_errors">
|
||||
<item quantity="one">Completed with one error</item>
|
||||
<item quantity="other">Completed with %1$d errors</item>
|
||||
</plurals>
|
||||
<string name="export_all_end">Completed</string>
|
||||
<string name="export_all_do_it_for_all">do it for all conflicts</string>
|
||||
<string name="export_click_twice_cancel">Click back again to cancel</string>
|
||||
<string name="export_show_errors">Show Errors</string>
|
||||
<string name="export_track_errors">Tracks not exported</string>
|
||||
<string name="export_progress_review">
|
||||
Total exported tracks: %1$d\n
|
||||
@@ -263,6 +256,13 @@ limitations under the License.
|
||||
<string name="generic_overwrite">Overwrite</string>
|
||||
<string name="generic_skip">Skip</string>
|
||||
<string name="generic_separator_done_total">/</string>
|
||||
<string name="generic_show_errors">Show Errors</string>
|
||||
<plurals name="generic_completed_with_errors">
|
||||
<item quantity="one">Completed with one error</item>
|
||||
<item quantity="other">Completed with %1$d errors</item>
|
||||
</plurals>
|
||||
<string name="generic_completed">Completed</string>
|
||||
<string name="generic_click_twice_cancel">Click back again to cancel</string>
|
||||
<!-- Gps -->
|
||||
<string name="gps_location_access">‘Location access’</string>
|
||||
<string name="gps_disabled">GPS not enabled. Tap here to go to %1$s. Press the back button to return.</string>
|
||||
@@ -285,6 +285,12 @@ limitations under the License.
|
||||
<string name="image_stop">Stop</string>
|
||||
<string name="image_track">Track</string>
|
||||
<!-- Import -->
|
||||
<string name="import_unsupported_format">Unsupported file format</string>
|
||||
<string name="import_parser_error">Parser error: %1$s</string>
|
||||
<string name="import_unable_to_import_file">Unable to import file: %1$s</string>
|
||||
<string name="import_error_info">%1$s: %2$s</string>
|
||||
<string name="import_error_list_dialog_title">Files not imported</string>
|
||||
<string name="import_file_imported">File %1$s imported</string>
|
||||
<string name="import_error">Imported %1$d of %2$s from %3$s</string>
|
||||
<string name="import_no_directory">%1$s does not exist</string>
|
||||
<string name="import_no_file">There were no files to import. Connect your device to your computer and place the files to import in %1$s.</string>
|
||||
@@ -293,6 +299,12 @@ limitations under the License.
|
||||
<string name="import_selection_option">All %1$s</string>
|
||||
<string name="import_selection_title">Import from external storage</string>
|
||||
<string name="import_success">Imported %1$s from %2$s</string>
|
||||
<string name="import_progress_review">
|
||||
Total imported files: %1$d\n
|
||||
- Files imported: %2$d\n
|
||||
- Already exists: %3$d\n
|
||||
- Errors: %4$d
|
||||
</string>
|
||||
<!-- Marker -->
|
||||
<string name="marker_add_error">Unable to insert a marker. No GPS signal. Try again.</string>
|
||||
<string name="marker_add_success">A marker was inserted</string>
|
||||
|
||||
@@ -33,16 +33,6 @@ limitations under the License.
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
</style>
|
||||
|
||||
<style name="ThemeCustomTransparentActivity" parent="ThemeCustom">
|
||||
<!-- TODO Remove when moving to settings to fragments. -->
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:backgroundDimEnabled">false</item>
|
||||
</style>
|
||||
|
||||
<style name="TrackDeleteActivity" parent="ThemeCustom">
|
||||
<!-- TODO Remove when moving to TrackDeleteActivity to fragments. -->
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
|
||||
Reference in New Issue
Block a user