Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-28445

Android: Add "FLAG_LAYOUT_NO_LIMITS" window constant

    Details

    • Story Points:
      1

      Description

      Adds the possibility to use the FLAG_LAYOUT_NO_LIMITS flag to make the statusbar completly transparent. Currently you can only hide it (fullscreen) or make it semi transparent (extendSafeArea).

      var win = Ti.UI.createWindow({
      	title: 'Demo App',
      	backgroundColor: "#aaa",
      	extendSafeArea: true,
      	windowFlags: Ti.UI.Android.FLAG_LAYOUT_NO_LIMITS,
      });
      win.open();
      

      Note 1:
      This flag won't make the status bar transparent on Android 4.x or Android 10+. I believe you "might" have to make adjustments to the theme to make the top status bar transparent on Android 10 and higher, but Google would prefer that you make the status bar transparent via the theme instead.

      Note 2:
      This flag breaks the "safeAreaPadding" feature. That is, setting the "no limits" flags means the window will ignore all insets, causing "safeAreaPadding" to return all zeros. This flag also breaks the keyboard "adjustPan" feature as well.

      Work-Around:
      On older Titanium versions, you can use this flag "today" by using this constant's integer value as shown below.

      const FLAG_LAYOUT_NO_LIMITS = 512;
      const window = Ti.UI.createWindow({
      	extendSafeArea: true,
      	theme: "Theme.AppCompat.NoTitleBar",
      	windowFlags: FLAG_LAYOUT_NO_LIMITS,
      });
      

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              michael Michael Gangolf
              Reviewer:
              Gary Mathews
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration