assignedControls = new HashSet<>();
- /** Color integer value to be applied to the refresh layout's progress indicator. */
+ /**
+ * Color integer value to be applied to the refresh layout's progress indicator.
+ */
private int tintColor = DEFAULT_TINT_COLOR;
/**
@@ -48,14 +55,55 @@ public class RefreshControlProxy extends KrollProxy
*/
private TiSwipeRefreshLayout swipeRefreshLayout;
- /** Creates a new Titanium "RefreshControl" proxy binding. */
+ /**
+ * Creates a new Titanium "RefreshControl" proxy binding.
+ */
public RefreshControlProxy()
{
super();
}
+ /**
+ * Unassigns the given view from a RefreshControlProxy instance that was once assigned to
+ * it via the assignTo() method. A view is expected to call this method when removed from the
+ * window or to disable pull-down refresh support.
+ *
+ * @param view The view to be unassigned from a refresh control, if currently assigned. Can be null.
+ */
+ public static void unassignFrom(TiSwipeRefreshLayout view)
+ {
+ // Validate argument.
+ if (view == null) {
+ return;
+ }
+
+ // Attempt to find a refresh control that is currently assigned to the given view.
+ RefreshControlProxy proxy = null;
+ for (RefreshControlProxy nextProxy : RefreshControlProxy.assignedControls) {
+ if ((nextProxy != null) && (nextProxy.swipeRefreshLayout == view)) {
+ proxy = nextProxy;
+ break;
+ }
+ }
+ if (proxy == null) {
+ return;
+ }
+
+ // Remove the refresh event listener.
+ proxy.swipeRefreshLayout.setOnRefreshListener(null);
+
+ // Disable pull-down refresh support.
+ proxy.endRefreshing();
+ proxy.swipeRefreshLayout.setSwipeRefreshEnabled(false);
+
+ // Unassign the view from the refresh control.
+ RefreshControlProxy.assignedControls.remove(proxy);
+ proxy.swipeRefreshLayout = null;
+ }
+
/**
* Fetches the JavaScript type name of this proxy object.
+ *
* @return Returns the unique type name of this proxy object.
*/
@Override
@@ -69,6 +117,7 @@ public String getApiName()
*
* Expected to be called on the runtime thread when the
* JavaScript Ti.UI.createRefreshControl() function has been invoked.
+ *
* @param properties Dictionary of property settings.
*/
@Override
@@ -94,7 +143,8 @@ public void handleCreationDict(KrollDict properties)
/**
* Called when a single property setting has been changed.
* Expected to be called on the JavaScript runtime thread.
- * @param name The unique name of the property that was changed.
+ *
+ * @param name The unique name of the property that was changed.
* @param value The property new value. Can be null.
*/
@Override
@@ -116,9 +166,9 @@ public void onPropertyChanged(String name, Object value)
/**
* Stores the given tint color value to be applied to the refresh progress indicator.
- * @param colorName
- * The color value to be applied. Expected to be a string such as "red", "blue", "#00FF00", etc.
- * Can be null, in which case, the progress indicator will revert back to its default color.
+ *
+ * @param colorName The color value to be applied. Expected to be a string such as "red", "blue", "#00FF00", etc.
+ * Can be null, in which case, the progress indicator will revert back to its default color.
*/
private void onTintColorChanged(Object colorName)
{
@@ -141,7 +191,9 @@ private void onTintColorChanged(Object colorName)
this.swipeRefreshLayout.setColorSchemeColors(tintColor);
}
- /** Displays the refresh progress indicator if a SwipeRefreshLayout is currently assigned. */
+ /**
+ * Displays the refresh progress indicator if a SwipeRefreshLayout is currently assigned.
+ */
@Kroll.method
public void beginRefreshing()
{
@@ -162,7 +214,9 @@ public void beginRefreshing()
fireEvent(TiC.EVENT_REFRESH_START, null);
}
- /** Hides the refresh progress indicator if a SwipeRefreshLayout is currently assigned. */
+ /**
+ * Hides the refresh progress indicator if a SwipeRefreshLayout is currently assigned.
+ */
@Kroll.method
public void endRefreshing()
{
@@ -195,10 +249,10 @@ public void endRefreshing()
*
* If this refresh control is currently assigned to another view, then it will be automatically
* unassigned from the previous view before being assigned the given view.
- * @param view
- * The view to be assigned to this refresh control.
- *
- * Can be null, in which case, this method will do nothing.
+ *
+ * @param view The view to be assigned to this refresh control.
+ *
+ * Can be null, in which case, this method will do nothing.
*/
public void assignTo(TiSwipeRefreshLayout view)
{
@@ -222,7 +276,8 @@ public void assignTo(TiSwipeRefreshLayout view)
// Set up the given view for pull-down refresh support.
view.setColorSchemeColors(this.tintColor);
view.setSwipeRefreshEnabled(true);
- view.setOnRefreshListener(new TiSwipeRefreshLayout.OnRefreshListener() {
+ view.setOnRefreshListener(new TiSwipeRefreshLayout.OnRefreshListener()
+ {
@Override
public void onRefresh()
{
@@ -232,42 +287,4 @@ public void onRefresh()
}
});
}
-
- /**
- * Unassigns the given view from a RefreshControlProxy instance that was once assigned to
- * it via the assignTo() method. A view is expected to call this method when removed from the
- * window or to disable pull-down refresh support.
- * @param view
- * The view to be unassigned from a refresh control, if currently assigned. Can be null.
- */
- public static void unassignFrom(TiSwipeRefreshLayout view)
- {
- // Validate argument.
- if (view == null) {
- return;
- }
-
- // Attempt to find a refresh control that is currently assigned to the given view.
- RefreshControlProxy proxy = null;
- for (RefreshControlProxy nextProxy : RefreshControlProxy.assignedControls) {
- if ((nextProxy != null) && (nextProxy.swipeRefreshLayout == view)) {
- proxy = nextProxy;
- break;
- }
- }
- if (proxy == null) {
- return;
- }
-
- // Remove the refresh event listener.
- proxy.swipeRefreshLayout.setOnRefreshListener(null);
-
- // Disable pull-down refresh support.
- proxy.endRefreshing();
- proxy.swipeRefreshLayout.setSwipeRefreshEnabled(false);
-
- // Unassign the view from the refresh control.
- RefreshControlProxy.assignedControls.remove(proxy);
- proxy.swipeRefreshLayout = null;
- }
}
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/ScrollViewProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/ScrollViewProxy.java
index d8a48cd4f0b..81ee8644f2d 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/ScrollViewProxy.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/ScrollViewProxy.java
@@ -6,17 +6,19 @@
*/
package ti.modules.titanium.ui;
+import android.app.Activity;
+
import org.appcelerator.kroll.KrollDict;
import org.appcelerator.kroll.annotations.Kroll;
import org.appcelerator.titanium.TiC;
import org.appcelerator.titanium.proxy.TiViewProxy;
-import org.appcelerator.titanium.view.TiUIView;
import org.appcelerator.titanium.util.TiConvert;
+import org.appcelerator.titanium.view.TiUIView;
-import ti.modules.titanium.ui.widget.TiUIScrollView;
-import android.app.Activity;
import java.util.HashMap;
+import ti.modules.titanium.ui.widget.TiUIScrollView;
+
@Kroll.proxy(creatableInModule = UIModule.class,
propertyAccessors = {
TiC.PROPERTY_CONTENT_HEIGHT,
@@ -28,7 +30,7 @@
TiC.PROPERTY_CAN_CANCEL_EVENTS,
TiC.PROPERTY_OVER_SCROLL_MODE,
TiC.PROPERTY_REFRESH_CONTROL
-})
+ })
public class ScrollViewProxy extends TiViewProxy
{
private static final int MSG_FIRST_ID = TiViewProxy.MSG_LAST_ID + 1;
@@ -65,18 +67,18 @@ public void scrollTo(int x, int y, @Kroll.argument(optional = true) HashMap args
handleScrollTo(x, y, animated);
}
- @Kroll.setProperty
- public void setScrollingEnabled(Object enabled)
- {
- getScrollView().setScrollingEnabled(enabled);
- }
-
@Kroll.getProperty
public boolean getScrollingEnabled()
{
return getScrollView().getScrollingEnabled();
}
+ @Kroll.setProperty
+ public void setScrollingEnabled(Object enabled)
+ {
+ getScrollView().setScrollingEnabled(enabled);
+ }
+
@Kroll.method
public void scrollToBottom()
{
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/ScrollableViewProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/ScrollableViewProxy.java
index 0f0ab6a1925..b3ab5c08940 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/ScrollableViewProxy.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/ScrollableViewProxy.java
@@ -6,9 +6,8 @@
*/
package ti.modules.titanium.ui;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicBoolean;
+import android.app.Activity;
+import android.os.Message;
import org.appcelerator.kroll.KrollDict;
import org.appcelerator.kroll.annotations.Kroll;
@@ -17,9 +16,11 @@
import org.appcelerator.titanium.util.TiConvert;
import org.appcelerator.titanium.view.TiUIView;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+
import ti.modules.titanium.ui.widget.TiUIScrollableView;
-import android.app.Activity;
-import android.os.Message;
@Kroll.proxy(creatableInModule = UIModule.class,
propertyAccessors = {
@@ -28,11 +29,11 @@
TiC.PROPERTY_PADDING,
TiC.PROPERTY_SHOW_PAGING_CONTROL,
TiC.PROPERTY_OVER_SCROLL_MODE
-})
+ })
public class ScrollableViewProxy extends TiViewProxy
{
+ public static final int MIN_CACHE_SIZE = 3;
private static final String TAG = "TiScrollableView";
-
private static final int MSG_FIRST_ID = TiViewProxy.MSG_LAST_ID + 1;
public static final int MSG_HIDE_PAGER = MSG_FIRST_ID + 101;
public static final int MSG_MOVE_PREV = MSG_FIRST_ID + 102;
@@ -41,12 +42,9 @@ public class ScrollableViewProxy extends TiViewProxy
public static final int MSG_SET_CURRENT = MSG_FIRST_ID + 107;
public static final int MSG_SET_ENABLED = MSG_FIRST_ID + 109;
public static final int MSG_LAST_ID = MSG_FIRST_ID + 999;
-
private static final int DEFAULT_PAGING_CONTROL_TIMEOUT = 3000;
- public static final int MIN_CACHE_SIZE = 3;
-
protected AtomicBoolean inScroll;
- private List views = new ArrayList<>();
+ private final List views = new ArrayList<>();
private TiUIScrollableView scrollableView;
public ScrollableViewProxy()
@@ -351,6 +349,13 @@ public void fireScroll(int currentPage, float currentPageAsFloat, TiViewProxy cu
}
}
+ @Kroll.getProperty
+ public boolean getScrollingEnabled()
+ {
+ return (scrollableView != null) ? scrollableView.getEnabled()
+ : getProperties().optBoolean(TiC.PROPERTY_SCROLLING_ENABLED, true);
+ }
+
@Kroll.setProperty
public void setScrollingEnabled(boolean value)
{
@@ -358,11 +363,12 @@ public void setScrollingEnabled(boolean value)
scrollableView.setEnabled(value);
}
}
+
@Kroll.getProperty
- public boolean getScrollingEnabled()
+ public int getCurrentPage()
{
- return (scrollableView != null) ? scrollableView.getEnabled()
- : getProperties().optBoolean(TiC.PROPERTY_SCROLLING_ENABLED, true);
+ return (scrollableView != null) ? scrollableView.getCurrentPage()
+ : getProperties().optInt(TiC.PROPERTY_CURRENT_PAGE, 0);
}
@Kroll.setProperty
@@ -375,13 +381,6 @@ public void setCurrentPage(int currentPage)
}
}
- @Kroll.getProperty
- public int getCurrentPage()
- {
- return (scrollableView != null) ? scrollableView.getCurrentPage()
- : getProperties().optInt(TiC.PROPERTY_CURRENT_PAGE, 0);
- }
-
@Override
public void releaseViews()
{
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/SearchBarProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/SearchBarProxy.java
index 59b8002414c..0bfadaae48c 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/SearchBarProxy.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/SearchBarProxy.java
@@ -1,11 +1,7 @@
-/**
- * Titanium SDK
- * Copyright TiDev, Inc. 04/07/2022-Present. All Rights Reserved.
- * Licensed under the terms of the Apache Public License
- * Please see the LICENSE included with this distribution for details.
- */
package ti.modules.titanium.ui;
+import android.app.Activity;
+
import org.appcelerator.kroll.KrollDict;
import org.appcelerator.kroll.annotations.Kroll;
import org.appcelerator.titanium.TiC;
@@ -14,7 +10,6 @@
import org.appcelerator.titanium.view.TiUIView;
import ti.modules.titanium.ui.widget.searchbar.TiUISearchBar;
-import android.app.Activity;
@Kroll.proxy(creatableInModule = UIModule.class,
propertyAccessors = {
@@ -30,7 +25,7 @@
TiC.PROPERTY_PROMPT,
TiC.PROPERTY_PROMPT_ID,
TiC.PROPERTY_VALUE
-})
+ })
public class SearchBarProxy extends TiViewProxy
{
public SearchBarProxy()
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/SliderProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/SliderProxy.java
index d6349387c34..eff016c99ed 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/SliderProxy.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/SliderProxy.java
@@ -6,13 +6,14 @@
*/
package ti.modules.titanium.ui;
+import android.app.Activity;
+
import org.appcelerator.kroll.annotations.Kroll;
import org.appcelerator.titanium.TiC;
import org.appcelerator.titanium.proxy.TiViewProxy;
import org.appcelerator.titanium.view.TiUIView;
import ti.modules.titanium.ui.widget.TiUISlider;
-import android.app.Activity;
@Kroll.proxy(creatableInModule = UIModule.class,
propertyAccessors = {
@@ -27,7 +28,7 @@
TiC.PROPERTY_TINT_COLOR,
TiC.PROPERTY_TRACK_TINT_COLOR,
TiC.PROPERTY_VALUE
-})
+ })
public class SliderProxy extends TiViewProxy
{
public SliderProxy()
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/SwitchProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/SwitchProxy.java
index 3bdcac73f38..f3758a97fa9 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/SwitchProxy.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/SwitchProxy.java
@@ -6,12 +6,14 @@
*/
package ti.modules.titanium.ui;
+import android.app.Activity;
+
import org.appcelerator.kroll.annotations.Kroll;
import org.appcelerator.titanium.TiC;
import org.appcelerator.titanium.proxy.TiViewProxy;
import org.appcelerator.titanium.view.TiUIView;
+
import ti.modules.titanium.ui.widget.TiUISwitch;
-import android.app.Activity;
@Kroll.proxy(creatableInModule = UIModule.class,
propertyAccessors = {
@@ -28,7 +30,7 @@
TiC.PROPERTY_VERTICAL_ALIGN,
TiC.PROPERTY_ON_THUMB_COLOR,
TiC.PROPERTY_THUMB_COLOR
-})
+ })
public class SwitchProxy extends TiViewProxy
{
public SwitchProxy()
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/TabGroupProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/TabGroupProxy.java
index c1849cdc9de..0c76925eb2e 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/TabGroupProxy.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/TabGroupProxy.java
@@ -6,9 +6,15 @@
*/
package ti.modules.titanium.ui;
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.HashMap;
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+
+import androidx.annotation.NonNull;
+import androidx.appcompat.app.ActionBar;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.Toolbar;
import org.appcelerator.kroll.KrollDict;
import org.appcelerator.kroll.annotations.Kroll;
@@ -27,20 +33,15 @@
import org.appcelerator.titanium.util.TiRHelper;
import org.appcelerator.titanium.util.TiUIHelper;
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.HashMap;
+
import ti.modules.titanium.ui.android.AndroidModule;
import ti.modules.titanium.ui.widget.tabgroup.TiUIAbstractTabGroup;
import ti.modules.titanium.ui.widget.tabgroup.TiUIBottomNavigationTabGroup;
import ti.modules.titanium.ui.widget.tabgroup.TiUITabLayoutTabGroup;
-import android.app.Activity;
-import android.content.Intent;
-import android.os.Bundle;
-import androidx.annotation.NonNull;
-import androidx.appcompat.app.ActionBar;
-import androidx.appcompat.app.AppCompatActivity;
-import androidx.appcompat.widget.Toolbar;
-import android.view.LayoutInflater;
-
@Kroll.proxy(creatableInModule = UIModule.class,
propertyAccessors = {
TiC.PROPERTY_TABS_BACKGROUND_COLOR,
@@ -49,27 +50,24 @@
TiC.PROPERTY_AUTO_TAB_TITLE,
TiC.PROPERTY_EXIT_ON_CLOSE,
TiC.PROPERTY_SMOOTH_SCROLL_ON_TAB_CLICK
-})
+ })
public class TabGroupProxy extends TiWindowProxy implements TiActivityWindow
{
private static final String TAG = "TabGroupProxy";
private static final String PROPERTY_POST_TAB_GROUP_CREATED = "postTabGroupCreated";
private static final int MSG_FIRST_ID = TiWindowProxy.MSG_LAST_ID + 1;
-
+ protected static final int MSG_LAST_ID = MSG_FIRST_ID + 999;
private static final int MSG_ADD_TAB = MSG_FIRST_ID + 100;
private static final int MSG_REMOVE_TAB = MSG_FIRST_ID + 101;
private static final int MSG_SET_ACTIVE_TAB = MSG_FIRST_ID + 102;
private static final int MSG_GET_ACTIVE_TAB = MSG_FIRST_ID + 103;
private static final int MSG_SET_TABS = MSG_FIRST_ID + 104;
private static final int MSG_DISABLE_TAB_NAVIGATION = MSG_FIRST_ID + 105;
-
- protected static final int MSG_LAST_ID = MSG_FIRST_ID + 999;
-
- private ArrayList tabs = new ArrayList<>();
+ private static int id_toolbar;
+ private final ArrayList tabs = new ArrayList<>();
private WeakReference tabGroupActivity = new WeakReference<>(null);
private Object selectedTab; // NOTE: Can be TabProxy or Number
private String tabGroupTitle = null;
- private static int id_toolbar;
private boolean autoTabTitle = false;
public TabGroupProxy()
@@ -167,12 +165,6 @@ public Object getActiveTab()
}
}
- private TabProxy getActiveTabProxy()
- {
- Object activeTab = getActiveTab();
- return (activeTab != null) ? parseTab(activeTab) : null;
- }
-
@Kroll.setProperty
public void setActiveTab(Object tabOrIndex)
{
@@ -197,6 +189,12 @@ public void setActiveTab(Object tabOrIndex)
}
}
+ private TabProxy getActiveTabProxy()
+ {
+ Object activeTab = getActiveTab();
+ return (activeTab != null) ? parseTab(activeTab) : null;
+ }
+
@Kroll.getProperty(name = "activity")
public ActivityProxy _getActivity()
{
@@ -337,7 +335,7 @@ protected void handleOpen(KrollDict options)
topActivity.startActivity(intent);
topActivity.overridePendingTransition(0, 0);
} else if (options.containsKey(TiC.PROPERTY_ACTIVITY_ENTER_ANIMATION)
- || options.containsKey(TiC.PROPERTY_ACTIVITY_EXIT_ANIMATION)) {
+ || options.containsKey(TiC.PROPERTY_ACTIVITY_EXIT_ANIMATION)) {
topActivity.startActivity(intent);
int enterAnimation = TiConvert.toInt(options.get(TiC.PROPERTY_ACTIVITY_ENTER_ANIMATION), 0);
int exitAnimation = TiConvert.toInt(options.get(TiC.PROPERTY_ACTIVITY_EXIT_ANIMATION), 0);
@@ -569,7 +567,7 @@ public void onTabSelected(TabProxy tabProxy)
tabProxy.onSelectionChanged(true);
tabProxy.onFocusChanged(true, focusEventData);
- tabProxy.fireEvent(TiC.EVENT_SELECTED, focusEventData, false);
+ tabProxy.fireEvent(TiC.EVENT_SELECTED, focusEventData.clone(), false);
}
@Override
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/TextAreaProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/TextAreaProxy.java
index 1661afb3a4d..d88956f5f91 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/TextAreaProxy.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/TextAreaProxy.java
@@ -6,6 +6,8 @@
*/
package ti.modules.titanium.ui;
+import android.app.Activity;
+
import org.appcelerator.kroll.KrollDict;
import org.appcelerator.kroll.KrollModule;
import org.appcelerator.kroll.annotations.Kroll;
@@ -15,7 +17,6 @@
import org.appcelerator.titanium.view.TiUIView;
import ti.modules.titanium.ui.widget.TiUIText;
-import android.app.Activity;
@Kroll.proxy(creatableInModule = UIModule.class,
propertyAccessors = {
@@ -46,7 +47,7 @@
TiC.PROPERTY_VERTICAL_ALIGN,
TiC.PROPERTY_PADDING,
TiC.PROPERTY_RETURN_KEY_TYPE
-})
+ })
public class TextAreaProxy extends TiViewProxy
{
public TextAreaProxy()
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/TextFieldProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/TextFieldProxy.java
index 65b1f153690..b594c7fadbb 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/TextFieldProxy.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/TextFieldProxy.java
@@ -6,6 +6,8 @@
*/
package ti.modules.titanium.ui;
+import android.app.Activity;
+
import org.appcelerator.kroll.KrollDict;
import org.appcelerator.kroll.KrollModule;
import org.appcelerator.kroll.annotations.Kroll;
@@ -15,7 +17,6 @@
import org.appcelerator.titanium.view.TiUIView;
import ti.modules.titanium.ui.widget.TiUIText;
-import android.app.Activity;
@Kroll.proxy(creatableInModule = UIModule.class,
propertyAccessors = {
@@ -46,7 +47,7 @@
TiC.PROPERTY_VERTICAL_ALIGN,
TiC.PROPERTY_RETURN_KEY_TYPE,
TiC.PROPERTY_PADDING
-})
+ })
public class TextFieldProxy extends TiViewProxy
{
public TextFieldProxy()
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/TiDialogProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/TiDialogProxy.java
index 0f4b3bf5f88..2fe493d11a0 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/TiDialogProxy.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/TiDialogProxy.java
@@ -6,14 +6,14 @@
*/
package ti.modules.titanium.ui;
+import android.app.Activity;
+
import org.appcelerator.kroll.KrollDict;
import org.appcelerator.kroll.annotations.Kroll;
import org.appcelerator.kroll.common.CurrentActivityListener;
import org.appcelerator.titanium.proxy.TiViewProxy;
import org.appcelerator.titanium.util.TiUIHelper;
-import android.app.Activity;
-
@Kroll.proxy(parentModule = UIModule.class,
propertyAccessors = {
"title",
@@ -24,7 +24,7 @@
"options",
"selectedIndex",
"cancel"
-})
+ })
public abstract class TiDialogProxy extends TiViewProxy
{
protected boolean showing = false;
@@ -38,7 +38,8 @@ public TiDialogProxy()
public void show(final KrollDict options)
{
showing = true;
- TiUIHelper.waitForCurrentActivity(new CurrentActivityListener() {
+ TiUIHelper.waitForCurrentActivity(new CurrentActivityListener()
+ {
@Override
public void onCurrentActivityReady(Activity activity)
{
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/ToolbarProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/ToolbarProxy.java
index ec1cd8a6912..0599bdf2f09 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/ToolbarProxy.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/ToolbarProxy.java
@@ -1,13 +1,16 @@
package ti.modules.titanium.ui;
import android.app.Activity;
-import androidx.appcompat.widget.Toolbar;
import android.view.View;
+
+import androidx.appcompat.widget.Toolbar;
+
import org.appcelerator.kroll.annotations.Kroll;
import org.appcelerator.titanium.TiC;
import org.appcelerator.titanium.proxy.TiToolbarProxy;
import org.appcelerator.titanium.proxy.TiViewProxy;
import org.appcelerator.titanium.view.TiUIView;
+
import ti.modules.titanium.ui.widget.TiToolbar;
@Kroll.proxy(creatableInModule = UIModule.class,
@@ -26,7 +29,7 @@
TiC.PROPERTY_SUBTITLE_TEXT_COLOR,
TiC.PROPERTY_CONTENT_INSET_END_WITH_ACTIONS,
TiC.PROPERTY_CONTENT_INSET_START_WITH_NAVIGATION
-})
+ })
public class ToolbarProxy extends TiToolbarProxy
{
private static final java.lang.String TAG = "Toolbar";
@@ -53,6 +56,7 @@ public TiUIView createView(Activity activity)
/**
* Sets the activity this proxy's view should be attached to.
+ *
* @param activity The activity this proxy's view should be attached to.
*/
@Override
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/WebViewProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/WebViewProxy.java
index 8be6063b52b..d0506b36a19 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/WebViewProxy.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/WebViewProxy.java
@@ -56,28 +56,25 @@
TiC.PROPERTY_LIGHT_TOUCH_ENABLED,
TiC.PROPERTY_ON_LINK,
TiC.PROPERTY_SCROLLBARS
-})
+ })
+
public class WebViewProxy extends ViewProxy implements Handler.Callback, OnLifecycleEvent, interceptOnBackPressedEvent
{
+ public static final String OPTIONS_IN_SETHTML = "optionsInSetHtml";
private static final String TAG = "WebViewProxy";
private static final int MSG_FIRST_ID = ViewProxy.MSG_LAST_ID + 1;
-
+ protected static final int MSG_LAST_ID = MSG_FIRST_ID + 999;
private static final int MSG_GO_BACK = MSG_FIRST_ID + 101;
private static final int MSG_GO_FORWARD = MSG_FIRST_ID + 102;
private static final int MSG_RELOAD = MSG_FIRST_ID + 103;
private static final int MSG_STOP_LOADING = MSG_FIRST_ID + 104;
private static final int MSG_RELEASE = MSG_FIRST_ID + 110;
-
- protected static final int MSG_LAST_ID = MSG_FIRST_ID + 999;
+ private static final Map fevalJSRequests = new HashMap<>();
+ private static final int frequestID = 0;
private static String fusername;
private static String fpassword;
- private static int frequestID = 0;
- private static final Map fevalJSRequests = new HashMap<>();
-
- private Message postCreateMessage;
PrintManager printManager;
-
- public static final String OPTIONS_IN_SETHTML = "optionsInSetHtml";
+ private Message postCreateMessage;
public WebViewProxy()
{
@@ -89,6 +86,15 @@ public WebViewProxy()
defaultValues.put(TiC.PROPERTY_ZOOM_LEVEL, 1.0);
}
+ private static void sendPostCreateMessage(WebView view, Message postCreateMessage)
+ {
+ WebView.WebViewTransport transport = (WebView.WebViewTransport) postCreateMessage.obj;
+ if (transport != null) {
+ transport.setWebView(view);
+ }
+ postCreateMessage.sendToTarget();
+ }
+
@Override
public TiUIView createView(Activity activity)
{
@@ -131,40 +137,6 @@ public Object evalJS(String code, @Kroll.argument(optional = true) KrollFunction
return view.getJSValue(code);
}
- private static class EvalJSRunnable implements Runnable
- {
- private final TiUIWebView view;
- private final KrollObject krollObject;
- private final String code;
- private final KrollFunction callback;
-
- public EvalJSRunnable(TiUIWebView view, KrollObject krollObject, String code, KrollFunction callback)
- {
- this.view = view;
- this.krollObject = krollObject;
- this.code = code;
- this.callback = callback;
- }
-
- public void run()
- {
- // Runs the "old" API we built
- String result = view.getJSValue(code);
- callback.callAsync(krollObject, new Object[] { result });
- }
-
- public void runAsync()
- {
- // Runs the newer API provided by Android
- view.getWebView().evaluateJavascript(code, new ValueCallback() {
- public void onReceiveValue(String value)
- {
- callback.callAsync(krollObject, new Object[] { value });
- }
- });
- }
- }
-
@Kroll.getProperty
public String getHtml()
{
@@ -243,6 +215,16 @@ public void setBasicAuthentication(String username, String password)
getWebView().setBasicAuthentication(username, password);
}
+ @Kroll.getProperty
+ public String getUserAgent()
+ {
+ TiUIWebView currWebView = getWebView();
+ if (currWebView != null) {
+ return currWebView.getUserAgentString();
+ }
+ return "";
+ }
+
@Kroll.setProperty
public void setUserAgent(String userAgent)
{
@@ -253,13 +235,13 @@ public void setUserAgent(String userAgent)
}
@Kroll.getProperty
- public String getUserAgent()
+ public HashMap getRequestHeaders()
{
TiUIWebView currWebView = getWebView();
if (currWebView != null) {
- return currWebView.getUserAgentString();
+ return currWebView.getRequestHeaders();
}
- return "";
+ return new HashMap();
}
@Kroll.setProperty
@@ -273,16 +255,6 @@ public void setRequestHeaders(HashMap params)
}
}
- @Kroll.getProperty
- public HashMap getRequestHeaders()
- {
- TiUIWebView currWebView = getWebView();
- if (currWebView != null) {
- return currWebView.getRequestHeaders();
- }
- return new HashMap();
- }
-
@Kroll.method
public boolean canGoBack()
{
@@ -432,9 +404,17 @@ public int getPluginState()
}
@Kroll.setProperty
- public void setDisableContextMenu(boolean disableContextMenu)
+ public void setPluginState(int pluginState)
{
- setPropertyAndFire(TiC.PROPERTY_DISABLE_CONTEXT_MENU, disableContextMenu);
+ switch (pluginState) {
+ case TiUIWebView.PLUGIN_STATE_OFF:
+ case TiUIWebView.PLUGIN_STATE_ON:
+ case TiUIWebView.PLUGIN_STATE_ON_DEMAND:
+ setPropertyAndFire(TiC.PROPERTY_PLUGIN_STATE, pluginState);
+ break;
+ default:
+ setPropertyAndFire(TiC.PROPERTY_PLUGIN_STATE, TiUIWebView.PLUGIN_STATE_OFF);
+ }
}
@Kroll.getProperty
@@ -447,17 +427,9 @@ public boolean getDisableContextMenu()
}
@Kroll.setProperty
- public void setPluginState(int pluginState)
+ public void setDisableContextMenu(boolean disableContextMenu)
{
- switch (pluginState) {
- case TiUIWebView.PLUGIN_STATE_OFF:
- case TiUIWebView.PLUGIN_STATE_ON:
- case TiUIWebView.PLUGIN_STATE_ON_DEMAND:
- setPropertyAndFire(TiC.PROPERTY_PLUGIN_STATE, pluginState);
- break;
- default:
- setPropertyAndFire(TiC.PROPERTY_PLUGIN_STATE, TiUIWebView.PLUGIN_STATE_OFF);
- }
+ setPropertyAndFire(TiC.PROPERTY_DISABLE_CONTEXT_MENU, disableContextMenu);
}
@Kroll.method
@@ -476,12 +448,6 @@ public void resume()
}
}
- @Kroll.setProperty(runOnUiThread = true)
- public void setEnableZoomControls(boolean enabled)
- {
- setPropertyAndFire(TiC.PROPERTY_ENABLE_ZOOM_CONTROLS, enabled);
- }
-
@Kroll.getProperty
public boolean getEnableZoomControls()
{
@@ -493,6 +459,12 @@ public boolean getEnableZoomControls()
return enabled;
}
+ @Kroll.setProperty(runOnUiThread = true)
+ public void setEnableZoomControls(boolean enabled)
+ {
+ setPropertyAndFire(TiC.PROPERTY_ENABLE_ZOOM_CONTROLS, enabled);
+ }
+
@Kroll.getProperty
public float getZoomLevel()
{
@@ -517,12 +489,6 @@ public void setZoomLevel(float value)
}
}
- @Kroll.setProperty
- public void setAllowFileAccess(boolean enabled)
- {
- setPropertyAndFire(TiC.PROPERTY_ALLOW_FILE_ACCESS, enabled);
- }
-
@Kroll.getProperty
public boolean getAllowFileAccess()
{
@@ -534,6 +500,12 @@ public boolean getAllowFileAccess()
return enabled;
}
+ @Kroll.setProperty
+ public void setAllowFileAccess(boolean enabled)
+ {
+ setPropertyAndFire(TiC.PROPERTY_ALLOW_FILE_ACCESS, enabled);
+ }
+
@Kroll.getProperty
public double getProgress()
{
@@ -570,15 +542,6 @@ public void setPostCreateMessage(Message postCreateMessage)
}
}
- private static void sendPostCreateMessage(WebView view, Message postCreateMessage)
- {
- WebView.WebViewTransport transport = (WebView.WebViewTransport) postCreateMessage.obj;
- if (transport != null) {
- transport.setWebView(view);
- }
- postCreateMessage.sendToTarget();
- }
-
/**
* Don't release the web view when it's removed. TIMOB-7808
*/
@@ -656,4 +619,39 @@ public String getApiName()
{
return "Ti.UI.WebView";
}
+
+ private static class EvalJSRunnable implements Runnable
+ {
+ private final TiUIWebView view;
+ private final KrollObject krollObject;
+ private final String code;
+ private final KrollFunction callback;
+
+ public EvalJSRunnable(TiUIWebView view, KrollObject krollObject, String code, KrollFunction callback)
+ {
+ this.view = view;
+ this.krollObject = krollObject;
+ this.code = code;
+ this.callback = callback;
+ }
+
+ public void run()
+ {
+ // Runs the "old" API we built
+ String result = view.getJSValue(code);
+ callback.callAsync(krollObject, new Object[] { result });
+ }
+
+ public void runAsync()
+ {
+ // Runs the newer API provided by Android
+ view.getWebView().evaluateJavascript(code, new ValueCallback()
+ {
+ public void onReceiveValue(String value)
+ {
+ callback.callAsync(krollObject, new Object[] { value });
+ }
+ });
+ }
+ }
}
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/WindowProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/WindowProxy.java
index 02d2eaafcaa..73dbe8f5f67 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/WindowProxy.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/WindowProxy.java
@@ -7,30 +7,6 @@
package ti.modules.titanium.ui;
-import java.lang.ref.WeakReference;
-import java.util.HashMap;
-
-import org.appcelerator.kroll.KrollDict;
-import org.appcelerator.kroll.KrollPromise;
-import org.appcelerator.kroll.annotations.Kroll;
-import org.appcelerator.kroll.common.Log;
-import org.appcelerator.titanium.TiActivity;
-import org.appcelerator.titanium.TiActivityWindow;
-import org.appcelerator.titanium.TiActivityWindows;
-import org.appcelerator.titanium.TiApplication;
-import org.appcelerator.titanium.TiBaseActivity;
-import org.appcelerator.titanium.TiC;
-import org.appcelerator.titanium.TiDimension;
-import org.appcelerator.titanium.TiRootActivity;
-import org.appcelerator.titanium.TiTranslucentActivity;
-import org.appcelerator.titanium.proxy.ActivityProxy;
-import org.appcelerator.titanium.proxy.TiWindowProxy;
-import org.appcelerator.titanium.util.TiColorHelper;
-import org.appcelerator.titanium.util.TiConvert;
-import org.appcelerator.titanium.util.TiRHelper;
-import org.appcelerator.titanium.view.TiUIView;
-import ti.modules.titanium.ui.widget.TiView;
-
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
@@ -40,12 +16,6 @@
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Message;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.appcompat.app.ActionBar;
-import androidx.appcompat.app.AppCompatActivity;
-import androidx.appcompat.widget.Toolbar;
-
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.style.ForegroundColorSpan;
@@ -63,23 +33,53 @@
import android.view.ViewGroup.LayoutParams;
import android.view.Window;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.ActionBar;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.Toolbar;
+
+import org.appcelerator.kroll.KrollDict;
+import org.appcelerator.kroll.KrollPromise;
+import org.appcelerator.kroll.annotations.Kroll;
+import org.appcelerator.kroll.common.Log;
+import org.appcelerator.titanium.TiActivity;
+import org.appcelerator.titanium.TiActivityWindow;
+import org.appcelerator.titanium.TiActivityWindows;
+import org.appcelerator.titanium.TiApplication;
+import org.appcelerator.titanium.TiBaseActivity;
+import org.appcelerator.titanium.TiC;
+import org.appcelerator.titanium.TiDimension;
+import org.appcelerator.titanium.TiRootActivity;
+import org.appcelerator.titanium.TiTranslucentActivity;
+import org.appcelerator.titanium.proxy.ActivityProxy;
+import org.appcelerator.titanium.proxy.TiWindowProxy;
+import org.appcelerator.titanium.util.TiColorHelper;
+import org.appcelerator.titanium.util.TiConvert;
+import org.appcelerator.titanium.util.TiRHelper;
+import org.appcelerator.titanium.view.TiUIView;
+
+import java.lang.ref.WeakReference;
+import java.util.HashMap;
+
+import ti.modules.titanium.ui.widget.TiView;
+
@Kroll.proxy(creatableInModule = UIModule.class,
propertyAccessors = {
TiC.PROPERTY_MODAL,
TiC.PROPERTY_WINDOW_PIXEL_FORMAT,
TiC.PROPERTY_FLAG_SECURE,
TiC.PROPERTY_BAR_COLOR
-})
+ })
public class WindowProxy extends TiWindowProxy implements TiActivityWindow
{
private static final String TAG = "WindowProxy";
private static final String PROPERTY_POST_WINDOW_CREATED = "postWindowCreated";
private static final int MSG_FIRST_ID = TiWindowProxy.MSG_LAST_ID + 1;
+ protected static final int MSG_LAST_ID = MSG_FIRST_ID + 999;
private static final int MSG_SET_PIXEL_FORMAT = MSG_FIRST_ID + 100;
private static final int MSG_SET_TITLE = MSG_FIRST_ID + 101;
- protected static final int MSG_LAST_ID = MSG_FIRST_ID + 999;
-
private static int id_toolbar;
private int barColor = -1;
@@ -156,7 +156,7 @@ protected void handleOpen(KrollDict options)
topActivity.startActivity(intent);
topActivity.overridePendingTransition(0, 0);
} else if (options.containsKey(TiC.PROPERTY_ACTIVITY_ENTER_ANIMATION)
- || options.containsKey(TiC.PROPERTY_ACTIVITY_EXIT_ANIMATION)) {
+ || options.containsKey(TiC.PROPERTY_ACTIVITY_EXIT_ANIMATION)) {
topActivity.startActivity(intent);
int enterAnimation = TiConvert.toInt(options.get(TiC.PROPERTY_ACTIVITY_ENTER_ANIMATION), 0);
int exitAnimation = TiConvert.toInt(options.get(TiC.PROPERTY_ACTIVITY_EXIT_ANIMATION), 0);
@@ -211,7 +211,7 @@ protected void handleClose(@NonNull KrollDict options)
if (!animated) {
activity.overridePendingTransition(0, 0);
} else if (options.containsKey(TiC.PROPERTY_ACTIVITY_ENTER_ANIMATION)
- || options.containsKey(TiC.PROPERTY_ACTIVITY_EXIT_ANIMATION)) {
+ || options.containsKey(TiC.PROPERTY_ACTIVITY_EXIT_ANIMATION)) {
int enterAnimation = TiConvert.toInt(options.get(TiC.PROPERTY_ACTIVITY_ENTER_ANIMATION), 0);
int exitAnimation = TiConvert.toInt(options.get(TiC.PROPERTY_ACTIVITY_EXIT_ANIMATION), 0);
activity.overridePendingTransition(enterAnimation, exitAnimation);
@@ -397,7 +397,7 @@ protected void fillIntent(Activity activity, Intent intent)
}
if (hasProperty(TiC.PROPERTY_WINDOW_PIXEL_FORMAT)) {
intent.putExtra(TiC.PROPERTY_WINDOW_PIXEL_FORMAT,
- TiConvert.toInt(getProperty(TiC.PROPERTY_WINDOW_PIXEL_FORMAT), PixelFormat.UNKNOWN));
+ TiConvert.toInt(getProperty(TiC.PROPERTY_WINDOW_PIXEL_FORMAT), PixelFormat.UNKNOWN));
}
// Set the splitActionBar property
@@ -418,7 +418,7 @@ public void onPropertyChanged(String name, Object value)
} else if (TiC.PROPERTY_TITLE.equals(name)) {
getMainHandler().obtainMessage(MSG_SET_TITLE, value).sendToTarget();
} else if (TiC.PROPERTY_TOP.equals(name) || TiC.PROPERTY_BOTTOM.equals(name)
- || TiC.PROPERTY_LEFT.equals(name) || TiC.PROPERTY_RIGHT.equals(name)) {
+ || TiC.PROPERTY_LEFT.equals(name) || TiC.PROPERTY_RIGHT.equals(name)) {
// The "top", "bottom", "left" and "right" properties do not work for heavyweight windows.
return;
} else if (TiC.PROPERTY_HIDES_BACK_BUTTON.equals(name)) {
@@ -465,6 +465,12 @@ public void onPropertyChanged(String name, Object value)
super.onPropertyChanged(name, value);
}
+ @Kroll.getProperty
+ public boolean getSustainedPerformanceMode()
+ {
+ return TiConvert.toBoolean(getProperty(TiC.PROPERTY_SUSTAINED_PERFORMANCE_MODE), false);
+ }
+
@Kroll.setProperty
public void setSustainedPerformanceMode(boolean mode)
{
@@ -475,12 +481,6 @@ public void setSustainedPerformanceMode(boolean mode)
}
}
- @Kroll.getProperty
- public boolean getSustainedPerformanceMode()
- {
- return TiConvert.toBoolean(getProperty(TiC.PROPERTY_SUSTAINED_PERFORMANCE_MODE), false);
- }
-
@Override
@Kroll.setProperty(retain = false)
public void setWidth(Object width)
@@ -518,7 +518,7 @@ public boolean handleMessage(Message msg)
if (activity != null) {
Window win = activity.getWindow();
if (win != null) {
- win.setFormat(TiConvert.toInt((Object) (msg.obj), PixelFormat.UNKNOWN));
+ win.setFormat(TiConvert.toInt(msg.obj, PixelFormat.UNKNOWN));
win.getDecorView().invalidate();
}
}
@@ -527,21 +527,21 @@ public boolean handleMessage(Message msg)
case MSG_SET_TITLE: {
Activity activity = getWindowActivity();
if (activity != null) {
- activity.setTitle(TiConvert.toString((Object) (msg.obj), ""));
+ activity.setTitle(TiConvert.toString(msg.obj, ""));
if (windowActivity != null && windowActivity.get() != null
&& windowActivity.get().getSupportActionBar() != null) {
ActionBar actionBar = windowActivity.get().getSupportActionBar();
if (actionBar.getTitle() instanceof SpannableStringBuilder) {
SpannableStringBuilder stringBuilder =
- new SpannableStringBuilder(TiConvert.toString((Object) (msg.obj), ""));
+ new SpannableStringBuilder(TiConvert.toString(msg.obj, ""));
if (barColor != -1) {
stringBuilder.setSpan(new ForegroundColorSpan(barColor),
0, stringBuilder.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);
}
actionBar.setTitle(stringBuilder);
} else {
- actionBar.setTitle(TiConvert.toString((Object) (msg.obj), ""));
+ actionBar.setTitle(TiConvert.toString(msg.obj, ""));
}
}
}
@@ -581,7 +581,8 @@ private void setWindowWidthHeight(Object width, Object height)
/**
* Helper method to apply activity transitions.
- * @param win The window holding the activity.
+ *
+ * @param win The window holding the activity.
* @param props The property dictionary.
*/
private void applyActivityTransitions(Window win, KrollDict props)
@@ -627,8 +628,9 @@ private void applyActivityTransitions(Window win, KrollDict props)
/**
* Creates a transition for the supplied transition type.
+ *
* @param props The property dictionary.
- * @param key The transition type
+ * @param key The transition type
* @return A Transition or null if UIModule.TRANSITION_NONE or unknown transition is specified.
*/
@SuppressLint({ "InlinedApi", "RtlHardcoded" })
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/android/CardViewProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/android/CardViewProxy.java
index caf6767d816..e1c2db91a01 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/android/CardViewProxy.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/android/CardViewProxy.java
@@ -6,13 +6,14 @@
*/
package ti.modules.titanium.ui.android;
+import android.app.Activity;
+
import org.appcelerator.kroll.annotations.Kroll;
import org.appcelerator.titanium.TiC;
import org.appcelerator.titanium.proxy.TiViewProxy;
import org.appcelerator.titanium.view.TiUIView;
import ti.modules.titanium.ui.widget.TiUICardView;
-import android.app.Activity;
@Kroll.proxy(creatableInModule = AndroidModule.class,
propertyAccessors = {
@@ -26,7 +27,7 @@
TiC.PROPERTY_PADDING_LEFT,
TiC.PROPERTY_PADDING_RIGHT,
TiC.PROPERTY_PADDING_TOP
-})
+ })
public class CardViewProxy extends TiViewProxy
{
private static final int MSG_FIRST_ID = TiViewProxy.MSG_LAST_ID + 1;
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/android/ProgressIndicatorProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/android/ProgressIndicatorProxy.java
index d5f26372070..f596f29d3c3 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/android/ProgressIndicatorProxy.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/android/ProgressIndicatorProxy.java
@@ -6,6 +6,8 @@
*/
package ti.modules.titanium.ui.android;
+import android.app.Activity;
+
import org.appcelerator.kroll.KrollDict;
import org.appcelerator.kroll.annotations.Kroll;
import org.appcelerator.titanium.TiC;
@@ -13,7 +15,6 @@
import ti.modules.titanium.ui.TiDialogProxy;
import ti.modules.titanium.ui.widget.TiUIProgressIndicator;
-import android.app.Activity;
@Kroll.proxy(creatableInModule = AndroidModule.class,
propertyAccessors = {
@@ -26,7 +27,7 @@
TiC.PROPERTY_MAX,
TiC.PROPERTY_CANCELABLE,
TiC.PROPERTY_CANCELED_ON_TOUCH_OUTSIDE
-})
+ })
@Kroll.dynamicApis(methods = { "hide", "show" })
public class ProgressIndicatorProxy extends TiDialogProxy
{
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/android/SearchViewProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/android/SearchViewProxy.java
index b8fbd13c8d6..d120d62e76d 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/android/SearchViewProxy.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/android/SearchViewProxy.java
@@ -6,13 +6,14 @@
*/
package ti.modules.titanium.ui.android;
+import android.app.Activity;
+
import org.appcelerator.kroll.annotations.Kroll;
import org.appcelerator.titanium.TiC;
import org.appcelerator.titanium.proxy.TiViewProxy;
import org.appcelerator.titanium.view.TiUIView;
import ti.modules.titanium.ui.widget.searchview.TiUISearchView;
-import android.app.Activity;
@Kroll.proxy(creatableInModule = AndroidModule.class,
propertyAccessors = {
@@ -22,7 +23,7 @@
TiC.PROPERTY_HINT_TEXT,
TiC.PROPERTY_HINT_TEXT_COLOR,
TiC.PROPERTY_VALUE
-})
+ })
public class SearchViewProxy extends TiViewProxy
{
private static final String TAG = "SearchProxy";
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIOptionBar.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIOptionBar.java
index 729549b64ad..cc18e9b3e95 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIOptionBar.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIOptionBar.java
@@ -7,6 +7,7 @@
package ti.modules.titanium.ui.widget;
import android.content.Context;
+import android.content.res.ColorStateList;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.view.ViewGroup;
@@ -207,6 +208,58 @@ private void addButton(String title, String accessibilityLabel, Drawable imageDr
MaterialButton button = new MaterialButton(context, null, attributeId);
button.setEnabled(isEnabled);
button.setText(title);
+ if (proxy.hasPropertyAndNotNull(TiC.PROPERTY_SELECTED_BACKGROUND_COLOR)) {
+ ColorStateList oldColors = button.getBackgroundTintList();
+ int col = TiConvert.toColor((String) proxy.getProperty(TiC.PROPERTY_SELECTED_BACKGROUND_COLOR), context);
+ ColorStateList trackStates = new ColorStateList(
+ new int[][] {
+ new int[] { -android.R.attr.state_checked },
+ new int[] { android.R.attr.state_checked },
+ },
+ new int[] {
+ oldColors.getColorForState(new int[] { -android.R.attr.state_checked }, R.attr.colorOnSurface),
+ col
+ }
+ );
+ button.setBackgroundTintList(trackStates);
+ }
+ if (proxy.hasPropertyAndNotNull("selectedBorderColor")) {
+ ColorStateList oldColors = button.getStrokeColor();
+ int col = TiConvert.toColor((String) proxy.getProperty("selectedBorderColor"), context);
+ ColorStateList trackStates = new ColorStateList(
+ new int[][] {
+ new int[] { -android.R.attr.state_checked },
+ new int[] { android.R.attr.state_checked },
+ },
+ new int[] {
+ oldColors.getColorForState(new int[] { -android.R.attr.state_checked }, R.attr.colorOnSurface),
+ col
+ }
+ );
+ button.setStrokeColor(trackStates);
+ }
+ if (proxy.hasPropertyAndNotNull("selectedTextColor") || proxy.hasPropertyAndNotNull(TiC.PROPERTY_COLOR)) {
+ int textCol = button.getCurrentHintTextColor();
+ int selCol = button.getCurrentTextColor();
+
+ if (proxy.hasPropertyAndNotNull("selectedTextColor")) {
+ selCol = TiConvert.toColor((String) proxy.getProperty("selectedTextColor"), context);
+ }
+ if (proxy.hasPropertyAndNotNull(TiC.PROPERTY_COLOR)) {
+ textCol = TiConvert.toColor((String) proxy.getProperty(TiC.PROPERTY_COLOR), context);
+ }
+ ColorStateList trackStates = new ColorStateList(
+ new int[][] {
+ new int[] { -android.R.attr.state_checked },
+ new int[] { android.R.attr.state_checked },
+ },
+ new int[] {
+ textCol,
+ selCol,
+ }
+ );
+ button.setTextColor(trackStates);
+ }
if ((accessibilityLabel != null) && !accessibilityLabel.isEmpty()) {
button.setContentDescription(accessibilityLabel);
}
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUITabbedBar.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUITabbedBar.java
index 0486e21cd6e..8ca71d59e4b 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUITabbedBar.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUITabbedBar.java
@@ -10,6 +10,7 @@
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Color;
+import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.view.MenuItem;
import androidx.annotation.ColorInt;
@@ -133,9 +134,11 @@ protected void onLayout(boolean changed, int l, int t, int r, int b)
// no selected color specified but a text color -> use that
selectedTextColor = textColor;
}
-
this.tabLayout.setTabTextColors(textColor, selectedTextColor);
}
+ if (getProxy().hasPropertyAndNotNull(TiC.PROPERTY_ACTIVE_TINT_COLOR)) {
+ setTintColor(this.tabLayout.getTabAt(0), TiC.PROPERTY_ACTIVE_TINT_COLOR);
+ }
setNativeView(this.tabLayout);
}
@@ -261,6 +264,10 @@ private void addItem(Object value)
if (value instanceof Drawable) {
tab.setIcon(((Drawable) value));
TiUITabLayoutTabGroup.scaleIconToFit(tab);
+
+ if (proxy.hasPropertyAndNotNull(TiC.PROPERTY_TINT_COLOR)) {
+ setTintColor(tab, TiC.PROPERTY_TINT_COLOR);
+ }
} else {
tab.setText(value.toString());
}
@@ -282,6 +289,14 @@ private void addItem(Object value)
}
}
+ private void setTintColor(TabLayout.Tab tab, String color)
+ {
+ if (tab != null && tab.getIcon() != null) {
+ tab.getIcon().setColorFilter(TiConvert.toColor(proxy.getProperty(color),
+ TiApplication.getAppCurrentActivity()), PorterDuff.Mode.SRC_IN);
+ }
+ }
+
// Handle switching styles after creation
public void setNewStyle(int newStyle)
{
@@ -394,6 +409,10 @@ private void onTabIndexChangedTo(int index)
// First, update the proxy's "index" property.
proxy.setProperty(TiC.PROPERTY_INDEX, index);
+ if (proxy.hasPropertyAndNotNull(TiC.PROPERTY_ACTIVE_TINT_COLOR)) {
+ setTintColor(this.tabLayout.getTabAt(index), TiC.PROPERTY_ACTIVE_TINT_COLOR);
+ }
+
// Last, fire a "click" event.
if (!skipClickEvent) {
KrollDict data = new KrollDict();
@@ -406,7 +425,10 @@ private void onTabIndexChangedTo(int index)
@Override
public void onTabUnselected(TabLayout.Tab tab)
{
- // No override
+ // set old tint color again
+ if (proxy.hasPropertyAndNotNull(TiC.PROPERTY_TINT_COLOR)) {
+ setTintColor(tab, TiC.PROPERTY_TINT_COLOR);
+ }
}
@Override
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUIBottomNavigationTabGroup.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUIBottomNavigationTabGroup.java
index f63c4790757..1ead9f66615 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUIBottomNavigationTabGroup.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUIBottomNavigationTabGroup.java
@@ -501,6 +501,7 @@ public void updateTabIcon(int index)
final Drawable drawable = TiUIHelper.getResourceDrawable(tabProxy.getProperty(TiC.PROPERTY_ICON));
this.mBottomNavigationView.getMenu().getItem(index).setIcon(drawable);
+ updateIconTint();
}
@Override
diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUITabLayoutTabGroup.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUITabLayoutTabGroup.java
index 4023d321162..a4d35f234a3 100644
--- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUITabLayoutTabGroup.java
+++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUITabLayoutTabGroup.java
@@ -361,6 +361,7 @@ public void updateTabIcon(int index)
TabLayout.Tab tab = this.mTabLayout.getTabAt(index);
tab.setIcon(TiUIHelper.getResourceDrawable(tabProxy.getProperty(TiC.PROPERTY_ICON)));
scaleIconToFit(tab);
+ updateIconTint();
}
@Override
diff --git a/android/package.json b/android/package.json
index ad6f5134f67..cb890f2d580 100644
--- a/android/package.json
+++ b/android/package.json
@@ -20,9 +20,9 @@
"compileSDKVersion": "33",
"vendorDependencies": {
"android sdk": ">=23.x <=34.x",
- "android build tools": ">=30.0.2 <=33.x",
+ "android build tools": ">=30.0.2 <=34.x",
"android platform tools": "33.x",
- "android tools": "<=26.x",
+ "android tools": "<=34.x",
"android ndk": ">=r21 <=r22b",
"java": ">=11.x"
},
diff --git a/android/runtime/v8/src/native/CMakeLists.txt b/android/runtime/v8/src/native/CMakeLists.txt
index fb6fdb9953a..4c363604f1b 100644
--- a/android/runtime/v8/src/native/CMakeLists.txt
+++ b/android/runtime/v8/src/native/CMakeLists.txt
@@ -5,7 +5,7 @@
# Please see the LICENSE included with this distribution for details.
################################################################################
-cmake_minimum_required(VERSION 3.10.2)
+cmake_minimum_required(VERSION 3.22.1)
# Set project/library name and have it use the C++ compiler.
# Note: Built library will be named "lib${PROJECT_NAME}.so".
diff --git a/android/templates/build/app.build.gradle b/android/templates/build/app.build.gradle
index 4a1607f99fc..44f859dfa54 100644
--- a/android/templates/build/app.build.gradle
+++ b/android/templates/build/app.build.gradle
@@ -62,6 +62,7 @@ android {
storePassword tiKeystorePassword
keyAlias tiKeystoreAliasName
keyPassword tiKeystoreAliasPassword
+ enableV3Signing true
}
}
buildTypes {
diff --git a/android/titanium/build.gradle b/android/titanium/build.gradle
index 0b6596266cb..160a9417a4d 100644
--- a/android/titanium/build.gradle
+++ b/android/titanium/build.gradle
@@ -44,7 +44,7 @@ android {
compileSdkVersion 33
defaultConfig {
minSdkVersion 21
- targetSdkVersion 33
+ targetSdkVersion 34
versionName tiBuildVersionString
versionCode tiBuildVersionCode
buildConfigField('int', 'VERSION_CODE', tiBuildVersionCode.toString())
@@ -74,7 +74,7 @@ android {
}
externalNativeBuild {
cmake {
- version '3.10.2'
+ version '3.22.1'
path "${projectDir}/../runtime/v8/src/native/CMakeLists.txt"
}
}
diff --git a/android/titanium/src/java/org/appcelerator/titanium/proxy/ActionBarProxy.java b/android/titanium/src/java/org/appcelerator/titanium/proxy/ActionBarProxy.java
index 988e87c6746..e49244cc65c 100644
--- a/android/titanium/src/java/org/appcelerator/titanium/proxy/ActionBarProxy.java
+++ b/android/titanium/src/java/org/appcelerator/titanium/proxy/ActionBarProxy.java
@@ -7,14 +7,17 @@
package org.appcelerator.titanium.proxy;
import android.graphics.drawable.Drawable;
+
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
+
import org.appcelerator.kroll.KrollProxy;
import org.appcelerator.kroll.annotations.Kroll;
import org.appcelerator.kroll.common.Log;
import org.appcelerator.titanium.TiC;
import org.appcelerator.titanium.util.TiConvert;
import org.appcelerator.titanium.util.TiUIHelper;
+import org.appcelerator.titanium.view.TiDrawableReference;
@SuppressWarnings("deprecation")
@Kroll.proxy(propertyAccessors = { TiC.PROPERTY_ON_HOME_ICON_ITEM_SELECTED, TiC.PROPERTY_CUSTOM_VIEW })
@@ -23,7 +26,7 @@ public class ActionBarProxy extends KrollProxy
private static final String TAG = "ActionBarProxy";
private static final String ACTION_BAR_NOT_AVAILABLE_MESSAGE = "ActionBar is not enabled";
- private ActionBar actionBar;
+ private final ActionBar actionBar;
private boolean showTitleEnabled = true;
public ActionBarProxy(AppCompatActivity activity)
@@ -33,7 +36,7 @@ public ActionBarProxy(AppCompatActivity activity)
// Guard against calls to ActionBar made before inflating the ActionBarView
if (actionBar != null) {
actionBar.setDisplayOptions(ActionBar.DISPLAY_USE_LOGO | ActionBar.DISPLAY_SHOW_HOME
- | ActionBar.DISPLAY_SHOW_TITLE);
+ | ActionBar.DISPLAY_SHOW_TITLE);
} else {
Log.w(TAG, "Trying to get a reference to ActionBar before its container was inflated.");
}
@@ -76,16 +79,6 @@ public void setHomeButtonEnabled(boolean homeButtonEnabled)
}
}
- @Kroll.setProperty
- public void setNavigationMode(int navigationMode)
- {
- if (actionBar != null) {
- actionBar.setNavigationMode(navigationMode);
- } else {
- Log.w(TAG, ACTION_BAR_NOT_AVAILABLE_MESSAGE);
- }
- }
-
@Kroll.setProperty
public void setBackgroundImage(String url)
{
@@ -102,27 +95,17 @@ public void setBackgroundImage(String url)
actionBar.setDisplayShowTitleEnabled(showTitleEnabled);
actionBar.setBackgroundDrawable(backgroundImage);
- }
- }
-
- @Kroll.setProperty
- public void setTitle(String title)
- {
- if (actionBar != null) {
- actionBar.setTitle(title);
- } else {
- Log.w(TAG, ACTION_BAR_NOT_AVAILABLE_MESSAGE);
- }
- }
-
- @Kroll.setProperty
- public void setSubtitle(String subTitle)
- {
- if (actionBar != null) {
- actionBar.setDisplayShowTitleEnabled(true);
- actionBar.setSubtitle(subTitle);
} else {
- Log.w(TAG, ACTION_BAR_NOT_AVAILABLE_MESSAGE);
+ // fallback check with TiDrawableReference
+ TiDrawableReference source = TiDrawableReference.fromUrl(this, url);
+ if (source.getDrawable() != null) {
+ actionBar.setDisplayShowTitleEnabled(!showTitleEnabled);
+ actionBar.setDisplayShowTitleEnabled(showTitleEnabled);
+ actionBar.setBackgroundDrawable(source.getDrawable());
+ } else {
+ // fail - show error
+ Log.e(TAG, "Image " + url + " not found");
+ }
}
}
@@ -152,6 +135,17 @@ public String getSubtitle()
return (String) actionBar.getSubtitle();
}
+ @Kroll.setProperty
+ public void setSubtitle(String subTitle)
+ {
+ if (actionBar != null) {
+ actionBar.setDisplayShowTitleEnabled(true);
+ actionBar.setSubtitle(subTitle);
+ } else {
+ Log.w(TAG, ACTION_BAR_NOT_AVAILABLE_MESSAGE);
+ }
+ }
+
@Kroll.getProperty
public String getTitle()
{
@@ -161,13 +155,33 @@ public String getTitle()
return (String) actionBar.getTitle();
}
+ @Kroll.setProperty
+ public void setTitle(String title)
+ {
+ if (actionBar != null) {
+ actionBar.setTitle(title);
+ } else {
+ Log.w(TAG, ACTION_BAR_NOT_AVAILABLE_MESSAGE);
+ }
+ }
+
@Kroll.getProperty
public int getNavigationMode()
{
if (actionBar == null) {
return 0;
}
- return (int) actionBar.getNavigationMode();
+ return actionBar.getNavigationMode();
+ }
+
+ @Kroll.setProperty
+ public void setNavigationMode(int navigationMode)
+ {
+ if (actionBar != null) {
+ actionBar.setNavigationMode(navigationMode);
+ } else {
+ Log.w(TAG, ACTION_BAR_NOT_AVAILABLE_MESSAGE);
+ }
}
@Kroll.method
diff --git a/android/titanium/src/java/org/appcelerator/titanium/proxy/TiWindowProxy.java b/android/titanium/src/java/org/appcelerator/titanium/proxy/TiWindowProxy.java
index a7546b6ab63..237924bbb95 100644
--- a/android/titanium/src/java/org/appcelerator/titanium/proxy/TiWindowProxy.java
+++ b/android/titanium/src/java/org/appcelerator/titanium/proxy/TiWindowProxy.java
@@ -51,6 +51,7 @@
TiC.PROPERTY_ON_BACK,
TiC.PROPERTY_TITLE,
TiC.PROPERTY_TITLEID,
+ TiC.PROPERTY_TITLE_ATTRIBUTES,
TiC.PROPERTY_WINDOW_SOFT_INPUT_MODE
})
public abstract class TiWindowProxy extends TiViewProxy
diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiNinePatchHelper.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiNinePatchHelper.java
index 652820f4b8c..0509e6ef62c 100644
--- a/android/titanium/src/java/org/appcelerator/titanium/util/TiNinePatchHelper.java
+++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiNinePatchHelper.java
@@ -6,8 +6,6 @@
*/
package org.appcelerator.titanium.util;
-import java.util.ArrayList;
-
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.Rect;
@@ -15,15 +13,11 @@
import android.graphics.drawable.Drawable;
import android.graphics.drawable.NinePatchDrawable;
+import java.util.ArrayList;
+
@SuppressWarnings("deprecation")
public class TiNinePatchHelper
{
- private static class SegmentColor
- {
- int index;
- int color;
- }
-
public Drawable process(Drawable d)
{
Drawable nd = d;
@@ -199,8 +193,8 @@ byte[] createChunk(Bitmap b)
numColors = colors.size();
// Figure out the size / looks like padded to 32bits.
- int size = 32 + // wasDeserialized, numXDivs, numYDivs, numColors, padLeft, padRight, padTop, padBottom
- numXDivs * 32 + numYDivs * 32 + numColors * 32;
+ int size = 32 // wasDeserialized, numXDivs, numYDivs, numColors, padLeft, padRight, padTop, padBottom
+ + numXDivs * 32 + numYDivs * 32 + numColors * 32;
chunk = new byte[size];
chunk[0] = 0;
@@ -245,4 +239,10 @@ private void toBytes(byte[] a, int offset, int v)
a[offset + 2] = (byte) ((0x00FF0000 & v) >> 16);
a[offset + 3] = (byte) ((0xFF000000 & v) >> 24);
}
+
+ private static class SegmentColor
+ {
+ int index;
+ int color;
+ }
}
diff --git a/android/titanium/src/java/ti/modules/titanium/BufferProxy.java b/android/titanium/src/java/ti/modules/titanium/BufferProxy.java
index a0422f7dcbb..1825b2082df 100644
--- a/android/titanium/src/java/ti/modules/titanium/BufferProxy.java
+++ b/android/titanium/src/java/ti/modules/titanium/BufferProxy.java
@@ -6,9 +6,6 @@
*/
package ti.modules.titanium;
-import java.io.UnsupportedEncodingException;
-import java.util.Arrays;
-
import org.appcelerator.kroll.KrollDict;
import org.appcelerator.kroll.KrollModule;
import org.appcelerator.kroll.KrollProxy;
@@ -18,6 +15,9 @@
import org.appcelerator.titanium.TiC;
import org.appcelerator.titanium.util.TiConvert;
+import java.io.UnsupportedEncodingException;
+import java.util.Arrays;
+
import ti.modules.titanium.codec.CodecModule;
/**
@@ -28,7 +28,7 @@
TiC.PROPERTY_BYTE_ORDER,
TiC.PROPERTY_TYPE,
TiC.PROPERTY_VALUE
-})
+ })
public class BufferProxy extends KrollProxy
{
private static final String TAG = "BufferProxy";
@@ -170,13 +170,14 @@ protected void validateOffsetAndLength(int offset, int length, int bufferLength)
{
if (length > offset + bufferLength) {
throw new IllegalArgumentException("offset of " + offset + " and length of " + length
- + " is larger than the buffer length: " + bufferLength);
+ + " is larger than the buffer length: " + bufferLength);
}
}
/**
* Writes data from sourceBuffer into this.
- * @param position the offset position of this buffer.
+ *
+ * @param position the offset position of this buffer.
* @param sourceBuffer the source buffer to write from.
* @param sourceOffset the offset position of the sourceBuffer.
* @param sourceLength the length of the sourceBuffer.
@@ -372,6 +373,7 @@ public int getLength()
/**
* Sets the length of this buffer proxy by either growing or shrinking
* the allocated buffer space
+ *
* @param length The new length of this buffer proxy in bytes
*/
@Kroll.setProperty
diff --git a/apidoc/Titanium/Android/ActionBar.yml b/apidoc/Titanium/Android/ActionBar.yml
index 2450257cbde..db9f36e9bb5 100644
--- a/apidoc/Titanium/Android/ActionBar.yml
+++ b/apidoc/Titanium/Android/ActionBar.yml
@@ -55,6 +55,15 @@ examples:
```
+
+ `app/controllers/index.js`:
+ ```
+ function doMenuClick() {}
+ function openSettings() {}
+ function doSearch() {}
+ $.index.open();
+ ```
+
`app/styles/index.tss`:
```
"MenuItem": {
@@ -85,7 +94,7 @@ examples:
win.activity.onCreate = () => {
const actionBar = win.activity.actionBar;
if (actionBar) {
- actionBar.backgroundImage = "/bg.png";
+ actionBar.backgroundImage = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'bg.png').nativePath;
actionBar.title = "New Title";
actionBar.onHomeIconItemSelected = () => {
Ti.API.info("Home icon clicked!");
diff --git a/apidoc/Titanium/Calendar/Event.yml b/apidoc/Titanium/Calendar/Event.yml
index 51d4831c44a..da4d8cbe140 100644
--- a/apidoc/Titanium/Calendar/Event.yml
+++ b/apidoc/Titanium/Calendar/Event.yml
@@ -72,7 +72,7 @@ methods:
- name: save
summary: Saves changes to an event permanently.
description: |
- This method raises an exception if it is passed an event from another event store.
+ This method raises an exception if it is passed an event from another calendar.
When an event is saved, it is updated in the Calendar database. Any fields you did
not modify are updated to reflect the most recent value in the database. If the
@@ -94,20 +94,21 @@ methods:
since: {android: "7.1.0", iphone: "3.1.0", ipad: "3.1.0"}
- name: remove
- summary: Removes an event from the event store.
+ summary: Removes an event from the calendar.
description: |
- This method raises an exception if it is passed an event from another event store.
+ This method raises an exception on iOS if an event from another calendar is used.
returns:
type: Boolean
parameters:
- name: span
summary: |
- The span to use. Indicates whether to remove future instances of the event in
+ iOS-only: The span to use. Indicates whether to remove future instances of the event in
the case of a recurring event.
type: Number
constants: Titanium.Calendar.SPAN_*
default:
- platforms: [iphone, ipad, macos]
+ since: {android: "12.4.0", iphone: "3.1.0", ipad: "3.1.0", macos: "9.2.0"}
+ platforms: [android, iphone, ipad, macos]
- name: refresh
summary: Updates the event's data with the current information in the Calendar database.
diff --git a/apidoc/Titanium/UI/OptionBar.yml b/apidoc/Titanium/UI/OptionBar.yml
index 9c6fc680bf1..f96bbe19130 100644
--- a/apidoc/Titanium/UI/OptionBar.yml
+++ b/apidoc/Titanium/UI/OptionBar.yml
@@ -60,6 +60,30 @@ properties:
default: horizontal
availability: creation
+ - name: selectedBackgroundColor
+ summary: Background color of the selected button
+ type: [String, Titanium.UI.Color]
+ platforms: [android]
+ since: { android: "12.4.0"}
+
+ - name: selectedTextColor
+ summary: Text color of the selected button
+ type: [String, Titanium.UI.Color]
+ platforms: [android]
+ since: { android: "12.4.0"}
+
+ - name: selectedBorderColor
+ summary: Border color of the selected button
+ type: [String, Titanium.UI.Color]
+ platforms: [android]
+ since: { android: "12.4.0"}
+
+ - name: color
+ summary: Text color of the unselected button
+ type: [String, Titanium.UI.Color]
+ platforms: [android]
+ since: { android: "12.4.0"}
+
examples:
- title: Text-Only Buttons
example: |
diff --git a/apidoc/Titanium/UI/TabbedBar.yml b/apidoc/Titanium/UI/TabbedBar.yml
index 0e846c3b578..6857a5eda60 100644
--- a/apidoc/Titanium/UI/TabbedBar.yml
+++ b/apidoc/Titanium/UI/TabbedBar.yml
@@ -56,6 +56,12 @@ properties:
availability: creation
platforms: [iphone, ipad, android, macos]
since: {iphone: "9.0.0", ipad: "9.0.0", android: "12.0.0"}
+ - name: activeTintColor
+ summary: Icon tint color of the selected tab
+ type: [ String, Titanium.UI.Color ]
+ availability: creation
+ platforms: [android]
+ since: {android: "12.5.0"}
- name: style
summary: Style of the tabbed bar.
description: |
@@ -66,7 +72,7 @@ properties:
The `BAR` style specifies a more compact style and allows the bar's background
color or gradient to show through.
-
+
For Android use [Titanium.UI.TABS_STYLE_DEFAULT](Titanium.UI.TABS_STYLE_DEFAULT) or
[Titanium.UI.TABS_STYLE_BOTTOM_NAVIGATION](Titanium.UI.TABS_STYLE_BOTTOM_NAVIGATION) and
it is only supported in the creation dictionary of the proxy.
diff --git a/build/lib/android/index.js b/build/lib/android/index.js
index 5e6a731b2ba..7da8a8faa16 100644
--- a/build/lib/android/index.js
+++ b/build/lib/android/index.js
@@ -173,7 +173,11 @@ class Android {
async function gradlew(args) {
await new Promise((resolve, reject) => {
- const childProcess = spawn(GRADLEW_FILE_PATH, args, { cwd: TITANIUM_ANDROID_PATH, stdio: 'inherit' });
+ const childProcess = spawn(GRADLEW_FILE_PATH, args, {
+ cwd: TITANIUM_ANDROID_PATH,
+ shell: process.platform === 'win32',
+ stdio: 'inherit'
+ });
childProcess.on('error', reject);
childProcess.on('exit', (exitCode) => {
if (exitCode === 0) {
diff --git a/build/lib/docs.js b/build/lib/docs.js
index 6b10a836e11..67e054a4533 100644
--- a/build/lib/docs.js
+++ b/build/lib/docs.js
@@ -23,7 +23,10 @@ class Documentation {
const outputFile = path.join(this.outputDir, filename);
return new Promise((resolve, reject) => {
- const prc = spawn(cmdPath, args, { cwd: DOC_DIR });
+ const prc = spawn(cmdPath, args, {
+ cwd: DOC_DIR,
+ shell: process.platform === 'win32'
+ });
prc.stdout.on('data', data => console.log(data.toString().trim()));
prc.stderr.on('data', data => console.error(data.toString().trim()));
prc.on('close', code => {
diff --git a/package-lock.json b/package-lock.json
index 4b577831625..fd968703387 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "titanium-mobile",
- "version": "12.4.0",
+ "version": "12.5.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "titanium-mobile",
- "version": "12.4.0",
+ "version": "12.5.0",
"hasInstallScript": true,
"license": "Apache-2.0",
"dependencies": {
@@ -25,7 +25,7 @@
"ejs": "3.1.9",
"fields": "0.1.24",
"fs-extra": "11.2.0",
- "ioslib": "1.7.36",
+ "ioslib": "1.7.37",
"liveview": "1.5.6",
"lodash.merge": "4.6.2",
"markdown": "0.5.0",
@@ -2285,6 +2285,7 @@
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz",
"integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==",
+ "license": "BSD-3-Clause",
"dependencies": {
"detect-libc": "^2.0.0",
"https-proxy-agent": "^5.0.0",
@@ -2305,6 +2306,7 @@
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",
"integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",
"deprecated": "This package is no longer supported.",
+ "license": "ISC",
"dependencies": {
"delegates": "^1.0.0",
"readable-stream": "^3.6.0"
@@ -2318,6 +2320,7 @@
"resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz",
"integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",
"deprecated": "This package is no longer supported.",
+ "license": "ISC",
"dependencies": {
"aproba": "^1.0.3 || ^2.0.0",
"color-support": "^1.1.2",
@@ -2337,6 +2340,7 @@
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz",
"integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",
+ "license": "ISC",
"dependencies": {
"abbrev": "1"
},
@@ -2352,6 +2356,7 @@
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz",
"integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",
"deprecated": "This package is no longer supported.",
+ "license": "ISC",
"dependencies": {
"are-we-there-yet": "^2.0.0",
"console-control-strings": "^1.1.0",
@@ -3744,7 +3749,8 @@
"node_modules/@yarnpkg/lockfile": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz",
- "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ=="
+ "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==",
+ "license": "BSD-2-Clause"
},
"node_modules/@yarnpkg/parsers": {
"version": "3.0.0-rc.41",
@@ -5192,7 +5198,8 @@
"node_modules/ci-info": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
- "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ=="
+ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
+ "license": "MIT"
},
"node_modules/clang-format": {
"version": "1.6.0",
@@ -6493,6 +6500,7 @@
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz",
"integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==",
+ "license": "Apache-2.0",
"engines": {
"node": ">=8"
}
@@ -7590,6 +7598,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz",
"integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==",
+ "license": "Apache-2.0",
"dependencies": {
"micromatch": "^4.0.2"
}
@@ -8813,9 +8822,10 @@
}
},
"node_modules/ioslib": {
- "version": "1.7.36",
- "resolved": "https://registry.npmjs.org/ioslib/-/ioslib-1.7.36.tgz",
- "integrity": "sha512-LxmVa7TrKPXOE2IWxlNyNASTonSLjizxfG1dO8wZwGWowng+9/YBeIbPcQxaFgT8GMGeSMkkK1Npi2XUl7iiVQ==",
+ "version": "1.7.37",
+ "resolved": "https://registry.npmjs.org/ioslib/-/ioslib-1.7.37.tgz",
+ "integrity": "sha512-D4SrH3QocN2GBlzSBcv9V1WKpmcOVUk3F6rjHafWXtrAFs7ZrsPtyR0nA4t1ubqjOYwkTZLgMliEUrs5bpfqXQ==",
+ "license": "Apache-2.0",
"dependencies": {
"always-tail": "0.2.0",
"async": "^3.2.4",
@@ -8823,7 +8833,7 @@
"debug": "^4.3.4",
"mkdirp": "0.5.1",
"node-appc": "1.1.6",
- "node-ios-device": "1.12.0"
+ "node-ios-device": "^1.12.1"
},
"engines": {
"node": ">=10.13"
@@ -8982,6 +8992,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz",
"integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==",
+ "license": "MIT",
"dependencies": {
"ci-info": "^2.0.0"
},
@@ -9019,6 +9030,7 @@
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
"integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
+ "license": "MIT",
"bin": {
"is-docker": "cli.js"
},
@@ -9302,6 +9314,7 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
"integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
+ "license": "MIT",
"dependencies": {
"is-docker": "^2.0.0"
},
@@ -9799,6 +9812,7 @@
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz",
"integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==",
+ "license": "MIT",
"dependencies": {
"graceful-fs": "^4.1.11"
}
@@ -11429,7 +11443,8 @@
"node_modules/nan": {
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.20.0.tgz",
- "integrity": "sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw=="
+ "integrity": "sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw==",
+ "license": "MIT"
},
"node_modules/nanoid": {
"version": "3.3.1",
@@ -11694,10 +11709,11 @@
}
},
"node_modules/node-ios-device": {
- "version": "1.12.0",
- "resolved": "https://registry.npmjs.org/node-ios-device/-/node-ios-device-1.12.0.tgz",
- "integrity": "sha512-ewGLYmcW1LbsTqs5UYmlLcm/52GCmGcuFTysWBqWnHPp88PfOh7uVm4zonb9r4MR/Nublt0vt0mNDIum0R71pw==",
+ "version": "1.12.1",
+ "resolved": "https://registry.npmjs.org/node-ios-device/-/node-ios-device-1.12.1.tgz",
+ "integrity": "sha512-qcCfQw5qXek1l4NDuKt19w4gCZK4Sra4AM2PXQrpW5NhhCCl0pGfDKknBNzB0UmVd+lRm5CF5Wvy8c2Nor2jEQ==",
"hasInstallScript": true,
+ "license": "Apache-2.0",
"dependencies": {
"@mapbox/node-pre-gyp": "^1.0.10",
"debug": "^4.3.4",
@@ -11713,6 +11729,7 @@
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/node-pre-gyp-init/-/node-pre-gyp-init-1.2.1.tgz",
"integrity": "sha512-gbC2fERRmWbJFvj54f4yyiY/O6J1kkLrN7jkwRvzNmgMgPCufZLv76l2luzWjj+Ge0xQF6zDalZ6iIgzCHJ95Q==",
+ "license": "MIT",
"dependencies": {
"@mapbox/node-pre-gyp": "^1.0.1"
}
@@ -12383,6 +12400,7 @@
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
@@ -12476,6 +12494,7 @@
"version": "7.4.2",
"resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz",
"integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==",
+ "license": "MIT",
"dependencies": {
"is-docker": "^2.0.0",
"is-wsl": "^2.1.1"
@@ -12864,6 +12883,7 @@
"version": "6.5.1",
"resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.5.1.tgz",
"integrity": "sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA==",
+ "license": "MIT",
"dependencies": {
"@yarnpkg/lockfile": "^1.1.0",
"chalk": "^4.1.2",
@@ -12892,6 +12912,7 @@
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "license": "MIT",
"dependencies": {
"color-convert": "^2.0.1"
},
@@ -12906,6 +12927,7 @@
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "license": "MIT",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
@@ -12921,6 +12943,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "license": "MIT",
"dependencies": {
"color-name": "~1.1.4"
},
@@ -12931,12 +12954,14 @@
"node_modules/patch-package/node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "license": "MIT"
},
"node_modules/patch-package/node_modules/cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+ "license": "MIT",
"dependencies": {
"nice-try": "^1.0.4",
"path-key": "^2.0.1",
@@ -12952,6 +12977,7 @@
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
"integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
+ "license": "MIT",
"dependencies": {
"at-least-node": "^1.0.0",
"graceful-fs": "^4.2.0",
@@ -12967,6 +12993,7 @@
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"deprecated": "Glob versions prior to v9 are no longer supported",
+ "license": "ISC",
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -12986,6 +13013,7 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "license": "MIT",
"engines": {
"node": ">=8"
}
@@ -12994,6 +13022,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
"integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==",
+ "license": "MIT",
"engines": {
"node": ">=4"
}
@@ -13003,6 +13032,7 @@
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
"integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
"deprecated": "Rimraf versions prior to v4 are no longer supported",
+ "license": "ISC",
"dependencies": {
"glob": "^7.1.3"
},
@@ -13014,6 +13044,7 @@
"version": "5.7.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
+ "license": "ISC",
"bin": {
"semver": "bin/semver"
}
@@ -13022,6 +13053,7 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==",
+ "license": "MIT",
"dependencies": {
"shebang-regex": "^1.0.0"
},
@@ -13033,6 +13065,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
"integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==",
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
@@ -13041,6 +13074,7 @@
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "license": "MIT",
"dependencies": {
"has-flag": "^4.0.0"
},
@@ -13052,6 +13086,7 @@
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "license": "ISC",
"dependencies": {
"isexe": "^2.0.0"
},
@@ -14543,6 +14578,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
"integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
+ "license": "MIT",
"engines": {
"node": ">=6"
}
@@ -22690,9 +22726,9 @@
}
},
"ioslib": {
- "version": "1.7.36",
- "resolved": "https://registry.npmjs.org/ioslib/-/ioslib-1.7.36.tgz",
- "integrity": "sha512-LxmVa7TrKPXOE2IWxlNyNASTonSLjizxfG1dO8wZwGWowng+9/YBeIbPcQxaFgT8GMGeSMkkK1Npi2XUl7iiVQ==",
+ "version": "1.7.37",
+ "resolved": "https://registry.npmjs.org/ioslib/-/ioslib-1.7.37.tgz",
+ "integrity": "sha512-D4SrH3QocN2GBlzSBcv9V1WKpmcOVUk3F6rjHafWXtrAFs7ZrsPtyR0nA4t1ubqjOYwkTZLgMliEUrs5bpfqXQ==",
"requires": {
"always-tail": "0.2.0",
"async": "^3.2.4",
@@ -22700,7 +22736,7 @@
"debug": "^4.3.4",
"mkdirp": "0.5.1",
"node-appc": "1.1.6",
- "node-ios-device": "1.12.0"
+ "node-ios-device": "^1.12.1"
},
"dependencies": {
"@xmldom/xmldom": {
@@ -24852,9 +24888,9 @@
}
},
"node-ios-device": {
- "version": "1.12.0",
- "resolved": "https://registry.npmjs.org/node-ios-device/-/node-ios-device-1.12.0.tgz",
- "integrity": "sha512-ewGLYmcW1LbsTqs5UYmlLcm/52GCmGcuFTysWBqWnHPp88PfOh7uVm4zonb9r4MR/Nublt0vt0mNDIum0R71pw==",
+ "version": "1.12.1",
+ "resolved": "https://registry.npmjs.org/node-ios-device/-/node-ios-device-1.12.1.tgz",
+ "integrity": "sha512-qcCfQw5qXek1l4NDuKt19w4gCZK4Sra4AM2PXQrpW5NhhCCl0pGfDKknBNzB0UmVd+lRm5CF5Wvy8c2Nor2jEQ==",
"requires": {
"@mapbox/node-pre-gyp": "^1.0.10",
"debug": "^4.3.4",
diff --git a/package.json b/package.json
index 87fb7f8cfd5..543a66416e7 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "titanium-mobile",
"description": "Titanium SDK",
- "version": "12.4.0",
+ "version": "12.5.0",
"moduleApiVersion": {
"iphone": "2",
"android": "4"
@@ -100,7 +100,7 @@
"ejs": "3.1.9",
"fields": "0.1.24",
"fs-extra": "11.2.0",
- "ioslib": "1.7.36",
+ "ioslib": "1.7.37",
"liveview": "1.5.6",
"lodash.merge": "4.6.2",
"markdown": "0.5.0",