lib/android: hide the title bar at the top of the screen
authorAlexis Laferrière <alexis.laf@xymus.net>
Sun, 13 Mar 2016 17:40:22 +0000 (13:40 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Mon, 21 Mar 2016 18:01:57 +0000 (14:01 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/android/ui/ui.nit

index d6cb45e..e93922d 100644 (file)
@@ -37,6 +37,21 @@ redef class Control
        type NATIVE: JavaObject
 end
 
+redef class NativeActivity
+
+       private fun remove_title_bar in "Java" `{
+               self.requestWindowFeature(android.view.Window.FEATURE_NO_TITLE);
+       `}
+end
+
+redef class App
+       redef fun on_create
+       do
+               app.native_activity.remove_title_bar
+               super
+       end
+end
+
 redef class Window
        redef var native = app.native_activity.new_global_ref