diff --git a/FBReader/src/main/java/org/accessibility/SimpleGestureFilter.java b/FBReader/src/main/java/org/accessibility/SimpleGestureFilter.java index 7d97e5e599f..30bb417c5a8 100644 --- a/FBReader/src/main/java/org/accessibility/SimpleGestureFilter.java +++ b/FBReader/src/main/java/org/accessibility/SimpleGestureFilter.java @@ -159,7 +159,7 @@ public boolean onSingleTapConfirmed(MotionEvent arg0) { } - public static interface SimpleGestureListener { + public interface SimpleGestureListener { void onSwipe(int direction); void onDoubleTap(); diff --git a/FBReader/src/main/java/org/geometerplus/android/fbreader/benetech/FBReaderWithNavigationBar.java b/FBReader/src/main/java/org/geometerplus/android/fbreader/benetech/FBReaderWithNavigationBar.java index 1a37db6db5d..c2e04f4e1a8 100644 --- a/FBReader/src/main/java/org/geometerplus/android/fbreader/benetech/FBReaderWithNavigationBar.java +++ b/FBReader/src/main/java/org/geometerplus/android/fbreader/benetech/FBReaderWithNavigationBar.java @@ -578,16 +578,20 @@ private void enablePauseButton() { private void changePlayPauseButtonState(final boolean isPlayButton) { runOnUiThread(new Runnable() { public void run() { - if (accessibilityManager.isEnabled()) - return; - ImageButton playButton = (ImageButton) findViewById(R.id.navigation_bar_play); - final int resourceIdForButton = getPlayButtonImageResource(isPlayButton); - playButton.setImageResource(resourceIdForButton); + playButton.setImageResource(getPlayButtonImageResource(isPlayButton)); + playButton.setContentDescription(getString(getPlayButtonContentDescription(isPlayButton))); } }); } + private int getPlayButtonContentDescription(boolean isPlayButton) { + if (isPlayButton) + return R.string.content_description_play; + + return R.string.content_description_pause; + } + private int getPlayButtonImageResource(boolean isPlayButton) { if (isPlayButton) return R.drawable.ic_play_arrow_white_24dp; diff --git a/FBReader/src/main/res/values/strings.xml b/FBReader/src/main/res/values/strings.xml index feabcc64e88..2e95dd7313e 100644 --- a/FBReader/src/main/res/values/strings.xml +++ b/FBReader/src/main/res/values/strings.xml @@ -164,4 +164,7 @@ Page Bookmark + play + pause +