diff options
author | Langston Smith <langston.smith@mapbox.com> | 2019-05-27 19:04:30 -0700 |
---|---|---|
committer | langsmith <langstonlmcs@gmail.com> | 2019-09-19 14:14:26 -0700 |
commit | d1459ec2272959b0bffa8ea73ae07f949ad386b1 (patch) | |
tree | 9dcc2b178c5e85b981472aa24c51b2d1c78ed15c | |
parent | 1cb97afbcfc578ec1272848625f992eb29fdd989 (diff) | |
download | qtlocation-mapboxgl-d1459ec2272959b0bffa8ea73ae07f949ad386b1.tar.gz |
[android] setting focus order for keyboard navigation
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java index 4521d2ae60..cf675bba54 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java @@ -131,11 +131,20 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback { // inflate view View view = LayoutInflater.from(context).inflate(R.layout.mapbox_mapview_internal, this); + view.setNextFocusForwardId(R.id.logoView); + view.setNextFocusRightId(R.id.logoView); + view.setNextFocusLeftId(R.id.attributionView); compassView = view.findViewById(R.id.compassView); - attrView = view.findViewById(R.id.attributionView); - attrView.setImageDrawable(BitmapUtils.getDrawableFromRes(getContext(), R.drawable.mapbox_info_bg_selector)); logoView = view.findViewById(R.id.logoView); logoView.setImageDrawable(BitmapUtils.getDrawableFromRes(getContext(), R.drawable.mapbox_logo_icon)); + logoView.setNextFocusForwardId(R.id.attributionView); + logoView.setNextFocusRightId(R.id.attributionView); + logoView.setNextFocusLeftId(view.getId()); + attrView = view.findViewById(R.id.attributionView); + attrView.setImageDrawable(BitmapUtils.getDrawableFromRes(getContext(), R.drawable.mapbox_info_bg_selector)); + attrView.setNextFocusForwardId(view.getId()); + attrView.setNextFocusRightId(view.getId()); + attrView.setNextFocusLeftId(R.id.logoView); // add accessibility support setContentDescription(context.getString(R.string.mapbox_mapActionDescription)); |