diff options
author | mvglasow <michael -at- vonglasow.com> | 2016-01-18 13:52:45 +0100 |
---|---|---|
committer | mvglasow <michael -at- vonglasow.com> | 2016-02-02 09:58:31 +0100 |
commit | 97e493aaacf25e4a56cb9c8dae8b4e90615ca2c9 (patch) | |
tree | 503723946781499f06cc63f06788cca0e1efe548 /navit/android/src | |
parent | b5ae2a33d79db5e21f2b7007da03776a1084f2d5 (diff) | |
download | navit-97e493aaacf25e4a56cb9c8dae8b4e90615ca2c9.tar.gz |
Add:port_android:Make system bars translucent on API 19+, transparent on API 21+
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'navit/android/src')
-rw-r--r-- | navit/android/src/org/navitproject/navit/Navit.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/navit/android/src/org/navitproject/navit/Navit.java b/navit/android/src/org/navitproject/navit/Navit.java index f08de4e56..d33425a76 100644 --- a/navit/android/src/org/navitproject/navit/Navit.java +++ b/navit/android/src/org/navitproject/navit/Navit.java @@ -25,6 +25,9 @@ import java.io.InputStream; import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
@@ -63,6 +66,7 @@ import android.util.Log; import android.view.Display;
import android.view.Menu;
import android.view.MenuItem;
+import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
@@ -387,6 +391,12 @@ public class Navit extends Activity {
super.onResume();
Log.d("Navit", "OnResume");
+ if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
+ /* Required to make system bars fully transparent */
+ getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+ | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+ | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
+ }
//InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
// DEBUG
// intent_data = "google.navigation:q=Wien Burggasse 27";
|