Skip to content

Commit

Permalink
Merge branch 'master' into androidPhotoPicker
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga authored Jan 9, 2025
2 parents 1dd2adf + 73f7e25 commit bcb2fb4
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
TiC.PROPERTY_WINDOW_PIXEL_FORMAT,
TiC.PROPERTY_FLAG_SECURE,
TiC.PROPERTY_BAR_COLOR,
TiC.PROPERTY_STATUS_BAR_COLOR
TiC.PROPERTY_STATUS_BAR_COLOR,
TiC.PROPERTY_UI_FLAGS
})

public class WindowProxy extends TiWindowProxy implements TiActivityWindow
Expand Down Expand Up @@ -328,6 +329,10 @@ public void windowCreated(TiBaseActivity activity, Bundle savedInstanceState)
win.setStatusBarColor(colorInt);
}

if (hasProperty(TiC.PROPERTY_UI_FLAGS)) {
win.getDecorView().setSystemUiVisibility(TiConvert.toInt(getProperty(TiC.PROPERTY_UI_FLAGS)));
}

// Handle titleAttributes property.
if (hasProperty(TiC.PROPERTY_TITLE_ATTRIBUTES)) {
KrollDict innerAttributes = getProperties().getKrollDict(TiC.PROPERTY_TITLE_ATTRIBUTES);
Expand Down Expand Up @@ -462,6 +467,13 @@ public void onPropertyChanged(String name, Object value)
}
}

if (name.equals(TiC.PROPERTY_UI_FLAGS)) {
if (windowActivity != null && windowActivity.get() != null) {
AppCompatActivity activity = windowActivity.get();
activity.getWindow().getDecorView().setSystemUiVisibility(TiConvert.toInt(value));
}
}

if (name.equals(TiC.PROPERTY_TITLE_ATTRIBUTES)) {
if (windowActivity != null && windowActivity.get() != null) {
// Get a reference to the ActionBar.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@ public class TiC
public static final String PROPERTY_JOBTITLE = "jobTitle";
public static final String PROPERTY_DEPARTMENT = "department";
public static final String PROPERTY_FIXED_SIZE = "fixedSize";
public static final String PROPERTY_UI_FLAGS = "uiFlags";

public static final String SIZE_AUTO = "auto";
public static final String URL_APP_PREFIX = "app://";
Expand Down
10 changes: 10 additions & 0 deletions apidoc/Titanium/UI/Window.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1537,6 +1537,16 @@ properties:
since: "3.3.0"
availability: creation

- name: uiFlags
summary: Additional UI flags to set on the Activity Window.
description: |
See [WindowManager.LayoutParams](https://developer.android.com/reference/android/view/View#setSystemUiVisibility\(int\)) for a
list of additional flags that can be assigned to this property. For example, you can use `8192` (SYSTEM_UI_FLAG_LIGHT_STATUS_BAR) to set
the status bar text color to a dark color.
platforms: [android]
type: Number
since: "12.7.0"

- name: windowSoftInputMode
summary: |
Determines whether a window's soft input area (ie software keyboard) is visible
Expand Down
4 changes: 0 additions & 4 deletions iphone/iphone/Titanium.plist
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@
<string>Can we use your microphone?</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Can we save to your photo library?</string>
<key>UIAppFonts</key>
<array>
<string>comic_zine_ot.otf</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiresFullScreen</key>
Expand Down
115 changes: 82 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"colors": "1.4.0",
"ejs": "3.1.9",
"fields": "0.1.24",
"fs-extra": "11.2.0",
"fs-extra": "10.0.0",
"ioslib": "1.7.39",
"liveview": "1.5.6",
"lodash.merge": "4.6.2",
Expand Down Expand Up @@ -155,7 +155,7 @@
"nyc": "15.1.0",
"request-promise-native": "1.0.9",
"rollup": "2.76.0",
"ssri": "10.0.4",
"ssri": "8.0.1",
"stream-splitter": "0.3.2",
"strip-ansi": "6.0.1",
"titanium": "6.1.1",
Expand Down

0 comments on commit bcb2fb4

Please sign in to comment.