Changed string.xml organization, fixed play/pause button description.

This commit is contained in:
Felix Ableitner 2014-01-04 17:41:44 +01:00
parent e5063fd8e9
commit b0f124c158
3 changed files with 32 additions and 11 deletions

View file

@ -2,25 +2,42 @@
<resources> <resources>
<string name="app_name">ControlDLNA</string> <string name="app_name">ControlDLNA</string>
<string name="title_route">Route</string>
<!-- Server Fragment -->
<string name="title_server">Server</string> <string name="title_server">Server</string>
<string name="folder_list_empty">Folder is empty</string>
<string name="device_list_empty">No UPNP devices found.
\nNew devices will be added automatically when they are available.</string>
<!-- Route Fragment -->
<string name="title_route">Route</string>
<string name="playlist_empty">Playlist is empty</string>
<string name="route_list_empty">No routes found.
\nNew routes will be added automatically when they are available.</string>
<!-- Playback controls -->
<string name="play">Play</string> <string name="play">Play</string>
<string name="pause">Pause</string> <string name="pause">Pause</string>
<string name="exit_renderer">Do you really want to exit the renderer? Playback will be stopped.</string>
<string name="previous">Previous</string> <string name="previous">Previous</string>
<string name="next">Next</string> <string name="next">Next</string>
<string name="shuffle">Shuffle</string> <string name="shuffle">Shuffle</string>
<string name="repeat">Repeat</string> <string name="repeat">Repeat</string>
<!-- Toasts/Dialogs -->
<string name="exit_renderer">Do you really want to exit the renderer?
Playback will be stopped.</string>
<string name="select_route">Please select a route</string> <string name="select_route">Please select a route</string>
<string name="album_art">Album Art</string>
<string name="route_description">DLNA Playback</string>
<string name="warning_wifi_not_connected">Wifi needs to be connected for playback</string> <string name="warning_wifi_not_connected">Wifi needs to be connected for playback</string>
<string name="auto_enable_wifi">Enable Wifi automatically on start</string>
<string name="dont_show_dialog_again">"Do not show this dialog again"</string> <!-- Image alt text -->
<string name="device_list_empty">No UPNP devices found. \nNew devices will be added automatically when they are available.</string> <string name="album_art">Album Art</string>
<string name="route_list_empty">No routes found. \nNew routes will be added automatically when they are available.</string>
<string name="folder_list_etmpy">Folder is empty</string> <!-- MediaRouter strings -->
<string name="playlist_empty">Playlist is empty</string> <string name="route_description">DLNA Playback</string>
<string name="upnp_route_provider_service">UPNP Route Provider Service</string> <string name="upnp_route_provider_service">UPNP Route Provider Service</string>
<!-- Settings -->
<string name="auto_enable_wifi">Enable Wifi automatically on start</string>
<string name="dont_show_dialog_again">"Do not show this dialog again"</string>
</resources> </resources>

View file

@ -391,10 +391,12 @@ public class RouteFragment extends MediaRouteDiscoveryFragment implements
if (mPlaying) { if (mPlaying) {
s.pause(); s.pause();
mPlayPause.setImageResource(R.drawable.ic_action_play); mPlayPause.setImageResource(R.drawable.ic_action_play);
mPlayPause.setContentDescription(getResources().getString(R.string.play));
} else { } else {
s.resume(); s.resume();
mListView.smoothScrollToPosition(s.getCurrentTrack()); mListView.smoothScrollToPosition(s.getCurrentTrack());
mPlayPause.setImageResource(R.drawable.ic_action_pause); mPlayPause.setImageResource(R.drawable.ic_action_pause);
mPlayPause.setContentDescription(getResources().getString(R.string.pause));
} }
mPlaying = !mPlaying; mPlaying = !mPlaying;
break; break;
@ -557,10 +559,12 @@ public class RouteFragment extends MediaRouteDiscoveryFragment implements
status.getPlaybackState() == MediaItemStatus.PLAYBACK_STATE_PENDING) { status.getPlaybackState() == MediaItemStatus.PLAYBACK_STATE_PENDING) {
mPlaying = true; mPlaying = true;
mPlayPause.setImageResource(R.drawable.ic_action_pause); mPlayPause.setImageResource(R.drawable.ic_action_pause);
mPlayPause.setContentDescription(getResources().getString(R.string.pause));
} }
else { else {
mPlaying = false; mPlaying = false;
mPlayPause.setImageResource(R.drawable.ic_action_play); mPlayPause.setImageResource(R.drawable.ic_action_play);
mPlayPause.setContentDescription(getResources().getString(R.string.play));
} }
if (mListView.getAdapter() == mPlaylistAdapter) if (mListView.getAdapter() == mPlaylistAdapter)

View file

@ -251,7 +251,7 @@ public class ServerFragment extends ListFragment implements OnBackPressedListene
mCurrentServer = server; mCurrentServer = server;
getFiles(ROOT_DIRECTORY); getFiles(ROOT_DIRECTORY);
TextView emptyView = (TextView) getListView().getEmptyView(); TextView emptyView = (TextView) getListView().getEmptyView();
emptyView.setText(R.string.folder_list_etmpy); emptyView.setText(R.string.folder_list_empty);
} }
/** /**
* Opens a new directory and displays it. * Opens a new directory and displays it.