Make categories read out correctly by screenreader.

This commit is contained in:
Peter Serwylo 2017-04-12 17:05:01 +10:00
parent 93e39d895c
commit 2fbfcb66b0
2 changed files with 4 additions and 1 deletions

View File

@ -81,6 +81,7 @@ public class CategoryController extends RecyclerView.ViewHolder implements Loade
int categoryNameId = getCategoryResource(activity, categoryName, "string", false);
String translatedName = categoryNameId == 0 ? categoryName : activity.getString(categoryNameId);
heading.setText(translatedName);
heading.setContentDescription(activity.getString(R.string.tts_category_name, translatedName));
viewAll.setVisibility(View.INVISIBLE);

View File

@ -19,7 +19,9 @@
android:paddingStart="18dp"
android:paddingRight="18dp"
android:paddingEnd="18dp"
tools:layout_editor_absoluteX="0dp" />
tools:layout_editor_absoluteX="0dp"
android:focusable="true"
android:focusableInTouchMode="true" />
<Button
android:id="@+id/button"