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

Discussion in 'Android Questions' started by Rick in North Carolina, Jun 11, 2015.

  1. Rick in North Carolina

    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;

    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:
  2. DonManfred

    DonManfred Expert Licensed User

    I would try to use inline java; see the turorial on how to extend onCreate
  3. Rick in North Carolina

    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:

    application code........
            ImageBlue.Visible = 
    ToastMessageShow("End Connection"True)
    Log("End Connection")
    End Sub

    #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;
    public void _onResume() {
    public void _onPause() {
    public void _onDestroy() {
    public void _onStop() {
    public void _onStart() {
    #End IF
    Last edited: Jun 12, 2015
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice