-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(android): implement Shortcut proxy (#11759)
* feat(android): implement Shortcut proxy * docs: update documentation * test: include Shortcut tests * test(android): limit to android * docs: minor fixes * test: improve Ti.UI.Shortcut tests * fix(android): implement Ti.UI.Shortcut click event * test: simplify ShortcutItem test * docs: include click event * docs: update example * fix(android): validate max shortcuts * fix(android): include missing getById() method Co-authored-by: Sohail <ssaddique@axway.com>
- Loading branch information
1 parent
901f991
commit 5432efc
Showing
9 changed files
with
654 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
android/modules/ui/src/java/ti/modules/titanium/ui/ShortcutModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2020 by Axway, Inc. 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 org.appcelerator.kroll.KrollModule; | ||
import org.appcelerator.kroll.annotations.Kroll; | ||
|
||
/** | ||
* This module exist so `Ti.UI.Shortcut.addEventListener()` is defined. | ||
* `Ti.UI.createShortcut` is manually defined in `UIModule`. | ||
*/ | ||
@Kroll.module(parentModule = UIModule.class) | ||
public class ShortcutModule extends KrollModule | ||
{ | ||
private static final String TAG = "ShortcutModule"; | ||
|
||
public ShortcutModule() | ||
{ | ||
super("Shortcut"); | ||
} | ||
|
||
@Override | ||
public String getApiName() | ||
{ | ||
return "Ti.UI.Shortcut"; | ||
} | ||
} |
Oops, something went wrong.