diff options
author | Michael Dankov <tryagain@navit-project.org> | 2016-07-09 22:51:48 +0300 |
---|---|---|
committer | Michael Dankov <tryagain@navit-project.org> | 2016-07-09 22:51:48 +0300 |
commit | 15882c84ee5c61028229b169f95265e11b38e412 (patch) | |
tree | 54f7d3bba1edb155b19f1006983f8e9fa93acc61 /navit | |
parent | 046d5b828f30b80318b3ee8766db99fdf5ea9324 (diff) | |
download | navit-15882c84ee5c61028229b169f95265e11b38e412.tar.gz |
Fix:port_android:Do not tint on pre-API-17
Tinting the navigation and status bars (introduced in a3e9e7) makes
the whole screen tinted on my Gingerbread (API level 9) device.
As the actual tint code in handleResize is anyway activated on API>=17,
there's no reason to create navigationTintView and statusTintView on API<17.
Diffstat (limited to 'navit')
-rw-r--r-- | navit/android/src/org/navitproject/navit/NavitGraphics.java | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/navit/android/src/org/navitproject/navit/NavitGraphics.java b/navit/android/src/org/navitproject/navit/NavitGraphics.java index de7c41863..f2c91e4a1 100644 --- a/navit/android/src/org/navitproject/navit/NavitGraphics.java +++ b/navit/android/src/org/navitproject/navit/NavitGraphics.java @@ -723,21 +723,26 @@ public class NavitGraphics view.setFocusable(true); view.setFocusableInTouchMode(true); view.setKeepScreenOn(true); - frameLayout = new FrameLayout(activity); relativelayout = new RelativeLayout(activity); - frameLayout.addView(relativelayout); if (use_camera != 0) { SetCamera(use_camera); } relativelayout.addView(view); - - navigationTintView = new SystemBarTintView(activity); - statusTintView = new SystemBarTintView(activity); - frameLayout.addView(navigationTintView); - frameLayout.addView(statusTintView); - - activity.setContentView(frameLayout); + if(Build.VERSION.SDK_INT >= 17) + { + frameLayout = new FrameLayout(activity); + frameLayout.addView(relativelayout); + navigationTintView = new SystemBarTintView(activity); + statusTintView = new SystemBarTintView(activity); + frameLayout.addView(navigationTintView); + frameLayout.addView(statusTintView); + activity.setContentView(frameLayout); + } + else + { + activity.setContentView(relativelayout); + } view.requestFocus(); } |