Accessibility content description for quick action dialog buttons

This commit is contained in:
Igor B. Poretsky 2017-04-23 12:22:07 +03:00
parent d1e8cb5b61
commit 9c1f4fb28c
5 changed files with 6 additions and 0 deletions

View file

@ -29,6 +29,7 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_margin="16dp" android:layout_margin="16dp"
android:src="@drawable/ic_action_plus" android:src="@drawable/ic_action_plus"
android:contentDescription="@string/quick_action_new_action"
app:backgroundTint="@color/dashboard_blue"/> app:backgroundTint="@color/dashboard_blue"/>
</RelativeLayout> </RelativeLayout>

View file

@ -73,6 +73,7 @@
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:scaleType="centerInside" android:scaleType="centerInside"
android:tint="?attr/secondary_icon_color" android:tint="?attr/secondary_icon_color"
android:contentDescription="@string/action_delete"
android:src="@drawable/ic_action_remove_dark"/> android:src="@drawable/ic_action_remove_dark"/>
</LinearLayout> </LinearLayout>

View file

@ -56,6 +56,7 @@
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:scaleType="centerInside" android:scaleType="centerInside"
android:src="@drawable/ic_action_remove_dark" android:src="@drawable/ic_action_remove_dark"
android:contentDescription="@string/action_delete"
android:tint="?attr/secondary_icon_color" /> android:tint="?attr/secondary_icon_color" />
</LinearLayout> </LinearLayout>

View file

@ -155,6 +155,8 @@ public class CreateEditActionDialog extends DialogFragment {
R.drawable.abc_ic_ab_back_mtrl_am_alpha, R.drawable.abc_ic_ab_back_mtrl_am_alpha,
R.color.color_white)); R.color.color_white));
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
toolbar.setNavigationOnClickListener(new View.OnClickListener() { toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {

View file

@ -111,6 +111,7 @@ public class QuickActionListFragment extends BaseOsmAndFragment implements Quick
Drawable back = getMyApplication().getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha); Drawable back = getMyApplication().getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
back.setColorFilter(ContextCompat.getColor(getContext(), R.color.color_white), PorterDuff.Mode.MULTIPLY); back.setColorFilter(ContextCompat.getColor(getContext(), R.color.color_white), PorterDuff.Mode.MULTIPLY);
toolbar.setNavigationIcon(back); toolbar.setNavigationIcon(back);
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
toolbar.setNavigationOnClickListener(new View.OnClickListener() { toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {