Add content description to the notification button

This commit is contained in:
Peter Vágner 2017-07-02 17:17:16 +02:00
commit 4ce299ca37

View file

@ -199,6 +199,7 @@ public class RecordingService extends Service {
view.setTextViewText(R.id.notification_text, text);
view.setOnClickPendingIntent(R.id.notification_pause, pe);
view.setImageViewResource(R.id.notification_pause, !recording ? R.drawable.ic_play_arrow_black_24dp : R.drawable.ic_pause_black_24dp);
view.setContentDescription(R.id.notification_pause, getString(!recording ? R.string.record_button : R.string.pause_button));
NotificationCompat.Builder builder = new NotificationCompat.Builder(this)
.setOngoing(true)