From b0f124c158f11636ee18698eb338e2b6a33b0bef Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Sat, 4 Jan 2014 17:41:44 +0100 Subject: [PATCH] Changed string.xml organization, fixed play/pause button description. --- res/values/strings.xml | 37 ++++++++++++++----- .../controldlna/gui/RouteFragment.java | 4 ++ .../controldlna/gui/ServerFragment.java | 2 +- 3 files changed, 32 insertions(+), 11 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 6f689f0..dc145f1 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -2,25 +2,42 @@ ControlDLNA - Route + + Server + Folder is empty + No UPNP devices found. + \nNew devices will be added automatically when they are available. + + + Route + Playlist is empty + No routes found. + \nNew routes will be added automatically when they are available. + + Play Pause - Do you really want to exit the renderer? Playback will be stopped. Previous Next Shuffle Repeat + + + Do you really want to exit the renderer? + Playback will be stopped. Please select a route - Album Art - DLNA Playback Wifi needs to be connected for playback - Enable Wifi automatically on start - "Do not show this dialog again" - No UPNP devices found. \nNew devices will be added automatically when they are available. - No routes found. \nNew routes will be added automatically when they are available. - Folder is empty - Playlist is empty + + + Album Art + + + DLNA Playback UPNP Route Provider Service + + Enable Wifi automatically on start + "Do not show this dialog again" + diff --git a/src/com/github/nutomic/controldlna/gui/RouteFragment.java b/src/com/github/nutomic/controldlna/gui/RouteFragment.java index 1a30012..92ec346 100644 --- a/src/com/github/nutomic/controldlna/gui/RouteFragment.java +++ b/src/com/github/nutomic/controldlna/gui/RouteFragment.java @@ -391,10 +391,12 @@ public class RouteFragment extends MediaRouteDiscoveryFragment implements if (mPlaying) { s.pause(); mPlayPause.setImageResource(R.drawable.ic_action_play); + mPlayPause.setContentDescription(getResources().getString(R.string.play)); } else { s.resume(); mListView.smoothScrollToPosition(s.getCurrentTrack()); mPlayPause.setImageResource(R.drawable.ic_action_pause); + mPlayPause.setContentDescription(getResources().getString(R.string.pause)); } mPlaying = !mPlaying; break; @@ -557,10 +559,12 @@ public class RouteFragment extends MediaRouteDiscoveryFragment implements status.getPlaybackState() == MediaItemStatus.PLAYBACK_STATE_PENDING) { mPlaying = true; mPlayPause.setImageResource(R.drawable.ic_action_pause); + mPlayPause.setContentDescription(getResources().getString(R.string.pause)); } else { mPlaying = false; mPlayPause.setImageResource(R.drawable.ic_action_play); + mPlayPause.setContentDescription(getResources().getString(R.string.play)); } if (mListView.getAdapter() == mPlaylistAdapter) diff --git a/src/com/github/nutomic/controldlna/gui/ServerFragment.java b/src/com/github/nutomic/controldlna/gui/ServerFragment.java index d3d2d1c..c17567e 100644 --- a/src/com/github/nutomic/controldlna/gui/ServerFragment.java +++ b/src/com/github/nutomic/controldlna/gui/ServerFragment.java @@ -251,7 +251,7 @@ public class ServerFragment extends ListFragment implements OnBackPressedListene mCurrentServer = server; getFiles(ROOT_DIRECTORY); 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.