Android Question Moverio Glasses - How to set window (activity) layout parameters?

Rick in North Carolina

Member
Licensed User
Forgive me if this has been answered (i searched the forum for anything close...)

I am using Epson Moverio Glasses and it has an unconventional way of setting the activity to full screen (I tried the conventional Android ways...manifest , etc.. )

From Epson's docs for Android:
Application can use full screen with the following setting.
FLAG_SMARTFULLSCREEN = 0x80000000;
Implement the following lines in each Activity onCreate():


Window win = getWindow();
WindowManager.LayoutParams winParams = win.getAttributes();
winParams.flags |= WindowManager.LayoutParams.FLAG_SMARTFULLSCREEN;
win.setAttributes(winParams);

This is as far as I have gotten with B4A...

Dim rWin As Reflector
rWin.Target = rWin.GetActivity
Dim Window As JavaObject = rWin.RunMethod("getWindow")

Some direction to continue would be appreciated :cool:
Thanks!
 

Rick in North Carolina

Member
Licensed User
Ahhh yes... perfect! Thanks Manfred.

Here is the java code added to the bottom of my application code:

B4X:
 application code........
        ImageBlue.Visible = False
        ToastMessageShow("End Connection", True)
        Log("End Connection")
End Sub

B4X:
#If JAVA
import android.view.Window;
import android.view.WindowManager;

public void _onCreate() {
      long FLAG_SMARTFULLSCREEN = 0x80000000;
      Window win = getWindow();
      WindowManager.LayoutParams winParams = win.getAttributes();
      winParams.flags |= FLAG_SMARTFULLSCREEN;
      win.setAttributes(winParams);
}
public void _onResume() {
     BA.Log("_onResume");
}
public void _onPause() {
     BA.Log("_onPause");
}
public void _onDestroy() {
     BA.Log("_onDestroy");
}
public void _onStop() {
     BA.Log("_onStop");
}
public void _onStart() {
     BA.Log("_onStart");
}
#End IF
 
Last edited:
Top