forked from upstream-mirrors/OpenTracks
Codeclean: accessibility content description
This commit is contained in:
@@ -29,7 +29,7 @@ limitations under the License.
|
|||||||
android:layout_width="match_parent" />
|
android:layout_width="match_parent" />
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:contentDescription="@string/icon_record_track"
|
android:contentDescription="@string/image_record"
|
||||||
android:id="@+id/track_controller_record"
|
android:id="@+id/track_controller_record"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="10"
|
android:layout_weight="10"
|
||||||
@@ -56,7 +56,7 @@ limitations under the License.
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:contentDescription="@string/icon_stop_recording"
|
android:contentDescription="@string/image_stop"
|
||||||
android:id="@+id/track_controller_stop"
|
android:id="@+id/track_controller_stop"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="10"
|
android:layout_weight="10"
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:baselineAligned="false"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="match_parent" >
|
android:layout_width="match_parent" >
|
||||||
<include layout="@layout/track_controller" />
|
<include layout="@layout/track_controller" />
|
||||||
@@ -41,6 +42,7 @@ limitations under the License.
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_width="match_parent" />
|
android:layout_width="match_parent" />
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:contentDescription="@string/image_arrow"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="10"
|
android:layout_weight="10"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -52,10 +54,10 @@ limitations under the License.
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingRight="20dp"
|
|
||||||
android:layout_toRightOf="@id/track_list_arrow_long"
|
android:layout_toRightOf="@id/track_list_arrow_long"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:orientation="vertical" >
|
android:orientation="vertical"
|
||||||
|
android:paddingRight="20dp" >
|
||||||
<View
|
<View
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="4"
|
android:layout_weight="4"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ limitations under the License.
|
|||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp" >
|
android:paddingRight="16dp" >
|
||||||
<ImageView
|
<ImageView
|
||||||
android:contentDescription="@string/icon_application"
|
android:contentDescription="@string/image_application"
|
||||||
android:id="@+id/choose_activity_list_item_icon"
|
android:id="@+id/choose_activity_list_item_icon"
|
||||||
android:layout_height="@android:dimen/app_icon_size"
|
android:layout_height="@android:dimen/app_icon_size"
|
||||||
android:layout_width="@android:dimen/app_icon_size"
|
android:layout_width="@android:dimen/app_icon_size"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ limitations under the License.
|
|||||||
android:layout_width="match_parent" >
|
android:layout_width="match_parent" >
|
||||||
<!-- Photo -->
|
<!-- Photo -->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:contentDescription="@string/icon_marker"
|
android:contentDescription="@string/image_photo_marker"
|
||||||
android:id="@+id/list_item_photo"
|
android:id="@+id/list_item_photo"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -31,7 +31,7 @@ limitations under the License.
|
|||||||
<!-- A gradient on top of the text -->
|
<!-- A gradient on top of the text -->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:alpha=".6"
|
android:alpha=".6"
|
||||||
android:contentDescription="@string/icon_marker"
|
android:contentDescription="@string/image_photo_marker"
|
||||||
android:id="@+id/list_item_text_gradient"
|
android:id="@+id/list_item_text_gradient"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -50,7 +50,7 @@ limitations under the License.
|
|||||||
<TableRow>
|
<TableRow>
|
||||||
<!-- Table 1: Row 1: Column 1: (icon) -->
|
<!-- Table 1: Row 1: Column 1: (icon) -->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:contentDescription="@string/icon_track"
|
android:contentDescription="@string/image_track"
|
||||||
android:id="@+id/list_item_icon"
|
android:id="@+id/list_item_icon"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -91,7 +91,7 @@ limitations under the License.
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
style="@style/TextSmall" />
|
style="@style/TextSmall" />
|
||||||
<ImageView
|
<ImageView
|
||||||
android:contentDescription="@string/icon_marker"
|
android:contentDescription="@string/image_marker_count"
|
||||||
android:id="@+id/list_item_marker_count_icon"
|
android:id="@+id/list_item_marker_count_icon"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ limitations under the License.
|
|||||||
style="@style/TextMedium.WithIcon" />
|
style="@style/TextMedium.WithIcon" />
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:background="@drawable/my_location"
|
android:background="@drawable/my_location"
|
||||||
android:contentDescription="@string/icon_my_location"
|
android:contentDescription="@string/image_my_location"
|
||||||
android:id="@+id/map_my_location"
|
android:id="@+id/map_my_location"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ limitations under the License.
|
|||||||
android:layout_width="match_parent" >
|
android:layout_width="match_parent" >
|
||||||
<ImageView
|
<ImageView
|
||||||
android:background="@android:color/black"
|
android:background="@android:color/black"
|
||||||
android:contentDescription="@string/icon_marker"
|
android:contentDescription="@string/image_photo_marker"
|
||||||
android:id="@+id/marker_detail_waypoint_photo"
|
android:id="@+id/marker_detail_waypoint_photo"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -34,7 +34,7 @@ limitations under the License.
|
|||||||
<!-- A gradient on top of the text -->
|
<!-- A gradient on top of the text -->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:alpha=".6"
|
android:alpha=".6"
|
||||||
android:contentDescription="@string/icon_marker"
|
android:contentDescription="@string/image_photo_marker"
|
||||||
android:id="@+id/marker_detail_waypoint_text_gradient"
|
android:id="@+id/marker_detail_waypoint_text_gradient"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ limitations under the License.
|
|||||||
android:layout_width="0dp" />
|
android:layout_width="0dp" />
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:contentDescription="@string/icon_record_track"
|
android:contentDescription="@string/image_record"
|
||||||
android:id="@+id/track_controller_record"
|
android:id="@+id/track_controller_record"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="10"
|
android:layout_weight="10"
|
||||||
@@ -56,7 +56,7 @@ limitations under the License.
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:contentDescription="@string/icon_stop_recording"
|
android:contentDescription="@string/image_stop"
|
||||||
android:id="@+id/track_controller_stop"
|
android:id="@+id/track_controller_stop"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="10"
|
android:layout_weight="10"
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ limitations under the License.
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_width="0dp" />
|
android:layout_width="0dp" />
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:contentDescription="@string/image_arrow"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="10"
|
android:layout_weight="10"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ limitations under the License.
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
style="@style/TrackWidgetVerticalSpacer" />
|
style="@style/TrackWidgetVerticalSpacer" />
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:contentDescription="@string/icon_record_track"
|
android:contentDescription="@string/image_record"
|
||||||
android:id="@+id/track_widget_record_button"
|
android:id="@+id/track_widget_record_button"
|
||||||
android:src="@drawable/button_record"
|
android:src="@drawable/button_record"
|
||||||
style="@style/TrackWidgetButton" />
|
style="@style/TrackWidgetButton" />
|
||||||
@@ -91,7 +91,7 @@ limitations under the License.
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:contentDescription="@string/icon_stop_recording"
|
android:contentDescription="@string/image_stop"
|
||||||
android:id="@+id/track_widget_stop_button"
|
android:id="@+id/track_widget_stop_button"
|
||||||
android:src="@drawable/ic_button_stop_disabled"
|
android:src="@drawable/ic_button_stop_disabled"
|
||||||
style="@style/TrackWidgetButton" />
|
style="@style/TrackWidgetButton" />
|
||||||
@@ -100,6 +100,6 @@ limitations under the License.
|
|||||||
style="@style/TrackWidgetVerticalSpacer" />
|
style="@style/TrackWidgetVerticalSpacer" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<ImageView
|
<ImageView
|
||||||
android:contentDescription="@string/my_tracks_app_name"
|
android:contentDescription="@string/image_my_tracks_logo"
|
||||||
style="@style/TrackWidgetLogo" />
|
style="@style/TrackWidgetLogo" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -138,7 +138,7 @@ limitations under the License.
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
style="@style/TrackWidgetVerticalSpacer" />
|
style="@style/TrackWidgetVerticalSpacer" />
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:contentDescription="@string/icon_record_track"
|
android:contentDescription="@string/image_record"
|
||||||
android:id="@+id/track_widget_record_button"
|
android:id="@+id/track_widget_record_button"
|
||||||
android:src="@drawable/button_record"
|
android:src="@drawable/button_record"
|
||||||
style="@style/TrackWidgetButton" />
|
style="@style/TrackWidgetButton" />
|
||||||
@@ -146,7 +146,7 @@ limitations under the License.
|
|||||||
android:id="@+id/track_widget_record_status"
|
android:id="@+id/track_widget_record_status"
|
||||||
style="@style/TrackWidgetRecordStatus" />
|
style="@style/TrackWidgetRecordStatus" />
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:contentDescription="@string/icon_stop_recording"
|
android:contentDescription="@string/image_stop"
|
||||||
android:id="@+id/track_widget_stop_button"
|
android:id="@+id/track_widget_stop_button"
|
||||||
android:src="@drawable/ic_button_stop_disabled"
|
android:src="@drawable/ic_button_stop_disabled"
|
||||||
style="@style/TrackWidgetButton" />
|
style="@style/TrackWidgetButton" />
|
||||||
@@ -156,6 +156,6 @@ limitations under the License.
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<ImageView
|
<ImageView
|
||||||
android:contentDescription="@string/my_tracks_app_name"
|
android:contentDescription="@string/image_my_tracks_logo"
|
||||||
style="@style/TrackWidgetLogo" />
|
style="@style/TrackWidgetLogo" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -138,7 +138,7 @@ limitations under the License.
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
style="@style/TrackWidgetVerticalSpacer" />
|
style="@style/TrackWidgetVerticalSpacer" />
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:contentDescription="@string/icon_record_track"
|
android:contentDescription="@string/image_record"
|
||||||
android:id="@+id/track_widget_record_button"
|
android:id="@+id/track_widget_record_button"
|
||||||
android:src="@drawable/button_record"
|
android:src="@drawable/button_record"
|
||||||
style="@style/TrackWidgetButton" />
|
style="@style/TrackWidgetButton" />
|
||||||
@@ -146,7 +146,7 @@ limitations under the License.
|
|||||||
android:id="@+id/track_widget_record_status"
|
android:id="@+id/track_widget_record_status"
|
||||||
style="@style/TrackWidgetRecordStatus" />
|
style="@style/TrackWidgetRecordStatus" />
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:contentDescription="@string/icon_stop_recording"
|
android:contentDescription="@string/image_stop"
|
||||||
android:id="@+id/track_widget_stop_button"
|
android:id="@+id/track_widget_stop_button"
|
||||||
android:src="@drawable/ic_button_stop_disabled"
|
android:src="@drawable/ic_button_stop_disabled"
|
||||||
style="@style/TrackWidgetButton" />
|
style="@style/TrackWidgetButton" />
|
||||||
@@ -156,6 +156,6 @@ limitations under the License.
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<ImageView
|
<ImageView
|
||||||
android:contentDescription="@string/my_tracks_app_name"
|
android:contentDescription="@string/image_my_tracks_logo"
|
||||||
style="@style/TrackWidgetLogo" />
|
style="@style/TrackWidgetLogo" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -142,7 +142,7 @@ limitations under the License.
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
style="@style/TrackWidgetVerticalSpacer" />
|
style="@style/TrackWidgetVerticalSpacer" />
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:contentDescription="@string/icon_record_track"
|
android:contentDescription="@string/image_record"
|
||||||
android:id="@+id/track_widget_record_button"
|
android:id="@+id/track_widget_record_button"
|
||||||
android:src="@drawable/button_record"
|
android:src="@drawable/button_record"
|
||||||
style="@style/TrackWidgetButton" />
|
style="@style/TrackWidgetButton" />
|
||||||
@@ -150,7 +150,7 @@ limitations under the License.
|
|||||||
android:id="@+id/track_widget_record_status"
|
android:id="@+id/track_widget_record_status"
|
||||||
style="@style/TrackWidgetRecordStatus" />
|
style="@style/TrackWidgetRecordStatus" />
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:contentDescription="@string/icon_stop_recording"
|
android:contentDescription="@string/image_stop"
|
||||||
android:id="@+id/track_widget_stop_button"
|
android:id="@+id/track_widget_stop_button"
|
||||||
android:src="@drawable/ic_button_stop_disabled"
|
android:src="@drawable/ic_button_stop_disabled"
|
||||||
style="@style/TrackWidgetButton" />
|
style="@style/TrackWidgetButton" />
|
||||||
@@ -160,6 +160,6 @@ limitations under the License.
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<ImageView
|
<ImageView
|
||||||
android:contentDescription="@string/my_tracks_app_name"
|
android:contentDescription="@string/image_my_tracks_logo"
|
||||||
style="@style/TrackWidgetLogo4x4" />
|
style="@style/TrackWidgetLogo4x4" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -886,37 +886,53 @@ limitations under the License.
|
|||||||
Waiting for GPS signal
|
Waiting for GPS signal
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<!-- Icon -->
|
<!-- Image -->
|
||||||
<string name="icon_application"
|
<string name="image_application"
|
||||||
translation_description="When sharing a track, we display a list of Android applications on the
|
translation_description="The accessibility description for a generic application icon.">
|
||||||
device that can be used. This is the generic accessibility description for any application
|
|
||||||
icon.">
|
|
||||||
Application
|
Application
|
||||||
</string>
|
</string>
|
||||||
<string name="icon_marker"
|
<string name="image_arrow"
|
||||||
translation_description="The accessibility description for the 'Marker' icon.">
|
translation_description="The accessibility description for an arrow image.">
|
||||||
|
Arrow
|
||||||
|
</string>
|
||||||
|
<string name="image_marker"
|
||||||
|
translation_description="The accessibility description for a marker icon, as opposed to a track
|
||||||
|
icon.">
|
||||||
Marker
|
Marker
|
||||||
</string>
|
</string>
|
||||||
<string name="icon_my_location"
|
<string name="image_marker_count"
|
||||||
translation_description="The accessibility description for the 'My Location' icon.">
|
translation_description="The accessibility description for the marker count icon.">
|
||||||
|
Marker count
|
||||||
|
</string>
|
||||||
|
<string name="image_my_location"
|
||||||
|
translation_description="The accessibility description for the 'My Location' button.">
|
||||||
My Location
|
My Location
|
||||||
</string>
|
</string>
|
||||||
<string name="icon_pause_recording"
|
<string name="image_my_tracks_logo"
|
||||||
translation_description="The accessibility description for the pause recording icon.">
|
translation_description="The accessibility description for the 'My Tracks' logo.">
|
||||||
Pause recording
|
My Tracks logo
|
||||||
</string>
|
</string>
|
||||||
<string name="icon_record_track"
|
<string name="image_pause"
|
||||||
translation_description="The accessibility description for the record track icon.">
|
translation_description="The accessibility description for the pause button.">
|
||||||
Record track
|
Pause
|
||||||
</string>
|
</string>
|
||||||
<string name="icon_stop_recording"
|
<string name="image_photo_marker"
|
||||||
translation_description="The accessibility description for the stop recording icon.">
|
translation_description="The accessibility description for a photo marker">
|
||||||
Stop recording
|
Photo marker
|
||||||
</string>
|
</string>
|
||||||
<string name="icon_track"
|
<string name="image_record"
|
||||||
translation_description="The accessibility description for the 'Track' icon.">
|
translation_description="The accessibility description for the record button.">
|
||||||
|
Record
|
||||||
|
</string>
|
||||||
|
<string name="image_stop"
|
||||||
|
translation_description="The accessibility description for the stop button.">
|
||||||
|
Stop
|
||||||
|
</string>
|
||||||
|
<string name="image_track"
|
||||||
|
translation_description="The accessibility description for a track icon, as opposed to a marker
|
||||||
|
icon.">
|
||||||
Track
|
Track
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<!-- Import -->
|
<!-- Import -->
|
||||||
<string name="import_error"
|
<string name="import_error"
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ public class MarkerListActivity extends AbstractMyTracksActivity implements Dele
|
|||||||
String photoUrl = cursor.getString(photoUrlIndex);
|
String photoUrl = cursor.getString(photoUrlIndex);
|
||||||
|
|
||||||
ListItemUtils.setListItem(MarkerListActivity.this, view, false, true, iconId,
|
ListItemUtils.setListItem(MarkerListActivity.this, view, false, true, iconId,
|
||||||
R.string.icon_marker, name, null, null, null, 0, time, false, category, description,
|
R.string.image_marker, name, null, null, null, 0, time, false, category, description,
|
||||||
photoUrl);
|
photoUrl);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -487,7 +487,7 @@ public class SearchListActivity extends AbstractSendToGoogleActivity implements
|
|||||||
resultMap.put(IS_PAUSED_FIELD, true);
|
resultMap.put(IS_PAUSED_FIELD, true);
|
||||||
resultMap.put(ICON_ID_FIELD,
|
resultMap.put(ICON_ID_FIELD,
|
||||||
statistics ? R.drawable.ic_marker_yellow_pushpin : R.drawable.ic_marker_blue_pushpin);
|
statistics ? R.drawable.ic_marker_yellow_pushpin : R.drawable.ic_marker_blue_pushpin);
|
||||||
resultMap.put(ICON_CONTENT_DESCRIPTION_ID_FIELD, R.string.icon_marker);
|
resultMap.put(ICON_CONTENT_DESCRIPTION_ID_FIELD, R.string.image_marker);
|
||||||
resultMap.put(NAME_FIELD, waypoint.getName());
|
resultMap.put(NAME_FIELD, waypoint.getName());
|
||||||
resultMap.put(SHARED_OWNER_FIELD, null);
|
resultMap.put(SHARED_OWNER_FIELD, null);
|
||||||
// Display the marker's track name in the total time field
|
// Display the marker's track name in the total time field
|
||||||
@@ -517,7 +517,7 @@ public class SearchListActivity extends AbstractSendToGoogleActivity implements
|
|||||||
resultMap.put(IS_RECORDING_FIELD, track.getId() == recordingTrackId);
|
resultMap.put(IS_RECORDING_FIELD, track.getId() == recordingTrackId);
|
||||||
resultMap.put(IS_PAUSED_FIELD, recordingTrackPaused);
|
resultMap.put(IS_PAUSED_FIELD, recordingTrackPaused);
|
||||||
resultMap.put(ICON_ID_FIELD, TrackIconUtils.getIconDrawable(icon));
|
resultMap.put(ICON_ID_FIELD, TrackIconUtils.getIconDrawable(icon));
|
||||||
resultMap.put(ICON_CONTENT_DESCRIPTION_ID_FIELD, R.string.icon_track);
|
resultMap.put(ICON_CONTENT_DESCRIPTION_ID_FIELD, R.string.image_track);
|
||||||
resultMap.put(NAME_FIELD, track.getName());
|
resultMap.put(NAME_FIELD, track.getName());
|
||||||
resultMap.put(SHARED_OWNER_FIELD, track.getSharedOwner());
|
resultMap.put(SHARED_OWNER_FIELD, track.getSharedOwner());
|
||||||
resultMap.put(TOTAL_TIME_FIELD, StringUtils.formatElapsedTime(tripStatitics.getTotalTime()));
|
resultMap.put(TOTAL_TIME_FIELD, StringUtils.formatElapsedTime(tripStatitics.getTotalTime()));
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class TrackController {
|
|||||||
recordImageButton.setImageResource(
|
recordImageButton.setImageResource(
|
||||||
isRecording && !isPaused ? R.drawable.button_pause : R.drawable.button_record);
|
isRecording && !isPaused ? R.drawable.button_pause : R.drawable.button_record);
|
||||||
recordImageButton.setContentDescription(activity.getString(
|
recordImageButton.setContentDescription(activity.getString(
|
||||||
isRecording && !isPaused ? R.string.icon_pause_recording : R.string.icon_record_track));
|
isRecording && !isPaused ? R.string.image_pause : R.string.image_record));
|
||||||
|
|
||||||
stopImageButton.setImageResource(
|
stopImageButton.setImageResource(
|
||||||
isRecording ? R.drawable.button_stop : R.drawable.ic_button_stop_disabled);
|
isRecording ? R.drawable.button_stop : R.drawable.ic_button_stop_disabled);
|
||||||
|
|||||||
@@ -383,7 +383,7 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
|
|||||||
String description = cursor.getString(descriptionIndex);
|
String description = cursor.getString(descriptionIndex);
|
||||||
|
|
||||||
ListItemUtils.setListItem(TrackListActivity.this, view, isRecording, recordingTrackPaused,
|
ListItemUtils.setListItem(TrackListActivity.this, view, isRecording, recordingTrackPaused,
|
||||||
iconId, R.string.icon_track, name, sharedOwner, totalTime, totalDistance, markerCount,
|
iconId, R.string.image_track, name, sharedOwner, totalTime, totalDistance, markerCount,
|
||||||
startTime, true, category, description, null);
|
startTime, true, category, description, null);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -88,8 +88,7 @@ public class ListItemUtils {
|
|||||||
// Set icon
|
// Set icon
|
||||||
if (isRecording) {
|
if (isRecording) {
|
||||||
iconId = isPaused ? R.drawable.ic_track_paused : R.drawable.ic_track_recording;
|
iconId = isPaused ? R.drawable.ic_track_paused : R.drawable.ic_track_recording;
|
||||||
iconContentDescriptionId = isPaused ? R.string.icon_pause_recording
|
iconContentDescriptionId = isPaused ? R.string.image_pause : R.string.image_record;
|
||||||
: R.string.icon_record_track;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageView iconImageView = (ImageView) view.findViewById(R.id.list_item_icon);
|
ImageView iconImageView = (ImageView) view.findViewById(R.id.list_item_icon);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class MultiColorTrackPathTest extends AndroidTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests the {@link MultiColorTrackPath#getColor(int)} when use dynamic speed
|
* Tests the {@link MultiColorTrackPath#getColor(double)} when use dynamic speed
|
||||||
* track path descriptor.
|
* track path descriptor.
|
||||||
*/
|
*/
|
||||||
public void testGetColor_DynamicSpeedTrackPathDescriptor() {
|
public void testGetColor_DynamicSpeedTrackPathDescriptor() {
|
||||||
|
|||||||
+4
-4
@@ -894,7 +894,7 @@ public class EndToEndTestUtils {
|
|||||||
*/
|
*/
|
||||||
public static void checkNotRecording() {
|
public static void checkNotRecording() {
|
||||||
instrumentation.waitForIdleSync();
|
instrumentation.waitForIdleSync();
|
||||||
Assert.assertEquals(activityMytracks.getString(R.string.icon_record_track), (String) SOLO
|
Assert.assertEquals(activityMytracks.getString(R.string.image_record), (String) SOLO
|
||||||
.getCurrentActivity().findViewById(R.id.track_controller_record).getContentDescription());
|
.getCurrentActivity().findViewById(R.id.track_controller_record).getContentDescription());
|
||||||
Assert.assertFalse(SOLO.getCurrentActivity().findViewById(R.id.track_controller_stop)
|
Assert.assertFalse(SOLO.getCurrentActivity().findViewById(R.id.track_controller_stop)
|
||||||
.isEnabled());
|
.isEnabled());
|
||||||
@@ -910,7 +910,7 @@ public class EndToEndTestUtils {
|
|||||||
*/
|
*/
|
||||||
public static void checkUnderRecording() {
|
public static void checkUnderRecording() {
|
||||||
instrumentation.waitForIdleSync();
|
instrumentation.waitForIdleSync();
|
||||||
Assert.assertEquals(activityMytracks.getString(R.string.icon_pause_recording), (String) SOLO
|
Assert.assertEquals(activityMytracks.getString(R.string.image_pause), (String) SOLO
|
||||||
.getCurrentActivity().findViewById(R.id.track_controller_record).getContentDescription());
|
.getCurrentActivity().findViewById(R.id.track_controller_record).getContentDescription());
|
||||||
Assert.assertTrue(SOLO.getCurrentActivity().findViewById(R.id.track_controller_stop)
|
Assert.assertTrue(SOLO.getCurrentActivity().findViewById(R.id.track_controller_stop)
|
||||||
.isEnabled());
|
.isEnabled());
|
||||||
@@ -930,7 +930,7 @@ public class EndToEndTestUtils {
|
|||||||
*/
|
*/
|
||||||
public static void checkUnderPaused() {
|
public static void checkUnderPaused() {
|
||||||
instrumentation.waitForIdleSync();
|
instrumentation.waitForIdleSync();
|
||||||
Assert.assertEquals(activityMytracks.getString(R.string.icon_record_track), (String) SOLO
|
Assert.assertEquals(activityMytracks.getString(R.string.image_record), (String) SOLO
|
||||||
.getCurrentActivity().findViewById(R.id.track_controller_record).getContentDescription());
|
.getCurrentActivity().findViewById(R.id.track_controller_record).getContentDescription());
|
||||||
Assert.assertTrue(SOLO.getCurrentActivity().findViewById(R.id.track_controller_stop)
|
Assert.assertTrue(SOLO.getCurrentActivity().findViewById(R.id.track_controller_stop)
|
||||||
.isEnabled());
|
.isEnabled());
|
||||||
@@ -1001,7 +1001,7 @@ public class EndToEndTestUtils {
|
|||||||
for (ImageButton imageButton : aa) {
|
for (ImageButton imageButton : aa) {
|
||||||
if (imageButton.getContentDescription() != null
|
if (imageButton.getContentDescription() != null
|
||||||
&& imageButton.getContentDescription().equals(
|
&& imageButton.getContentDescription().equals(
|
||||||
activity.getString(R.string.icon_my_location))) {
|
activity.getString(R.string.image_my_location))) {
|
||||||
myLocation = imageButton;
|
myLocation = imageButton;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user