diff --git a/.eslintrc b/.eslintrc index 6eabf12f624..655e3fad978 100644 --- a/.eslintrc +++ b/.eslintrc @@ -33,9 +33,7 @@ "kroll": "readonly" }, "rules": { - "node/no-deprecated-api": "off", - "node/no-unsupported-features/es-syntax": "off", - "node/no-unsupported-features/node-builtins": ["warn", { "version": "10.11.0" }] + "node/no-unsupported-features/es-syntax": "off" } }, { @@ -61,9 +59,7 @@ "sourceType": "module" }, "rules": { - "node/no-deprecated-api": "off", - "node/no-unsupported-features/es-syntax": "off", - "node/no-unsupported-features/node-builtins": ["warn", { "version": "10.11.0" }] + "node/no-unsupported-features/es-syntax": "off" } }, { diff --git a/.github/actions/build-android/action.yml b/.github/actions/build-android/action.yml index 3f150d06384..ac6d0389498 100644 --- a/.github/actions/build-android/action.yml +++ b/.github/actions/build-android/action.yml @@ -49,18 +49,10 @@ runs: run: npm run lint:android shell: bash - - name: Set up Homebrew - id: set-up-homebrew - uses: Homebrew/actions/setup-homebrew@master - - name: Install ccache - run: brew install ccache - shell: bash - - - name: Retrieve ccache - uses: actions/cache@v3 + uses: hendrikmuhs/ccache-action@v1.2 with: - path: ${{ env.CCACHE_DIR }} + create-symlink: true key: ${{ runner.os }}-ccache-${{ github.sha }} restore-keys: | ${{ runner.os }}-ccache- diff --git a/.github/dependabot.yml b/.github/dependabot.yml.disable similarity index 100% rename from .github/dependabot.yml rename to .github/dependabot.yml.disable diff --git a/.github/workflows/cla.yaml b/.github/workflows/cla.yaml index ac0fe2322be..bbfcc73f82c 100644 --- a/.github/workflows/cla.yaml +++ b/.github/workflows/cla.yaml @@ -8,6 +8,6 @@ jobs: name: Verify contributor steps: - - uses: tidev/tidev-cla-action@v1 + - uses: tidev/tidev-cla-action@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/regen-builds.yml b/.github/workflows/regen-builds.yml index 0dcf274b199..c4bc936c500 100644 --- a/.github/workflows/regen-builds.yml +++ b/.github/workflows/regen-builds.yml @@ -1,7 +1,5 @@ name: Regen Builds on: - release: - types: [published, released] workflow_run: workflows: [Build] types: [completed] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b567d40fce9..9ab7e263666 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,13 @@ on: options: - GA - RC + - RC2 + - RC3 + - RC4 - Beta + - Beta2 + - Beta3 + - Beta4 jobs: validate: @@ -171,4 +177,9 @@ jobs: git add package-lock.json git commit -m "chore(release): bump version" git push - + - name: Regen Builds + uses: peter-evans/repository-dispatch@v2 + with: + event-type: regen-builds + repository: tidev/downloads-www + token: ${{ secrets.REGEN_BUILDS_DOCS_GITHUB_TOKEN }} diff --git a/AppSpider.scfg b/AppSpider.scfg deleted file mode 100644 index 0f32b008bc0..00000000000 --- a/AppSpider.scfg +++ /dev/null @@ -1,3205 +0,0 @@ - - -MobileSDK -6.0 -1 -0 -0 -0 -0 -0 -1 - - -Internet Explorer -1073741824 -0 - -100 -5000 --1 -500 -50 -100 -300 -100 -300 -250 -2 -10 --1 -25 -5 -500 -2500 -500 -500 -500 -500 -60000 -4000 -4 -600 -400 -100 -400 -2 -100 -10 -Smart -(page|resource) (you requested )?(was not|cannot be) found|Page not found|404(.0)? - ((File (or directory )?not found)|(Not Found))|HTTP Status 404|404 Not Found - -]|\d([-+]|%2[bd])\d|repeat\(|alert\(|/x\w{7}\.txt]]> - -0 -Case Sensitive -0 -0 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0.95 -0.8 -Disabled -1 -1 -1 -1 -1000 - -1 -react[^"]*\.js|data-reactid - - - -https://f4df0833a1352ef193633d85356e6e80ffcdcdb7.cloudapp-enterprise.appcelerator.com/api - - - - -https://f4df0833a1352ef193633d85356e6e80ffcdcdb7.cloudapp-enterprise.appcelerator.com/* -All -Wildcard -Include - - -https://*.f4df0833a1352ef193633d85356e6e80ffcdcdb7.cloudapp-enterprise.appcelerator.com/* -All -Wildcard -Include - - - - -css - - -axd - - - - -pdf - - -doc - - -jpg - - -jpeg - - -gif - - -png - - -bmp - - -ico - - -js - - - - -fla - - -swf - - -pdf - - -doc - - -jpg - - -jpeg - - -gif - - -png - - -bmp - - -ico - - -dll - - -exe - - -eot - - -ttf - - -mp3 - - -mp4 - - -wav - - -woff - - -svg - - - - -txt - - -js - - -css - - -json - - - - -audio/* - - -image/* - - -video/* - - -application/pdf - - -application/zip - - -application/x-rar-compressed - - -application/x-dvi - - -application/x-shockwave-flash - - -application/msword - - -application/ogg - - -application/x-tar - - -application/octet-stream - - - - -text/html - - -html/* - - -application/xhtml+xml - - - - -text/plain - - -text/csv - - -text/css - - -text/javascript - - -application/javascript - - -application/x-javascript - - -application/json - - -application/x-httpd-php-source - - - - -application/xml-dtd - - -text/xml - - -application/soap+xml - - -application/xml - - - - -*.css - - -*.js - - -*.xml - - -*.dtd - - -*.axd - - -*.json - - -*/js/* - - -*/css/* - - - - -pdf - - -doc - - -jpg - - -jpeg - - -gif - - -png - - -bmp - - -ico - - -exe - - -swf - - -mp3 - - -mp4 - - -wav - - -eot - - -ttf - - -woff - - -ico - - -svg - - - - -audio/* - - -image/* - - -video/* - - -application/pdf - - -application/zip - - -application/x-rar-compressed - - -application/x-dvi - - -application/x-shockwave-flash - - -application/msword - - -application/ogg - - -application/x-tar - - -application/octet-stream - - - - -400 -200 -25 -15 -2 -50 -4 -1 -1 -1000000 -3600 - - -^_*(ASP[.]NET_SessionId|VSTATE|VIEWSTATE(ENCRYPTED|FIELDCOUNT|GENERATOR|[0-9]*)|EVENT(VALIDATION|TTARGET|ARGUMENT)|COMPRESSEDVIEWSTATE|LASTFOCUS|CALLBACK(ID|FRAME|LOADSCRIPT|PARAM|INDEX)|SCROLLPOSITIONX|SCROLLPOSITIONY|utm.*|submit[.][x|y]|_ga|_gat|__utm[a|b|c|t|z|v|x])$ -Regex - - - - -Default attack policy -Smart -Smart -0 -This web browser does not support JavaScript or JavaScript in this web browser is not enabled. - - -1 -0 -Web Site|Directory|File|Web Resource|Parameter|Response Analysis -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - -1 -59597A25A9504D5AAD20B74A4DCCABB7 -High -High -100 -3 -0 -0 -0 -Directory|File|Web Resource|Parameter -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -9F6600FB2E7840E48B156790FEFAC10A -High -Informational -100 -3 -1 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -929E08F60E084936B12C984ED0F5F47C -High -High -100 -4 -0 -0 -0 -Parameter -Post -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -719FF94DEF014D29B16234909941E48E -Medium -Low -20 -2 -0 -0 -0 -Directory -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -865E5CE0E5144D3E899B825EC8603969 -Medium -Low -100 -2 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -13B4C758BA174200885A29CBA7346165 -Medium -Informational -100 -1 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -E33B272027B844D5BBB8EDE541983474 -Medium -Low -100 -4 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -A8091DB7769C49ED9E844B9F19529AC1 -High -High -2 -2 -0 -0 -0 -Web Resource -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -7F61DDD522C5439B9EAB4FC17B2F47AA -High -High -2 -2 -0 -0 -0 -Parameter -Query|Post -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -22E85EEA6883403982D8C298AEBC935A -High -High -200 -4 -0 -0 -0 -Parameter -Directory|File|Path|Query|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -FD1C760270CE493D92F50C347C79218F -Low -Low -100 -4 -0 -0 -0 -Directory -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -A41D5AC842594BF086E9A96DD3353333 -Low -Informational -100 -4 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -BBFCB66779ED4E7292C08F19E9BB45DF -Medium -Low -20 -10 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -2227AE47A2AA40A6B6B1328AC13A6F0C -Low -Low -100 -5 -0 -0 -0 -Web Resource|Response Analysis -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -F8A0814584594965B0AF68B4E190F566 -Low -Medium -10 -2 -0 -0 -0 -Response Analysis - -HTML|Form|Silverlight - - - -1 -C35E7D79DD6F4DA489BBF6BC1D9D012B -Medium -Informational -100 -4 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -81C9D7ED0E33447899D5CD20B978617B -Low -Low -100 -2 -0 -0 -0 -Web Resource -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -3A586D24C653446196BAAC345FDE8C53 -Medium -Informational -10 -1 -0 -0 -0 -Directory -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -EE998B281CE840948E90BF2D61E4C5F9 -Medium -Informational -10 -1 -0 -0 -0 -Parameter -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -1DE8C004C53D4B89A41E6B98DC6FD3B4 -Medium -Informational -100 -1 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -2CE90A403F704F80961E381BE19CCA2F -Medium -Low -100 -1 -0 -0 -0 -Directory -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -240EBB4A72024BA585833EB1F1AB4EC0 -Low -Informational -100 -4 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -9B62D146FF00456388F9822A76F95841 -High -High -100 -4 -0 -0 -0 -Parameter -Path|Query|Post -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -D07D5C8EF8664392A0CC1509A6DE5940 -Low -Low -50 -2 -0 -0 -0 -Parameter -Directory|Path|Query|Post|Cookie -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -FD28B5D41E064D37B5543CE22BBC6306 -Medium -Low -100 -2 -0 -0 -0 -Response Analysis - -HTML|Form|Silverlight - - - -1 -7B61BD81D278490C9B1A7B0568E94E30 -High -Low -2 -4 -0 -0 -0 -Web Resource -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -5032DAF0D8FE4294B23F0D1DAA4C0337 -High -High -10 -50 -0 -0 -0 -Web Site -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -748E90FC47AB4B438C3A49660989B44A -High -High -10 -1 -0 -0 -0 -Web Site -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -EBEE6CA2515F4FBEB8B7EC0197C5A74F -Low -Informational -4 -1 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -F25AF6387E8A429F8E664F31E2974054 -Low -Low -2 -4 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -60B0D57597EF4542A15FCB8D907669B0 -Low -Low -100 -1 -0 -0 -0 -Web Resource -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -55D76EB20CE54C01856E43223232E3DD -Medium -Informational -100 -4 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -DE08B6DDD872440E91347969D514CFD6 -High -High -200 -4 -0 -0 -0 -Parameter -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -1712CD453B074C78A8A561E0ED66DD1F -Low -Low -100 -1 -0 -0 -0 -Web Site|Web Resource|Response Analysis -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -6A609D0096124619842EE23FA7C989B5 -Low -Informational -500 -4 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -E617D008F7534C808064D2B1A4BFE81A -High -Low -250 -4 -1 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -B86A3A67D710456898A9009DBF6A4989 -Low -Low -100 -4 -0 -0 -0 -Web Resource -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -B7FD0D454CB246AC85A29AF53C27157F -High -High -100 -4 -0 -0 -0 -Parameter -Path|Query|Post|Cookie -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -FCD9A41AD39247C0B45A8D42FF7A4E5E -High -Informational -100 -4 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX - - - -1 -466E4CC294D94A11AFD50FD01D56261F -Medium -Low -100 -4 -0 -0 -0 -Parameter|Response Analysis -Path|Query|Post|Cookie|Referer -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -7D06B46D915644E9870F4A6B903FC09F -High -High -1 -1 -0 -0 -0 -Parameter -Path|Query|Post|Cookie|Referer -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -99E5E4DD1B734047B95402FB7C76BEC3 -Medium -High -200 -4 -0 -0 -0 -Parameter -File|Path|Query|Post -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -2934BC76771C4016BD3524B432CEBCA8 -High -High -250 -5 -0 -0 -0 -Parameter -Query|Post -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -A62D1481CB394632B06C0C54FCDD0579 -High -Medium -250 -5 -0 -0 -0 -Parameter -Query|Post -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -A8AB603EABC04875A5B2320CF6990C24 -High -Medium -500 -4 -0 -0 -0 -Parameter -Path|Query|Post|Cookie|Referer -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -FAC53175FF1E4478AA6D3E2DD4D66B6D -High -Low -2 -2 -1 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -243C315A46A14C92A2717A29A4290167 -Medium -Informational -200 -10 -0 -0 -0 -Response Analysis - -HTML|Form|Silverlight - - - -1 -B97A29683AEE4AA2B94FC26BFC2694A9 -High -Medium -100 -4 -0 -0 -0 -Parameter -Query|Post|Cookie -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -AFF041E38E444889B271CDE1B24378EA -Low -Informational -250 -10 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -433C43A54C714F08B822B7932D410A78 -Medium -Low -2 -4 -0 -0 -0 -Web Resource|Response Analysis -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -ED2E98EFF9A14BF7ACA06A7B28FF97BE -Low -Informational -100 -4 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -0AE25E41D6F44F29900104EF86B04191 -Low -Safe -500 -4 -0 -0 -0 -Parameter -Directory|File|Path|Query|Post|Cookie -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -8CB2F93CE7F243B98D3C83A9A3E6EA4B -Medium -Medium -1000 -4 -0 -0 -0 -Directory|File|Parameter -Query|Post|Cookie -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -63430695B68941DF99BF242F5AE1674B -Low -Informational -10 -2 -0 -0 -0 -Web Resource -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -D8741C7560B8431A9AE74E9B4FEB4F45 -Low -Low -100 -10 -0 -0 -0 -Web Site|Directory|File -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -13623AA162FA4488852116B7EC0DE49E -Medium -Medium -250 -4 -0 -0 -0 -Parameter -Query -HTML|Form - - - -1 -A418163442A54BB9BB0F1E591881A835 -High -Low -10 -1 -0 -0 -0 -Web Site -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -2C7D393BABA44517B0A37DC8ADCF9630 -Low -Low -100 -4 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -07BD211A580944E591F78B40FF3F3489 -Low -Informational -100 -4 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -1CBEA71A88844A11A4CD6ABAA2FD7F62 -Low -Low -100 -4 -0 -0 -0 -Response Analysis - -HTML|Form|Silverlight - - - -1 -34A0F038EFA248B594E7F17447F4CF2E -High -Informational -2 -1 -0 -0 -0 -Web Site|Response Analysis -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -DC8E0D09314B44D39915AAF8439B4F53 -Medium -Medium -100 -4 -0 -0 -0 -Parameter -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX - - - -1 -DB1340E1857540219DF84A6A9DC0494C -High -Medium -10 -2 -0 -0 -0 -Web Resource -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -F729A70998064A1F99A8BEA8512D31AE -Medium -Low -2 -4 -0 -0 -0 -Web Resource -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -7A7B3239AB8146839A8AEF170807ED1E -Low -Medium -100 -4 -0 -0 -0 -File -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -59646365E0E44520BE4297C3ABAA7E75 -High -Low -100 -4 -1 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -B6F559D374B5451EB424A1C1FB264FA6 -High -High -250 -4 -0 -0 -0 -Parameter -Directory|File|Path|Query|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -0496353D92704F2E942BFE1B575D9B7C -High -High -10 -4 -0 -0 -0 -Parameter -Path|Query|Post -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -CEB40EE490564D60B4F9B3CE79C009B5 -Medium -Medium -100 -4 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -C5805272001249A095A48F2E56240C10 -Medium -Informational -10 -1 -0 -0 -0 -Web Site -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -5D9A66E5961B4644AAF5EC655E18EE66 -Medium -Informational -20 -20 -0 -0 -0 -Web Site -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -9A22444AC7C642ABBC598CBCA4738C3B -High -Low -10 -4 -0 -0 -0 -Parameter -Path|Query|Post|Cookie -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -B69E83831D26496BB2CC0C0D70181EC3 -High -Low -10 -4 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -4DE84100F31849A7B845FE5F62D2FD7A -Medium -Medium -10 -2 -0 -0 -0 -Response Analysis - -HTML|Form - - - -1 -0BE4C251F44C4CF1924104ADFD86289C -Low -Informational -100 -4 -0 -0 -0 -Web Resource -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|Flash|Silverlight - - - -1 -74FB936F2BBA499F8D0AF3B7A29B4F9E -High -Low -10 -4 -0 -0 -0 -Web Site -Directory|File|Path|Query|Fragment|Post|Cookie|Referer|Http Header -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -377030BFE58A4F01A112295D32A0744C -High -Medium -250 -4 -0 -0 -0 -Parameter -Post -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -8399FA8EDF5C41BC9D3CF85DC23DC26B -Low -Informational -1 -2 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -3E2E60F7D0E04D8596918C2D1F639064 -Low -Informational -20 -2 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -615D72F401BC447AB4A2139654BC9945 -Low -Informational -1 -2 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -ABFA075919804435A25A22A8CAC191DF -High -Medium -100 -4 -0 -0 -0 -Parameter -Path|Query|Post|Cookie -HTML|Form|AJAX - - - -1 -BBE9F36A88A944ECB837D5193D356E4C -Medium -High -100 -4 -0 -0 -0 -Parameter -Path|Query|Post -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -6CEF426D33514825B50741616DB2120B -Low -Informational -1 -2 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -46A8FE469F6C44BFB9946C021A2BCDC8 -High -Medium -100 -4 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX - - - -1 -62AA6A08FA764E209551B4A4C479F08D -High -High -100 -4 -0 -0 -0 -Response Analysis - -HTML|Form|AJAX - - - -1 -050ABD8CF99F4EE4AA18C12F06FA3051 -High -High -250 -5 -0 -0 -0 -Parameter -Directory|File|Path|Query|Post|Cookie|Referer -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -ABEB2E590AA24A39BB6FE7DBD6338277 -High -Medium -250 -5 -0 -0 -0 -Parameter -Directory|File|Path|Query|Post|Cookie|Referer -HTML|Form|AJAX|Flash|Silverlight|WSDL|REST - - - -1 -FFBF4640C8A4475E93E099018951B409 -Medium -Medium -250 -4 -0 -0 -0 -Parameter -File|Query|Post -HTML|Form|AJAX - - - - - -0 -/aaaaaaaa.aaa -/aaaaaaaa/ -1 -0 - - -None -0 -0 -1 -1 -0 -0 -1 -1 -0 -1 -0 -1 -1 -Restricted - - - - -Medium -((log|sign)[ -]?(in|on))|auth -(sign|log)[ -]?(out|off) - -please (re)?login|have been logged out|session has expired -Location: [^\n]{0,100}((sign|log)(in|on|out)|unauthenticated)\b -(sign|log|time)[ -]?(in|on|out|off)|password -(sign|log|time)[ -]?(in|on|out|off) - - - -\b(CFID|CFTOKEN|SESSION|JSESSIONID|ASPSESSIONID[A-Z0-9]+|PHPSESSID|ASP[.]NET_SessionId)\b -32 - - - - -60 -100 -50 -10 -10 -3 -Login Form Discovery -Login -60000 - -1 -1 - - - - -32780 - - - -/authorize - - - - - - - - -Null -FormPost - -Login - - - - - -0 -1 -1 -3000 -2000 -0 - -1 -1 - - - - - -0 - - - - -1 - - - - - - - -0 -0 --1 - - -0 -10000 -20000 - - - -Internet Explorer Settings - -0 - -0 - - - - - -250 -250 -250 -8 -2 -8 -0.75 -1.25 -0.25 -1 -0.75 -1.25 - - -NoCert - - - - - - -0 -180 - - -0 -2 -7000000 -60000 -60000 -60000 -60000 -7200000 -25 -500 -0 -SSL3|TLS1 - - -16 -1200 -10 -100 -209715200 -80 -3400 -0 -1 -0 -0 -524288000 -70 -400 -240000 - - -1 -2 -4187593113 -2147483648 -2147483648 -1073741824 -10737418240 - - -HTTP/1.1 -text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 - -gzip, deflate -en-US - -Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko -0 - - -Authorization - - -X-XSRF-TOKEN - - -X-CSRF-Token - - - - - - -MobileSDK.trec - -0 -0 --1 - - - - -Smart - - -Username -text,textarea -en -user[:space:]*name|member[:space:]*(name|id)|user|login|usr.(name|id) -%RANDALPHANUM% - -Regex - - -Password -password -en -password|passwd|pw|pwd -%RANDALPHANUM%$ - -Regex - - -Social Security Number -text,textarea,password -en -SSN|social|security -987-65-4320 - -Regex - - -Address -text,textarea -en -income -100000 - -Regex - - -Address -text,textarea -en -address|street -600 Fairy Land Drive - -Regex - - -Apartment number -text,textarea -en -address|apartment|house -123 - -Regex - - -First name -text,textarea -en -name -John - -Regex - - -Last name -text,textarea -en -last[:space:]*name|surname -Johnson - -Regex - - -Full name -text,textarea -en -(your|full)[:space:]+name|name -John Johnson - -Regex - - -User Signature -text,textarea -en -signature -John Johnson - -Regex - - -Middle name -text,textarea -en -middle[:space:]+name -L - -Regex - - -City -text,textarea -en -city|town -Costa Mesa - -Regex - - -County -text,textarea -en -county -Orange - -Regex - - -State -text,textarea -en -state -CA - -Regex - - -Zip code -text,textarea -en -zip[:space:]*code|post[:space:]*code|postal[:space:]*code|zip -92626 - -Regex - - -Country -text,textarea -en -united[:space:]*states|country -US -us -Regex - - -Phone number -text,textarea -en -tele[:space:]*phone|fax|phone -123-456-7890 - -Regex - - -Phone area code -text,textarea -en -area[:space:]+code -123 - -Regex - - -Company name -text,textarea -en -company|employer|organization -Example - -Regex - - -Email -text,textarea -en -e-?mail -a%RANDALPHANUM%@example.com - -Regex - - -Birthday -text,textarea -en -birth[:space:]day|birth -12/25/1975 - -Regex - - -Day -text,textarea,select -en -dd|day -25 -25 -Regex - - -Month -text,textarea,select -en -mm|month -12 -12|dec|d -Regex - - -FutureYear -text,textarea,select -en -2015|2016|2017 -2016 -2015|2016|2017 -Regex - - -BirthYear -text,textarea,select -en -yyyy|year|1975|1970|1960|1950 - -1975|1970|1960|1950 -Regex - - -Past Date mm/dd/yyyy -text,textarea -en -(start|from)[-\s_]*date -02/02/2003 - -Regex - - -Future Date mm/dd/yy -text,textarea -en -mm/dd/yy -02/02/15 - -Regex - - -Future Date mm/dd/yyyy -text,textarea -en -mm/dd/yyyy|check.in|check.out|departing|returning|appointment|after|arrival|departure|(end|to)[-\s_]*date -02/02/2015 - -Regex - - -Old password -password -en -old[:space:]+password -%RANDALPHANUM%1' - -Regex - - -Accept terms -checkbox,radio -en - - -yes|1|on -Regex - - -Save login -checkbox,radio,select -en -save|remember - -yes|1|on -Regex - - -Remove item -checkbox,radio -en -remove|delete - - -Regex - - -Search -text,textarea -en -keyword|search|query -water - -Regex - - -Quantity -text,textarea,select -en -quantity|amount|number|qty|num -3 - -Regex - - -Number -text,textarea -en -number|count|nmr|cnt|rate|decimal|digit -21 - -Regex - - -Account Number -text,textarea,select,radio,checkbox -en -account -20 - -Regex - - -Shipping method -select,radio,checkbox -en -shipping|fedex|standard|ups - -fedex|standard|ups -Regex - - -Gift -checkbox -en -gift - -yes|1|on -Regex - - -Credit card number -text,textarea,password -en -credit[:space:]*card|card[:space:]*number -5105105105105100 - -Regex - - -Credit card type -select,checkbox,radio -en -master[:space:]*card|master|visa|diners|diners[:space:]*club|discovery|american[:space:]*express|amex - - -Regex - - -Credit card security code -text,textarea,password -en -security[:space:]*code|verification[:space:]*number -123 - -Regex - - -PIN -text,textarea,password -en -PIN -1234 - -Regex - - -CAPTCHA -text,textarea -en -code[:space:]*shown|captcha -%RANDALPHANUM% - -Regex - - -Size -select -en -size|xxl - -(\b(m|s|42)\b -Regex - - -Color -select -en -\b(color|red|black)\b -Blue -\b(blue|red|black)\b -Regex - - -Price -text,textare -en -price -20 - -Regex - - -Attention -text,textare -en -attention -John - -Regex - - -Gender -select,radio -en -gender|male|female -male -\b(male|m|f)\b -Regex - - -Legal age -checkbox,radio -en -legal|\d\d[:space:]*years[:space:]*old -yes -\b(on|1|yes)\b -Regex - - -Coupon code -text,textarea -en -promotion|coupon -%RANDALPHANUM% - -Regex - - -Send message -text,textarea -en -message|comment|complain|enquiry|review -comment - -Regex - - -Existing user -checkbox,radio -en -returning|existing|customer - -\b(on|1|yes)\b -Regex - - -Age -text,textarea -en -age|under|over -40 - -Regex - - -Passphrase Hint -text,textarea -en -What make|pet's name|your father|high school|friend -What make was your first car? - -Regex - - -Passphrase Hint Answer -text,textarea -en -Answer -Ford - -Regex - - -Doctor name -text,textarea -en -doctor -John Johnson - -Regex - - -Website -text,textarea -en -website -www.example.com - -Regex - - -Address -text,textarea -de -adresse|strasse -600 Fairy Land Drive - -Regex - - -Apartment number -text,textarea -de -adresse|wohnung|haus -123 - -Regex - - -First name -text,textarea -de -name -John - -Regex - - -Last name -text,textarea -de -vorname|name -Johnson - -Regex - - -Full name -text,textarea -de -ihren namen|name -John Johnson - -Regex - - -User Signature -text,textarea -de -unterschrift -John Johnson - -Regex - - -City -text,textarea -de -stadt|stadt -Berlin - -Regex - - -Regierungsbezirke -text,textarea -de -regierungsbezirke -Berlin - -Regex - - -Zip code -text,textarea -de -postleitzahl|zip|ZIP|PLZ|Postleitzahl -10115 - -Regex - - -Country -text,textarea -de -\b(deutschland|land)\b -DE -\bDE\b -Regex - - -Phone number -text,textarea -de -telefon|telefon|fax -(1234) 567890 - -Regex - - -Phone area code -text,textarea -de -vorwahl -123 - -Regex - - -Company name -text,textarea -de -unternehmen|arbeitgeber|organisation -Example - -Regex - - -Email -text,textarea -de -E-Mailadresse|email|E-Mail -a%RANDALPHANUM%@example.com - -Regex - - -Birthday -text,textarea -de -geburtstag|geburt -12/25/1975 - -Regex - - -Day -text,textarea -de -tag -25 - -Regex - - -Month -text,textarea -de -monat -12 - -Regex - - -Year -text,textarea -de -Jahr -2007 - -Regex - - -BirthYear -text,textarea -de -Jahr|1975|1970|1960|1950 -1975 - -Regex - - -Past Date mm/dd/yy -text,textarea -de -Datum|d.m.yyyy|dd.mm.yyyy -02.02.03 - -Regex - - -Past Date mm/dd/yyyy -text,textarea -de -Datum|mm/dd/yyyy -02/02/2003 - -Regex - - -Future Date mm/dd/yy -text,textarea -de -MJPYBZHSWwshWRRFSGWAGEQ2hlY2staW58WnVyIEthc3NlfEFiZmFocnR8UsO8Y2trZWhyfGQubS55fGRkLm1tLnl5fFRlcm1pbg== -02/02/11 - -Regex - - -Future Date mm/dd/yyyy -text,textarea -de -MJPYBZHSWwshWRRFSGWAGEQ2hlY2staW58WnVyIEthc3NlfEFiZmFocnR8UsO8Y2trZWhyfFRlcm1pbnxkZC5tbS55eXl5 -02/02/2011 - -Regex - - -Username -text,textarea -de -Benutzername|Mitgliedsnamen|Benutzer -%RANDALPHANUM% - -Regex - - -Password -password -de -password|passwort|passwd -%RANDALPHANUM%1' - -Regex - - -Old password -password -de -alte[:space:]passwort -%RANDALPHANUM%1' - -Regex - - -Accept terms -checkbox,radio -de -Ich habe gelesen und akzeptiere|Ich habe gelesen und akzeptiere|akzeptieren|vereinbaren|AGB|Nutzungsbedingungen|AGB - - -Regex - - -Remove item -checkbox,radio -de -MJPYBZHSWwshWRRFSGWAGEZW50ZmVybmVufGzDtnNjaGVu - - -Regex - - -Search -text,textarea -de -MJPYBZHSWwshWRRFSGWAGEw5xiZXJzaWNodHxTdWNoZXxBbmZyYWdl -water - -Regex - - -Quantity -text,textarea -de -qty|Menge|Betrag|Anzahl -3 - -Regex - - -Number -text,textarea -de -Anzahl|NMR|cnt|bewerten|dezimal|stellige -21 - -Regex - - -Account Number -text,textarea -de -Konto -3456 - -Regex - - -Shipping method -select -de -Versand - - -Regex - - -Gift -text,textarea -de -Geschenk - - -Regex - - -Credit card number -text,textarea -de -Kreditkarte|Kredit|Kartennummer -5105105105105100 - -Regex - - -Credit card type -text,textarea -de -MasterCard|Master|Visum|Diners|Diners Club|Entdeckung|American Express - -Master -Regex - - -Credit card security code -text,textarea -de -MJPYBZHSWwshWRRFSGWAGES3JlZGl0fFNpY2hlcmhlaXRzLUNvZGV8UHLDvGZudW1tZXI= -123 - -Regex - - -CAPTCHA -text,textarea -de -captcha -[%RANDALPHANUM% - -Regex - - -Back button -button,image,submit -de -MJPYBZHSWwshWRRFSGWAGEenVyw7xja3xyZXR1cm58c3Rvcm5pZXJlbnx2b3JoZXJpZ2V8d2VpdGVyIGVpbmthdWZlbg== - - -Regex - - -Logout button -button,image,submi -de -Abmeldung|Abmeldung|ausloggen|(sign|log)-?(off|out) - - -Regex - - -Login button -button,image,submi -de -(log|sign)-?in - - -Regex - - -Size -select -de -MJPYBZHSWwshWRRFSGWAGER3LDtnNzZXxYWEw= -m -m|s|42 -Regex - - -Color -select -de -Farbe -Blue - -Regex - - -Enter price -text,textarea -de -Preis -20 - -Regex - - -Attention -text,textarea -de -Aufmerksamkeit -John - -Regex - - -Gender -select,radio,checkbox -de -Geschlecht|Herren -m -m|h -Regex - - -Legal age -select,radio,checkbox -de -rechtliche|\d\d[:space:]*Jahre -ja -ja|yes|1|on -Regex - - -Coupon code -text,textarea -de -MJPYBZHSWwshWRRFSGWAGERsO2cmRlcnVuZ3xHdXRzY2hlaW4= -111 - -Regex - - -Send message -text,textarea -de -Nachricht|Kommentar|beschweren|Anfrage|Kritik -comment - -Regex - - -Age -text,textarea -de -Alter|unter|mehr -40 - -Regex - - -Passphrase Hint -text,textarea -de -Was machen|Name des Haustieres|Ihr Vater -What make was your first car? - -Regex - - -Passphrase Hint Answer -text,textarea -de -beantworten -Ford - -Regex - - -Doctor name -text,textarea -de -Arzt -John Johnson - -Regex - - - - - - -js - - -css - - -doc - - -jpg - - -jpeg - - -gif - - -png - - -bmp - - -ico - - -exe - - -swf - - -mp3 - - -wav - - -eot - - - - -*font* - - -audio/* - - -image/* - - -video/* - - -application/pdf - - -application/zip - - -application/x-rar-compressed - - -application/x-dvi - - -application/x-shockwave-flash - - -application/msword - - -application/ogg - - -application/x-tar - - -application/octet-stream - - - - -1 - - -1 -32768 - -Firefox - - - - - -([?]wsdl|[.]wsdl)$ -1 -0 -Hashed - - - -en - -0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -0 -1 -0 -0 -1 -1 -1 -1 -1 -1 -1 -0 -0 -0 -1 -1 -1 -0 -1 -1 -1 -0 -1 -1 -1 -1 -1 -0 -0 -1 -0 -1 -1 -1 -1 -1 -0 -0 -1 -0 -10000 - - - - -1 -1 -1 -Alert - - -0 -2017-06-13 04:39:32 -2017-06-13 04:39:32 -42899 Days, 4:39:31 - - -1 -Unknown - - - - -1 -1899-12-30 00:00:00 - -csrf - - - -Not Defined -Not Defined -Not Defined -Not Defined -Not Defined -Not Defined -Not Defined -Not Defined - - -1 - -=. -/; -= - -\d+ --1 - - - - - diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cadcbdf2a1..ca98a09d798 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,471 @@ +# [12.4.0](https://github.com/tidev/titanium_mobile/compare/12_3_X...12.4.0) (2024-07-17) + +## About this release + +Titanium SDK 12.4.0 is a minor release of the SDK, adding new features and platform updates. + +## Community Credits + +* Hans Knöchel + * add 12.4.0 changelog ([874e5f2](https://github.com/tidev/titanium_mobile/commit/874e5f2a86a1a58f99f4de50378c824e5b67029f)) + * add missing “Calendar.Event.remove” method ([d1bbe8a](https://github.com/tidev/titanium_mobile/commit/d1bbe8ac2d5fc8530858bcaa48b56d94b9c407e4)) + * add swipe actions support for Ti.UI.TableView ([40808cd](https://github.com/tidev/titanium_mobile/commit/40808cd5ffed82abaeb7e7523100f901f336298f)) + * add iOS 17+ symbol effects ([84ccadb](https://github.com/tidev/titanium_mobile/commit/84ccadbdcbe9b800ebc08dbac8ae5eaeac36a7f8)) + * update changelog ([9f144c1](https://github.com/tidev/titanium_mobile/commit/9f144c12c28fe6ead59237759c53c40509f3d4cc)) + * bump master to 12.4.0 ([2f1212f](https://github.com/tidev/titanium_mobile/commit/2f1212fd9e46a4a8aeae0af7a850aaa7bff34e52)) + * address all whitespace-related linting issues part 2 ([8c92dc7](https://github.com/tidev/titanium_mobile/commit/8c92dc7521219efebad8943a5305348014bd32e4)) + * address all whitespace-related linting issues ([e2bf653](https://github.com/tidev/titanium_mobile/commit/e2bf653d406b772deeafb504a0b9f68e363cf3e5)) + * fix linting issues ([bf24bf2](https://github.com/tidev/titanium_mobile/commit/bf24bf26ae07ebda2e2d70c23de198bac6b2ba8e)) + * Revert "feat(ios): support multi-scene applications (#13941)" ([82203d7](https://github.com/tidev/titanium_mobile/commit/82203d782fd499a33723bf86b41e1019e50bc99d)) + * fix some open issues related to scenes ([a0a3aea](https://github.com/tidev/titanium_mobile/commit/a0a3aeaf666b864fbcb75e57f011a142dbae715c)) + * fix debug issues with scenes ([8bcd5c3](https://github.com/tidev/titanium_mobile/commit/8bcd5c31a8dc86415c231a6086c1d83bbb183565)) + * Revert "feat(ios): support multi-scene applications (#13941)" ([4a1d20f](https://github.com/tidev/titanium_mobile/commit/4a1d20f43c82296dd21bfd760fa63b65927e98fd)) + +* Michael Gangolf + * optionBar color properties ([d5cff3c](https://github.com/tidev/titanium_mobile/commit/d5cff3c32d33b2df2469af949c54c4bab1734676)) + * fix webpack command name issue ([420ccdc](https://github.com/tidev/titanium_mobile/commit/420ccdceadff8658803e02bb6144e853c8767a20)) + * new Android Studio settings xml ([ceda65e](https://github.com/tidev/titanium_mobile/commit/ceda65eb73492c671b6dc74639dee072fa512439)) + * track color of the Ti.UI.Switch ([07df689](https://github.com/tidev/titanium_mobile/commit/07df6890e2a363f40e44757147287bf307e86808)) + * prepare SDK for Android 34 ([ada10bb](https://github.com/tidev/titanium_mobile/commit/ada10bb065851d4b8c55e1342b2a888a776ad381)) + * add iOS WebViewConfiguration link ([9f85623](https://github.com/tidev/titanium_mobile/commit/9f85623fa45dda478124a9b52794c77eb60bd5ac)) + * ioslib update ([7b82317](https://github.com/tidev/titanium_mobile/commit/7b82317907a492b57c52059d8a648ad0e07fb834)) + * new event for empty TextFields ([29964cf](https://github.com/tidev/titanium_mobile/commit/29964cf5a6830948b802810a41e42230c3b1e820)) + * textAlignment for DatePicker ([afb253e](https://github.com/tidev/titanium_mobile/commit/afb253e697442cb6bafdb430a9d8d3539235d58e)) + * add source to webView fireEvent ([960d40c](https://github.com/tidev/titanium_mobile/commit/960d40cd153fc3ee9e0cad09e5171a7a65c62253)) + * remove some dead analytics code ([6926f0d](https://github.com/tidev/titanium_mobile/commit/6926f0d9bfc177fe74e43fa1242adc8f30972cae)) + * update ti.playservice to 18.3.0 ([dc180b9](https://github.com/tidev/titanium_mobile/commit/dc180b94f05aa810aa1f302958ee3f6b36ae69c4)) + * expose contentOffset getter in TableView/ListView ([1f75084](https://github.com/tidev/titanium_mobile/commit/1f7508484839ec20626f6c189e94068fca042f08)) + * ndk update ([a852835](https://github.com/tidev/titanium_mobile/commit/a852835f7612d9c0ab034872a0439461dddde488)) + * add moveToBackground method ([229ef10](https://github.com/tidev/titanium_mobile/commit/229ef10fcfba15ad3050af9266aca8f2c2012448)) + * videoPlayer speed property ([7b9a4e9](https://github.com/tidev/titanium_mobile/commit/7b9a4e92b2e26cc6d8816c1f7fbfda06316997b6)) + * bundle webp res files ([6552a2c](https://github.com/tidev/titanium_mobile/commit/6552a2ccb0c11d01a6bcf185f228dcac709b0453)) + * adaptive icons in default template ([2e0e2e5](https://github.com/tidev/titanium_mobile/commit/2e0e2e5dfa8a726561d2f15daad65a9fec7afa3a)) + * attributedString link example ([cb69378](https://github.com/tidev/titanium_mobile/commit/cb6937849970ac8417ea87f950b03467668672cd)) + * update TabbedBar Android properties ([f5dfa92](https://github.com/tidev/titanium_mobile/commit/f5dfa923fcf649a10e861251d87a073526af2896)) + * node-appc update ([644831f](https://github.com/tidev/titanium_mobile/commit/644831f18e6f35e987992da3f72e294e0d9649be)) + * create alloy project with spaces with --alloy ([c601e7e](https://github.com/tidev/titanium_mobile/commit/c601e7e7579b7b527cc2321b63c82232b169faf4)) + * improve accessibility text ([3171e14](https://github.com/tidev/titanium_mobile/commit/3171e140fd106afb3b42f09076b1cc0a0b86f895)) + * remove some deprecated classes ([e1f2dc1](https://github.com/tidev/titanium_mobile/commit/e1f2dc1e4b246c7156e31fd68a287ca04cc4b752)) + * raise android max sdk support ([eb87849](https://github.com/tidev/titanium_mobile/commit/eb87849b67b68205567247e20e30c7d43e8ea990)) + * add overrideUserInterfaceStyle to Picker ([0c93fa7](https://github.com/tidev/titanium_mobile/commit/0c93fa77aa911e92d3dfbae312e2884706414753)) + * fixing typos ([a298387](https://github.com/tidev/titanium_mobile/commit/a2983877b5a7d6c14bdfdc5426a82e2aca590074)) + * improve the ScrollableView clipView description ([940ca9e](https://github.com/tidev/titanium_mobile/commit/940ca9e959aad1010cc42c6196d9a21a92febc0b)) + * npm packages ([48afddf](https://github.com/tidev/titanium_mobile/commit/48afddf5652602ae2f8cc376d9a37156c828d9c1)) + * hide scrollbars in WebView ([6642ed1](https://github.com/tidev/titanium_mobile/commit/6642ed16ec984331cafa62658a887b33c6a9cd2f)) + * indent log correctly ([a7b145d](https://github.com/tidev/titanium_mobile/commit/a7b145d5668b661f903fdfe53b380bd35a82265a)) + * backgroundColor for RefreshControl ([4f78a79](https://github.com/tidev/titanium_mobile/commit/4f78a79cc51b9a90fa7eb2226e98fad471a6db8d)) + * defaultLang option in tiapp.xml ([07e9a6a](https://github.com/tidev/titanium_mobile/commit/07e9a6ac58a72178c35bda6fdf298860d7786885)) + * pass platform to tiappxml ([760ca45](https://github.com/tidev/titanium_mobile/commit/760ca45c9b63c0aa06940a36010d051b7bb2cbed)) + * try/catch around unlink snapshots ([115bbb2](https://github.com/tidev/titanium_mobile/commit/115bbb24214374228d06a299ce720e72661785cb)) + * update gradle ([e41650c](https://github.com/tidev/titanium_mobile/commit/e41650cd9d088435e8e9641ceae5a2802223a3d2)) + * add info about iOS foreground notifications ([4e5ca53](https://github.com/tidev/titanium_mobile/commit/4e5ca53bf58db474d968bbe1616fcca6d18b2b90)) + * link idleTimerDisabled and keepScreenOn ([bd5c5e7](https://github.com/tidev/titanium_mobile/commit/bd5c5e71d24b04691b510f96b1567da16a5b8283)) + * fix some doc errors ([cf14a9b](https://github.com/tidev/titanium_mobile/commit/cf14a9b4ed83cef111e80d87189cc3e89a906d11)) + * update ti.map ([5eb950c](https://github.com/tidev/titanium_mobile/commit/5eb950ce1c3392f26496a6c6317b5dea24eee9e4)) + +## Bug Fixes + +### Multiple platforms + +* address all whitespace-related linting issues ([e2bf653](https://github.com/tidev/titanium_mobile/commit/e2bf653d406b772deeafb504a0b9f68e363cf3e5)) +* address all whitespace-related linting issues part 2 ([8c92dc7](https://github.com/tidev/titanium_mobile/commit/8c92dc7521219efebad8943a5305348014bd32e4)) +* create alloy project with spaces with --alloy ([c601e7e](https://github.com/tidev/titanium_mobile/commit/c601e7e7579b7b527cc2321b63c82232b169faf4)) +* fix linting issues ([bf24bf2](https://github.com/tidev/titanium_mobile/commit/bf24bf26ae07ebda2e2d70c23de198bac6b2ba8e)) + +### Android platform + +* add missing “Calendar.Event.remove” method ([d1bbe8a](https://github.com/tidev/titanium_mobile/commit/d1bbe8ac2d5fc8530858bcaa48b56d94b9c407e4)) +* bundle webp res files ([6552a2c](https://github.com/tidev/titanium_mobile/commit/6552a2ccb0c11d01a6bcf185f228dcac709b0453)) +* remove some deprecated classes ([e1f2dc1](https://github.com/tidev/titanium_mobile/commit/e1f2dc1e4b246c7156e31fd68a287ca04cc4b752)) + +### iOS platform + +* fix debug issues with scenes ([8bcd5c3](https://github.com/tidev/titanium_mobile/commit/8bcd5c31a8dc86415c231a6086c1d83bbb183565)) +* fix some open issues related to scenes ([a0a3aea](https://github.com/tidev/titanium_mobile/commit/a0a3aeaf666b864fbcb75e57f011a142dbae715c)) + +## Features + +### Multiple platforms + +* add swipe actions support for Ti.UI.TableView ([40808cd](https://github.com/tidev/titanium_mobile/commit/40808cd5ffed82abaeb7e7523100f901f336298f)) + +### Android platform + +* adaptive icons in default template ([2e0e2e5](https://github.com/tidev/titanium_mobile/commit/2e0e2e5dfa8a726561d2f15daad65a9fec7afa3a)) +* add moveToBackground method ([229ef10](https://github.com/tidev/titanium_mobile/commit/229ef10fcfba15ad3050af9266aca8f2c2012448)) +* add source to webView fireEvent ([960d40c](https://github.com/tidev/titanium_mobile/commit/960d40cd153fc3ee9e0cad09e5171a7a65c62253)) +* defaultLang option in tiapp.xml ([07e9a6a](https://github.com/tidev/titanium_mobile/commit/07e9a6ac58a72178c35bda6fdf298860d7786885)) +* expose contentOffset getter in TableView/ListView ([1f75084](https://github.com/tidev/titanium_mobile/commit/1f7508484839ec20626f6c189e94068fca042f08)) +* hide scrollbars in WebView ([6642ed1](https://github.com/tidev/titanium_mobile/commit/6642ed16ec984331cafa62658a887b33c6a9cd2f)) +* improve accessibility text ([3171e14](https://github.com/tidev/titanium_mobile/commit/3171e140fd106afb3b42f09076b1cc0a0b86f895)) +* indent log correctly ([a7b145d](https://github.com/tidev/titanium_mobile/commit/a7b145d5668b661f903fdfe53b380bd35a82265a)) +* new event for empty TextFields ([29964cf](https://github.com/tidev/titanium_mobile/commit/29964cf5a6830948b802810a41e42230c3b1e820)) +* optionBar color properties ([d5cff3c](https://github.com/tidev/titanium_mobile/commit/d5cff3c32d33b2df2469af949c54c4bab1734676)) +* textAlignment for DatePicker ([afb253e](https://github.com/tidev/titanium_mobile/commit/afb253e697442cb6bafdb430a9d8d3539235d58e)) +* track color of the Ti.UI.Switch ([07df689](https://github.com/tidev/titanium_mobile/commit/07df6890e2a363f40e44757147287bf307e86808)) +* update gradle ([e41650c](https://github.com/tidev/titanium_mobile/commit/e41650cd9d088435e8e9641ceae5a2802223a3d2)) +* update ti.playservice to 18.3.0 ([dc180b9](https://github.com/tidev/titanium_mobile/commit/dc180b94f05aa810aa1f302958ee3f6b36ae69c4)) +* videoPlayer speed property ([7b9a4e9](https://github.com/tidev/titanium_mobile/commit/7b9a4e92b2e26cc6d8816c1f7fbfda06316997b6)) + +### iOS platform + +* add iOS 17+ symbol effects ([84ccadb](https://github.com/tidev/titanium_mobile/commit/84ccadbdcbe9b800ebc08dbac8ae5eaeac36a7f8)) +* add overrideUserInterfaceStyle to Picker ([0c93fa7](https://github.com/tidev/titanium_mobile/commit/0c93fa77aa911e92d3dfbae312e2884706414753)) +* backgroundColor for RefreshControl ([4f78a79](https://github.com/tidev/titanium_mobile/commit/4f78a79cc51b9a90fa7eb2226e98fad471a6db8d)) + +## SDK Module Versions + +| Module | Android version | iOS Version | +| ----------- | --------------- | ----------- | +| facebook | 12.1.0 | 14.0.0 | +| ti.map | 5.6.1 | 7.3.1 | +| ti.webdialog | 2.3.0 | 3.0.2 | +| ti.playservices | 18.3.0 | n/a | +| ti.identity | 3.1.0 | 5.0.0 | +| urlSession | n/a | 4.0.1 | +| ti.coremotion | n/a | 4.0.1 | +| ti.applesignin | n/a | 3.1.2 | +| hyperloop | 7.0.6 | 7.0.6 | + +## [12.3.1](https://github.com/tidev/titanium_mobile/compare/12_3_0_GA...12.3.1) (2024-06-12) + +## About this release + +Titanium SDK 12.3.1 is a patch release of the SDK, addressing high-priority issues from previous releases. + +As of this GA release, the previous Titanium SDK patch release (12.3.0) is no longer supported. + + +## Community Credits + +* Hans Knöchel + * fix(ios): fix privacy-related Filesystem APIs (#14063) ([ff0bd64](https://github.com/tidev/titanium_mobile/commit/ff0bd64f9f4c8d44247a028f5a266481bfa82f78)) + * add 12.3.1 changelog ([f92e4e0](https://github.com/tidev/titanium_mobile/commit/f92e4e02509cb045b46db4ea2f67bc25495d096a)) + * update package-lock.json after merge conflicts ([eadd4fe](https://github.com/tidev/titanium_mobile/commit/eadd4fece5f8ac77c0a1b35e7af18d131ecc416d)) + * handle first privacy manifest changes ([a6f8ed4](https://github.com/tidev/titanium_mobile/commit/a6f8ed48843334686ab6ace07c52066c4a74dbfc)) + * Revert "feat(ios): support multi-scene applications (#13941)" ([8570d92](https://github.com/tidev/titanium_mobile/commit/8570d922175ba60f2554249d75fdf4505471c110)) + +* Michael Gangolf + * node-appc update ([54acc65](https://github.com/tidev/titanium_mobile/commit/54acc65fc870754b4eb869abd9a3328584752464)) + * fix noresults event in ListView width custom query ([d9ecad7](https://github.com/tidev/titanium_mobile/commit/d9ecad760b6ea2be6089a00939bc95ba6527202f)) + * node-titanium-sdk update ([feffa23](https://github.com/tidev/titanium_mobile/commit/feffa239ca35c5fbf208583e3c78299631bfca66)) + * Ti.UI.Tab selected event returns no data ([abc9e81](https://github.com/tidev/titanium_mobile/commit/abc9e81bd38c01bc3de48219707aa4d1d06e94fe)) + * touchFeedbackColor not working for a bottomNavigation tab ([4639ced](https://github.com/tidev/titanium_mobile/commit/4639cede2baeca7e2f7670595bf376ef94bd77fa)) + * switchCamera method was missing ([5fc9115](https://github.com/tidev/titanium_mobile/commit/5fc91157528805bc984ad05eba851328162c0797)) + +## Bug Fixes + +### Android platform + +* fix noresults event in ListView width custom query ([d9ecad7](https://github.com/tidev/titanium_mobile/commit/d9ecad760b6ea2be6089a00939bc95ba6527202f)) +* switchCamera method was missing ([5fc9115](https://github.com/tidev/titanium_mobile/commit/5fc91157528805bc984ad05eba851328162c0797)) +* Ti.UI.Tab selected event returns no data ([abc9e81](https://github.com/tidev/titanium_mobile/commit/abc9e81bd38c01bc3de48219707aa4d1d06e94fe)) +* touchFeedbackColor not working for a bottomNavigation tab ([4639ced](https://github.com/tidev/titanium_mobile/commit/4639cede2baeca7e2f7670595bf376ef94bd77fa)) + +## SDK Module Versions + +| Module | Android version | iOS Version | +| ----------- | --------------- | ----------- | +| facebook | 12.1.0 | 14.0.0 | +| ti.map | 5.6.0 | 7.3.1 | +| ti.webdialog | 2.3.0 | 3.0.2 | +| ti.playservices | 18.2.0 | n/a | +| ti.identity | 3.1.0 | 5.0.0 | +| urlSession | n/a | 4.0.1 | +| ti.coremotion | n/a | 4.0.1 | +| ti.applesignin | n/a | 3.1.2 | +| hyperloop | 7.0.6 | 7.0.6 | + +# [12.3.0](https://github.com/tidev/titanium_mobile/compare/12_2_X...12.3.0) (2024-02-16) + +## About this release + +Titanium SDK 12.3.0 is a minor release of the SDK, addressing high-priority issues from previous releases. + +## Community Credits + +* Michael Gangolf + * fix Android FAB tintColor ([0c1bf92](https://github.com/tidev/titanium_mobile/commit/0c1bf9238593fd364dd8a887a7b190f339602def)) + * update minimum node.js version to 16.x ([af08e72](https://github.com/tidev/titanium_mobile/commit/af08e72c3fccdeade7f10e4e983c2c48dea6f491)) + * set correct title after titleAttributes update ([53738a1](https://github.com/tidev/titanium_mobile/commit/53738a1d05f0945841cb2247bc0e86fb413e0bc3)) + * optimize TiProperties ([e364209](https://github.com/tidev/titanium_mobile/commit/e3642099bacfebaaa0c0835a9a39dd9c2a521934)) + * re-sync CHANGELOG.md ([d9ae9ba](https://github.com/tidev/titanium_mobile/commit/d9ae9ba0354c2bd05af85af47d8b122096045eca)) + * add cli.ignoreLog to ios ([eabedaa](https://github.com/tidev/titanium_mobile/commit/eabedaaf1e7806134b3be9f3c506427b94f524cb)) + * view rotation parity ([5c7edd8](https://github.com/tidev/titanium_mobile/commit/5c7edd8588f4f66c74040ad0febb83ce687e925a)) + * minor CameraX, Recyclerview library update ([8fde8c2](https://github.com/tidev/titanium_mobile/commit/8fde8c20a221a6c959bc05c1f2535df5b803dc94)) + * lineCount/visibleText for Ti.UI.Label ([1eeb301](https://github.com/tidev/titanium_mobile/commit/1eeb30113d752b8871282ad49d84306f4ca75178)) + * window titleAttributes parity ([eb19d17](https://github.com/tidev/titanium_mobile/commit/eb19d17c9a1627a03f8bed3560ab38ba4cf834fe)) + * xml parser null check ([3c0794f](https://github.com/tidev/titanium_mobile/commit/3c0794f1c7610ccf6870da0ac2d85be7b843e998)) + * return more httpclient errors to Ti ([fafdde6](https://github.com/tidev/titanium_mobile/commit/fafdde61c520ac09c374aad3c97c9b8c1c34422f)) + * update hyperloop version ([4b01bc0](https://github.com/tidev/titanium_mobile/commit/4b01bc0fcaa2a74e0201c2e77ef7e9f0ebee4461)) + * null check in ScrollView getAttributeSet ([c3c6cde](https://github.com/tidev/titanium_mobile/commit/c3c6cde3aa596dc7db8db66bf0665137e5eaece5)) + * fix TextArea hinttextid ([845a08d](https://github.com/tidev/titanium_mobile/commit/845a08d650134950ab7ef7325d362f6406b3eada)) + * webview html example ([58f868b](https://github.com/tidev/titanium_mobile/commit/58f868b906c10e61fb90e0005938a23dacb5db05)) + * removing old Appc strings ([2c3ecce](https://github.com/tidev/titanium_mobile/commit/2c3ecce5badc6de2724d9952ed1760c17d84ca00)) + * updated examples ([1ebb379](https://github.com/tidev/titanium_mobile/commit/1ebb3799212a70f88901af8bccb53e98ba88a9f7)) + * label breakStrategy & hyphenationFrequency ([f5181db](https://github.com/tidev/titanium_mobile/commit/f5181dbd808f31b24424d5ee62945bfa528307d1)) + * copyright headers, wiki links ([455d4b2](https://github.com/tidev/titanium_mobile/commit/455d4b278d6d8368086c06b44dc43cefd688b687)) + * remove more appc/jira links ([6726c2c](https://github.com/tidev/titanium_mobile/commit/6726c2cee7c451f81b154cab74ecd0d004d25104)) + * add empty build.gradle ([2c965e4](https://github.com/tidev/titanium_mobile/commit/2c965e4e1e0950a34f7ef777614260c86b063b7a)) + +* Hans Knöchel + * restore compatibility for Ti.App._resumeRestart() ([4b34d5f](https://github.com/tidev/titanium_mobile/commit/4b34d5ff8660ce3d717ca2e104fcbcfc09462b14)) + * update 12.3.0 changelog ([5272d8a](https://github.com/tidev/titanium_mobile/commit/5272d8a72a58dc96ee9cfd625d6fd172553ff57e)) + * fix various issues related to the scene migration ([21c2861](https://github.com/tidev/titanium_mobile/commit/21c28613d906cbe210b5fc1dc1f4ca4193e3e1a5)) + * fix debug issues with scenes ([34e0086](https://github.com/tidev/titanium_mobile/commit/34e00861ea8aeeeacddd2155a9013b480e7aa8d0)) + * move issue ([f83062b](https://github.com/tidev/titanium_mobile/commit/f83062b6cda6e2a1aa26fc06abe9b99228f1d6cb)) + * add 12.3.0 changelog ([1e58137](https://github.com/tidev/titanium_mobile/commit/1e58137bb4886324ceb4bcf527b7550e963b10bc)) + * support multi-scene applications ([bfc87a6](https://github.com/tidev/titanium_mobile/commit/bfc87a6517f0b70b82ea760b8d052381bddf1ff4)) + * add iOS 17+ spring animations ([be053b0](https://github.com/tidev/titanium_mobile/commit/be053b07ab0a51158e3a6d0e8e7c368f1935aaa5)) + * update ti.map to 7.3.1 ([10535bc](https://github.com/tidev/titanium_mobile/commit/10535bc9f48949c15ae523ecd3e1739ca130884b)) + * include new versions of ti.map ([e4b3974](https://github.com/tidev/titanium_mobile/commit/e4b397468a01e0ade21ba0a9d41f37cf8d76895f)) + * bump master to 12.3.0 ([acf6b15](https://github.com/tidev/titanium_mobile/commit/acf6b159bf246126c36ce4420d6f38bb415d940a)) + +* Brianggalvez + * support for html in AttributedStrings ([ca4a7a9](https://github.com/tidev/titanium_mobile/commit/ca4a7a9e77a3c88d9790671eb8abf8d837c409bd)) + + +## Bug Fixes + +### Android platform + +* fix Android FAB tintColor ([0c1bf92](https://github.com/tidev/titanium_mobile/commit/0c1bf9238593fd364dd8a887a7b190f339602def)) +* fix TextArea hinttextid ([845a08d](https://github.com/tidev/titanium_mobile/commit/845a08d650134950ab7ef7325d362f6406b3eada)) +* null check in ScrollView getAttributeSet ([c3c6cde](https://github.com/tidev/titanium_mobile/commit/c3c6cde3aa596dc7db8db66bf0665137e5eaece5)) +* return more httpclient errors to Ti ([fafdde6](https://github.com/tidev/titanium_mobile/commit/fafdde61c520ac09c374aad3c97c9b8c1c34422f)) +* set correct title after titleAttributes update ([53738a1](https://github.com/tidev/titanium_mobile/commit/53738a1d05f0945841cb2247bc0e86fb413e0bc3)) +* xml parser null check ([3c0794f](https://github.com/tidev/titanium_mobile/commit/3c0794f1c7610ccf6870da0ac2d85be7b843e998)) + +### Multiple platforms + +* simulator and macos builds don't require wwdr ([8c70a0d](https://github.com/tidev/titanium_mobile/commit/8c70a0db7ad33e62e15128061237935bece49843)) + +### iOS platform + +* fix debug issues with scenes ([34e0086](https://github.com/tidev/titanium_mobile/commit/34e00861ea8aeeeacddd2155a9013b480e7aa8d0)) +* fix various issues related to the scene migration ([21c2861](https://github.com/tidev/titanium_mobile/commit/21c28613d906cbe210b5fc1dc1f4ca4193e3e1a5)) +* restore compatibility for Ti.App._resumeRestart() ([4b34d5f](https://github.com/tidev/titanium_mobile/commit/4b34d5ff8660ce3d717ca2e104fcbcfc09462b14)) + +## Features + +### Multiple platforms + +* add iOS 17+ spring animations ([be053b0](https://github.com/tidev/titanium_mobile/commit/be053b07ab0a51158e3a6d0e8e7c368f1935aaa5)) +* update minimum node.js version to 16.x ([af08e72](https://github.com/tidev/titanium_mobile/commit/af08e72c3fccdeade7f10e4e983c2c48dea6f491)) + +### Android platform + +* add empty build.gradle ([2c965e4](https://github.com/tidev/titanium_mobile/commit/2c965e4e1e0950a34f7ef777614260c86b063b7a)) +* label breakStrategy & hyphenationFrequency ([f5181db](https://github.com/tidev/titanium_mobile/commit/f5181dbd808f31b24424d5ee62945bfa528307d1)) +* lineCount/visibleText for Ti.UI.Label ([1eeb301](https://github.com/tidev/titanium_mobile/commit/1eeb30113d752b8871282ad49d84306f4ca75178)) +* optimize TiProperties ([e364209](https://github.com/tidev/titanium_mobile/commit/e3642099bacfebaaa0c0835a9a39dd9c2a521934)) +* window titleAttributes parity ([eb19d17](https://github.com/tidev/titanium_mobile/commit/eb19d17c9a1627a03f8bed3560ab38ba4cf834fe)) + +### iOS platform + +* add cli.ignoreLog to ios ([eabedaa](https://github.com/tidev/titanium_mobile/commit/eabedaaf1e7806134b3be9f3c506427b94f524cb)) +* support for html in AttributedStrings ([ca4a7a9](https://github.com/tidev/titanium_mobile/commit/ca4a7a9e77a3c88d9790671eb8abf8d837c409bd)) +* support multi-scene applications ([bfc87a6](https://github.com/tidev/titanium_mobile/commit/bfc87a6517f0b70b82ea760b8d052381bddf1ff4)) +* view rotation parity ([5c7edd8](https://github.com/tidev/titanium_mobile/commit/5c7edd8588f4f66c74040ad0febb83ce687e925a)) + +## BREAKING CHANGES + + +## SDK Module Versions + +| Module | Android version | iOS Version | +| ----------- | --------------- | ----------- | +| facebook | 12.1.0 | 14.0.0 | +| ti.map | 5.6.0 | 7.3.1 | +| ti.webdialog | 2.3.0 | 3.0.2 | +| ti.playservices | 18.2.0 | n/a | +| ti.identity | 3.1.0 | 5.0.0 | +| urlSession | n/a | 4.0.1 | +| ti.coremotion | n/a | 4.0.1 | +| ti.applesignin | n/a | 3.1.2 | +| hyperloop | 7.0.6 | 7.0.6 | + +## [12.2.1](https://github.com/tidev/titanium_mobile/compare/12_2_0_GA...12.2.1) (2023-10-09) + +## About this release + +Titanium SDK 12.2.1 is a patch release of the SDK, addressing high-priority issues from previous releases. + +As of this GA release, the previous Titanium SDK patch release (12.2.0) is no longer supported. + +## Community Credits + +* Ahmed Eissa + * (iOS) Fix app freezing when trying to hide & show popover repeatedly and popover layout issues ([f9fe9b7](https://github.com/tidev/titanium_mobile/commit/f9fe9b76a83415656079b724bca57b166ae6f5ff)) + +* narbs + * [13922] fix(ios): request full access to calendar on ios17 to retain backward compatibility with ios16 (#13923) ([25ab480](https://github.com/tidev/titanium_mobile/commit/25ab480e676591cbb635fa41bf4364ce7614ce82)) + +* Michael Gangolf + * ioslib 1.7.35 ([c6678d8](https://github.com/tidev/titanium_mobile/commit/c6678d849393bf6c0e8ca876a40ba502761d450e)) + * fix Android camera with overlay issues ([d56de28](https://github.com/tidev/titanium_mobile/commit/d56de28d2da32fe4adc174a5f527d163c55910b5)) + * update to new V8Snapshot generator ([ece412a](https://github.com/tidev/titanium_mobile/commit/ece412aff7c0c9ccccea59dbf0f67345f1bf0035)) + +* Hans Knöchel + * fix crash in “backgroundRepeat”, replace deprecated API ([5ccea28](https://github.com/tidev/titanium_mobile/commit/5ccea2815a770c2b78d07017748049129a51f738)) + * fix crash when setting navTinColor during a view transition ([951877b](https://github.com/tidev/titanium_mobile/commit/951877b29c0655a2f2e9d053d25ddfcdf464c7dd)) + * revert video player change ([1a7e84b](https://github.com/tidev/titanium_mobile/commit/1a7e84b4e969f4afa0c2108f76b35f5b61146942)) + * bump version ([798523f](https://github.com/tidev/titanium_mobile/commit/798523f86b01fe8e5c1f47169d8c4d30838abb15)) + +## Bug Fixes + +### Android platform + +* fix Android camera with overlay issues ([d56de28](https://github.com/tidev/titanium_mobile/commit/d56de28d2da32fe4adc174a5f527d163c55910b5)) + +### iOS platform + +* fix app freezing when trying to hide & show popover repeatedly and popover layout issues ([f9fe9b7](https://github.com/tidev/titanium_mobile/commit/f9fe9b76a83415656079b724bca57b166ae6f5ff)) +* fix crash in “backgroundRepeat”, replace deprecated API ([5ccea28](https://github.com/tidev/titanium_mobile/commit/5ccea2815a770c2b78d07017748049129a51f738)) +* fix crash when setting navTinColor during a view transition ([951877b](https://github.com/tidev/titanium_mobile/commit/951877b29c0655a2f2e9d053d25ddfcdf464c7dd)) +* revert video player change ([1a7e84b](https://github.com/tidev/titanium_mobile/commit/1a7e84b4e969f4afa0c2108f76b35f5b61146942)) + +## SDK Module Versions + +| Module | Android version | iOS Version | +| ----------- | --------------- | ----------- | +| facebook | 12.1.0 | 14.0.0 | +| ti.map | 5.5.3 | 7.2.0 | +| ti.webdialog | 2.3.0 | 3.0.2 | +| ti.playservices | 18.2.0 | n/a | +| ti.identity | 3.1.0 | 5.0.0 | +| urlSession | n/a | 4.0.1 | +| ti.coremotion | n/a | 4.0.1 | +| ti.applesignin | n/a | 3.1.2 | +| hyperloop | 7.0.5 | 7.0.5 | + +# [12.2.0](https://github.com/tidev/titanium_mobile/compare/12_1_X...12.2.0) (2023-09-15) + +## About this release + +Titanium SDK 12.2.0 is a minor release of the SDK, adding new features to the platform. The focus of this release is the full support of Xcode 15 +and iOS 17, as well as several performance improvements across both platforms (iOS & Android). + +## Community Credits + +* Michael Gangolf + * update ti.webdialog ([07f10b8](https://github.com/tidev/titanium_mobile/commit/07f10b8395bd7fded4c17ff8ce82b6868062b181)) + * update ioslib to 1.7.34 ([07f464f](https://github.com/tidev/titanium_mobile/commit/07f464f6c29a9dda00447e632e26cd7f307667cf)) + * reduce tableView updates ([c76535a](https://github.com/tidev/titanium_mobile/commit/c76535a4e7714dd01d7dadfddf7606c1d3a9fac9)) + * make tabBarVisible work at creation ([5d07f5c](https://github.com/tidev/titanium_mobile/commit/5d07f5c430f3f1cc4832a6df4e939270831e781f)) + * add `forceUpdates` propterty to listView to improve scrolling event ([f954ae7](https://github.com/tidev/titanium_mobile/commit/f954ae76fe531ea8dc08ff3865decdb5e5cc7cbb)) + * add rotation to blob ([56bd00c](https://github.com/tidev/titanium_mobile/commit/56bd00c98be372558b27e520ce2c0f86cb030656)) + * ioslib update ([c7154f7](https://github.com/tidev/titanium_mobile/commit/c7154f7c54f878cae335fb4bfb09648c010c57d0)) + * fix some tests ([8b998f4](https://github.com/tidev/titanium_mobile/commit/8b998f4ec8f1e76bb53f970ff4239efcbbabf175)) + * add tabMode to TabGroup ([322b78d](https://github.com/tidev/titanium_mobile/commit/322b78dd01623d957c68455383940134a308efac)) + * badgeTextColor property ([c591f9c](https://github.com/tidev/titanium_mobile/commit/c591f9c26fe8d3c25406ec6767c73ef12804e406)) + * enable webview inspection ([8061acd](https://github.com/tidev/titanium_mobile/commit/8061acdc2a985c43e4396c715eaa061c3f4770bc)) + * clean up propertyAccessors ([5f33b2f](https://github.com/tidev/titanium_mobile/commit/5f33b2f42cc0577b4b587ce701db8f9de981f610)) + * update ti.map (android) ([18f087d](https://github.com/tidev/titanium_mobile/commit/18f087d7df6d5900c0f40679dbd422cb3d371745)) + * secure Ti.Network.Socket ([0f5743d](https://github.com/tidev/titanium_mobile/commit/0f5743d8975c219cfdf0753e23c4e0c4315ac4b4)) + * replace titanium_mobile URLs ([ffebf85](https://github.com/tidev/titanium_mobile/commit/ffebf853b033a1ac5085433a2a85391f240c80cd)) + * remove X-Requested-With header from HTTP requests ([67ba7a6](https://github.com/tidev/titanium_mobile/commit/67ba7a63b9c9c713631d710986f6d93147939fec)) + * optimize test output ([8c67faf](https://github.com/tidev/titanium_mobile/commit/8c67fafb8b2b97524f2c7daef086ba17215ef390)) + * update android dependencies ([a30b031](https://github.com/tidev/titanium_mobile/commit/a30b03121dee67a7ced8e23db7a027a10fa7cf0d)) + * fixed rows in filtered results ([bb23609](https://github.com/tidev/titanium_mobile/commit/bb23609362479ea51deab620e830b6d5c851f52b)) + * make rotationX, rotationY animatable ([bfa2bc5](https://github.com/tidev/titanium_mobile/commit/bfa2bc536c779a3c111d96cc39d42752d40e45fc)) + * use cameraX ([e68d33a](https://github.com/tidev/titanium_mobile/commit/e68d33a86c05ec0dcff173128e2b3b05817fec41)) + * remove old example ([a58a7f8](https://github.com/tidev/titanium_mobile/commit/a58a7f8a31493d929cbb8f0719c6f3009da42c9a)) + * fix Android clipboard test ([58932b1](https://github.com/tidev/titanium_mobile/commit/58932b195fc0751476db0fa1af3bbc9759f734e2)) + * github actions ([0457e2c](https://github.com/tidev/titanium_mobile/commit/0457e2c49f6cb45d19b092c79f381e235f735c45)) + * update ubuntu in github action ([6f50bc3](https://github.com/tidev/titanium_mobile/commit/6f50bc38965cd8d7cf8d57a01e0bbff1d8d933d4)) + +* Hans Knöchel + * update ti.map (iOS & Android) ([4f34fb1](https://github.com/tidev/titanium_mobile/commit/4f34fb18276ffbfa8c5be0a9ac188719e5a8d333)) + * update ioslib to 1.7.33 ([aef7a34](https://github.com/tidev/titanium_mobile/commit/aef7a3438e130677ade2f9cd773a99f72815b7d7)) + * modernize Apple Script to open Xcode ([44e7651](https://github.com/tidev/titanium_mobile/commit/44e7651822fa7ab6a6b572f7353a3a8b596861f7)) + * fix catalyst build ([552b835](https://github.com/tidev/titanium_mobile/commit/552b835b7e34fa628d4b43061b98504911cf3004)) + * update Facebook SDKs ([521a3ee](https://github.com/tidev/titanium_mobile/commit/521a3eed1eda85c531ba7869720faecb2d5effd1)) + * add changelog ([a75fcc5](https://github.com/tidev/titanium_mobile/commit/a75fcc5342a85e8fce8b8300a61ef48f1c203595)) + * support DRM-encrypted video assets ([d4cd040](https://github.com/tidev/titanium_mobile/commit/d4cd0402d3c0250aae589f57e62a8249210e63e1)) + * fix iOS log crash ([af732d9](https://github.com/tidev/titanium_mobile/commit/af732d91fb905388152013b0888a3b78a238274f)) + * expose keyboardDismissMode to Ti.UI.TableView as well ([4202779](https://github.com/tidev/titanium_mobile/commit/4202779b6105bd729ef5df9769aa2a0e553d866d)) + * properly attach / detach child video controller ([6195261](https://github.com/tidev/titanium_mobile/commit/619526165caa6efee82e017334c9eaf71538c98b)) + * guard and re-throw native exception ([9308d2b](https://github.com/tidev/titanium_mobile/commit/9308d2b4e3a82c3af53a58b6f477b6fb4537734e)) + * add sponsors action ([dc8a338](https://github.com/tidev/titanium_mobile/commit/dc8a33869c7aa434d91930c5666f4955dbf4647b)) + * bump version ([6350ce5](https://github.com/tidev/titanium_mobile/commit/6350ce5ca1b4dc79af3d40630c05584776a4d53a)) + +* Marc Bender + * building for MacOS (Catalyst) now works with that fix ([02dc740](https://github.com/tidev/titanium_mobile/commit/02dc740c360b74b79b51b65322a4cff2e1c306a3)) + +* narbs + * ensure default icon is not flattened during maccatalyst builds to void white background ([ae2674d](https://github.com/tidev/titanium_mobile/commit/ae2674dc10c8fd1e88e255594cf9dd54f7e635d9)) + +* Alessandro La Rocca + * Update TiMediaVideoPlayerProxy.m (#13859) ([70e0393](https://github.com/tidev/titanium_mobile/commit/70e0393a87357e3b3d7cb53fcf4301cbab55849c)) + +* Jórdan Luiz Bisato + * remove injection of "appcelerator.com" on whitelist when ATS is enabled ([6e658f7](https://github.com/tidev/titanium_mobile/commit/6e658f71e73dd9ac34fa0553f8413113b47e0790)) + +* cb1kenobi + * Apply automatic changes ([84f0144](https://github.com/tidev/titanium_mobile/commit/84f01440242eb6626cca4ddf452862206368a849)) + + +## Bug Fixes + +### Android platform + +* make tabBarVisible work at creation ([5d07f5c](https://github.com/tidev/titanium_mobile/commit/5d07f5c430f3f1cc4832a6df4e939270831e781f)) +* reduce tableView updates ([c76535a](https://github.com/tidev/titanium_mobile/commit/c76535a4e7714dd01d7dadfddf7606c1d3a9fac9)) + +### Multiple platforms + +* fix iOS log crash ([af732d9](https://github.com/tidev/titanium_mobile/commit/af732d91fb905388152013b0888a3b78a238274f)) +* fix catalyst build ([552b835](https://github.com/tidev/titanium_mobile/commit/552b835b7e34fa628d4b43061b98504911cf3004)) + +### iOS platform + +* support Xcode 17 and iOS 17 +* building for MacOS (Catalyst) now works with that fix ([02dc740](https://github.com/tidev/titanium_mobile/commit/02dc740c360b74b79b51b65322a4cff2e1c306a3)) +* enable webview inspection ([8061acd](https://github.com/tidev/titanium_mobile/commit/8061acdc2a985c43e4396c715eaa061c3f4770bc)) +* ensure default icon is not flattened during maccatalyst builds to void white background ([ae2674d](https://github.com/tidev/titanium_mobile/commit/ae2674dc10c8fd1e88e255594cf9dd54f7e635d9)) +* guard and re-throw native exception ([9308d2b](https://github.com/tidev/titanium_mobile/commit/9308d2b4e3a82c3af53a58b6f477b6fb4537734e)) +* properly attach / detach child video controller ([6195261](https://github.com/tidev/titanium_mobile/commit/619526165caa6efee82e017334c9eaf71538c98b)) + +## Features + +### Multiple platforms + +* add sponsors action ([dc8a338](https://github.com/tidev/titanium_mobile/commit/dc8a33869c7aa434d91930c5666f4955dbf4647b)) +* add `forceUpdates` propterty to listView to improve scrolling event ([f954ae7](https://github.com/tidev/titanium_mobile/commit/f954ae76fe531ea8dc08ff3865decdb5e5cc7cbb)) +* fixed rows in filtered results ([bb23609](https://github.com/tidev/titanium_mobile/commit/bb23609362479ea51deab620e830b6d5c851f52b)) +* remove X-Requested-With header from HTTP requests ([67ba7a6](https://github.com/tidev/titanium_mobile/commit/67ba7a63b9c9c713631d710986f6d93147939fec)) +* update Facebook SDKs ([521a3ee](https://github.com/tidev/titanium_mobile/commit/521a3eed1eda85c531ba7869720faecb2d5effd1)) + +### Android platform + +* add rotation to blob ([56bd00c](https://github.com/tidev/titanium_mobile/commit/56bd00c98be372558b27e520ce2c0f86cb030656)) +* add tabMode to TabGroup ([322b78d](https://github.com/tidev/titanium_mobile/commit/322b78dd01623d957c68455383940134a308efac)) +* badgeTextColor property ([c591f9c](https://github.com/tidev/titanium_mobile/commit/c591f9c26fe8d3c25406ec6767c73ef12804e406)) +* clean up propertyAccessors ([5f33b2f](https://github.com/tidev/titanium_mobile/commit/5f33b2f42cc0577b4b587ce701db8f9de981f610)) +* make rotationX, rotationY animatable ([bfa2bc5](https://github.com/tidev/titanium_mobile/commit/bfa2bc536c779a3c111d96cc39d42752d40e45fc)) +* secure Ti.Network.Socket ([0f5743d](https://github.com/tidev/titanium_mobile/commit/0f5743d8975c219cfdf0753e23c4e0c4315ac4b4)) +* use cameraX ([e68d33a](https://github.com/tidev/titanium_mobile/commit/e68d33a86c05ec0dcff173128e2b3b05817fec41)) + +### iOS platform + +* expose keyboardDismissMode to Ti.UI.TableView as well ([4202779](https://github.com/tidev/titanium_mobile/commit/4202779b6105bd729ef5df9769aa2a0e553d866d)) +* support DRM-encrypted video assets ([d4cd040](https://github.com/tidev/titanium_mobile/commit/d4cd0402d3c0250aae589f57e62a8249210e63e1)) + +## SDK Module Versions + +| Module | Android version | iOS Version | +| ----------- | --------------- | ----------- | +| facebook | 12.1.0 | 14.0.0 | +| ti.map | 5.5.3 | 7.2.0 | +| ti.webdialog | 2.3.0 | 3.0.2 | +| ti.playservices | 18.2.0 | n/a | +| ti.identity | 3.1.0 | 5.0.0 | +| urlSession | n/a | 4.0.1 | +| ti.coremotion | n/a | 4.0.1 | +| ti.applesignin | n/a | 3.1.2 | +| hyperloop | 7.0.5 | 7.0.5 | + ## [12.1.1](https://github.com/tidev/titanium-sdk/compare/12_1_0_GA...12.1.1) (2023-04-28) ## About this release @@ -980,7 +1448,7 @@ Titanium SDK 10.0.0 is a major release of the SDK, addressing high-priority issu * [TIMOB-28264](https://jira-archive.titaniumsdk.com/TIMOB-28264) - Improve Ti.UI documentation to reflect current state * [TIMOB-28367](https://jira-archive.titaniumsdk.com/TIMOB-28367) - Ti.UI.ProgressBar should smoothly animate value changes * [TIMOB-28401](https://jira-archive.titaniumsdk.com/TIMOB-28401) - declare all variables before their usage ([062c06d](https://github.com/tidev/titanium-sdk/commit/062c06d7e1b5c961b693ddc8e154be5d6bf9d6db)) -* replace shortened appcelerator.com URLs with long URLs ([d0caea0](https://github.com/tidev/titanium-sdk/commit/d0caea05e8d21e4aae74818dd6af3a6a30f67bea)) +* replace shortened URLs with long URLs ([d0caea0](https://github.com/tidev/titanium-sdk/commit/d0caea05e8d21e4aae74818dd6af3a6a30f67bea)) * filepath compatibility with windows ([824488f](https://github.com/tidev/titanium-sdk/commit/824488f419df6917f5fa3ee90cdbc34a927b50da)) * handle when project has no root package.json ([7b9a747](https://github.com/tidev/titanium-sdk/commit/7b9a747d02552b763c562822b9028ab633f0c847)) * record output files for process js task ([e7951bd](https://github.com/tidev/titanium-sdk/commit/e7951bdd689666986564fc31d49c680169b1b4bf)) @@ -2476,5 +2944,3 @@ See [Axway Appcelerator Deprecation Policy](https://docs.axway.com/bundle/AMPLIF ### Multiple platforms * [MOD-2545](https://jira-archive.titaniumsdk.com/MOD-2545) - update to 3.3.0-ios, 4.5.0-android module releases ([e1156a0](https://github.com/tidev/titanium-sdk/commit/e1156a09c06a902826c03a5b3ffc2ef31e3c0811)) - - diff --git a/CREDITS b/CREDITS index 80ac36bf4f1..d1cd16d9077 100644 --- a/CREDITS +++ b/CREDITS @@ -57,7 +57,7 @@ We would like to thank the following for their contributions: - Jan Vennemann If you're interested in contributing to Titanium, please let us know -by emailing info@appcelerator.com. Or, better yet, fork the Github +by emailing info@tidev.io. Or, better yet, fork the Github project at start hacking away and let us know! In addition to the awesome contributors above, we also use a number diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 62c678c2ee3..00000000000 --- a/Jenkinsfile +++ /dev/null @@ -1,540 +0,0 @@ -#!groovy -library 'pipeline-library' - -// Some branch flags to alter behavior -def isPR = env.CHANGE_ID || false // CHANGE_ID is set if this is a PR. (We used to look whether branch name started with PR-, which would not be true for a branch from origin filed as PR) -def MAINLINE_BRANCH_REGEXP = /master|next|\d+_\d_(X|\d)/ // a branch is considered mainline if 'master' or like: 6_2_X, 7_0_X, 6_2_1 -def isMainlineBranch = (env.BRANCH_NAME ==~ MAINLINE_BRANCH_REGEXP) - -// Keep logs/reports/etc of last 30 builds, only keep build artifacts of last 3 builds -properties([buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '3'))]) - -// These values could be changed manually on PRs/branches, but be careful we don't merge the changes in. We want this to be the default behavior for now! -// target branch of test suite to test with -def runDanger = isPR // run Danger.JS if it's a PR by default. (should we also run on origin branches that aren't mainline?) -def publishToS3 = isMainlineBranch // publish zips to S3 if on mainline branch, by default - -// Variables we can change -def nodeVersion = '12.18.0' // NOTE that changing this requires we set up the desired version on jenkins master first! -def npmVersion = 'latest' // We can change this without any changes to Jenkins. 5.7.1 is minimum to use 'npm ci' - -// Variables which we assign and share between nodes -// Don't modify these yourself, these are generated during the build -def gitCommit = '' -def basename = '' -def vtag = '' - -@NonCPS -def hasAPIDocChanges() { - // https://javadoc.jenkins-ci.org/hudson/scm/ChangeLogSet.html - def changeLogSets = currentBuild.changeSets - for (int i = 0; i < changeLogSets.size(); i++) { - def entries = changeLogSets[i].items - for (int j = 0; j < entries.size(); j++) { - def entry = entries[j] - if (entry.msg.contains('[skip ci]')) { - echo "skipping commit: ${entry.msg}" - continue; // skip this commit - } - // echo "checking commit: ${entry.msg}" - def paths = entry.affectedPaths - for (int k = 0; k < paths.size(); k++) { - def path = paths[k] - if (path.startsWith('apidoc/')) { - return true - } - } - } - } - return false -} - -def getBuiltSDK() { - // Unarchive the osx build of the SDK (as a zip) - sh 'rm -rf osx.zip' // delete osx.zip file if it already exists - unarchive mapping: ['dist/mobilesdk-*-osx.zip': 'osx.zip'] // grab the osx zip from our current build - return sh(returnStdout: true, script: 'ls osx.zip/dist/mobilesdk-*-osx.zip').trim() -} - -def gatherAndroidCrashReports() { - // gather crash reports/tombstones for Android - timeout(5) { - sh label: 'gather crash reports/tombstones for Android', returnStatus: true, script: './tests/adb-all.sh pull /data/tombstones' - archiveArtifacts allowEmptyArchive: true, artifacts: 'tombstones/' - sh returnStatus: true, script: 'rm -rf tombstones/' - // wipe tombstones and re-build dir with proper permissions/ownership on emulator - sh returnStatus: true, script: './tests/adb-all.sh shell rm -rf /data/tombstones' - sh returnStatus: true, script: './tests/adb-all.sh shell mkdir -m 771 /data/tombstones' - sh returnStatus: true, script: './tests/adb-all.sh shell chown system:system /data/tombstones' - } -} - -def androidUnitTests(testName, nodeVersion, npmVersion, deviceId) { - return { - def labels = 'git && osx && android-emulator && android-sdk' // FIXME get working on windows/linux! - - if (!deviceId) { - deviceId = 'android-31-playstore-x86_64'; - } - - node(labels) { - env.JAVA_HOME="${tool name:'OpenJDK 11.0.11+9', type: 'jdk'}" - env.PATH="${env.JAVA_HOME}/bin:${env.PATH}" - - // TODO: Do a shallow checkout rather than stash/unstash? - unstash 'mocha-tests' - try { - nodejs(nodeJSInstallationName: "node ${nodeVersion}") { - ensureNPM(npmVersion) - sh 'npm ci' - def zipName = getBuiltSDK() - sh label: 'Install SDK', script: "npm run deploy -- ${zipName} --select" // installs the sdk - try { - withEnv(['CI=1']) { - timeout(30) { - // Forcibly remove value for specific build tools version to use (set by module builds) - sh returnStatus: true, script: 'ti config android.buildTools.selectedVersion --remove' - sh label: 'Run Test Suite on emulator', script: "npm run test:integration -- android -T emulator -D test -C ${deviceId} -J ${testName}" - } // timeout - } - } catch (e) { - archiveArtifacts 'tmp/mocha/build/build_*.log' // save build log if build failed - gatherAndroidCrashReports() - throw e - } finally { - try { - // Kill the app and emulators! - timeout(5) { - sh returnStatus: true, script: './tests/adb-all.sh shell am force-stop com.appcelerator.testApp.testing' - sh returnStatus: true, script: './tests/adb-all.sh uninstall com.appcelerator.testApp.testing' - } - killAndroidEmulators() - } finally { - sh 'npm run clean:sdks' // remove non-GA sdks - sh 'npm run clean:modules' // remove modules - } - } // try/catch/finally - // save the junit reports as artifacts explicitly so danger.js can use them later - stash includes: 'junit.*.xml', name: "test-report-android-${testName}" - junit 'junit.*.xml' - archiveArtifacts allowEmptyArchive: true, artifacts: 'tests/diffs/,tests/generated/' - } // nodejs - } finally { - deleteDir() - } - } // node - } -} - -def macosUnitTests(nodeVersion, npmVersion) { - return { - node('git && xcode-14') { - // TODO: Do a shallow checkout rather than stash/unstash? - unstash 'mocha-tests' - try { - nodejs(nodeJSInstallationName: "node ${nodeVersion}") { - ensureNPM(npmVersion) - sh 'npm ci' - def zipName = getBuiltSDK() - sh label: 'Install SDK', script: "npm run deploy -- ${zipName} --select" // installs the sdk - try { - withEnv(['CI=1']) { - timeout(20) { - sh label: 'Run Test Suite on macOS', script: 'npm run test:integration -- ios -T macos' - } - } - } catch (e) { - gatherIOSCrashReports('mocha') // app name is mocha - throw e - } finally { - sh 'npm run clean:sdks' // remove non-GA sdks - sh 'npm run clean:modules' // remove modules - } - // save the junit reports as artifacts explicitly so danger.js can use them later - stash includes: 'junit.ios.macos.xml', name: "test-report-ios-macos" - junit 'junit.ios.macos.xml' - // Save any diffed images - archiveArtifacts allowEmptyArchive: true, artifacts: 'tests/diffs/,tests/generated/' - } // nodejs - } finally { - deleteDir() - } - } - } -} - -def iosUnitTests(deviceFamily, nodeVersion, npmVersion) { - return { - node('git && xcode-14') { - // TODO: Do a shallow checkout rather than stash/unstash? - unstash 'mocha-tests' - try { - nodejs(nodeJSInstallationName: "node ${nodeVersion}") { - ensureNPM(npmVersion) - sh 'npm ci' - def zipName = getBuiltSDK() - sh label: 'Install SDK', script: "npm run deploy -- ${zipName} --select" // installs the sdk - try { - withEnv(['CI=1']) { - timeout(40) { - sh label: 'Run Test Suite on simulator', script: "npm run test:integration -- ios -F ${deviceFamily}" - } - } - } catch (e) { - archiveArtifacts 'tmp/mocha/build/build_*.log' // save build log if build failed - gatherIOSCrashReports('mocha') // app name is mocha - throw e - } finally { - sh 'npm run clean:sdks' // remove non-GA sdks - sh 'npm run clean:modules' // remove modules - } - // save the junit reports as artifacts explicitly so danger.js can use them later - stash includes: 'junit.ios.*.xml', name: "test-report-ios-${deviceFamily}" - junit 'junit.ios.*.xml' - // Save any diffed images - archiveArtifacts allowEmptyArchive: true, artifacts: 'tests/diffs/,tests/generated/' - } // nodejs - } finally { - deleteDir() - } - } - } -} - -def cliUnitTests(nodeVersion, npmVersion) { - return { - node('git && osx') { // ToDo: refactor to try and run across mac, linux, and windows? - unstash 'cli-unit-tests' - nodejs(nodeJSInstallationName: "node ${nodeVersion}") { - ensureNPM(npmVersion) - sh 'npm ci' - try { - sh 'npm run test:cli' - } finally { - if (fileExists('coverage/cobertura-coverage.xml')) { - step([$class: 'CoberturaPublisher', autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'coverage/cobertura-coverage.xml', failUnhealthy: false, failUnstable: false, maxNumberOfBuilds: 0, onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false]) - } - stash includes: 'junit.cli.report.xml', name: 'test-report-cli' - junit 'junit.cli.report.xml' - } - } - } - } -} - -// Wrap in timestamper -timestamps { - try { - node('git && android-sdk && gperf && xcode-14') { - env.JAVA_HOME="${tool name:'OpenJDK 11.0.11+9', type: 'jdk'}" - env.PATH="${env.JAVA_HOME}/bin:${env.PATH}" - - stage('Checkout') { - // Update our shared reference repo for all branches/PRs - dir('..') { - if (fileExists('titanium_mobile.git')) { - dir('titanium_mobile.git') { - sh 'git gc' - sh 'git remote update -p' // update the clone - sh 'git prune' // prune to avoid "warning: There are too many unreachable loose objects" - } - } else { - sh 'git clone --mirror git@github.com:appcelerator/titanium_mobile.git' // create a mirror - } - } - - // checkout scm - // Hack for JENKINS-37658 - see https://support.cloudbees.com/hc/en-us/articles/226122247-How-to-Customize-Checkout-for-Pipeline-Multibranch - checkout([ - $class: 'GitSCM', - branches: scm.branches, - extensions: scm.extensions + [ - [$class: 'WipeWorkspace'], - [$class: 'CloneOption', honorRefspec: true, noTags: true, reference: "${pwd()}/../titanium_mobile.git", shallow: true, depth: 30, timeout: 30]], - userRemoteConfigs: scm.userRemoteConfigs - ]) - // FIXME: Workaround for missing env.GIT_COMMIT: http://stackoverflow.com/questions/36304208/jenkins-workflow-checkout-accessing-branch-name-and-git-commit - gitCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim() - } - - nodejs(nodeJSInstallationName: "node ${nodeVersion}") { - - stage('Lint') { - ensureNPM(npmVersion) - - // Install dependencies - timeout(5) { - sh 'npm ci' - } - // Run npm test, but record output in a file and check for failure of command by checking output - if (fileExists('npm_test.log')) { - sh 'rm -rf npm_test.log' - } - // forcibly grab and set correct value for android sdk path by grabbing from node we're actually building on (using env.ANDROID_SDK will pick up master node's env value!) - def androidSDK = env.ANDROID_SDK - withEnv(['ANDROID_SDK=']) { - try { - androidSDK = sh(returnStdout: true, script: 'printenv ANDROID_SDK').trim() - } catch (e) { - // squash, env var not set at OS-level - } - } - def npmTestResult = sh(returnStatus: true, script: "ANDROID_SDK_ROOT=${androidSDK} npm test &> npm_test.log") - recordIssues(tools: [checkStyle(pattern: 'android/**/build/reports/checkstyle/checkJavaStyle.xml')]) - if (runDanger) { // Stash files for danger.js later - stash includes: 'package.json,package-lock.json,dangerfile.js,.eslintignore,.eslintrc,npm_test.log,android/**/*.java', name: 'danger' - } - stash includes: 'package.json,package-lock.json,android/cli/**,iphone/cli/**,build/**', name: 'cli-unit-tests' - stash includes: 'package.json,package-lock.json,tests/**,build/**', name: 'mocha-tests' - // was it a failure? - if (npmTestResult != 0) { - error readFile('npm_test.log') - } else if (env.BRANCH_NAME.equals('master') && hasAPIDocChanges()) { - // if we have a master branch build of SDK with updated apidocs, trigger a new doc site build - build job: 'docs/doctools/docs', wait: false - } - } - - stage('Build') { - // Normal build, pull out the version - def version = sh(returnStdout: true, script: 'sed -n \'s/^ *"version": *"//p\' package.json | tr -d \'"\' | tr -d \',\'').trim() - echo "VERSION: ${version}" - // Create a timestamp - def timestamp = sh(returnStdout: true, script: 'date +\'%Y%m%d%H%M%S\'').trim() - echo "TIMESTAMP: ${timestamp}" - vtag = "${version}.v${timestamp}" - echo "VTAG: ${vtag}" - basename = "dist/mobilesdk-${vtag}" - echo "BASENAME: ${basename}" - - ansiColor('xterm') { - timeout(15) { - def buildCommand = 'npm run clean' - if (isMainlineBranch) { - buildCommand += ' -- --all' - } - sh label: 'clean', script: buildCommand - } // timeout - timeout(15) { - def buildCommand = 'npm run build' - if (isMainlineBranch) { - buildCommand += ' -- --all' - } - try { - sh label: 'build', script: buildCommand - } finally { - recordIssues(tools: [clang(), java()]) - } - } // timeout - timeout(25) { - def packageCommand = "npm run package -- --version-tag ${vtag}" - if (isMainlineBranch) { - // on mainline builds, build for all 3 host OSes - packageCommand += ' --all' - } else { - // On PRs, just build android and ios for macOS - packageCommand += ' android ios' - } - sh label: 'package', script: packageCommand - } // timeout - } // ansiColor - - archiveArtifacts artifacts: "${basename}-*.zip" - stash includes: 'dist/parity.html', name: 'parity' - } // end 'Build' stage - } // nodeJs - } // end node for checkout/build - - // Run unit tests in parallel for android/iOS - stage('Test') { - parallel( - 'android main unit tests': androidUnitTests('main', nodeVersion, npmVersion, null), - 'android 5.0 unit tests': androidUnitTests('5.0', nodeVersion, npmVersion, 'android-21-x86'), - 'iPhone unit tests': iosUnitTests('iphone', nodeVersion, npmVersion), - 'iPad unit tests': iosUnitTests('ipad', nodeVersion, npmVersion), - 'macOS unit tests': macosUnitTests(nodeVersion, npmVersion), - 'cli unit tests': cliUnitTests(nodeVersion, npmVersion), - failFast: false - ) - } - - stage('Deploy') { - if (publishToS3) { - // Now allocate a node for uploading artifacts to s3 and in Jenkins - node('(osx || linux) && !axway-internal && curl') { - def indexJson = [] - if (fileExists('index.json')) { - sh 'rm -f index.json' - } - try { - sh "curl -O http://builds.appcelerator.com.s3.amazonaws.com/mobile/${env.BRANCH_NAME}/index.json" - } catch (err) { - // ignore? Not able to grab the index.json, so assume it means it's a new branch - } - if (fileExists('index.json')) { - def contents = readFile('index.json') - if (!contents.startsWith(' env.json' - sh returnStatus: true, script: 'npx danger ci --verbose' // Don't fail build if danger fails. We want to retain existing build status. - } // withEnv - } // nodejs - deleteDir() - } // node - } // Danger stage - } // if(runDanger) - } -} diff --git a/LICENSE b/LICENSE index 117f4c7ca7e..11d458edef6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ ====================================== -TiDev Titanium Mobile +Titanium SDK Copyright TiDev, Inc. 04/07/2022-Present ====================================== diff --git a/README.md b/README.md index 8c541a85392..f2ce0db7e75 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@

-

Titanium SDK

+

Titanium SDK

+ +

Welcome to the Titanium SDK open source project. Titanium SDK provides a mature platform for developers to build completely native cross-platform mobile applications using JavaScript. @@ -50,7 +52,7 @@ today and benefit from 1:1 sessions with the core team, exclusive modules, merch Learn more about sponsoring TiDev, the organization behind the Titanium SDK, [here](https://github.com/sponsors/tidev) 🚀. -Sebastian KlausRodrigo FarfánJason KneenMatt Delmarterdlewis23Daniel EthierAvinash DalviJoe KniesekVittorio SorberaMarcus OlovssonSynaxon AGAlessandro La RoccaReshopperGusJason David MillerMichael ZaladonisRichard LustembergMighty GmbHFruugulKorelogic LimitedRomeo ManzurLibemax +Rene PotRodrigo FarfánMatt Delmarterdlewis23Daniel EthierJoe KniesekVittorio SorberaMarcus OlovssonAlessandro La RoccaReshopperGusJason David MillerMichael ZaladonisVincenzo QuacquarelliMighty GmbHFruugulKorelogic LimitedJohn GouldJoaquin Maroto ## Features @@ -267,6 +269,25 @@ After you've made the changes and compiled the SDK make sure to run the test sui Some modules like ti.map or ti.facebook are included with the SDK. To update to the latest versions you have to edit the links in `support/module/packaged/modules.json` and run `node build/scons-modules-integrity.js`. This will download the files and update the integrity values. +### Update Android libraries +The `/android/titanium/build.gradle` file contains various Android libraries that are used in the SDK. If you want to update them check the corresponding release pages: +* https://developer.android.com/jetpack/androidx/releases/recyclerview +* https://developer.android.com/jetpack/androidx/releases/swiperefreshlayout +* https://developer.android.com/jetpack/androidx/releases/camera +* https://developer.android.com/jetpack/androidx/releases/transition +* https://developer.android.com/jetpack/androidx/releases/vectordrawable +* https://developer.android.com/jetpack/androidx/releases/viewpager +* https://developer.android.com/jetpack/androidx/releases/cardview +* https://developer.android.com/jetpack/androidx/releases/drawerlayout +* https://developer.android.com/jetpack/androidx/releases/exifinterface +* https://developer.android.com/jetpack/androidx/releases/media +for a new version and change the number in the build.gradle file. Some version numbers are managed inside `/android/templates/build/ti.constants.gradle`. After that build the SDK and run `npm run test` to see if everything is still running. Building Kitchensink, Hyperloop-examples and a custom app is also helpful. + +### Documentation + +If you want to help updating and improving the documentation you can checkout the repository and edit the files in `/apidoc/`. Those files are shown in the API documentation at https://titaniumsdk.com/api/ and include all methods, properties, examples and so on. After you made changes run `npm run lint:docs` to see if your changes produce a valid documentation. The PR commit title you create should start with `docs: ` and a proper title like: `docs: updated textfield examples`. +All other documentation files (e.g. the guides) are located in the https://github.com/tidev/titanium-docs repository. In case you want to update guides, tutorials or spelling mistakes you clone that repo and follow the README file inside the main folder. + ## Contributing Interested in contributing? There are several ways you can help contribute to this project. diff --git a/android/.idea/inspectionProfiles/Project_Default.xml b/android/.idea/inspectionProfiles/Project_Default.xml index 1eb788b1487..23c812cbcc9 100644 --- a/android/.idea/inspectionProfiles/Project_Default.xml +++ b/android/.idea/inspectionProfiles/Project_Default.xml @@ -10,7 +10,11 @@ - + + @@ -155,11 +159,21 @@ - - + + \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index be53a3dc73b..d2ac439bee8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License. * Please see the LICENSE included with this distribution for details. @@ -13,7 +13,7 @@ android { defaultConfig { applicationId 'com.titanium.test' minSdkVersion 21 - targetSdkVersion 33 + targetSdkVersion 34 versionCode 1 versionName '1.0' manifestPlaceholders = project.ext.tiManifestPlaceholders @@ -39,17 +39,17 @@ android { // Checks our Java code against our style guidelines and for common coding mistakes using "checkstyle.xml". // Will trigger a build failure if any violations have been detected. // Customize all the Checkstyle tasks -tasks.withType(Checkstyle) { +tasks.withType(Checkstyle).configureEach { // Specify all files that should be checked classpath = files() source android.sourceSets.main.java.srcDirs } // Execute Checkstyle on all files -task checkJavaStyle(type: Checkstyle) { +tasks.register('checkJavaStyle', Checkstyle) { // include '**/*.java' } // Execute Checkstyle on all modified files -task checkstyleChanged(type: Checkstyle) { +tasks.register('checkstyleChanged', Checkstyle) { include getChangedFiles() } @@ -73,7 +73,7 @@ def getChangedFiles() { files } -tasks.withType(JavaCompile) { +tasks.withType(JavaCompile).configureEach { dependsOn checkJavaStyle } diff --git a/android/app/src/main/java/com/titanium/test/TitaniumTestAppInfo.java b/android/app/src/main/java/com/titanium/test/TitaniumTestAppInfo.java index 6d79409bd19..7da287d9665 100644 --- a/android/app/src/main/java/com/titanium/test/TitaniumTestAppInfo.java +++ b/android/app/src/main/java/com/titanium/test/TitaniumTestAppInfo.java @@ -60,11 +60,6 @@ public String getIcon() return "appicon.png"; } - public boolean isAnalyticsEnabled() - { - return true; - } - public String getGUID() { return "edf09efc-69ef-46fd-9777-35d6aaa2d7b5"; diff --git a/android/build.gradle b/android/build.gradle index 2f329bb416c..325c0af0c32 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License. * Please see the LICENSE included with this distribution for details. @@ -29,7 +29,7 @@ allprojects { // Load plugin used to enforce our Java coding style guidelines. project.apply plugin: 'checkstyle' checkstyle { - toolVersion = '8.38' + toolVersion = '10.11.0' configFile file("${rootDir}/checkstyle.xml"); ignoreFailures false showViolations true @@ -39,6 +39,6 @@ allprojects { project.apply from: "${rootDir}/templates/build/ti.constants.gradle" } -task clean(type: Delete) { +tasks.register('clean', Delete) { delete rootProject.buildDir } diff --git a/android/cli/commands/_build.js b/android/cli/commands/_build.js index b230e62b55b..ee4a6d17c9b 100644 --- a/android/cli/commands/_build.js +++ b/android/cli/commands/_build.js @@ -410,7 +410,7 @@ AndroidBuilder.prototype.config = function config(logger, config, cli) { // if there are no devices/emulators, error if (!Object.keys(opts).length) { if (cli.argv.target === 'device') { - logger.warn(__('Unable to find any devices, possibily due to missing dependencies.') + '\n'); + logger.warn(__('Unable to find any devices, possibly due to missing dependencies.') + '\n'); logger.log(__('Continuing with build... (will attempt to install missing dependencies)') + '\n'); } else { logger.warn(__('Unable to find any emulators, possibily due to missing dependencies.') + '\n'); @@ -756,7 +756,7 @@ AndroidBuilder.prototype.config = function config(logger, config, cli) { return callback(new Error(msg)); } - // empty the alias array. it is important that we don't destory the original + // empty the alias array. it is important that we don't destroy the original // instance since it was passed by reference to the alias select list while (_t.keystoreAliases.length) { _t.keystoreAliases.pop(); @@ -1101,7 +1101,7 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) { } // we need to translate the sdk to a real api level (i.e. L => 20, MNC => 22) so that - // we can valiate them + // we can validate them function getRealAPILevel(ver) { return (ver && targetSDKMap[ver] && targetSDKMap[ver].sdk) || ver; } @@ -1462,7 +1462,7 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) { process.exit(1); } - // For CommonJS modules, verfiy we can find the main script to be loaded by require() method. + // For CommonJS modules, verify we can find the main script to be loaded by require() method. if (!module.native) { // Look for legacy ".js" script file first. let jsFilePath = path.join(module.modulePath, module.id + '.js'); @@ -1541,9 +1541,6 @@ AndroidBuilder.prototype.run = async function run(logger, config, cli, finished) // Notify plugins that we're about to begin. await new Promise(resolve => cli.emit('build.pre.construct', this, resolve)); - // Post build anlytics. - await this.doAnalytics(); - // Initialize build system. Checks if we need to do a clean or incremental build. await this.initialize(); await this.loginfo(); @@ -1602,35 +1599,6 @@ AndroidBuilder.prototype.run = async function run(logger, config, cli, finished) } }; -AndroidBuilder.prototype.doAnalytics = async function doAnalytics() { - const cli = this.cli; - let eventName = 'android.' + cli.argv.target; - - if (cli.argv.target === 'dist-playstore') { - eventName = 'android.distribute.playstore'; - } else if (this.allowDebugging && this.debugPort) { - eventName += '.debug'; - } else if (this.allowProfiling && this.profilerPort) { - eventName += '.profile'; - } else { - eventName += '.run'; - } - - cli.addAnalyticsEvent(eventName, { - name: cli.tiapp.name, - publisher: cli.tiapp.publisher, - url: cli.tiapp.url, - image: cli.tiapp.icon, - appid: cli.tiapp.id, - description: cli.tiapp.description, - type: cli.argv.type, - guid: cli.tiapp.guid, - version: cli.tiapp.version, - copyright: cli.tiapp.copyright, - date: (new Date()).toDateString() - }); -}; - AndroidBuilder.prototype.initialize = async function initialize() { const argv = this.cli.argv; @@ -1865,12 +1833,6 @@ AndroidBuilder.prototype.checkIfShouldForceRebuild = function checkIfShouldForce return true; } - if (!this.tiapp.analytics !== !manifest.analytics) { - this.logger.info(__('Forcing rebuild: tiapp.xml analytics flag changed since last build')); - this.logger.info(' ' + __('Was: %s', !!manifest.analytics)); - this.logger.info(' ' + __('Now: %s', !!this.tiapp.analytics)); - return true; - } if (this.tiapp.publisher !== manifest.publisher) { this.logger.info(__('Forcing rebuild: tiapp.xml publisher changed since last build')); this.logger.info(' ' + __('Was: %s', manifest.publisher)); @@ -1956,7 +1918,7 @@ AndroidBuilder.prototype.checkIfShouldForceRebuild = function checkIfShouldForce } if (this.activitiesHash !== manifest.activitiesHash) { - this.logger.info(__('Forcing rebuild: Android activites in tiapp.xml changed since last build')); + this.logger.info(__('Forcing rebuild: Android activities in tiapp.xml changed since last build')); this.logger.info(' ' + __('Was: %s', manifest.activitiesHash)); this.logger.info(' ' + __('Now: %s', this.activitiesHash)); return true; @@ -2143,7 +2105,7 @@ AndroidBuilder.prototype.processLibraries = async function processLibraries() { } // Check if the module has a maven repository directory. - // If it does, then we can leverage gradle/maven's depency management system. + // If it does, then we can leverage gradle/maven's dependency management system. let dependencyString = null; const repositoryDirPath = path.join(nextModule.modulePath, 'm2repository'); if (await fs.exists(repositoryDirPath)) { @@ -2198,7 +2160,7 @@ AndroidBuilder.prototype.generateRootProjectFiles = async function generateRootP gradleProperties.push({ key: 'org.gradle.jvmargs', value: `-Xmx${this.javacMaxMemory}` }); await gradlew.writeGradlePropertiesFile(gradleProperties); - // Copy optional "gradle.properties" file contents from Titainum project to the above generated file. + // Copy optional "gradle.properties" file contents from Titanium project to the above generated file. // These properties must be copied to the end of the file so that they can override Titanium's default properties. const customGradlePropertiesFilePath = path.join(this.projectDir, 'platform', 'android', 'gradle.properties'); if (await fs.exists(customGradlePropertiesFilePath)) { @@ -3206,7 +3168,8 @@ AndroidBuilder.prototype.generateI18N = async function generateI18N() { root.appendChild(dom.createTextNode('\n')); // Create the XML file under the Android "res/values-" folder. - const localeSuffixName = (locale === 'en' ? '' : '-' + resolveRegionName(locale)); + const defaultLang = this.tiapp.defaultLang || 'en'; + const localeSuffixName = (locale === defaultLang ? '' : '-' + resolveRegionName(locale)); const dirPath = path.join(this.buildAppMainResDir, `values${localeSuffixName}`); const filePath = path.join(dirPath, 'ti_i18n_strings.xml'); this.logger.debug(__('Writing %s strings => %s', locale.cyan, filePath.cyan)); @@ -3821,7 +3784,6 @@ AndroidBuilder.prototype.writeBuildManifest = async function writeBuildManifest( outputDir: this.cli.argv['output-dir'], name: this.tiapp.name, id: this.tiapp.id, - analytics: this.tiapp.analytics, publisher: this.tiapp.publisher, url: this.tiapp.url, version: this.tiapp.version, diff --git a/android/cli/commands/_buildModule.js b/android/cli/commands/_buildModule.js index c4d196d67b8..30e6f003cf5 100644 --- a/android/cli/commands/_buildModule.js +++ b/android/cli/commands/_buildModule.js @@ -65,7 +65,7 @@ AndroidModuleBuilder.prototype.migrate = async function migrate() { isApiVersionUpdateRequired = (this.manifest.apiversion !== cliModuleAPIVersion); } - // Determin if the "manifest" file's "minsdk" needs updating. + // Determine if the "manifest" file's "minsdk" needs updating. // As of Titanium 9.0.0, modules are built as AARs to an "m2repository". Not supported on older Titanium versions. let isMinSdkUpdateRequired = false; const minSupportedSdkVersionMajorNumber = 9; @@ -495,6 +495,7 @@ AndroidModuleBuilder.prototype.generateRootProjectFiles = async function generat // Create a "gradle.properties" file. Will add network proxy settings if needed. const gradleProperties = await gradlew.fetchDefaultGradleProperties(); gradleProperties.push({ key: 'android.useAndroidX', value: 'true' }); + gradleProperties.push({ key: 'android.suppressUnsupportedCompileSdk', value: '33' }); gradleProperties.push({ key: 'org.gradle.jvmargs', value: `-Xmx${this.javacMaxMemory} -Dkotlin.daemon.jvm.options="-Xmx${this.javacMaxMemory}"` @@ -859,7 +860,7 @@ AndroidModuleBuilder.prototype.runModule = async function (cli) { await fs.mkdirs(tmpDir); // Generate a new Titanium app in the temp directory which we'll later copy the "example" files to. - // Note: App must have a diffentent id/package-name. Avoids class name collision with module generating Java code. + // Note: App must have a different id/package-name. Avoids class name collision with module generating Java code. this.logger.debug(__('Staging module project at %s', tmpDir.cyan)); await runTiCommand( process.execPath, diff --git a/android/cli/hooks/run.js b/android/cli/hooks/run.js index 0d5d1081d8b..b8b2e07ef06 100644 --- a/android/cli/hooks/run.js +++ b/android/cli/hooks/run.js @@ -254,24 +254,22 @@ exports.init = function (logger, config, cli) { // start of a new log message if (device.appPidRegExp.test(line)) { - line = line.trim().replace(device.appPidRegExp, ':'); + line = line.replace(/^ {1,2}/, '').replace(device.appPidRegExp, ':'); logLevel = line.charAt(0).toLowerCase(); if (tiapiRegExp.test(line)) { - line = line.replace(tiapiRegExp, '').trim(); + line = line.replace(tiapiRegExp, '').replace(/^ {1,2}/, ''); } else { line = line.replace(/^\w\/(\w+)\s*:/g, '$1:').grey; } line = deviceName + line; - // if it begins with something like "E/SQLiteLog( 1659):" it's not a contination, don't log it. + // if it begins with something like "E/SQLiteLog( 1659):" it's not a continuation, don't log it. } else if (nonTiLogRegexp.test(line)) { return; } // ignore some Android logs in info log level - for (let i = 0, len = ignoreLog.length; i < len; ++i) { - if (line.includes(ignoreLog[i])) { - return; - } + if (ignoreLog.some(ignoreItem => line.includes(ignoreItem))) { + return; } switch (logLevel) { diff --git a/android/cli/lib/android-manifest.js b/android/cli/lib/android-manifest.js index 888e7ee7dd9..fec4761eca7 100644 --- a/android/cli/lib/android-manifest.js +++ b/android/cli/lib/android-manifest.js @@ -711,7 +711,7 @@ function isElementNode(node) { * @param {Object} node The XML node object to check. Can be null/undefined. * @returns {Boolean} * Returns true if given node is text between XLM elements or attributes. - * Returns false if not or given an invalild argument. + * Returns false if not or given an invalid argument. * @private */ function isTextNode(node) { diff --git a/android/cli/lib/gradle-wrapper.js b/android/cli/lib/gradle-wrapper.js index 7c45bcaf8b4..0cc8e60a064 100644 --- a/android/cli/lib/gradle-wrapper.js +++ b/android/cli/lib/gradle-wrapper.js @@ -174,7 +174,7 @@ class GradleWrapper { } // Function which returns a stdout/stderr "data" reading function object and outputs it to given "logFunction". - // The "logFunction" argument is expected to be a "logger" object that conatins "logger.info" or "logger.error". + // The "logFunction" argument is expected to be a "logger" object that contains "logger.info" or "logger.error". // The "logType" is a string "error" or "info" to call the correct logger function const createReadableDataHandlerUsing = (logFunction, logType) => { let stringBuffer = ''; @@ -297,7 +297,6 @@ class GradleWrapper { appc.subprocess.run('appc', [ '-q', 'config', 'get', 'proxyServer' ], runOptions, (exitCode, out) => { try { if (!exitCode && out && (out.length > 0)) { - // eslint-disable-next-line node/no-deprecated-api proxyUrl = url.parse(out.trim()); } } catch (ex) { diff --git a/android/cli/locales/en.js b/android/cli/locales/en.js index a6bcb0a91f6..5537438a580 100644 --- a/android/cli/locales/en.js +++ b/android/cli/locales/en.js @@ -208,7 +208,7 @@ "Forcing rebuild: Android minimum SDK changed since last build": "Forcing rebuild: Android minimum SDK changed since last build", "Forcing rebuild: Android target SDK changed since last build": "Forcing rebuild: Android target SDK changed since last build", "Forcing rebuild: tiapp.xml properties changed since last build": "Forcing rebuild: tiapp.xml properties changed since last build", - "Forcing rebuild: Android activites in tiapp.xml changed since last build": "Forcing rebuild: Android activites in tiapp.xml changed since last build", + "Forcing rebuild: Android activities in tiapp.xml changed since last build": "Forcing rebuild: Android activites in tiapp.xml changed since last build", "Forcing rebuild: Android services in tiapp.xml SDK changed since last build": "Forcing rebuild: Android services in tiapp.xml SDK changed since last build", "Forcing rebuild: One or more JSS files changed since last build": "Forcing rebuild: One or more JSS files changed since last build", "Forcing rebuild: mergeCustomAndroidManifest config has changed since last build": "Forcing rebuild: mergeCustomAndroidManifest config has changed since last build", diff --git a/android/cli/tests/test-android-manifest.js b/android/cli/tests/test-android-manifest.js index 12110208391..4318cf248e3 100644 --- a/android/cli/tests/test-android-manifest.js +++ b/android/cli/tests/test-android-manifest.js @@ -1,5 +1,5 @@ /* - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/debugger.md b/android/debugger.md index 44f2d81bc3a..4cb90a59e99 100644 --- a/android/debugger.md +++ b/android/debugger.md @@ -52,7 +52,7 @@ That simply places the message in a queue. One of the two threads spun up after ### Handling messages coming from the Debugger -The second thread spun up after a connection is made simply reads lines from the debugger's stream and does very basic parsing of the message. Once the headers are stripped, we grab the JSON body and call down into C++ to do a V8::Debug::SendCommand to give the command to V8. +The second thread spun up after a connection is made simply reads lines from the debuggers stream and does very basic parsing of the message. Once the headers are stripped, we grab the JSON body and call down into C++ to do a V8::Debug::SendCommand to give the command to V8. The next step is to call V8::Debug::ProcessDebugMessages(). We do so indirectly by using a Handler.post(Runnable) to ensure this gets called on the main thread. diff --git a/android/gradle.properties b/android/gradle.properties index c6a77d5d47d..a5678e41a60 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ # -------------------------------------------------------------------------------- -# TiDev Titanium Mobile +# Titanium SDK # Copyright TiDev, Inc. 04/07/2022-Present # Licensed under the terms of the Apache Public License. # Please see the LICENSE included with this distribution for details. @@ -14,4 +14,4 @@ android.useAndroidX=true android.enableJetifier=false # remove if com.android.tools.build:gradle can be raised in /android/build.gradle -android.suppressUnsupportedCompileSdk=33 +android.suppressUnsupportedCompileSdk=33,34 diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar index 41d9927a4d4..c1962a79e29 100644 Binary files a/android/gradle/wrapper/gradle-wrapper.jar and b/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 92f06b50fd6..e8be595e3c6 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/android/gradlew b/android/gradlew index 1b6c787337f..aeb74cbb43e 100755 --- a/android/gradlew +++ b/android/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -143,12 +140,16 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in @@ -205,6 +210,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/android/gradlew.bat b/android/gradlew.bat index ac1b06f9382..6689b85beec 100644 --- a/android/gradlew.bat +++ b/android/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/android/kroll-apt/build.gradle b/android/kroll-apt/build.gradle index cf2bb024c05..addda9dcd4f 100644 --- a/android/kroll-apt/build.gradle +++ b/android/kroll-apt/build.gradle @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License. * Please see the LICENSE included with this distribution for details. @@ -13,16 +13,16 @@ targetCompatibility = JavaVersion.VERSION_11 // Checks our Java code against our style guidelines and for common coding mistakes using "checkstyle.xml". // Will trigger a build failure if any violations have been detected. // Customize all the Checkstyle tasks -tasks.withType(Checkstyle) { +tasks.withType(Checkstyle).configureEach { // Specify all files that should be checked classpath = files() source 'src/main/java' } // Execute Checkstyle on all files -task checkJavaStyle(type: Checkstyle) { +tasks.register('checkJavaStyle', Checkstyle) { // include '**/*.java' } -task checkstyleChanged(type: Checkstyle) { +tasks.register('checkstyleChanged', Checkstyle) { include getChangedFiles() } @@ -47,7 +47,7 @@ def getChangedFiles() { } // Hook into Java compile task. -tasks.withType(JavaCompile) { +tasks.withType(JavaCompile).configureEach { // Check Java code for mistakes before compiling. dependsOn checkJavaStyle diff --git a/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/Kroll.java b/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/Kroll.java index b04824c0e12..7f55a141e02 100644 --- a/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/Kroll.java +++ b/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/Kroll.java @@ -1,6 +1,6 @@ package org.appcelerator.kroll.annotations; /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/JSONUtils.java b/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/JSONUtils.java index 98f3f8b72a7..05477223f57 100644 --- a/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/JSONUtils.java +++ b/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/JSONUtils.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollAnnotationUtils.java b/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollAnnotationUtils.java index 27cb61cf1ff..a4896aa6fa2 100644 --- a/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollAnnotationUtils.java +++ b/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollAnnotationUtils.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollBindingGenerator.java b/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollBindingGenerator.java index 9b20343434b..4ccd93841dc 100644 --- a/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollBindingGenerator.java +++ b/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollBindingGenerator.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollJSONGenerator.java b/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollJSONGenerator.java index 2b08835d4b4..e97abe907c0 100644 --- a/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollJSONGenerator.java +++ b/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollJSONGenerator.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -210,7 +210,7 @@ protected void initialize() } properties = (Map) JSONValue.parseWithException(new FileReader(jsonPath)); - debug("Succesfully loaded existing binding data: " + jsonPath); + debug("Successfully loaded existing binding data: " + jsonPath); } catch (Exception e) { // file doesn't exist, we'll just create it later debug("No binding data found, creating new data file: %s/%s", this.jarJsonPackageName, diff --git a/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollVisitor.java b/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollVisitor.java index ee0ec82dd82..cd56380b285 100644 --- a/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollVisitor.java +++ b/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollVisitor.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/kroll-apt/src/main/resources/org/appcelerator/kroll/annotations/generator/ProxyBindingV8.cpp.fm b/android/kroll-apt/src/main/resources/org/appcelerator/kroll/annotations/generator/ProxyBindingV8.cpp.fm index e0850e54fd8..444f4aee75b 100644 --- a/android/kroll-apt/src/main/resources/org/appcelerator/kroll/annotations/generator/ProxyBindingV8.cpp.fm +++ b/android/kroll-apt/src/main/resources/org/appcelerator/kroll/annotations/generator/ProxyBindingV8.cpp.fm @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/kroll-apt/src/main/resources/org/appcelerator/kroll/annotations/generator/ProxyBindingV8.h.fm b/android/kroll-apt/src/main/resources/org/appcelerator/kroll/annotations/generator/ProxyBindingV8.h.fm index 644f3bb1d99..9e38445f25c 100644 --- a/android/kroll-apt/src/main/resources/org/appcelerator/kroll/annotations/generator/ProxyBindingV8.h.fm +++ b/android/kroll-apt/src/main/resources/org/appcelerator/kroll/annotations/generator/ProxyBindingV8.h.fm @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/modules/accelerometer/src/java/ti/modules/titanium/accelerometer/AccelerometerModule.java b/android/modules/accelerometer/src/java/ti/modules/titanium/accelerometer/AccelerometerModule.java index fa4a4868759..35897d89a5b 100644 --- a/android/modules/accelerometer/src/java/ti/modules/titanium/accelerometer/AccelerometerModule.java +++ b/android/modules/accelerometer/src/java/ti/modules/titanium/accelerometer/AccelerometerModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/analytics/src/java/ti/modules/titanium/analytics/AnalyticsModule.java b/android/modules/analytics/src/java/ti/modules/titanium/analytics/AnalyticsModule.java index 1ebc1345f1d..279b7a25aba 100644 --- a/android/modules/analytics/src/java/ti/modules/titanium/analytics/AnalyticsModule.java +++ b/android/modules/analytics/src/java/ti/modules/titanium/analytics/AnalyticsModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/android/src/java/org/appcelerator/titanium/proxy/TiActivityWindowProxy.java b/android/modules/android/src/java/org/appcelerator/titanium/proxy/TiActivityWindowProxy.java index ea4834a9022..a0f97698f78 100644 --- a/android/modules/android/src/java/org/appcelerator/titanium/proxy/TiActivityWindowProxy.java +++ b/android/modules/android/src/java/org/appcelerator/titanium/proxy/TiActivityWindowProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/android/src/java/org/appcelerator/titanium/view/TiUIActivityWindow.java b/android/modules/android/src/java/org/appcelerator/titanium/view/TiUIActivityWindow.java index d190462238f..b60392e3568 100644 --- a/android/modules/android/src/java/org/appcelerator/titanium/view/TiUIActivityWindow.java +++ b/android/modules/android/src/java/org/appcelerator/titanium/view/TiUIActivityWindow.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/android/src/java/ti/modules/titanium/android/AndroidModule.java b/android/modules/android/src/java/ti/modules/titanium/android/AndroidModule.java index 1b99533a5da..fdc5c89431a 100644 --- a/android/modules/android/src/java/ti/modules/titanium/android/AndroidModule.java +++ b/android/modules/android/src/java/ti/modules/titanium/android/AndroidModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -561,7 +561,7 @@ public void onDisposing(KrollRuntime runtime) // Remove this listener from the runtime's static collection. KrollRuntime.removeOnDisposingListener(this); - // Unregister all currently registerd broadcast receviers. + // Unregister all currently registered broadcast receivers. // They can no longer be handled by the terminating JavaScript runtime. while (registeredBroadcastReceiverProxyList.isEmpty() == false) { unregisterBroadcastReceiver(registeredBroadcastReceiverProxyList.pollFirst()); @@ -756,7 +756,14 @@ public void registerBroadcastReceiver(BroadcastReceiverProxy receiverProxy, Obje filter.addAction(TiConvert.toString(action)); } - TiApplication.getInstance().registerReceiver(receiverProxy.getBroadcastReceiver(), filter); + if (Build.VERSION.SDK_INT > Build.VERSION_CODES.TIRAMISU + && TiApplication.getInstance().getApplicationInfo().targetSdkVersion > Build.VERSION_CODES.TIRAMISU) { + int receiverFlags = Context.RECEIVER_EXPORTED; + TiApplication.getInstance().registerReceiver( + receiverProxy.getBroadcastReceiver(), filter, receiverFlags); + } else { + TiApplication.getInstance().registerReceiver(receiverProxy.getBroadcastReceiver(), filter); + } if (this.registeredBroadcastReceiverProxyList.contains(receiverProxy) == false) { this.registeredBroadcastReceiverProxyList.add(receiverProxy); } diff --git a/android/modules/android/src/java/ti/modules/titanium/android/BroadcastReceiverProxy.java b/android/modules/android/src/java/ti/modules/titanium/android/BroadcastReceiverProxy.java index 94901ff880d..91edcd9dc5a 100644 --- a/android/modules/android/src/java/ti/modules/titanium/android/BroadcastReceiverProxy.java +++ b/android/modules/android/src/java/ti/modules/titanium/android/BroadcastReceiverProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/android/src/java/ti/modules/titanium/android/PendingIntentProxy.java b/android/modules/android/src/java/ti/modules/titanium/android/PendingIntentProxy.java index 31898dd691e..fc44f474348 100644 --- a/android/modules/android/src/java/ti/modules/titanium/android/PendingIntentProxy.java +++ b/android/modules/android/src/java/ti/modules/titanium/android/PendingIntentProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/android/src/java/ti/modules/titanium/android/RemoteViewsProxy.java b/android/modules/android/src/java/ti/modules/titanium/android/RemoteViewsProxy.java index d36e49ef8c2..0caa7c96d5b 100644 --- a/android/modules/android/src/java/ti/modules/titanium/android/RemoteViewsProxy.java +++ b/android/modules/android/src/java/ti/modules/titanium/android/RemoteViewsProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/android/src/java/ti/modules/titanium/android/TiBroadcastReceiver.java b/android/modules/android/src/java/ti/modules/titanium/android/TiBroadcastReceiver.java index 12fceddad9e..c7644d7143f 100644 --- a/android/modules/android/src/java/ti/modules/titanium/android/TiBroadcastReceiver.java +++ b/android/modules/android/src/java/ti/modules/titanium/android/TiBroadcastReceiver.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/android/src/java/ti/modules/titanium/android/TiJSActivity.java b/android/modules/android/src/java/ti/modules/titanium/android/TiJSActivity.java index 532ccd7e33a..850841ca95c 100644 --- a/android/modules/android/src/java/ti/modules/titanium/android/TiJSActivity.java +++ b/android/modules/android/src/java/ti/modules/titanium/android/TiJSActivity.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/android/src/java/ti/modules/titanium/android/TiJSIntervalService.java b/android/modules/android/src/java/ti/modules/titanium/android/TiJSIntervalService.java index 0c9cd33b635..76f7bd9e916 100644 --- a/android/modules/android/src/java/ti/modules/titanium/android/TiJSIntervalService.java +++ b/android/modules/android/src/java/ti/modules/titanium/android/TiJSIntervalService.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/android/src/java/ti/modules/titanium/android/TiJSService.java b/android/modules/android/src/java/ti/modules/titanium/android/TiJSService.java index fcfd36dbc94..287cbd9f363 100644 --- a/android/modules/android/src/java/ti/modules/titanium/android/TiJSService.java +++ b/android/modules/android/src/java/ti/modules/titanium/android/TiJSService.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/BigPictureStyleProxy.java b/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/BigPictureStyleProxy.java index 53b3254b3f5..5d7775ea598 100644 --- a/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/BigPictureStyleProxy.java +++ b/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/BigPictureStyleProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/BigTextStyleProxy.java b/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/BigTextStyleProxy.java index 8cda7143812..d2c5a9e2629 100644 --- a/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/BigTextStyleProxy.java +++ b/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/BigTextStyleProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/NotificationChannelProxy.java b/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/NotificationChannelProxy.java index 34545f13599..1e66cda36ef 100644 --- a/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/NotificationChannelProxy.java +++ b/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/NotificationChannelProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/NotificationManagerModule.java b/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/NotificationManagerModule.java index cb434b85840..81e31037b49 100644 --- a/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/NotificationManagerModule.java +++ b/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/NotificationManagerModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/NotificationProxy.java b/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/NotificationProxy.java index e0f85e2a490..30db45ae14a 100644 --- a/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/NotificationProxy.java +++ b/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/NotificationProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/StyleProxy.java b/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/StyleProxy.java index f049ec490cd..662b88f3e66 100644 --- a/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/StyleProxy.java +++ b/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/StyleProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/app/src/java/ti/modules/titanium/app/AndroidModule.java b/android/modules/app/src/java/ti/modules/titanium/app/AndroidModule.java index 55544eae51a..7ed4ad78a48 100644 --- a/android/modules/app/src/java/ti/modules/titanium/app/AndroidModule.java +++ b/android/modules/app/src/java/ti/modules/titanium/app/AndroidModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/app/src/java/ti/modules/titanium/app/AppModule.java b/android/modules/app/src/java/ti/modules/titanium/app/AppModule.java index 268140ac4b8..b6c07b9c810 100644 --- a/android/modules/app/src/java/ti/modules/titanium/app/AppModule.java +++ b/android/modules/app/src/java/ti/modules/titanium/app/AppModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/app/src/java/ti/modules/titanium/app/properties/PropertiesModule.java b/android/modules/app/src/java/ti/modules/titanium/app/properties/PropertiesModule.java index 130e3ac2c0a..c66b78be452 100644 --- a/android/modules/app/src/java/ti/modules/titanium/app/properties/PropertiesModule.java +++ b/android/modules/app/src/java/ti/modules/titanium/app/properties/PropertiesModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/calendar/src/java/ti/modules/titanium/calendar/AlertProxy.java b/android/modules/calendar/src/java/ti/modules/titanium/calendar/AlertProxy.java index 425a2b62b13..b7ad83d3925 100644 --- a/android/modules/calendar/src/java/ti/modules/titanium/calendar/AlertProxy.java +++ b/android/modules/calendar/src/java/ti/modules/titanium/calendar/AlertProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/calendar/src/java/ti/modules/titanium/calendar/CalendarModule.java b/android/modules/calendar/src/java/ti/modules/titanium/calendar/CalendarModule.java index f0bd549b5e9..6f0ab16ef83 100644 --- a/android/modules/calendar/src/java/ti/modules/titanium/calendar/CalendarModule.java +++ b/android/modules/calendar/src/java/ti/modules/titanium/calendar/CalendarModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/calendar/src/java/ti/modules/titanium/calendar/CalendarProxy.java b/android/modules/calendar/src/java/ti/modules/titanium/calendar/CalendarProxy.java index 4d7b202e407..86082882a18 100644 --- a/android/modules/calendar/src/java/ti/modules/titanium/calendar/CalendarProxy.java +++ b/android/modules/calendar/src/java/ti/modules/titanium/calendar/CalendarProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/calendar/src/java/ti/modules/titanium/calendar/EventProxy.java b/android/modules/calendar/src/java/ti/modules/titanium/calendar/EventProxy.java index 9567cc882e8..9ad71100316 100644 --- a/android/modules/calendar/src/java/ti/modules/titanium/calendar/EventProxy.java +++ b/android/modules/calendar/src/java/ti/modules/titanium/calendar/EventProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -559,6 +559,21 @@ public void setExtendedProperty(String name, String value) contentResolver.insert(extPropsUri, values); } + @Kroll.method + public boolean remove() + { + ContentResolver contentResolver = TiApplication.getInstance().getContentResolver(); + + try { + Uri deleteUri = ContentUris.withAppendedId(CalendarContract.Events.CONTENT_URI, TiConvert.toInt(id)); + contentResolver.delete(deleteUri, null, null); + } catch (IllegalArgumentException e) { + return false; + } + + return true; + } + @Override public String getApiName() { diff --git a/android/modules/calendar/src/java/ti/modules/titanium/calendar/RecurrenceRuleProxy.java b/android/modules/calendar/src/java/ti/modules/titanium/calendar/RecurrenceRuleProxy.java index c3159f896a0..82d63368b69 100644 --- a/android/modules/calendar/src/java/ti/modules/titanium/calendar/RecurrenceRuleProxy.java +++ b/android/modules/calendar/src/java/ti/modules/titanium/calendar/RecurrenceRuleProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/calendar/src/java/ti/modules/titanium/calendar/ReminderProxy.java b/android/modules/calendar/src/java/ti/modules/titanium/calendar/ReminderProxy.java index 03563d97144..d21acc0019d 100644 --- a/android/modules/calendar/src/java/ti/modules/titanium/calendar/ReminderProxy.java +++ b/android/modules/calendar/src/java/ti/modules/titanium/calendar/ReminderProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/calendar/src/java/ti/modules/titanium/calendar/TiRecurrenceFrequencyType.java b/android/modules/calendar/src/java/ti/modules/titanium/calendar/TiRecurrenceFrequencyType.java index 6b5abf6a568..a5435701db4 100644 --- a/android/modules/calendar/src/java/ti/modules/titanium/calendar/TiRecurrenceFrequencyType.java +++ b/android/modules/calendar/src/java/ti/modules/titanium/calendar/TiRecurrenceFrequencyType.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/contacts/src/java/ti/modules/titanium/contacts/CommonContactsApi.java b/android/modules/contacts/src/java/ti/modules/titanium/contacts/CommonContactsApi.java index 0b90d7a190a..a9b55b878b3 100644 --- a/android/modules/contacts/src/java/ti/modules/titanium/contacts/CommonContactsApi.java +++ b/android/modules/contacts/src/java/ti/modules/titanium/contacts/CommonContactsApi.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/contacts/src/java/ti/modules/titanium/contacts/ContactsApiLevel5.java b/android/modules/contacts/src/java/ti/modules/titanium/contacts/ContactsApiLevel5.java index edcc8f1ed67..f57e3d241ca 100644 --- a/android/modules/contacts/src/java/ti/modules/titanium/contacts/ContactsApiLevel5.java +++ b/android/modules/contacts/src/java/ti/modules/titanium/contacts/ContactsApiLevel5.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/contacts/src/java/ti/modules/titanium/contacts/ContactsModule.java b/android/modules/contacts/src/java/ti/modules/titanium/contacts/ContactsModule.java index cbd4be51925..92f28584f2e 100644 --- a/android/modules/contacts/src/java/ti/modules/titanium/contacts/ContactsModule.java +++ b/android/modules/contacts/src/java/ti/modules/titanium/contacts/ContactsModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/contacts/src/java/ti/modules/titanium/contacts/PersonProxy.java b/android/modules/contacts/src/java/ti/modules/titanium/contacts/PersonProxy.java index 1fb02b20e64..b681ce02485 100644 --- a/android/modules/contacts/src/java/ti/modules/titanium/contacts/PersonProxy.java +++ b/android/modules/contacts/src/java/ti/modules/titanium/contacts/PersonProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -7,9 +7,8 @@ package ti.modules.titanium.contacts; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; +import android.graphics.Bitmap; +import android.util.Log; import org.appcelerator.kroll.KrollDict; import org.appcelerator.kroll.KrollProxy; @@ -17,8 +16,9 @@ import org.appcelerator.titanium.TiBlob; import org.appcelerator.titanium.TiC; -import android.graphics.Bitmap; -import android.util.Log; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; @Kroll.proxy(parentModule = ContactsModule.class, propertyAccessors = { @@ -44,18 +44,17 @@ TiC.PROPERTY_LASTPHONETIC, TiC.PROPERTY_JOBTITLE, TiC.PROPERTY_DEPARTMENT -}) + }) public class PersonProxy extends KrollProxy { private static final String TAG = "Person"; + // Contact Modifications + private final HashMap modified = new HashMap<>(); + protected boolean hasImage = false; private TiBlob image = null; private boolean imageFetched; // lazy load these bitmap images - protected boolean hasImage = false; private String fullName = ""; - // Contact Modifications - private final HashMap modified = new HashMap<>(); - public PersonProxy() { super(); @@ -189,15 +188,15 @@ public void onPropertyChanged(String name, Object value) || name.equals(TiC.PROPERTY_LASTNAME)) { modified.put(TiC.PROPERTY_NAME, true); } else if (name.equals(TiC.PROPERTY_BIRTHDAY) || name.equals(TiC.PROPERTY_ORGANIZATION) - || name.equals(TiC.PROPERTY_NOTE) || name.equals(TiC.PROPERTY_NICKNAME) - || name.equals(TiC.PROPERTY_PHONE) || name.equals(TiC.PROPERTY_ADDRESS) - || name.equals(TiC.PROPERTY_INSTANTMSG) || name.equals(TiC.PROPERTY_URL) - || name.equals(TiC.PROPERTY_EMAIL) || name.equals(TiC.PROPERTY_RELATED_NAMES) - || name.equals(TiC.PROPERTY_DATE) || name.equals(TiC.PROPERTY_KIND) - || name.equals(TiC.PROPERTY_PREFIX) || name.equals(TiC.PROPERTY_SUFFIX) - || name.equals(TiC.PROPERTY_FIRSTPHONETIC) || name.equals(TiC.PROPERTY_MIDDLEPHONETIC) - || name.equals(TiC.PROPERTY_LASTPHONETIC) || name.equals(TiC.PROPERTY_JOBTITLE) - || name.equals(TiC.PROPERTY_DEPARTMENT)) { + || name.equals(TiC.PROPERTY_NOTE) || name.equals(TiC.PROPERTY_NICKNAME) + || name.equals(TiC.PROPERTY_PHONE) || name.equals(TiC.PROPERTY_ADDRESS) + || name.equals(TiC.PROPERTY_INSTANTMSG) || name.equals(TiC.PROPERTY_URL) + || name.equals(TiC.PROPERTY_EMAIL) || name.equals(TiC.PROPERTY_RELATED_NAMES) + || name.equals(TiC.PROPERTY_DATE) || name.equals(TiC.PROPERTY_KIND) + || name.equals(TiC.PROPERTY_PREFIX) || name.equals(TiC.PROPERTY_SUFFIX) + || name.equals(TiC.PROPERTY_FIRSTPHONETIC) || name.equals(TiC.PROPERTY_MIDDLEPHONETIC) + || name.equals(TiC.PROPERTY_LASTPHONETIC) || name.equals(TiC.PROPERTY_JOBTITLE) + || name.equals(TiC.PROPERTY_DEPARTMENT)) { modified.put(name, true); } diff --git a/android/modules/database/src/java/ti/modules/titanium/database/DatabaseModule.java b/android/modules/database/src/java/ti/modules/titanium/database/DatabaseModule.java index d132a060eca..434ea620543 100644 --- a/android/modules/database/src/java/ti/modules/titanium/database/DatabaseModule.java +++ b/android/modules/database/src/java/ti/modules/titanium/database/DatabaseModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -73,7 +73,7 @@ public TiDatabaseProxy open(Object file) throw new IllegalArgumentException("Ti.Database.open() was given invalid URL: " + fileString); } } else { - // Assume we were given a databas file name only. (This is the most common case.) + // Assume we were given a database file name only. (This is the most common case.) dbName = fileString; } } else if (file != null) { diff --git a/android/modules/database/src/java/ti/modules/titanium/database/TiDatabaseProxy.java b/android/modules/database/src/java/ti/modules/titanium/database/TiDatabaseProxy.java index b4108573914..f1253ee1e43 100644 --- a/android/modules/database/src/java/ti/modules/titanium/database/TiDatabaseProxy.java +++ b/android/modules/database/src/java/ti/modules/titanium/database/TiDatabaseProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/database/src/java/ti/modules/titanium/database/TiResultSetProxy.java b/android/modules/database/src/java/ti/modules/titanium/database/TiResultSetProxy.java index 381ea6880fc..25b05c53bf8 100644 --- a/android/modules/database/src/java/ti/modules/titanium/database/TiResultSetProxy.java +++ b/android/modules/database/src/java/ti/modules/titanium/database/TiResultSetProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/design/res/values-land/values-land.xml b/android/modules/design/res/values-land/values-land.xml new file mode 100755 index 00000000000..99ccd0d6a10 --- /dev/null +++ b/android/modules/design/res/values-land/values-land.xml @@ -0,0 +1,8 @@ + + + + diff --git a/android/modules/design/res/values/values.xml b/android/modules/design/res/values/values.xml new file mode 100755 index 00000000000..99ccd0d6a10 --- /dev/null +++ b/android/modules/design/res/values/values.xml @@ -0,0 +1,8 @@ + + + + diff --git a/android/modules/filesystem/src/java/ti/modules/titanium/filesystem/FileProxy.java b/android/modules/filesystem/src/java/ti/modules/titanium/filesystem/FileProxy.java index ab111972946..0e2906cc6b0 100644 --- a/android/modules/filesystem/src/java/ti/modules/titanium/filesystem/FileProxy.java +++ b/android/modules/filesystem/src/java/ti/modules/titanium/filesystem/FileProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/filesystem/src/java/ti/modules/titanium/filesystem/FilesystemModule.java b/android/modules/filesystem/src/java/ti/modules/titanium/filesystem/FilesystemModule.java index b0cded95415..995bfc8c45c 100644 --- a/android/modules/filesystem/src/java/ti/modules/titanium/filesystem/FilesystemModule.java +++ b/android/modules/filesystem/src/java/ti/modules/titanium/filesystem/FilesystemModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/GeolocationModule.java b/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/GeolocationModule.java index 82412898bd2..b43d22f214e 100644 --- a/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/GeolocationModule.java +++ b/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/GeolocationModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -392,7 +392,7 @@ protected void eventListenerAdded(String event, int count, KrollProxy proxy) // FIXME: Why can't we just track some boolean flag for this? if (currentPositionCallback.size() == 0) { HashMap locationProviders = simpleLocationProviders; - // FIXME: why does this differ from how we enable in getCurrentPostion()? + // FIXME: why does this differ from how we enable in getCurrentPosition()? if (getManualMode()) { locationProviders = androidModule.manualLocationProviders; } diff --git a/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/TiCompass.java b/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/TiCompass.java index 458f8272bc7..e72f9f1ffcb 100644 --- a/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/TiCompass.java +++ b/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/TiCompass.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/TiLocation.java b/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/TiLocation.java index d0dd507aff9..6d6afd33e13 100644 --- a/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/TiLocation.java +++ b/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/TiLocation.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/AndroidModule.java b/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/AndroidModule.java index ca3c2865a46..054ec279b60 100644 --- a/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/AndroidModule.java +++ b/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/AndroidModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/FusedLocationProvider.java b/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/FusedLocationProvider.java index 7c2d570612e..67ed1d0dbe9 100644 --- a/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/FusedLocationProvider.java +++ b/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/FusedLocationProvider.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/LocationProviderProxy.java b/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/LocationProviderProxy.java index 42318a3ab73..6dab8970620 100644 --- a/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/LocationProviderProxy.java +++ b/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/LocationProviderProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -181,7 +181,7 @@ public String getName() if (property == null) { Log.e(TAG, "No name found for location provider"); - return ""; // this shouldnt be possible + return ""; // this shouldn't be possible } return (String) property; diff --git a/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/LocationRuleProxy.java b/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/LocationRuleProxy.java index c147f37eb41..df2b46d5db5 100644 --- a/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/LocationRuleProxy.java +++ b/android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/LocationRuleProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/gesture/src/java/ti/modules/titanium/gesture/GestureModule.java b/android/modules/gesture/src/java/ti/modules/titanium/gesture/GestureModule.java index a984ce453eb..cfd9c2718e9 100644 --- a/android/modules/gesture/src/java/ti/modules/titanium/gesture/GestureModule.java +++ b/android/modules/gesture/src/java/ti/modules/titanium/gesture/GestureModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/gesture/src/java/ti/modules/titanium/gesture/TiDeviceOrientationMonitor.java b/android/modules/gesture/src/java/ti/modules/titanium/gesture/TiDeviceOrientationMonitor.java index 14c044b6970..aaabed786a4 100644 --- a/android/modules/gesture/src/java/ti/modules/titanium/gesture/TiDeviceOrientationMonitor.java +++ b/android/modules/gesture/src/java/ti/modules/titanium/gesture/TiDeviceOrientationMonitor.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -82,7 +82,7 @@ public TiDeviceOrientationMonitor(Handler handler) if (value instanceof SensorManager) { this.sensorManager = (SensorManager) value; } else { - Log.w(TAG, "Unable to aquire SensorManager."); + Log.w(TAG, "Unable to acquire SensorManager."); } // Create an event handler for the Android "OrientationEventListener". @@ -370,7 +370,7 @@ public void onSensorChanged(SensorEvent event) break; } - // Do not continue if the device rotation matrix has not been udpated above. + // Do not continue if the device rotation matrix has not been updated above. if (!wasRotationMatrixUpdated) { return; } diff --git a/android/modules/locale/src/java/ti/modules/titanium/locale/CollatorProxy.java b/android/modules/locale/src/java/ti/modules/titanium/locale/CollatorProxy.java index ae9d7a0cd9b..009a389bdc3 100644 --- a/android/modules/locale/src/java/ti/modules/titanium/locale/CollatorProxy.java +++ b/android/modules/locale/src/java/ti/modules/titanium/locale/CollatorProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -55,7 +55,7 @@ public void handleCreationDict(KrollDict properties) options = new KrollDict(); } - // Determine the collatior setting we need to use. + // Determine the collator setting we need to use. int strengthId; int decompositionId = Collator.CANONICAL_DECOMPOSITION; this.isStrippingAccents = false; diff --git a/android/modules/locale/src/java/ti/modules/titanium/locale/DateTimeFormatProxy.java b/android/modules/locale/src/java/ti/modules/titanium/locale/DateTimeFormatProxy.java index 6c0e3fe80e7..720e03220ae 100644 --- a/android/modules/locale/src/java/ti/modules/titanium/locale/DateTimeFormatProxy.java +++ b/android/modules/locale/src/java/ti/modules/titanium/locale/DateTimeFormatProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -121,7 +121,7 @@ public void handleCreationDict(KrollDict properties) String dateStyleStringId = TiConvert.toString(options.get("dateStyle")); String timeStyleStringId = TiConvert.toString(options.get("timeStyle")); - // Determine if at least 1 "date" componoent has been configured. + // Determine if at least 1 "date" component has been configured. boolean hasCustomDateSettings = (weekdayFormatId != null) || (eraFormatId != null) @@ -129,7 +129,7 @@ public void handleCreationDict(KrollDict properties) || (monthFormatId != null) || (dayFormatId != null); - // Determine if at least 1 "time" componoent has been configured. + // Determine if at least 1 "time" component has been configured. boolean hasCustomTimeSettings = (hourFormatId != null) || (minuteFormatId != null) @@ -315,7 +315,7 @@ public KrollDict[] formatToParts(Date value) index = endIndex; } - // Add the substring part enttry to the collection. + // Add the substring part entry to the collection. KrollDict entry = new KrollDict(); entry.put(TiC.PROPERTY_TYPE, typeName); entry.put(TiC.PROPERTY_VALUE, substring); diff --git a/android/modules/locale/src/java/ti/modules/titanium/locale/LocaleModule.java b/android/modules/locale/src/java/ti/modules/titanium/locale/LocaleModule.java index c50445f46c4..d76653ce3dc 100644 --- a/android/modules/locale/src/java/ti/modules/titanium/locale/LocaleModule.java +++ b/android/modules/locale/src/java/ti/modules/titanium/locale/LocaleModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/locale/src/java/ti/modules/titanium/locale/NumberFormatProxy.java b/android/modules/locale/src/java/ti/modules/titanium/locale/NumberFormatProxy.java index 94eeb171f08..c0d7308b755 100644 --- a/android/modules/locale/src/java/ti/modules/titanium/locale/NumberFormatProxy.java +++ b/android/modules/locale/src/java/ti/modules/titanium/locale/NumberFormatProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/locale/src/java/ti/modules/titanium/locale/NumberingSystem.java b/android/modules/locale/src/java/ti/modules/titanium/locale/NumberingSystem.java index fa076da0796..0568e4b7a61 100644 --- a/android/modules/locale/src/java/ti/modules/titanium/locale/NumberingSystem.java +++ b/android/modules/locale/src/java/ti/modules/titanium/locale/NumberingSystem.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/media/src/java/android/widget/TiVideoView8.java b/android/modules/media/src/java/android/widget/TiVideoView8.java index 4d16bb46f8b..41b2b760ffc 100644 --- a/android/modules/media/src/java/android/widget/TiVideoView8.java +++ b/android/modules/media/src/java/android/widget/TiVideoView8.java @@ -16,7 +16,7 @@ /** * Modifications copyright: - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/media/src/java/ti/modules/titanium/media/AudioPlayerProxy.java b/android/modules/media/src/java/ti/modules/titanium/media/AudioPlayerProxy.java index 7bdabb0fb59..58bc45f48a9 100644 --- a/android/modules/media/src/java/ti/modules/titanium/media/AudioPlayerProxy.java +++ b/android/modules/media/src/java/ti/modules/titanium/media/AudioPlayerProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -64,7 +64,7 @@ public AudioPlayerProxy() { super(); - // TODO - we shouldnt need this as this proxy is created only from the runtime - double check + // TODO - we shouldn't need this as this proxy is created only from the runtime - double check // TODO this needs to happen post-set //((TiBaseActivity)getActivity()).addOnLifecycleEventListener(this); diff --git a/android/modules/media/src/java/ti/modules/titanium/media/AudioRecorderProxy.java b/android/modules/media/src/java/ti/modules/titanium/media/AudioRecorderProxy.java index cee06091153..2ea961610a4 100644 --- a/android/modules/media/src/java/ti/modules/titanium/media/AudioRecorderProxy.java +++ b/android/modules/media/src/java/ti/modules/titanium/media/AudioRecorderProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/media/src/java/ti/modules/titanium/media/MediaModule.java b/android/modules/media/src/java/ti/modules/titanium/media/MediaModule.java index 7749f35eded..87ec0194fcf 100644 --- a/android/modules/media/src/java/ti/modules/titanium/media/MediaModule.java +++ b/android/modules/media/src/java/ti/modules/titanium/media/MediaModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -93,7 +93,8 @@ public class MediaModule extends KrollModule implements Handler.Callback public static final int NO_CAMERA = 2; @Kroll.constant public static final int NO_VIDEO = 3; - + @Kroll.constant + public static final int NO_FOCUS = 4; @Kroll.constant public static final int IMAGE_SCALING_AUTO = -1; @Kroll.constant @@ -240,6 +241,7 @@ public class MediaModule extends KrollModule implements Handler.Callback private static String mediaType = MEDIA_TYPE_PHOTO; private static ContentResolver contentResolver; private boolean useCameraX = false; + private static boolean pathOnly = false; public MediaModule() { @@ -1115,6 +1117,15 @@ public void openPhotoGallery(KrollDict options) TiIntentWrapper galleryIntent = new TiIntentWrapper(new Intent()); galleryIntent.getIntent().setAction(Intent.ACTION_GET_CONTENT); + if (options.containsKeyAndNotNull(TiC.PROPERTY_MAX_IMAGES) + && options.containsKey(TiC.PROPERTY_ALLOW_MULTIPLE) + && Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + // set max image count + galleryIntent = new TiIntentWrapper(new Intent(MediaStore.ACTION_PICK_IMAGES)); + galleryIntent.getIntent() + .putExtra(MediaStore.EXTRA_PICK_IMAGES_MAX, options.getInt(TiC.PROPERTY_MAX_IMAGES)); + } + boolean isSelectingPhoto = false; boolean isSelectingVideo = false; if (options.containsKey(TiC.PROPERTY_MEDIA_TYPES)) { @@ -1162,6 +1173,11 @@ public void openPhotoGallery(KrollDict options) galleryIntent.getIntent().putExtra(Intent.EXTRA_ALLOW_MULTIPLE, allowMultiple); } + pathOnly = false; + if (options.containsKeyAndNotNull(TiC.PROPERTY_PATH_ONLY)) { + pathOnly = options.getBoolean(TiC.PROPERTY_PATH_ONLY); + } + final int code = allowMultiple ? PICK_IMAGE_MULTIPLE : PICK_IMAGE_SINGLE; activitySupport.launchActivityForResult(galleryIntent.getIntent(), code, new TiActivityResultHandler() { @@ -1400,16 +1416,18 @@ protected static KrollDict createDictForImage(TiBlob imageData, String mimeType) d.put("width", width); d.put("height", height); - // Add the image/video's crop dimensiosn to the dictionary. + // Add the image/video's crop dimension to the dictionary. KrollDict cropRect = new KrollDict(); cropRect.put("x", 0); cropRect.put("y", 0); cropRect.put("width", width); cropRect.put("height", height); d.put("cropRect", cropRect); - + d.put("path", imageData.getNativePath()); // Add the blob to the dictionary. - d.put("media", imageData); + if (!pathOnly) { + d.put("media", imageData); + } return d; } @@ -1699,6 +1717,7 @@ public void switchCamera(int whichCamera) Log.e(TAG, "Camera preview is not open, unable to switch camera."); return; } + activity.switchCamera(whichCamera); } } diff --git a/android/modules/media/src/java/ti/modules/titanium/media/SoundProxy.java b/android/modules/media/src/java/ti/modules/titanium/media/SoundProxy.java index 3a0d8d6608f..052ffb6a2b0 100644 --- a/android/modules/media/src/java/ti/modules/titanium/media/SoundProxy.java +++ b/android/modules/media/src/java/ti/modules/titanium/media/SoundProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/media/src/java/ti/modules/titanium/media/TiAudioRecorder.java b/android/modules/media/src/java/ti/modules/titanium/media/TiAudioRecorder.java index 2ccc63e41bb..c0a0f55111f 100644 --- a/android/modules/media/src/java/ti/modules/titanium/media/TiAudioRecorder.java +++ b/android/modules/media/src/java/ti/modules/titanium/media/TiAudioRecorder.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/media/src/java/ti/modules/titanium/media/TiCamera.java b/android/modules/media/src/java/ti/modules/titanium/media/TiCamera.java index f423f9dd138..d7e0cce3a9f 100644 --- a/android/modules/media/src/java/ti/modules/titanium/media/TiCamera.java +++ b/android/modules/media/src/java/ti/modules/titanium/media/TiCamera.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/media/src/java/ti/modules/titanium/media/TiCameraActivity.java b/android/modules/media/src/java/ti/modules/titanium/media/TiCameraActivity.java index ec7709b3465..8089c00d04c 100644 --- a/android/modules/media/src/java/ti/modules/titanium/media/TiCameraActivity.java +++ b/android/modules/media/src/java/ti/modules/titanium/media/TiCameraActivity.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -20,6 +20,7 @@ import org.appcelerator.titanium.TiC; import org.appcelerator.titanium.io.TiContentFile; import org.appcelerator.titanium.proxy.TiViewProxy; +import org.appcelerator.titanium.view.TiUIView; import android.Manifest; import android.app.Activity; @@ -246,14 +247,23 @@ protected void onResume() cameraActivity = this; previewLayout.addView(preview, new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); - View overlayView = localOverlayProxy.getOrCreateView().getNativeView(); - ViewGroup parent = (ViewGroup) overlayView.getParent(); - // Detach from the parent if applicable - if (parent != null) { - parent.removeView(overlayView); - } - cameraLayout.addView(overlayView, - new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); + if (localOverlayProxy != null) { + TiUIView localView = localOverlayProxy.getOrCreateView(); + if (localView != null) { + View overlayView = localView.getNativeView(); + ViewGroup parent = (ViewGroup) overlayView.getParent(); + // Detach from the parent if applicable + if (parent != null) { + parent.removeView(overlayView); + } + cameraLayout.addView(overlayView, + new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); + } else { + Log.e(TAG, "Overlay view is null"); + } + } else { + Log.e(TAG, "Overlay is null"); + } } public static void setFlashMode(int cameraFlashMode) @@ -729,6 +739,18 @@ public void onAutoFocus(boolean success, Camera camera) } } else { Log.w(TAG, "Unable to focus."); + if (errorCallback != null) { + KrollDict response = new KrollDict(); + response.putCodeAndMessage(MediaModule.NO_FOCUS, "Couldn't focus"); + errorCallback.callAsync(callbackContext, response); + } + try { + camera.cancelAutoFocus(); + camera.autoFocus(null); + } catch (Exception e) { + Log.w(TAG, "Failed to cancel auto focus: " + e.toString()); + } + takingPicture = false; } } } diff --git a/android/modules/media/src/java/ti/modules/titanium/media/TiCameraXActivity.java b/android/modules/media/src/java/ti/modules/titanium/media/TiCameraXActivity.java index bd0e34bd411..10e0d13224e 100644 --- a/android/modules/media/src/java/ti/modules/titanium/media/TiCameraXActivity.java +++ b/android/modules/media/src/java/ti/modules/titanium/media/TiCameraXActivity.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/media/src/java/ti/modules/titanium/media/TiPlaybackListener.java b/android/modules/media/src/java/ti/modules/titanium/media/TiPlaybackListener.java index f9d2dd4ff10..d28cc5052ed 100644 --- a/android/modules/media/src/java/ti/modules/titanium/media/TiPlaybackListener.java +++ b/android/modules/media/src/java/ti/modules/titanium/media/TiPlaybackListener.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/media/src/java/ti/modules/titanium/media/TiSound.java b/android/modules/media/src/java/ti/modules/titanium/media/TiSound.java index 98c3edfe63c..cc64287afaa 100644 --- a/android/modules/media/src/java/ti/modules/titanium/media/TiSound.java +++ b/android/modules/media/src/java/ti/modules/titanium/media/TiSound.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/media/src/java/ti/modules/titanium/media/TiUIVideoView.java b/android/modules/media/src/java/ti/modules/titanium/media/TiUIVideoView.java index 7d52e0fb6fb..2b7c6f91b7a 100644 --- a/android/modules/media/src/java/ti/modules/titanium/media/TiUIVideoView.java +++ b/android/modules/media/src/java/ti/modules/titanium/media/TiUIVideoView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -19,7 +19,9 @@ import android.media.MediaPlayer.OnCompletionListener; import android.media.MediaPlayer.OnErrorListener; import android.media.MediaPlayer.OnPreparedListener; +import android.media.PlaybackParams; import android.net.Uri; +import android.os.Build; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; @@ -330,6 +332,13 @@ public void release() @Override public void onPrepared(MediaPlayer mp) { + + if (proxy.hasPropertyAndNotNull(TiC.PROPERTY_SPEED) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + PlaybackParams myPlayBackParams = new PlaybackParams(); + myPlayBackParams.setSpeed(TiConvert.toFloat(proxy.getProperty(TiC.PROPERTY_SPEED))); + mp.setPlaybackParams(myPlayBackParams); + } + getPlayerProxy().onPlaybackReady(mp.getDuration()); } diff --git a/android/modules/media/src/java/ti/modules/titanium/media/TiVideoActivity.java b/android/modules/media/src/java/ti/modules/titanium/media/TiVideoActivity.java index b73a1142afb..588b7221195 100644 --- a/android/modules/media/src/java/ti/modules/titanium/media/TiVideoActivity.java +++ b/android/modules/media/src/java/ti/modules/titanium/media/TiVideoActivity.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/media/src/java/ti/modules/titanium/media/VideoPlayerProxy.java b/android/modules/media/src/java/ti/modules/titanium/media/VideoPlayerProxy.java index d236819bc77..34185dcf79c 100644 --- a/android/modules/media/src/java/ti/modules/titanium/media/VideoPlayerProxy.java +++ b/android/modules/media/src/java/ti/modules/titanium/media/VideoPlayerProxy.java @@ -1,12 +1,19 @@ /** - * TiDev Titanium Mobile + * 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.media; -import java.lang.ref.WeakReference; +import android.app.Activity; +import android.content.Intent; +import android.media.MediaPlayer; +import android.net.Uri; +import android.os.Handler; +import android.os.Message; +import android.os.Messenger; +import android.webkit.URLUtil; import org.appcelerator.kroll.KrollDict; import org.appcelerator.kroll.KrollFunction; @@ -23,15 +30,9 @@ import org.appcelerator.titanium.view.TiCompositeLayout; import org.appcelerator.titanium.view.TiUIView; +import java.lang.ref.WeakReference; + import ti.modules.titanium.media.TiThumbnailRetriever.ThumbnailResponseHandler; -import android.app.Activity; -import android.content.Intent; -import android.media.MediaPlayer; -import android.net.Uri; -import android.os.Handler; -import android.os.Message; -import android.os.Messenger; -import android.webkit.URLUtil; @Kroll.proxy(creatableInModule = MediaModule.class, propertyAccessors = { @@ -43,14 +44,15 @@ TiC.PROPERTY_PLAYABLE_DURATION, TiC.PROPERTY_VOLUME, TiC.PROPERTY_SHOWS_CONTROLS, -}) + }) public class VideoPlayerProxy extends TiViewProxy implements TiLifecycle.OnLifecycleEvent { - private static final String TAG = "VideoPlayerProxy"; - + // The player doesn't automatically preserve its current location and seek back to + // there when being resumed. This internal property lets us track that. + public static final String PROPERTY_SEEK_TO_ON_RESUME = "__seek_to_on_resume__"; protected static final int CONTROL_MSG_ACTIVITY_AVAILABLE = 101; protected static final int CONTROL_MSG_CONFIG_CHANGED = 102; - + private static final String TAG = "VideoPlayerProxy"; private static final int MSG_FIRST_ID = TiViewProxy.MSG_LAST_ID + 1; private static final int MSG_PLAY = MSG_FIRST_ID + 101; private static final int MSG_STOP = MSG_FIRST_ID + 102; @@ -64,16 +66,10 @@ public class VideoPlayerProxy extends TiViewProxy implements TiLifecycle.OnLifec private static final int MSG_HIDE_MEDIA_CONTROLLER = MSG_FIRST_ID + 110; private static final int MSG_SET_VIEW_FROM_ACTIVITY = MSG_FIRST_ID + 111; private static final int MSG_REPEAT_CHANGE = MSG_FIRST_ID + 112; - // Keeping these out of TiC because I believe we'll stop supporting them // in favor of the documented property, which is "mediaControlStyle". private static final String PROPERTY_MOVIE_CONTROL_MODE = "movieControlMode"; private static final String PROPERTY_MOVIE_CONTROL_STYLE = "movieControlStyle"; - - // The player doesn't automatically preserve its current location and seek back to - // there when being resumed. This internal property lets us track that. - public static final String PROPERTY_SEEK_TO_ON_RESUME = "__seek_to_on_resume__"; - protected int mediaControlStyle = MediaModule.VIDEO_CONTROL_DEFAULT; protected int scalingMode = MediaModule.VIDEO_SCALING_RESIZE_ASPECT; private int loadState = MediaModule.VIDEO_LOAD_STATE_UNKNOWN; @@ -127,6 +123,7 @@ public void setActivity(Activity activity) * a TiUIVideoView so we have on common interface to the VideoView * and so we can handle child views in our standard way without any * extra code beyond this here. + * * @param layout The content view of the TiVideoActivity. It already contains a VideoView. */ // @@ -192,11 +189,13 @@ private void launchVideoActivity(KrollDict options) /** * Create handler used for communication from TiVideoActivity to this proxy. + * * @return Returns the handler used to send commands to the video view. */ private Handler createControlHandler() { - return new Handler(new Handler.Callback() { + return new Handler(new Handler.Callback() + { @Override public boolean handleMessage(Message msg) { @@ -613,7 +612,7 @@ public void onPlaybackReady(int duration) setProperty(TiC.PROPERTY_DURATION, duration); setProperty(TiC.PROPERTY_PLAYABLE_DURATION, duration); setProperty(TiC.PROPERTY_END_PLAYBACK_TIME, - duration); // Currently we're not doing anything else with this property in Android. + duration); // Currently we're not doing anything else with this property in Android. if (!hasProperty(TiC.PROPERTY_INITIAL_PLAYBACK_TIME)) { setProperty(TiC.PROPERTY_INITIAL_PLAYBACK_TIME, 0); } @@ -761,7 +760,7 @@ public void onDestroy(Activity activity) fireComplete(MediaModule.VIDEO_FINISH_REASON_USER_EXITED); } - // Cancel any Thumbnail requests and releasing TiMediaMetadataRetriver resource + // Cancel any Thumbnail requests and releasing TiMediaMetadataRetriever resource cancelAllThumbnailImageRequests(); } @@ -778,7 +777,7 @@ public void requestThumbnailImagesAtTimes(Object[] times, Object option, KrollFu Uri uri = Uri.parse(url); mTiThumbnailRetriever.setUri(uri); mTiThumbnailRetriever.getBitmap(TiConvert.toIntArray(times), TiConvert.toInt(option), - createThumbnailResponseHandler(callback)); + createThumbnailResponseHandler(callback)); } } @@ -793,16 +792,17 @@ public void cancelAllThumbnailImageRequests() /** * Convenience method for creating a response handler that is used when getting a - * bitmmap. + * bitmap. * - * @param callback Javascript function that the response handler will invoke - * once the bitmap response is ready - * @return the bitmap response handler + * @param callback Javascript function that the response handler will invoke + * once the bitmap response is ready + * @return the bitmap response handler */ private ThumbnailResponseHandler createThumbnailResponseHandler(final KrollFunction callback) { final VideoPlayerProxy videoPlayerProxy = this; - return new ThumbnailResponseHandler() { + return new ThumbnailResponseHandler() + { @Override public void handleThumbnailResponse(KrollDict bitmapResponse) { diff --git a/android/modules/media/src/java/ti/modules/titanium/media/android/AndroidModule.java b/android/modules/media/src/java/ti/modules/titanium/media/android/AndroidModule.java index 1c8534f9903..bd4310b0e39 100644 --- a/android/modules/media/src/java/ti/modules/titanium/media/android/AndroidModule.java +++ b/android/modules/media/src/java/ti/modules/titanium/media/android/AndroidModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/CookieProxy.java b/android/modules/network/src/java/ti/modules/titanium/network/CookieProxy.java index 2d883b6027e..d7f8b4084b2 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/CookieProxy.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/CookieProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -7,10 +7,6 @@ package ti.modules.titanium.network; -import java.net.HttpCookie; -import java.text.SimpleDateFormat; -import java.util.TimeZone; - import org.appcelerator.kroll.KrollDict; import org.appcelerator.kroll.KrollProxy; import org.appcelerator.kroll.annotations.Kroll; @@ -18,6 +14,10 @@ import org.appcelerator.titanium.TiC; import org.appcelerator.titanium.util.TiConvert; +import java.net.HttpCookie; +import java.text.SimpleDateFormat; +import java.util.TimeZone; + @Kroll.proxy(creatableInModule = NetworkModule.class, propertyAccessors = { TiC.PROPERTY_VALUE, @@ -28,14 +28,15 @@ TiC.PROPERTY_SECURE, TiC.PROPERTY_HTTP_ONLY, TiC.PROPERTY_VERSION -}) + }) public class CookieProxy extends KrollProxy { + public static final SimpleDateFormat systemExpiryDateFormatter = + new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss 'GMT'"); private static final String TAG = "CookieProxy"; private static final TimeZone timezone = TimeZone.getTimeZone("GMT"); private static final SimpleDateFormat httpExpiryDateFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"); - public static final SimpleDateFormat systemExpiryDateFormatter = - new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss 'GMT'"); + static { httpExpiryDateFormatter.setTimeZone(timezone); @@ -53,7 +54,7 @@ public CookieProxy(HttpCookie cookie) { super(); if (cookie instanceof HttpCookie) { - httpCookie = (HttpCookie) cookie; + httpCookie = cookie; setProperty(TiC.PROPERTY_NAME, httpCookie.getName()); setProperty(TiC.PROPERTY_VALUE, httpCookie.getValue()); setProperty(TiC.PROPERTY_DOMAIN, httpCookie.getDomain()); diff --git a/android/modules/network/src/java/ti/modules/titanium/network/HTTPClientProxy.java b/android/modules/network/src/java/ti/modules/titanium/network/HTTPClientProxy.java index bb635b8ff4d..397ccf9d2e6 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/HTTPClientProxy.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/HTTPClientProxy.java @@ -1,12 +1,12 @@ /** - * TiDev Titanium Mobile + * 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.network; -import java.io.UnsupportedEncodingException; +import android.os.Build; import org.appcelerator.kroll.KrollDict; import org.appcelerator.kroll.KrollProxy; @@ -15,8 +15,9 @@ import org.appcelerator.titanium.TiC; import org.appcelerator.titanium.util.TiConvert; +import java.io.UnsupportedEncodingException; + import ti.modules.titanium.xml.DocumentProxy; -import android.os.Build; @Kroll.proxy(creatableInModule = NetworkModule.class, propertyAccessors = { @@ -26,7 +27,7 @@ TiC.PROPERTY_ONERROR, TiC.PROPERTY_ONREADYSTATECHANGE, TiC.PROPERTY_ONDATASTREAM -}) + }) public class HTTPClientProxy extends KrollProxy { @Kroll.constant @@ -39,9 +40,8 @@ public class HTTPClientProxy extends KrollProxy public static final int LOADING = TiHTTPClient.READY_STATE_LOADING; @Kroll.constant public static final int DONE = TiHTTPClient.READY_STATE_DONE; - - private static final String TAG = "TiHTTPClientProxy"; public static final String PROPERTY_SECURITY_MANAGER = "securityManager"; + private static final String TAG = "TiHTTPClientProxy"; private TiHTTPClient client; public HTTPClientProxy() @@ -82,7 +82,7 @@ public void handleCreationDict(KrollDict dict) } else { throw new IllegalArgumentException( "Invalid argument passed to securityManager property." - + " Does not conform to SecurityManagerProtocol"); + + " Does not conform to SecurityManagerProtocol"); } } } @@ -241,12 +241,6 @@ public void setValidatesSecureCertificate(boolean value) this.setProperty("validatesSecureCertificate", value); } - @Kroll.setProperty - public void setUsername(String value) - { - this.setProperty(TiC.PROPERTY_USERNAME, value); - } - @Kroll.getProperty public String getUsername() { @@ -257,9 +251,9 @@ public String getUsername() } @Kroll.setProperty - public void setPassword(String value) + public void setUsername(String value) { - this.setProperty(TiC.PROPERTY_PASSWORD, value); + this.setProperty(TiC.PROPERTY_USERNAME, value); } @Kroll.getProperty @@ -272,9 +266,9 @@ public String getPassword() } @Kroll.setProperty - public void setDomain(String value) + public void setPassword(String value) { - this.setProperty(TiC.PROPERTY_DOMAIN, value); + this.setProperty(TiC.PROPERTY_PASSWORD, value); } @Kroll.getProperty @@ -287,9 +281,9 @@ public String getDomain() } @Kroll.setProperty - public void setTlsVersion(int tlsVersion) + public void setDomain(String value) { - client.setTlsVersion(tlsVersion); + this.setProperty(TiC.PROPERTY_DOMAIN, value); } @Kroll.getProperty @@ -309,6 +303,12 @@ public int getTlsVersion() return tlsVersion; } + @Kroll.setProperty + public void setTlsVersion(int tlsVersion) + { + client.setTlsVersion(tlsVersion); + } + @Override public String getApiName() { diff --git a/android/modules/network/src/java/ti/modules/titanium/network/NetworkModule.java b/android/modules/network/src/java/ti/modules/titanium/network/NetworkModule.java index 4508b5b8138..bb3f5cf1df1 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/NetworkModule.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/NetworkModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/NonValidatingSSLSocketFactory.java b/android/modules/network/src/java/ti/modules/titanium/network/NonValidatingSSLSocketFactory.java index ffcdce49134..6c86a943e9f 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/NonValidatingSSLSocketFactory.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/NonValidatingSSLSocketFactory.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/NonValidatingTrustManager.java b/android/modules/network/src/java/ti/modules/titanium/network/NonValidatingTrustManager.java index f232657bd3b..7354ae0157b 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/NonValidatingTrustManager.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/NonValidatingTrustManager.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/SecurityManagerProtocol.java b/android/modules/network/src/java/ti/modules/titanium/network/SecurityManagerProtocol.java index 30a310ff53f..dc30a9cee3b 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/SecurityManagerProtocol.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/SecurityManagerProtocol.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/TiHTTPClient.java b/android/modules/network/src/java/ti/modules/titanium/network/TiHTTPClient.java index af6dead9276..d3c04b4f916 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/TiHTTPClient.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/TiHTTPClient.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -89,7 +89,7 @@ public class TiHTTPClient private static final int PROTOCOL_DEFAULT_PORT = -1; private static final String TITANIUM_ID_HEADER = "X-Titanium-Id"; private static final String TITANIUM_USER_AGENT = - "Appcelerator Titanium/" + TiApplication.getInstance().getTiBuildVersion() + " (" + Build.MODEL + "Titanium SDK/" + TiApplication.getInstance().getTiBuildVersion() + " (" + Build.MODEL + "; Android API Level: " + Integer.toString(Build.VERSION.SDK_INT) + "; " + TiPlatformHelper.getInstance().getLocale() + ";)"; private static final String[] FALLBACK_CHARSETS = { "UTF_8", "ISO_8859_1" }; @@ -1338,7 +1338,7 @@ public void progress(int progress) printWriter.close(); } - // Fix for https://jira.appcelerator.org/browse/TIMOB-23309 + // Fix for https://jira-archive.titaniumsdk.com/TIMOB-23309 // HttpURLConnection does not follow redirects from HTTPS to HTTP (vice versa). // This section of the code handles that. if (autoRedirect) { @@ -1371,7 +1371,11 @@ public void progress(int progress) } catch (IOException e) { if (!aborted) { - throw e; + KrollDict data = new KrollDict(); + data.putCodeAndMessage((getStatus() >= 400) ? getStatus() : TiC.ERROR_CODE_UNKNOWN, + e.getMessage()); + dispatchCallback(TiC.PROPERTY_ONERROR, data); + return; } } finally { if (client != null) { diff --git a/android/modules/network/src/java/ti/modules/titanium/network/TiNetworkListener.java b/android/modules/network/src/java/ti/modules/titanium/network/TiNetworkListener.java index b0c35355112..88eec58c041 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/TiNetworkListener.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/TiNetworkListener.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -7,6 +7,7 @@ package ti.modules.titanium.network; import org.appcelerator.kroll.common.Log; +import org.appcelerator.titanium.TiApplication; import android.content.BroadcastReceiver; import android.content.Context; @@ -14,6 +15,7 @@ import android.content.IntentFilter; import android.net.ConnectivityManager; import android.net.NetworkInfo; +import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.Message; @@ -110,7 +112,13 @@ public void attach(Context context) } else { throw new IllegalStateException("Context was not cleaned up from last release."); } - context.registerReceiver(receiver, connectivityIntentFilter); + if (Build.VERSION.SDK_INT > Build.VERSION_CODES.TIRAMISU + && TiApplication.getInstance().getApplicationInfo().targetSdkVersion > Build.VERSION_CODES.TIRAMISU) { + int receiverFlags = Context.RECEIVER_EXPORTED; + context.registerReceiver(receiver, connectivityIntentFilter, receiverFlags); + } else { + context.registerReceiver(receiver, connectivityIntentFilter); + } listening = true; } else { Log.w(TAG, "Connectivity listener is already attached"); diff --git a/android/modules/network/src/java/ti/modules/titanium/network/TiSocketFactory.java b/android/modules/network/src/java/ti/modules/titanium/network/TiSocketFactory.java index 1171e008585..c492814f202 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/TiSocketFactory.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/TiSocketFactory.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/AbstractContentBody.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/AbstractContentBody.java index cd1afd1610d..6485b6202a8 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/AbstractContentBody.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/AbstractContentBody.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/Body.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/Body.java index a19a5641914..64653240c0f 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/Body.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/Body.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/ContentBody.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/ContentBody.java index ac2c6dcf898..a6b67cf2fb1 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/ContentBody.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/ContentBody.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/ContentDescriptor.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/ContentDescriptor.java index 2a3fbf06545..722af751bd5 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/ContentDescriptor.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/ContentDescriptor.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/Entity.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/Entity.java index 84c9a29d9c8..9d0c5634012 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/Entity.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/Entity.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/FileBody.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/FileBody.java index 34593cfcdf3..792a82b1f60 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/FileBody.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/FileBody.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/FileEntity.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/FileEntity.java index 0d76e0681ea..2a5964d574b 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/FileEntity.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/FileEntity.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/Header.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/Header.java index ec91b4bab60..7e78854b2d3 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/Header.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/Header.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/HeaderElement.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/HeaderElement.java index ae54e4c040b..8a77f491798 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/HeaderElement.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/HeaderElement.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/HttpEntity.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/HttpEntity.java index da8a8fb12db..80cd58a96f0 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/HttpEntity.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/HttpEntity.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/HttpUrlConnectionUtils.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/HttpUrlConnectionUtils.java index 4bb51f7a143..a612ed20ae9 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/HttpUrlConnectionUtils.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/HttpUrlConnectionUtils.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/JsonBody.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/JsonBody.java index 4dde4b3da72..8863f075bd4 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/JsonBody.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/JsonBody.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/NameValuePair.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/NameValuePair.java index ba6d9cef513..6e48d99a1d3 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/NameValuePair.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/NameValuePair.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present. All Rights Reserved. * Licensed under the terms of the Apache Public License * diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/NullHostNameVerifier.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/NullHostNameVerifier.java index 26f60a1b9cb..5b9d7ac16e0 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/NullHostNameVerifier.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/NullHostNameVerifier.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/SingleBody.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/SingleBody.java index 3deafc3b100..02fc143c598 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/SingleBody.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/SingleBody.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/StringBody.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/StringBody.java index b7143505bc4..2bc4c0e2edf 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/StringBody.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/StringBody.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/StringEntity.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/StringEntity.java index 43f099d6134..0b25762ca27 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/StringEntity.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/StringEntity.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/UrlEncodedFormEntity.java b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/UrlEncodedFormEntity.java index 990e4f8d255..3a9e6e530ac 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/UrlEncodedFormEntity.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/httpurlconnection/UrlEncodedFormEntity.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/socket/SocketModule.java b/android/modules/network/src/java/ti/modules/titanium/network/socket/SocketModule.java index a9de9f35adb..577441bd71e 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/socket/SocketModule.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/socket/SocketModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/network/src/java/ti/modules/titanium/network/socket/TCPProxy.java b/android/modules/network/src/java/ti/modules/titanium/network/socket/TCPProxy.java index cae3555ec15..0037dc40031 100644 --- a/android/modules/network/src/java/ti/modules/titanium/network/socket/TCPProxy.java +++ b/android/modules/network/src/java/ti/modules/titanium/network/socket/TCPProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -449,7 +449,7 @@ public void close() throws IOException } catch (Exception e) { e.printStackTrace(); - throw new IOException("Error occured when closing socket"); + throw new IOException("Error occurred when closing socket"); } } diff --git a/android/modules/platform/src/java/ti/modules/titanium/platform/DisplayCapsProxy.java b/android/modules/platform/src/java/ti/modules/titanium/platform/DisplayCapsProxy.java index a7a23373594..62f3fae91e7 100644 --- a/android/modules/platform/src/java/ti/modules/titanium/platform/DisplayCapsProxy.java +++ b/android/modules/platform/src/java/ti/modules/titanium/platform/DisplayCapsProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/platform/src/java/ti/modules/titanium/platform/PlatformModule.java b/android/modules/platform/src/java/ti/modules/titanium/platform/PlatformModule.java index 3a46d9dd739..b83a70af2b1 100644 --- a/android/modules/platform/src/java/ti/modules/titanium/platform/PlatformModule.java +++ b/android/modules/platform/src/java/ti/modules/titanium/platform/PlatformModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -259,7 +259,7 @@ public boolean openURL(KrollInvocation invocation, String url, @Kroll.argument(optional = true) Object arg2, @Kroll.argument(optional = true) Object arg3) { // If given an optional callback, then call this method recursively without the callback. - // Note: We might also receieve an optional KrollDict argument. This is iOS only and should be ignored. + // Note: We might also receive an optional KrollDict argument. This is iOS only and should be ignored. KrollFunction callback = null; if (arg2 instanceof KrollFunction) { callback = (KrollFunction) arg2; @@ -471,7 +471,7 @@ private synchronized List getProcessors() // TODO Sort processors by index, fill in model name by preceding if unknown } catch (IOException ex) { - // somethign went wrong, create "default" set of processors? + // something went wrong, create "default" set of processors? this.processors = new ArrayList<>(processorCount); for (int i = 0; i < processorCount; i++) { this.processors.add(Processor.unknown(i)); diff --git a/android/modules/ui/res/layout/titanium_ui_listview_holder.xml b/android/modules/ui/res/layout/titanium_ui_listview_holder.xml index 88cab51e45a..de8cfbe1581 100644 --- a/android/modules/ui/res/layout/titanium_ui_listview_holder.xml +++ b/android/modules/ui/res/layout/titanium_ui_listview_holder.xml @@ -1,96 +1,91 @@ - + - - + - - - + - - + - + - + - - + - - + - - - - + diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/ActivityIndicatorProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/ActivityIndicatorProxy.java index 4ef85f3a7f6..379119eff3c 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/ActivityIndicatorProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/ActivityIndicatorProxy.java @@ -1,11 +1,14 @@ /** - * TiDev Titanium Mobile + * 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 android.os.Message; + import org.appcelerator.kroll.KrollDict; import org.appcelerator.kroll.annotations.Kroll; import org.appcelerator.titanium.TiC; @@ -13,8 +16,6 @@ import org.appcelerator.titanium.view.TiUIView; import ti.modules.titanium.ui.widget.TiUIActivityIndicator; -import android.app.Activity; -import android.os.Message; @Kroll.proxy(creatableInModule = UIModule.class, propertyAccessors = { @@ -24,7 +25,7 @@ TiC.PROPERTY_FONT, TiC.PROPERTY_STYLE, TiC.PROPERTY_INDICATOR_COLOR -}) + }) @Kroll.dynamicApis(methods = { "hide", "show" }) public class ActivityIndicatorProxy extends TiViewProxy { diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/AlertDialogProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/AlertDialogProxy.java index e15dd3764b1..84c38669b9e 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/AlertDialogProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/AlertDialogProxy.java @@ -1,11 +1,13 @@ /** - * TiDev Titanium Mobile + * 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 +16,6 @@ import org.appcelerator.titanium.view.TiUIView; import ti.modules.titanium.ui.widget.TiUIDialog; -import android.app.Activity; @Kroll.proxy(creatableInModule = UIModule.class, propertyAccessors = { @@ -29,7 +30,7 @@ TiC.PROPERTY_OK, TiC.PROPERTY_OKID, TiC.PROPERTY_PERSISTENT -}) + }) public class AlertDialogProxy extends TiViewProxy { public AlertDialogProxy() @@ -63,7 +64,8 @@ protected void handleShow(KrollDict options) // dialog should occur above the "topmost" activity, so if activity // stack transitions are occurring, try to give them a chance to "settle" // before determining which Activity should be the context for the AlertDialog. - TiUIHelper.runUiDelayedIfBlock(new Runnable() { + TiUIHelper.runUiDelayedIfBlock(new Runnable() + { @Override public void run() { diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/AnimationProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/AnimationProxy.java index bba5e162b3c..73e03fe0c84 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/AnimationProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/AnimationProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -27,7 +27,7 @@ TiC.PROPERTY_WIDTH, TiC.PROPERTY_HEIGHT, TiC.PROPERTY_BACKGROUND_COLOR -}) + }) public class AnimationProxy extends TiAnimation { @Override diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/AttributeProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/AttributeProxy.java index 65072ccab3c..feb61d18392 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/AttributeProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/AttributeProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/AttributedStringProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/AttributedStringProxy.java index b1ef957a118..e8b6301f25e 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/AttributedStringProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/AttributedStringProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/ButtonBarProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/ButtonBarProxy.java index 35c3e35507e..061b8a84e50 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/ButtonBarProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/ButtonBarProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/ButtonProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/ButtonProxy.java index 9de535ea9fa..7be131fa2c6 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/ButtonProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/ButtonProxy.java @@ -1,11 +1,13 @@ /** - * TiDev Titanium Mobile + * 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; @@ -13,7 +15,6 @@ import org.appcelerator.titanium.view.TiUIView; import ti.modules.titanium.ui.widget.TiUIButton; -import android.app.Activity; @Kroll.proxy(creatableInModule = UIModule.class, propertyAccessors = { @@ -30,7 +31,7 @@ TiC.PROPERTY_SHADOW_COLOR, TiC.PROPERTY_SHADOW_RADIUS, TiC.PROPERTY_TINT_COLOR -}) + }) public class ButtonProxy extends TiViewProxy { public ButtonProxy() diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/EmailDialogProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/EmailDialogProxy.java index efaf3496efd..4dab5f3abb2 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/EmailDialogProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/EmailDialogProxy.java @@ -1,22 +1,26 @@ /** - * TiDev Titanium Mobile + * 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 java.io.File; -import java.util.ArrayList; -import java.util.List; +import android.app.Activity; +import android.content.ClipData; +import android.content.Intent; +import android.content.pm.PackageManager; +import android.content.pm.ResolveInfo; +import android.net.Uri; +import android.text.Html; import org.appcelerator.kroll.KrollDict; import org.appcelerator.kroll.annotations.Kroll; import org.appcelerator.kroll.common.Log; -import org.appcelerator.titanium.TiC; import org.appcelerator.titanium.TiApplication; import org.appcelerator.titanium.TiApplication.ActivityTransitionListener; import org.appcelerator.titanium.TiBlob; +import org.appcelerator.titanium.TiC; import org.appcelerator.titanium.io.TiBaseFile; import org.appcelerator.titanium.io.TiFile; import org.appcelerator.titanium.io.TiFileFactory; @@ -29,14 +33,11 @@ import org.appcelerator.titanium.util.TiMimeTypeHelper; import org.appcelerator.titanium.view.TiUIView; +import java.io.File; +import java.util.ArrayList; +import java.util.List; + import ti.modules.titanium.filesystem.FileProxy; -import android.app.Activity; -import android.content.ClipData; -import android.content.Intent; -import android.content.pm.PackageManager; -import android.content.pm.ResolveInfo; -import android.net.Uri; -import android.text.Html; @Kroll.proxy(creatableInModule = UIModule.class, propertyAccessors = { @@ -46,12 +47,10 @@ "messageBody", "subject", "toRecipients" -}) + }) public class EmailDialogProxy extends TiViewProxy implements ActivityTransitionListener { - private static final String TAG = "EmailDialogProxy"; - @Kroll.constant public static final int CANCELLED = 0; @Kroll.constant @@ -60,7 +59,7 @@ public class EmailDialogProxy extends TiViewProxy implements ActivityTransitionL public static final int SENT = 2; @Kroll.constant public static final int FAILED = 3; - + private static final String TAG = "EmailDialogProxy"; private ArrayList attachments; private String privateDataDirectoryPath = null; @@ -103,9 +102,9 @@ public void addAttachment(Object attachment) } else { // silently ignore? Log.d(TAG, - "addAttachment for type " + attachment.getClass().getName() - + " ignored. Only files and blobs may be attached.", - Log.DEBUG_MODE); + "addAttachment for type " + attachment.getClass().getName() + + " ignored. Only files and blobs may be attached.", + Log.DEBUG_MODE); } } @@ -149,7 +148,8 @@ public void doOpen() TiActivitySupport activitySupport = (TiActivitySupport) activity; final int code = activitySupport.getUniqueResultCode(); - activitySupport.launchActivityForResult(choosingIntent, code, new TiActivityResultHandler() { + activitySupport.launchActivityForResult(choosingIntent, code, new TiActivityResultHandler() + { @Override public void onResult(Activity activity, int requestCode, int resultCode, Intent data) { diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/ImageViewProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/ImageViewProxy.java index e38d6982833..41419f4a825 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/ImageViewProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/ImageViewProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -7,10 +7,12 @@ package ti.modules.titanium.ui; import android.app.Activity; + import org.appcelerator.kroll.annotations.Kroll; import org.appcelerator.titanium.TiBlob; import org.appcelerator.titanium.TiC; import org.appcelerator.titanium.view.TiUIView; + import ti.modules.titanium.media.MediaModule; import ti.modules.titanium.ui.widget.TiUIImageView; @@ -27,7 +29,7 @@ TiC.PROPERTY_IMAGES, TiC.PROPERTY_REPEAT_COUNT, TiC.PROPERTY_SCALING_MODE -}) + }) public class ImageViewProxy extends ViewProxy { public ImageViewProxy() @@ -108,18 +110,18 @@ public TiBlob toBlob() return getImageView().toBlob(); } - @Kroll.setProperty(runOnUiThread = true) - public void setTintColor(String color) - { - getImageView().setTintColor(color); - } - @Kroll.getProperty public int getTintColor() { return getImageView().getTintColor(); } + @Kroll.setProperty(runOnUiThread = true) + public void setTintColor(String color) + { + getImageView().setTintColor(color); + } + @Override public String getApiName() { diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/LabelProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/LabelProxy.java index 7032e50f1c6..a2cb6669b01 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/LabelProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/LabelProxy.java @@ -1,11 +1,13 @@ /** - * TiDev Titanium Mobile + * 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; @@ -13,7 +15,6 @@ import org.appcelerator.titanium.view.TiUIView; import ti.modules.titanium.ui.widget.TiUILabel; -import android.app.Activity; @Kroll.proxy(creatableInModule = UIModule.class, propertyAccessors = { @@ -35,8 +36,10 @@ TiC.PROPERTY_MAX_LINES, TiC.PROPERTY_LINE_SPACING, TiC.PROPERTY_INCLUDE_FONT_PADDING, - TiC.PROPERTY_MINIMUM_FONT_SIZE -}) + TiC.PROPERTY_MINIMUM_FONT_SIZE, + TiC.PROPERTY_BREAK_STRATEGY, + TiC.PROPERTY_HYPHENATION_FREQUENCY + }) public class LabelProxy extends TiViewProxy { private static final String TAG = "LabelProxy"; @@ -58,6 +61,26 @@ protected KrollDict getLangConversionTable() return table; } + @Kroll.getProperty + public int getLineCount() + { + TiUIView v = getOrCreateView(); + if (v instanceof TiUILabel) { + return ((TiUILabel) v).getLineCount(); + } + return 0; + } + + @Kroll.getProperty + public String getVisibleText() + { + TiUIView v = getOrCreateView(); + if (v instanceof TiUILabel) { + return ((TiUILabel) v).getVisibleText(); + } + return ""; + } + @Override public TiUIView createView(Activity activity) { diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/ListViewScrollPositionModule.java b/android/modules/ui/src/java/ti/modules/titanium/ui/ListViewScrollPositionModule.java index 51664a3dccd..589f1cc0b24 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/ListViewScrollPositionModule.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/ListViewScrollPositionModule.java @@ -1,6 +1,6 @@ /** - * Appcelerator Titanium Mobile - * Copyright (c) 2009-2020 by Appcelerator, Inc. All Rights Reserved. + * 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. */ diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/MaskedImageProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/MaskedImageProxy.java index 1697d7120d8..40600c13a93 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/MaskedImageProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/MaskedImageProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -7,9 +7,11 @@ package ti.modules.titanium.ui; import android.app.Activity; + import org.appcelerator.kroll.annotations.Kroll; import org.appcelerator.titanium.TiC; import org.appcelerator.titanium.view.TiUIView; + import ti.modules.titanium.ui.widget.TiUIMaskedImage; @Kroll.proxy(creatableInModule = UIModule.class, @@ -19,7 +21,7 @@ TiC.PROPERTY_MODE, TiC.PROPERTY_TINT, TiC.PROPERTY_TINT_COLOR -}) + }) public class MaskedImageProxy extends ViewProxy { public MaskedImageProxy() diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/Matrix2DProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/Matrix2DProxy.java index baf7f7e3e5f..ee5239eb143 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/Matrix2DProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/Matrix2DProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/NavigationWindowProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/NavigationWindowProxy.java index 6450de8b77b..fa2f20cffea 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/NavigationWindowProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/NavigationWindowProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/NotificationProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/NotificationProxy.java index 9e6dcd70ae5..f8344025cda 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/NotificationProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/NotificationProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/OptionBarProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/OptionBarProxy.java index ac999d9958a..60e5900c012 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/OptionBarProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/OptionBarProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/OptionDialogProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/OptionDialogProxy.java index ef51491b764..da9391fd199 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/OptionDialogProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/OptionDialogProxy.java @@ -1,18 +1,20 @@ /** - * TiDev Titanium Mobile + * 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; import org.appcelerator.titanium.view.TiUIView; import ti.modules.titanium.ui.widget.TiUIDialog; -import android.app.Activity; + @Kroll.proxy(creatableInModule = UIModule.class, propertyAccessors = { TiC.PROPERTY_ANDROID_VIEW, @@ -22,7 +24,7 @@ TiC.PROPERTY_TITLE, TiC.PROPERTY_TITLEID, TiC.PROPERTY_PERSISTENT -}) + }) public class OptionDialogProxy extends TiDialogProxy { public OptionDialogProxy() diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/PickerColumnProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/PickerColumnProxy.java index d8b30d8dee5..df6f2bd18f0 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/PickerColumnProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/PickerColumnProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -7,22 +7,20 @@ package ti.modules.titanium.ui; import android.util.Log; -import java.util.ArrayList; + import org.appcelerator.kroll.KrollDict; import org.appcelerator.kroll.KrollProxy; import org.appcelerator.kroll.annotations.Kroll; import org.appcelerator.titanium.TiC; +import java.util.ArrayList; + @Kroll.proxy(creatableInModule = UIModule.class, propertyAccessors = { TiC.PROPERTY_WIDTH, -}) + }) public class PickerColumnProxy extends KrollProxy implements PickerRowProxy.OnChangedListener { - public interface OnChangedListener { - void onChanged(PickerColumnProxy proxy); - } - private static final String TAG = "PickerColumnProxy"; private final ArrayList rowList = new ArrayList<>(); private final ArrayList listeners = new ArrayList<>(); @@ -222,4 +220,8 @@ public String getApiName() { return "Ti.UI.PickerColumn"; } + + public interface OnChangedListener { + void onChanged(PickerColumnProxy proxy); + } } diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/PickerProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/PickerProxy.java index 0317a9ae213..d2536898cfc 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/PickerProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/PickerProxy.java @@ -1,36 +1,11 @@ /** - * TiDev Titanium Mobile + * 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 java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; -import java.util.TimeZone; -import java.util.concurrent.atomic.AtomicInteger; - -import org.appcelerator.kroll.KrollDict; -import org.appcelerator.kroll.KrollFunction; -import org.appcelerator.kroll.annotations.Kroll; -import org.appcelerator.titanium.R; -import org.appcelerator.titanium.TiApplication; -import org.appcelerator.titanium.TiC; -import org.appcelerator.titanium.TiDimension; -import org.appcelerator.titanium.proxy.TiViewProxy; -import org.appcelerator.titanium.util.TiConvert; -import org.appcelerator.titanium.util.TiUIHelper; -import org.appcelerator.titanium.view.TiUIView; - -import ti.modules.titanium.ui.widget.picker.TiUIDatePicker; -import ti.modules.titanium.ui.widget.picker.TiUIPlainDropDownPicker; -import ti.modules.titanium.ui.widget.picker.TiUIPlainPicker; -import ti.modules.titanium.ui.widget.picker.TiUIPlainSpinnerPicker; -import ti.modules.titanium.ui.widget.picker.TiUITimePicker; - import android.annotation.SuppressLint; import android.app.Activity; import android.graphics.Color; @@ -56,6 +31,31 @@ import com.google.android.material.timepicker.MaterialTimePicker; import com.google.android.material.timepicker.TimeFormat; +import org.appcelerator.kroll.KrollDict; +import org.appcelerator.kroll.KrollFunction; +import org.appcelerator.kroll.annotations.Kroll; +import org.appcelerator.titanium.R; +import org.appcelerator.titanium.TiApplication; +import org.appcelerator.titanium.TiC; +import org.appcelerator.titanium.TiDimension; +import org.appcelerator.titanium.proxy.TiViewProxy; +import org.appcelerator.titanium.util.TiConvert; +import org.appcelerator.titanium.util.TiUIHelper; +import org.appcelerator.titanium.view.TiUIView; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.TimeZone; +import java.util.concurrent.atomic.AtomicInteger; + +import ti.modules.titanium.ui.widget.picker.TiUIDatePicker; +import ti.modules.titanium.ui.widget.picker.TiUIPlainDropDownPicker; +import ti.modules.titanium.ui.widget.picker.TiUIPlainPicker; +import ti.modules.titanium.ui.widget.picker.TiUIPlainSpinnerPicker; +import ti.modules.titanium.ui.widget.picker.TiUITimePicker; + @Kroll.proxy(creatableInModule = UIModule.class, propertyAccessors = { TiC.PROPERTY_CALENDAR_VIEW_SHOWN, @@ -66,13 +66,13 @@ TiC.PROPERTY_MAX_DATE, TiC.PROPERTY_SELECTION_OPENS, TiC.PROPERTY_VALUE -}) + }) public class PickerProxy extends TiViewProxy implements PickerColumnProxy.OnChangedListener { private static final String TAG = "PickerProxy"; - private int type = UIModule.PICKER_TYPE_PLAIN; private final ArrayList columnList = new ArrayList<>(); private final ArrayList selectedRows = new ArrayList<>(); + private int type = UIModule.PICKER_TYPE_PLAIN; private boolean useSpinner = false; private boolean canFireColumnEvents = true; @@ -83,6 +83,26 @@ public PickerProxy() defaultValues.put(TiC.PROPERTY_DATE_PICKER_STYLE, UIModule.DATE_PICKER_STYLE_AUTOMATIC); } + /** + * Trim hour, minute, second and millisecond from the date + * + * @param inDate input date + * @return return the trimmed date + */ + private static Date createDateWithoutTime(Date inDate) + { + if (inDate == null) { + return null; + } + Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC")); + cal.setTime(inDate); + cal.set(Calendar.HOUR_OF_DAY, 0); + cal.set(Calendar.MINUTE, 0); + cal.set(Calendar.SECOND, 0); + cal.set(Calendar.MILLISECOND, 0); + return cal.getTime(); + } + @Override public void handleCreationDict(KrollDict dict) { @@ -187,17 +207,20 @@ public TextInputLayout createTextInputLayout() editText.setSingleLine(); editText.setMaxLines(1); editText.setGravity(Gravity.CENTER_VERTICAL | Gravity.START); - editText.setKeyListener(new BaseKeyListener() { + editText.setKeyListener(new BaseKeyListener() + { @Override public int getInputType() { return InputType.TYPE_NULL; } + @Override public boolean backspace(View view, Editable content, int keyCode, KeyEvent event) { return false; } + @Override public boolean forwardDelete(View view, Editable content, int keyCode, KeyEvent event) { @@ -635,25 +658,6 @@ public void showDatePickerDialog(Object[] args) picker.show(appCompatActivity.getSupportFragmentManager(), picker.toString()); } - /** - * Trim hour, minute, second and millisecond from the date - * @param inDate input date - * @return return the trimmed date - */ - private static Date createDateWithoutTime(Date inDate) - { - if (inDate == null) { - return null; - } - Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC")); - cal.setTime(inDate); - cal.set(Calendar.HOUR_OF_DAY, 0); - cal.set(Calendar.MINUTE, 0); - cal.set(Calendar.SECOND, 0); - cal.set(Calendar.MILLISECOND, 0); - return cal.getTime(); - } - // This is meant to be a kind of "static" method, in the sense that // it doesn't use any state except for context. It's a quick hit way // of getting a date dialog up, in other words. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/PickerRowProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/PickerRowProxy.java index ca7b7a04f39..583efd3d24e 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/PickerRowProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/PickerRowProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/ProgressBarProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/ProgressBarProxy.java index 21bc6e62f77..b6b0a5f4346 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/ProgressBarProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/ProgressBarProxy.java @@ -1,18 +1,19 @@ /** - * TiDev Titanium Mobile + * 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.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.TiUIProgressBar; -import android.app.Activity; @Kroll.proxy(creatableInModule = UIModule.class, propertyAccessors = { @@ -24,7 +25,7 @@ TiC.PROPERTY_COLOR, TiC.PROPERTY_TINT_COLOR, TiC.PROPERTY_TRACK_TINT_COLOR, -}) + }) public class ProgressBarProxy extends TiViewProxy { public ProgressBarProxy() diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/RefreshControlProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/RefreshControlProxy.java index 7c0cb842320..f4a8fd62783 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/RefreshControlProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/RefreshControlProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -7,23 +7,28 @@ package ti.modules.titanium.ui; import android.graphics.Color; -import java.util.HashSet; -import org.appcelerator.kroll.annotations.Kroll; -import org.appcelerator.kroll.common.Log; + import org.appcelerator.kroll.KrollDict; 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.TiColorHelper; + +import java.util.HashSet; + import ti.modules.titanium.ui.widget.TiSwipeRefreshLayout; @Kroll.proxy(creatableInModule = UIModule.class, propertyAccessors = { TiC.PROPERTY_TINT_COLOR, TiC.PROPERTY_TITLE, -}) + }) public class RefreshControlProxy extends KrollProxy { - /** The default Android log tag name to be used by this class. */ + /** + * The default Android log tag name to be used by this class. + */ private static final String TAG = "RefreshControlProxy"; /** @@ -39,7 +44,9 @@ public class RefreshControlProxy extends KrollProxy */ private static final HashSet 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 020ddb62cc8..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 @@ -1,22 +1,24 @@ /** - * TiDev Titanium Mobile + * 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; 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 a11fab32103..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 @@ -1,14 +1,13 @@ /** - * TiDev Titanium Mobile + * 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 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,24 +16,24 @@ 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 = { - TiC.PROPERTY_CURRENT_PAGE, TiC.PROPERTY_CACHE_SIZE, TiC.PROPERTY_CLIP_VIEWS, TiC.PROPERTY_PADDING, - TiC.PROPERTY_SCROLLING_ENABLED, 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; @@ -43,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() @@ -360,6 +356,14 @@ public boolean getScrollingEnabled() : getProperties().optBoolean(TiC.PROPERTY_SCROLLING_ENABLED, true); } + @Kroll.setProperty + public void setScrollingEnabled(boolean value) + { + if (scrollableView != null) { + scrollableView.setEnabled(value); + } + } + @Kroll.getProperty public int getCurrentPage() { @@ -367,6 +371,16 @@ public int getCurrentPage() : getProperties().optInt(TiC.PROPERTY_CURRENT_PAGE, 0); } + @Kroll.setProperty + public void setCurrentPage(int currentPage) + { + setProperty(TiC.PROPERTY_CURRENT_PAGE, currentPage); + + if (scrollableView != null) { + scrollableView.setCurrentPage(currentPage); + } + } + @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 a308c18c462..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 @@ -/** - * TiDev Titanium Mobile - * 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/ShortcutItemProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/ShortcutItemProxy.java index 9f30a4b3d09..fd3827ca0b4 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/ShortcutItemProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/ShortcutItemProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/ShortcutModule.java b/android/modules/ui/src/java/ti/modules/titanium/ui/ShortcutModule.java index 110cc07ad8d..7e28cb5f563 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/ShortcutModule.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/ShortcutModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. 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 8f914f7e04f..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 @@ -1,18 +1,19 @@ /** - * TiDev Titanium Mobile + * 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.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 b06793c8806..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 @@ -1,17 +1,19 @@ /** - * TiDev Titanium Mobile + * 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.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 = { @@ -23,8 +25,12 @@ TiC.PROPERTY_COLOR, TiC.PROPERTY_FONT, TiC.PROPERTY_TEXT_ALIGN, - TiC.PROPERTY_VERTICAL_ALIGN -}) + TiC.PROPERTY_TINT_COLOR, + TiC.PROPERTY_ON_TINT_COLOR, + 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 5d7f2131bbb..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 @@ -1,14 +1,20 @@ /** - * TiDev Titanium Mobile + * 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 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); @@ -364,6 +362,10 @@ public void windowCreated(TiBaseActivity activity, Bundle savedInstanceState) if (getProperty(TiC.PROPERTY_STYLE) == null || ((Integer) getProperty(TiC.PROPERTY_STYLE)) == AndroidModule.TABS_STYLE_DEFAULT) { view = new TiUITabLayoutTabGroup(this, activity); + + if (getProperty(TiC.PROPERTY_TAB_MODE) != null) { + ((TiUITabLayoutTabGroup) view).setTabMode((Integer) getProperty(TiC.PROPERTY_TAB_MODE)); + } } else { view = new TiUIBottomNavigationTabGroup(this, activity); } @@ -565,7 +567,7 @@ public void onTabSelected(TabProxy tabProxy) tabProxy.onSelectionChanged(true); tabProxy.onFocusChanged(true, focusEventData); - tabProxy.fireEvent(TiC.EVENT_SELECTED, null, false); + tabProxy.fireEvent(TiC.EVENT_SELECTED, focusEventData.clone(), false); } @Override diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/TabProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/TabProxy.java index 21426142160..09ea35d055f 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/TabProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/TabProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -24,7 +24,9 @@ TiC.PROPERTY_ACTIVE_TINT_COLOR, TiC.PROPERTY_ACTIVE_TITLE_COLOR, TiC.PROPERTY_BADGE, - TiC.PROPERTY_BADGE_COLOR, + TiC.PROPERTY_BADGE_COLOR, // DEPRECATED: Superseded by PROPERTY_BADGE_BACKGROUND_COLOR. + TiC.PROPERTY_BADGE_BACKGROUND_COLOR, + TiC.PROPERTY_BADGE_TEXT_COLOR, TiC.PROPERTY_ICON, TiC.PROPERTY_TINT_COLOR, TiC.PROPERTY_TITLE, @@ -245,7 +247,8 @@ public void onPropertyChanged(String name, Object value) tabGroupView.updateTabIcon(this.tabGroupProxy.getTabIndex(this)); } else if (name.equals(TiC.PROPERTY_BADGE)) { tabGroupView.updateBadge(this.tabGroupProxy.getTabIndex(this)); - } else if (name.equals(TiC.PROPERTY_BADGE_COLOR)) { + } else if (name.equals(TiC.PROPERTY_BADGE_COLOR) || name.equals(TiC.PROPERTY_BADGE_BACKGROUND_COLOR) + || name.equals(TiC.PROPERTY_BADGE_TEXT_COLOR)) { tabGroupView.updateBadgeColor(this.tabGroupProxy.getTabIndex(this)); } } diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/TabbedBarProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/TabbedBarProxy.java index 0fae780ecb5..f497d506bce 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/TabbedBarProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/TabbedBarProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewProxy.java index 0585e120475..65bc33c7acd 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -128,6 +128,11 @@ static public TableViewSectionProxy processSection(Object obj) */ @Kroll.method public void appendRow(Object rows, @Kroll.argument(optional = true) KrollDict animation) + { + appendRowInternal(rows, animation, false); + } + + private void appendRowInternal(Object rows, KrollDict animation, boolean internalUpdate) { final List rowList = new ArrayList<>(); @@ -190,7 +195,11 @@ public void appendRow(Object rows, @Kroll.argument(optional = true) KrollDict an // Allow updating rows after iteration. shouldUpdate = true; - update(); + + // don't update when coming from setData loop + if (!internalUpdate) { + update(); + } } /** @@ -405,7 +414,7 @@ public String getApiName() return "Ti.UI.TableView"; } - // NOTE: For internal use only. + @Kroll.getProperty public KrollDict getContentOffset() { final TiTableView tableView = getTableView(); @@ -508,7 +517,7 @@ public void setData(Object[] data) final TableViewRowProxy row = (TableViewRowProxy) d; // Handle TableViewRow. - appendRow(row, null); + appendRowInternal(row, null, true); } else if (d instanceof Object[]) { setData((Object[]) d); @@ -519,7 +528,7 @@ public void setData(Object[] data) // Handle TableViewRow dictionary. row.handleCreationDict(new KrollDict((HashMap) d)); - appendRow(row, null); + appendRowInternal(row, null, true); } else if (d instanceof TableViewSectionProxy) { final TableViewSectionProxy section = (TableViewSectionProxy) d; @@ -531,7 +540,6 @@ public void setData(Object[] data) // Allow updating rows after iteration. shouldUpdate = true; - update(); } diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewRowProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewRowProxy.java index 07039e27fb2..04781c1de63 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewRowProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewRowProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -234,7 +234,7 @@ public void setHolder(TableViewHolder holder) /** * Override getRect() to amend dimensions. * - * @return Dictinary of view dimensions. + * @return Dictionary of view dimensions. */ @Override public KrollDict getRect() diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewScrollPositionModule.java b/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewScrollPositionModule.java index 371b7094b77..56d2f6f17b2 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewScrollPositionModule.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewScrollPositionModule.java @@ -1,6 +1,6 @@ /** - * Appcelerator Titanium Mobile - * Copyright (c) 2009-2020 by Appcelerator, Inc. All Rights Reserved. + * 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. */ diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewSectionProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewSectionProxy.java index 513accfa7fe..faeb0786187 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewSectionProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewSectionProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. 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 81e82d72d4c..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 @@ -1,11 +1,13 @@ /** - * TiDev Titanium Mobile + * 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.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 = { @@ -32,6 +33,7 @@ TiC.PROPERTY_ENABLE_RETURN_KEY, TiC.PROPERTY_FONT, TiC.PROPERTY_FULLSCREEN, + TiC.PROPERTY_HINT_TEXT_ID, TiC.PROPERTY_HINT_TEXT, TiC.PROPERTY_HINT_TEXT_COLOR, TiC.PROPERTY_HINT_TYPE, @@ -45,7 +47,7 @@ TiC.PROPERTY_VERTICAL_ALIGN, TiC.PROPERTY_PADDING, TiC.PROPERTY_RETURN_KEY_TYPE -}) + }) public class TextAreaProxy extends TiViewProxy { public TextAreaProxy() @@ -61,6 +63,14 @@ public TextAreaProxy() defaultValues.put(TiC.PROPERTY_HINT_TYPE, UIModule.HINT_TYPE_STATIC); } + @Override + protected KrollDict getLangConversionTable() + { + KrollDict table = new KrollDict(); + table.put(TiC.PROPERTY_HINT_TEXT, TiC.PROPERTY_HINT_TEXT_ID); + return table; + } + @Override public void handleCreationArgs(KrollModule createdInModule, Object[] args) { 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 0327176f03c..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 @@ -1,11 +1,13 @@ /** - * TiDev Titanium Mobile + * 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.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 92113c487bc..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 @@ -1,19 +1,19 @@ /** - * TiDev Titanium Mobile + * 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.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/UIModule.java b/android/modules/ui/src/java/ti/modules/titanium/ui/UIModule.java index 1397ba527ba..19d77525a1f 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/UIModule.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/UIModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -443,6 +443,24 @@ public class UIModule extends KrollModule implements TiApplication.Configuration @Kroll.constant public static final int USER_INTERFACE_STYLE_UNSPECIFIED = Configuration.UI_MODE_NIGHT_UNDEFINED; + @Kroll.constant + public static final int BREAK_SIMPLE = 0; + @Kroll.constant + public static final int BREAK_HIGH_QUALITY = 1; + @Kroll.constant + public static final int BREAK_BALANCED = 2; + + @Kroll.constant + public static final int HYPHEN_NONE = 0; + @Kroll.constant + public static final int HYPHEN_NORMAL = 1; + @Kroll.constant + public static final int HYPHEN_FULL = 2; + @Kroll.constant + public static final int HYPHEN_NORMAL_FAST = 3; + @Kroll.constant + public static final int HYPHEN_FULL_FAST = 4; + protected static final int MSG_LAST_ID = KrollProxy.MSG_LAST_ID + 101; public UIModule() diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/ViewProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/ViewProxy.java index 23d840c7417..bef8a67c97c 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/ViewProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/ViewProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. 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 fa415b5f176..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 @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -54,29 +54,27 @@ TiC.PROPERTY_OVER_SCROLL_MODE, TiC.PROPERTY_CACHE_MODE, TiC.PROPERTY_LIGHT_TOUCH_ENABLED, - TiC.PROPERTY_ON_LINK -}) + 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() { @@ -88,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) { @@ -130,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() { @@ -242,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) { @@ -252,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 @@ -272,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() { @@ -431,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 @@ -446,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 @@ -475,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() { @@ -492,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() { @@ -516,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() { @@ -533,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() { @@ -569,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 */ @@ -655,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 7d1f053e936..43d68e76c01 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 @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -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,11 +16,9 @@ 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; import android.transition.ChangeBounds; import android.transition.ChangeClipBounds; import android.transition.ChangeImageTransform; @@ -59,24 +33,57 @@ 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 -}) + TiC.PROPERTY_BAR_COLOR, + TiC.PROPERTY_STATUS_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; private WeakReference windowActivity; @@ -151,7 +158,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); @@ -206,7 +213,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); @@ -314,12 +321,49 @@ public void windowCreated(TiBaseActivity activity, Bundle savedInstanceState) Log.w(TAG, "Trying to set a barColor on a Window with ActionBar disabled. Property will be ignored."); } } + + if (hasProperty(TiC.PROPERTY_STATUS_BAR_COLOR)) { + int colorInt = TiColorHelper.parseColor( + TiConvert.toString(getProperty(TiC.PROPERTY_STATUS_BAR_COLOR)), activity); + win.setStatusBarColor(colorInt); + } + + // Handle titleAttributes property. + if (hasProperty(TiC.PROPERTY_TITLE_ATTRIBUTES)) { + KrollDict innerAttributes = getProperties().getKrollDict(TiC.PROPERTY_TITLE_ATTRIBUTES); + int colorInt = TiColorHelper.parseColor( + TiConvert.toString(innerAttributes.getString(TiC.PROPERTY_COLOR)), activity); + ActionBar actionBar = activity.getSupportActionBar(); + + if (actionBar != null) { + changeTitleColor(actionBar, colorInt); + } else { + Log.w(TAG, + "Trying to set a titleAttributes on a Window with ActionBar disabled. Property will be ignored."); + } + } activity.getActivityProxy().getDecorView().add(this); // Need to handle the cached activity proxy properties and url window in the JS side. callPropertySync(PROPERTY_POST_WINDOW_CREATED, null); } + private void changeTitleColor(ActionBar actionBar, int colorInt) + { + SpannableStringBuilder ssb; + if (actionBar.getTitle() instanceof SpannableStringBuilder) { + ssb = (SpannableStringBuilder) actionBar.getTitle(); + } else { + String abTitle = TiConvert.toString(actionBar.getTitle()); + ssb = new SpannableStringBuilder(abTitle); + } + + barColor = colorInt; + ssb.setSpan(new ForegroundColorSpan(colorInt), + 0, ssb.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE); + actionBar.setTitle(ssb); + } + @Override public void onWindowActivityCreated() { @@ -361,7 +405,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 @@ -382,7 +426,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)) { @@ -409,9 +453,40 @@ public void onPropertyChanged(String name, Object value) } } } + + if (name.equals(TiC.PROPERTY_STATUS_BAR_COLOR)) { + if (windowActivity != null && windowActivity.get() != null) { + AppCompatActivity activity = windowActivity.get(); + int colorInt = TiColorHelper.parseColor(TiConvert.toString(value), activity); + activity.getWindow().setStatusBarColor(colorInt); + } + } + + if (name.equals(TiC.PROPERTY_TITLE_ATTRIBUTES)) { + if (windowActivity != null && windowActivity.get() != null) { + // Get a reference to the ActionBar. + AppCompatActivity activity = windowActivity.get(); + ActionBar actionBar = activity.getSupportActionBar(); + // Check if it is available ( app is using a theme with one or a Toolbar is used as one ). + if (actionBar != null) { + HashMap innerAttributes = (HashMap) value; + changeTitleColor(actionBar, + TiConvert.toColor(innerAttributes.get(TiC.PROPERTY_COLOR), activity)); + } else { + // Log a warning if there is no ActionBar available. + Log.w(TAG, "There is no ActionBar available for this Window."); + } + } + } 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) { @@ -422,12 +497,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) @@ -465,7 +534,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(); } } @@ -474,7 +543,23 @@ 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(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(msg.obj, "")); + } + } } return true; } @@ -512,7 +597,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) @@ -558,8 +644,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/_2DMatrixProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/_2DMatrixProxy.java index 2a95c8d5215..6ebac3ceaec 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/_2DMatrixProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/_2DMatrixProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/activityindicatorstyle/ActivityIndicatorStyleModule.java b/android/modules/ui/src/java/ti/modules/titanium/ui/activityindicatorstyle/ActivityIndicatorStyleModule.java index c10b4101aa2..60823cf4464 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/activityindicatorstyle/ActivityIndicatorStyleModule.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/activityindicatorstyle/ActivityIndicatorStyleModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/android/AndroidModule.java b/android/modules/ui/src/java/ti/modules/titanium/ui/android/AndroidModule.java index a11b39f061e..b6d6db771df 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/android/AndroidModule.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/android/AndroidModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -192,6 +192,11 @@ public class AndroidModule extends KrollModule @Kroll.constant public static final int TABS_STYLE_BOTTOM_NAVIGATION = 1; + @Kroll.constant + public static final int TAB_MODE_FIXED = 1; + @Kroll.constant + public static final int TAB_MODE_SCROLLABLE = 0; + @Kroll.constant public static final int TRANSITION_NONE = TiUIView.TRANSITION_NONE; @Kroll.constant @@ -248,6 +253,15 @@ public class AndroidModule extends KrollModule @Kroll.constant public static final int SCROLL_FLAG_SNAP_MARGINS = 32; + @Kroll.constant + public static final int WEBVIEW_SCROLLBARS_DEFAULT = 0; + @Kroll.constant + public static final int WEBVIEW_SCROLLBARS_HIDE_VERTICAL = 1; + @Kroll.constant + public static final int WEBVIEW_SCROLLBARS_HIDE_HORIZONTAL = 2; + @Kroll.constant + public static final int WEBVIEW_SCROLLBARS_HIDE_ALL = 3; + public AndroidModule() { super(); @@ -323,6 +337,11 @@ public String harmonizedColor(String value) return String.format("#%06X", (0xFFFFFF & MaterialColors.harmonizeWithPrimary(TiApplication.getAppCurrentActivity(), color))); } + @Kroll.method + public void moveToBackground() + { + TiApplication.getAppRootOrCurrentActivity().moveTaskToBack(true); + } @Override public String getApiName() 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 d563749ef7f..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 @@ -1,18 +1,19 @@ /** - * TiDev Titanium Mobile + * 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.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/CollapseToolbarProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/android/CollapseToolbarProxy.java index 14de4eb1806..0855777e2ff 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/android/CollapseToolbarProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/android/CollapseToolbarProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/android/DrawerLayoutProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/android/DrawerLayoutProxy.java index 8bb0668ded1..ee4aaada098 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/android/DrawerLayoutProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/android/DrawerLayoutProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/android/FloatingActionButtonProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/android/FloatingActionButtonProxy.java index aa009df4909..deeb9b5335b 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/android/FloatingActionButtonProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/android/FloatingActionButtonProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. 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 d8c57a19606..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 @@ -1,11 +1,13 @@ /** - * TiDev Titanium Mobile + * 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.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 8728894e579..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 @@ -1,18 +1,19 @@ /** - * TiDev Titanium Mobile + * 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.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/android/SnackbarProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/android/SnackbarProxy.java index 45676206310..86c5246d475 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/android/SnackbarProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/android/SnackbarProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/android/TiPreferencesActivity.java b/android/modules/ui/src/java/ti/modules/titanium/ui/android/TiPreferencesActivity.java index 59f223c4467..eb0bf78fb7b 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/android/TiPreferencesActivity.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/android/TiPreferencesActivity.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/android/TiPreferencesFragment.java b/android/modules/ui/src/java/ti/modules/titanium/ui/android/TiPreferencesFragment.java index 8d6842acc73..4108d4ac59e 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/android/TiPreferencesFragment.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/android/TiPreferencesFragment.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/clipboard/ClipboardModule.java b/android/modules/ui/src/java/ti/modules/titanium/ui/clipboard/ClipboardModule.java index 6558fa7e420..e28f741ad5a 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/clipboard/ClipboardModule.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/clipboard/ClipboardModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiArrowView.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiArrowView.java index 5cb54c69ba0..1e3bbcad932 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiArrowView.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiArrowView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiImageView.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiImageView.java index ef83f324bc0..769de54feeb 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiImageView.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiImageView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiSwipeRefreshLayout.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiSwipeRefreshLayout.java index f8651e1e8be..4459cc9e422 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiSwipeRefreshLayout.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiSwipeRefreshLayout.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -93,8 +93,8 @@ public void setSwipeRefreshEnabled(boolean value) * Updates this view's width and height based on the given width and height constraints. *

* Given arguments size and size mode can be extracted by the Android "View.MeasureSpec" class. - * @param widthMeasureSpec Provides the parent's width contraints and size mode. - * @param heightMeasureSpec Provides the parent's height contraints and size mode. + * @param widthMeasureSpec Provides the parent's width constraints and size mode. + * @param heightMeasureSpec Provides the parent's height constraints and size mode. */ @Override public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIActivityIndicator.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIActivityIndicator.java index d00d4f5ee10..5f56dcb2dfc 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIActivityIndicator.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIActivityIndicator.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIButton.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIButton.java index 55333075c2d..6d5a773221e 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIButton.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIButton.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIButtonBar.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIButtonBar.java index be72910eb79..cc9f66c6c3c 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIButtonBar.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIButtonBar.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUICardView.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUICardView.java index e4158e69917..a5fa30a9e66 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUICardView.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUICardView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUICollapseToolbar.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUICollapseToolbar.java index 8ce6b55859c..d422c829803 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUICollapseToolbar.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUICollapseToolbar.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIDialog.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIDialog.java index f02db20fbaf..1fc4ab9f9ad 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIDialog.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIDialog.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIDrawerLayout.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIDrawerLayout.java index 04dd608595c..984b1f338e2 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIDrawerLayout.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIDrawerLayout.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIEditText.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIEditText.java index f06e8b30cf8..d17f7fe63cb 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIEditText.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIEditText.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -443,7 +443,7 @@ public boolean onTouchEvent(MotionEvent event) // Request the parent to scroll if one of the following is true: // - EditText is not scrollable. (ie: All text fits within the box.) - // - EditText is scrollabe, but cannot scroll any further in given direction. + // - EditText is scrollable, but cannot scroll any further in given direction. if (!isScrollEnabled || !canScrollFurther) { wasHandled = dispatchNestedPreScroll(deltaX, deltaY, null, null); wasHandled |= dispatchNestedScroll(0, 0, deltaX, deltaY, null); diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIFloatingActionButton.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIFloatingActionButton.java index 473ffab6813..c63fd5d79a1 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIFloatingActionButton.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIFloatingActionButton.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -7,6 +7,7 @@ package ti.modules.titanium.ui.widget; import android.content.res.ColorStateList; +import android.graphics.PorterDuff; import com.google.android.material.floatingactionbutton.FloatingActionButton; @@ -54,6 +55,9 @@ public void processProperties(KrollDict d) if (d.containsKey("maxImageSize")) { setMaxImageSize(TiConvert.toInt(d.get("maxImageSize"))); } + if (d.containsKey(TiC.PROPERTY_TINT_COLOR)) { + setTintColor(d.getString("tintColor")); + } if (d.containsKeyAndNotNull(TiC.PROPERTY_TOUCH_FEEDBACK_COLOR)) { ColorStateList colorStateList = null; colorStateList = ColorStateList.valueOf( @@ -91,6 +95,12 @@ private void setImage(Object obj) } } + public void setTintColor(String color) + { + int tintColor = TiConvert.toColor(color, TiApplication.getAppCurrentActivity()); + fab.setColorFilter(tintColor, PorterDuff.Mode.SRC_IN); + } + @Override public void propertyChanged(String key, Object oldValue, Object newValue, KrollProxy proxy) { @@ -106,6 +116,8 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP ColorStateList colorStateList = null; colorStateList = ColorStateList.valueOf(TiConvert.toColor(newValue, proxy.getActivity())); fab.setRippleColor(colorStateList); + } else if (key.equals(TiC.PROPERTY_TINT_COLOR)) { + setTintColor(TiConvert.toString(newValue)); } } } diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIImageView.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIImageView.java index ee029db2312..70aa2a6d7a3 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIImageView.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIImageView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUILabel.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUILabel.java index 374de058775..3198fdbea7a 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUILabel.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUILabel.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -22,6 +22,7 @@ import ti.modules.titanium.ui.UIModule; import ti.modules.titanium.ui.AttributedStringProxy; import android.graphics.Color; +import android.os.Build; import android.text.Html; import android.text.Layout; import android.text.Selection; @@ -34,6 +35,7 @@ import android.text.style.URLSpan; import android.text.util.Linkify; import android.text.TextPaint; +import android.util.TypedValue; import android.view.Gravity; import android.view.MotionEvent; import androidx.annotation.NonNull; @@ -245,7 +247,7 @@ private void adjustTextFontSize(@NonNull MaterialTextView textView) { int value = textView.getWidth(); { - // Exlude the view's padding and borders. + // Exclude the view's padding and borders. value -= textView.getTotalPaddingLeft() + textView.getTotalPaddingRight(); } if ((this.layoutParams != null) && (this.layoutParams.optionWidth != null) @@ -470,6 +472,18 @@ public void processProperties(KrollDict d) } } + if (d.containsKey(TiC.PROPERTY_BREAK_STRATEGY)) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + tv.setBreakStrategy(TiConvert.toInt(d.get(TiC.PROPERTY_BREAK_STRATEGY))); + } + } + + if (d.containsKey(TiC.PROPERTY_HYPHENATION_FREQUENCY)) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + tv.setHyphenationFrequency(TiConvert.toInt(d.get(TiC.PROPERTY_HYPHENATION_FREQUENCY))); + } + } + // This needs to be the last operation. updateLabelText(); tv.invalidate(); @@ -597,11 +611,19 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP } else { TextViewCompat.setAutoSizeTextTypeWithDefaults(tv, TextViewCompat.AUTO_SIZE_TEXT_TYPE_NONE); if (oldFontSize != -1) { - tv.setTextSize(android.util.TypedValue.COMPLEX_UNIT_PX, oldFontSize); + tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, oldFontSize); tv.requestLayout(); } } + } else if (key.equals(TiC.PROPERTY_BREAK_STRATEGY)) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + tv.setBreakStrategy(TiConvert.toInt(newValue)); + } + } else if (key.equals(TiC.PROPERTY_HYPHENATION_FREQUENCY)) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + tv.setHyphenationFrequency(TiConvert.toInt(newValue)); + } } else { super.propertyChanged(key, oldValue, newValue, proxy); } @@ -777,4 +799,16 @@ private void updateLabelText() textView.setText(text, MaterialTextView.BufferType.NORMAL); textView.requestLayout(); } + + public int getLineCount() + { + MaterialTextView textView = (MaterialTextView) getNativeView(); + return textView.getLineCount(); + } + + public String getVisibleText() + { + MaterialTextView textView = (MaterialTextView) getNativeView(); + return textView.getLayout().getText().toString(); + } } diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIListView.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIListView.java index 7bfd9b81c24..a5af9a599fb 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIListView.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIListView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIMaskedImage.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIMaskedImage.java index 52bc6c7ed2b..96815bd63f0 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIMaskedImage.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIMaskedImage.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -125,7 +125,7 @@ public void processProperties(KrollDict properties) } /** - * Called when one of the proxy's properies have changed. + * Called when one of the proxy's properties have changed. *

* Expected to be called on the main UI thread. * @param key The unique name of the property. @@ -1295,7 +1295,7 @@ public boolean drawTo(Canvas canvas) Drawable imageDrawable = getMaskedDrawable().getImageDrawable(); Bitmap imageBitmap = getBitmapFrom(imageDrawable); if (imageBitmap != null) { - // Draw the image drawable's bitmap ourselves with given blend mode. (Most optmized.) + // Draw the image drawable's bitmap ourselves with given blend mode. (Most optimized.) bufferedCanvas.drawBitmap(imageBitmap, null, targetBounds, bufferedPaint); } else if (imageDrawable != null) { // Draw the image via its drawable with given blend mode. (Least optimized.) diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUINotification.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUINotification.java index faaa4f8fd93..9d80290295e 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUINotification.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUINotification.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. 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 4a9ad24215f..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 @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -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/TiUIProgressBar.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIProgressBar.java index db9530e7bf1..10af08949ab 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIProgressBar.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIProgressBar.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIProgressIndicator.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIProgressIndicator.java index 0f7d1df9be6..f8f00deb589 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIProgressIndicator.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIProgressIndicator.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIRelativeLayout.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIRelativeLayout.java index 8aff81ce460..8c39308cb8f 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIRelativeLayout.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIRelativeLayout.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIScrollView.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIScrollView.java index 4d3eaa81d92..4dded6d0761 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIScrollView.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIScrollView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -114,7 +114,7 @@ public void setParentContentWidth(int width) /** * Gets the value set via the setParentContentWidth() method. - * Note that this value is not assignd automatically. The owner must assign it. + * Note that this value is not assigned automatically. The owner must assign it. * @return Returns the parent view's width, excluding its left/right padding. */ public int getParentContentWidth() @@ -136,7 +136,7 @@ public void setParentContentHeight(int height) /** * Gets the value set via the setParentContentHeight() method. - * Note that this value is not assignd automatically. The owner must assign it. + * Note that this value is not assigned automatically. The owner must assign it. * @return Returns the parent view's height, excluding its top/bottom padding. */ public int getParentContentHeight() @@ -353,6 +353,9 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) private AttributeSet getAttributeSet(Context context, int resourceId) { AttributeSet attr = null; + if (context == null || context.getResources() == null) { + return null; + } try { XmlPullParser parser = context.getResources().getXml(resourceId); try { diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIScrollableView.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIScrollableView.java index 9b475630873..28d681cba11 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIScrollableView.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIScrollableView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUISlider.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUISlider.java index 93261e217de..ecf70157c02 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUISlider.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUISlider.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUISnackbar.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUISnackbar.java index 57eff22eff4..c523cb43d6e 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUISnackbar.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUISnackbar.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUISwitch.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUISwitch.java index 7b0b469aef4..da3bb4a1112 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUISwitch.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUISwitch.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -7,13 +7,17 @@ package ti.modules.titanium.ui.widget; import android.app.Activity; +import android.content.res.ColorStateList; import android.view.View; import android.widget.CompoundButton; import android.widget.CompoundButton.OnCheckedChangeListener; + import androidx.appcompat.widget.AppCompatToggleButton; + import com.google.android.material.checkbox.MaterialCheckBox; import com.google.android.material.chip.Chip; import com.google.android.material.switchmaterial.SwitchMaterial; + import org.appcelerator.kroll.KrollDict; import org.appcelerator.kroll.KrollProxy; import org.appcelerator.kroll.common.Log; @@ -23,13 +27,14 @@ import org.appcelerator.titanium.util.TiConvert; import org.appcelerator.titanium.util.TiUIHelper; import org.appcelerator.titanium.view.TiUIView; + import ti.modules.titanium.ui.UIModule; public class TiUISwitch extends TiUIView implements OnCheckedChangeListener { private static final String TAG = "TiUISwitch"; - private View.OnLayoutChangeListener layoutListener; + private final View.OnLayoutChangeListener layoutListener; private boolean oldValue = false; public TiUISwitch(TiViewProxy proxy) @@ -37,7 +42,8 @@ public TiUISwitch(TiViewProxy proxy) super(proxy); Log.d(TAG, "Creating a switch", Log.DEBUG_MODE); - this.layoutListener = new View.OnLayoutChangeListener() { + this.layoutListener = new View.OnLayoutChangeListener() + { @Override public void onLayoutChange( View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) @@ -58,6 +64,62 @@ public void processProperties(KrollDict d) setStyle(TiConvert.toInt(d.get(TiC.PROPERTY_STYLE), UIModule.SWITCH_STYLE_SLIDER)); } + if (d.containsKeyAndNotNull(TiC.PROPERTY_THUMB_COLOR) + || d.containsKeyAndNotNull(TiC.PROPERTY_ON_THUMB_COLOR)) { + CompoundButton currentButton = (CompoundButton) getNativeView(); + if (currentButton instanceof SwitchMaterial) { + + int colActive = d.containsKeyAndNotNull(TiC.PROPERTY_ON_THUMB_COLOR) + ? TiConvert.toColor(d, TiC.PROPERTY_ON_THUMB_COLOR) + : TiConvert.toColor(d, TiC.PROPERTY_THUMB_COLOR); + int colNormal = d.containsKeyAndNotNull(TiC.PROPERTY_THUMB_COLOR) + ? TiConvert.toColor(d, TiC.PROPERTY_THUMB_COLOR) + : TiConvert.toColor(d, TiC.PROPERTY_ON_THUMB_COLOR); + + ColorStateList trackStates = new ColorStateList( + new int[][] { + new int[] { -android.R.attr.state_enabled }, + new int[] { android.R.attr.state_checked }, + new int[] {} + }, + new int[] { + colNormal, + colActive, + colNormal + } + ); + ((SwitchMaterial) currentButton).setThumbTintList(trackStates); + } + } + + if (d.containsKeyAndNotNull(TiC.PROPERTY_TINT_COLOR) + || d.containsKeyAndNotNull(TiC.PROPERTY_ON_TINT_COLOR)) { + CompoundButton currentButton = (CompoundButton) getNativeView(); + if (currentButton instanceof SwitchMaterial) { + + int colActive = d.containsKeyAndNotNull(TiC.PROPERTY_ON_TINT_COLOR) + ? TiConvert.toColor(d, TiC.PROPERTY_ON_TINT_COLOR) + : TiConvert.toColor(d, TiC.PROPERTY_TINT_COLOR); + int colNormal = d.containsKeyAndNotNull(TiC.PROPERTY_TINT_COLOR) + ? TiConvert.toColor(d, TiC.PROPERTY_TINT_COLOR) + : TiConvert.toColor(d, TiC.PROPERTY_ON_TINT_COLOR); + + ColorStateList trackStates = new ColorStateList( + new int[][] { + new int[] { -android.R.attr.state_enabled }, + new int[] { android.R.attr.state_checked }, + new int[] {} + }, + new int[] { + colNormal, + colActive, + colNormal + } + ); + ((SwitchMaterial) currentButton).setTrackTintList(trackStates); + } + } + if (d.containsKey(TiC.PROPERTY_VALUE)) { oldValue = TiConvert.toBoolean(d, TiC.PROPERTY_VALUE); } @@ -151,7 +213,7 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP } else { super.propertyChanged(key, oldValue, newValue, proxy); } - } + } @Override public void onCheckedChanged(CompoundButton btn, boolean value) 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 f7e8aff3e45..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 @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -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/TiUITableView.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUITableView.java index edfb9d4969d..5f8c3946523 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUITableView.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUITableView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIText.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIText.java index 314c5077797..da19265a5b2 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIText.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIText.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -136,6 +136,22 @@ public void onLayoutChange( this.tv.setOnEditorActionListener(this); this.tv.setOnFocusChangeListener(this); this.tv.setIncludeFontPadding(true); + if (proxy.hasListeners("empty")) { + this.tv.setOnKeyListener(new View.OnKeyListener() + { + @Override + public boolean onKey(View v, int keyCode, KeyEvent event) + { + if (tv.getText().length() == 0) { + KrollDict data = new KrollDict(); + data.put("keyCode", keyCode); + fireEvent("empty", data); + } + return false; + } + }); + } + if (field) { this.tv.setGravity(Gravity.CENTER_VERTICAL | Gravity.START); } else { @@ -798,7 +814,7 @@ public void handleKeyboard(KrollDict d) } // Update fullscreen edit handling. - // We might have to diable it due to Google bugs with password handling of certain input types. + // We might have to disable it due to Google bugs with password handling of certain input types. handleFullscreen(d); // Force keyboard to use English if enabled. (Not all keyboards honor this setting.) diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiView.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiView.java index 863bebf64a3..d03d7585f38 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiView.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ItemTouchHandler.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ItemTouchHandler.java index c3b692ce27c..60b3445ec8a 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ItemTouchHandler.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ItemTouchHandler.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListItemProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListItemProxy.java index a29720872e4..4de91d69ff7 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListItemProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListItemProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -580,7 +580,7 @@ public ListViewProxy getListViewProxy() /** * Override getRect() to amend dimensions. * - * @return Dictinary of view dimensions. + * @return Dictionary of view dimensions. */ @Override public KrollDict getRect() diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListSectionProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListSectionProxy.java index 403b9e2da7e..a431c8822d3 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListSectionProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListSectionProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -23,8 +23,7 @@ TiC.PROPERTY_FOOTER_TITLE, TiC.PROPERTY_FOOTER_VIEW, TiC.PROPERTY_HEADER_TITLE, - TiC.PROPERTY_HEADER_VIEW, - TiC.PROPERTY_ITEMS + TiC.PROPERTY_HEADER_VIEW }) public class ListSectionProxy extends TiViewProxy { @@ -196,6 +195,12 @@ public KrollDict[] getItems() return dataItems; } + @Kroll.setProperty + public void setItems(Object value) + { + setItems(value, null); + } + /** * Obtain ListItemProxy from index in section. * diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewAdapter.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewAdapter.java index 8b8cd69195e..dc59801541c 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewAdapter.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewAdapter.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -16,9 +16,9 @@ import android.content.Context; import android.view.ViewGroup; -import android.widget.RelativeLayout; import androidx.annotation.NonNull; +import androidx.constraintlayout.widget.ConstraintLayout; public class ListViewAdapter extends TiRecyclerViewAdapter { @@ -112,7 +112,7 @@ public void onBindViewHolder(@NonNull ListViewHolder holder, int position) public ListViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { // Create new TableViewHolder instance. - final RelativeLayout layout = (RelativeLayout) inflater.inflate(id_holder, null); + final ConstraintLayout layout = (ConstraintLayout) inflater.inflate(id_holder, null); return new ListViewHolder(parent.getContext(), layout); } diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewHolder.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewHolder.java index a4c2d0c39a6..0a400cd4705 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewHolder.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewHolder.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -18,6 +18,7 @@ import org.appcelerator.titanium.view.TiCompositeLayout; import org.appcelerator.titanium.view.TiUIView; +import android.annotation.SuppressLint; import android.app.Activity; import android.content.Context; import android.content.res.Resources; @@ -33,6 +34,8 @@ import android.widget.ImageView; import android.widget.TextView; +import androidx.constraintlayout.widget.ConstraintLayout; +import androidx.constraintlayout.widget.ConstraintSet; import androidx.recyclerview.widget.RecyclerView; import java.lang.ref.WeakReference; @@ -70,7 +73,7 @@ public ListViewHolder(final Context context, final ViewGroup viewGroup) // Header attributes. setTitleAttributes("header", context, this.headerTitle); - this.container = viewGroup.findViewById(R.id.titanium_ui_listview_holder_outer_content_container); + this.container = viewGroup.findViewById(R.id.titanium_ui_listview_holder); this.leftImage = viewGroup.findViewById(R.id.titanium_ui_listview_holder_left_image); @@ -92,6 +95,7 @@ public ListViewHolder(final Context context, final ViewGroup viewGroup) * @param proxy ListItemProxy to bind. * @param selected Is row selected. */ + @SuppressLint("ClickableViewAccessibility") public void bind(final ListItemProxy proxy, final boolean selected) { reset(); @@ -165,7 +169,6 @@ public void bind(final ListItemProxy proxy, final boolean selected) this.rightImage.setVisibility(View.VISIBLE); RecyclerView.ViewHolder mViewHolder = this; - this.rightImage.setOnTouchListener(new View.OnTouchListener() { @Override @@ -252,7 +255,7 @@ public boolean onTouch(View view, MotionEvent motionEvent) borderView.setAddStatesFromChildren(true); // Amend maximum size for content to parent ListView measured height. - this.content.setChildFillHeight(nativeListView.getMeasuredHeight()); + this.container.setMinimumHeight(nativeListView.getMeasuredHeight()); // Add ListViewItem to content. this.content.addView(borderView, view.getLayoutParams()); @@ -311,7 +314,7 @@ private void reset() * Set header and footer views of holder. * * @param listViewProxy ListView proxy. - * @param properties Properties containing header and footer entires. + * @param properties Properties containing header and footer entries. * @param updateHeader Boolean to determine if the header should be updated. * @param updateFooter Boolean to determine if the footer should be updated. */ @@ -362,6 +365,16 @@ private void setHeaderFooter(TiViewProxy listViewProxy, this.header.addView(headerView, view.getLayoutParams()); this.header.setVisibility(View.VISIBLE); + + ConstraintSet constraintSet = new ConstraintSet(); + constraintSet.clone((ConstraintLayout) this.container); + constraintSet.connect(R.id.titanium_ui_listview_holder_content, ConstraintSet.TOP, + R.id.titanium_ui_listview_holder_header, ConstraintSet.BOTTOM, 0); + constraintSet.connect(R.id.titanium_ui_listview_holder_left_image, ConstraintSet.TOP, + R.id.titanium_ui_listview_holder_header, ConstraintSet.BOTTOM, 0); + constraintSet.connect(R.id.titanium_ui_listview_holder_right_image, ConstraintSet.TOP, + R.id.titanium_ui_listview_holder_header, ConstraintSet.BOTTOM, 0); + constraintSet.applyTo((ConstraintLayout) this.container); } } } @@ -396,6 +409,16 @@ private void setHeaderFooter(TiViewProxy listViewProxy, this.footer.addView(footerView, view.getLayoutParams()); this.footer.setVisibility(View.VISIBLE); + + ConstraintSet constraintSet = new ConstraintSet(); + constraintSet.clone((ConstraintLayout) this.container); + constraintSet.connect(R.id.titanium_ui_listview_holder_content, ConstraintSet.BOTTOM, + R.id.titanium_ui_listview_holder_footer, ConstraintSet.TOP, 0); + constraintSet.connect(R.id.titanium_ui_listview_holder_left_image, ConstraintSet.BOTTOM, + R.id.titanium_ui_listview_holder_footer, ConstraintSet.TOP, 0); + constraintSet.connect(R.id.titanium_ui_listview_holder_right_image, ConstraintSet.BOTTOM, + R.id.titanium_ui_listview_holder_footer, ConstraintSet.TOP, 0); + constraintSet.applyTo((ConstraintLayout) this.container); } } } diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewProxy.java index 991bdf9e534..79b5769f8f8 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -450,7 +450,7 @@ public void setActivity(Activity activity) } } - // NOTE: For internal use only. + @Kroll.getProperty public KrollDict getContentOffset() { final TiListView listView = getListView(); @@ -562,6 +562,11 @@ private void processProperty(String name, Object value) if (listView != null) { listView.setContinousUpdate(TiConvert.toBoolean(value, false)); } + } else if (name.equals("forceUpdates")) { + final TiListView listView = getListView(); + if (listView != null) { + listView.setForceUpdates(TiConvert.toBoolean(value, false)); + } } } diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/RecyclerViewProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/RecyclerViewProxy.java index 2739ef161be..bdbccae4d6f 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/RecyclerViewProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/RecyclerViewProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiListView.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiListView.java index 73b5e4d492d..e4cee03582b 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiListView.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiListView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -56,6 +56,7 @@ public class TiListView extends TiSwipeRefreshLayout implements OnSearchChangeLi private SelectionTracker tracker = null; private boolean isScrolling = false; private boolean continuousUpdate = false; + private boolean forceUpdate = false; private int lastScrollDeltaY; private int scrollOffsetX = 0; private int scrollOffsetY = 0; @@ -157,7 +158,8 @@ public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) if (continuousUpdate) { if (lastVisibleItem != TiConvert.toInt(payload.get(TiC.PROPERTY_FIRST_VISIBLE_ITEM_INDEX)) || lastVisibleSection - != TiConvert.toInt(payload.get(TiC.PROPERTY_FIRST_VISIBLE_SECTION_INDEX))) { + != TiConvert.toInt(payload.get(TiC.PROPERTY_FIRST_VISIBLE_SECTION_INDEX)) + || forceUpdate) { proxy.fireSyncEvent(TiC.EVENT_SCROLLING, payload); lastVisibleItem = TiConvert.toInt(payload.get(TiC.PROPERTY_FIRST_VISIBLE_ITEM_INDEX)); lastVisibleSection = TiConvert.toInt(payload.get(TiC.PROPERTY_FIRST_VISIBLE_SECTION_INDEX)); @@ -282,6 +284,7 @@ public boolean inSelectionHotspot(@NonNull MotionEvent e) final boolean allowsMultipleSelection = properties.optBoolean(TiC.PROPERTY_ALLOWS_MULTIPLE_SELECTION_DURING_EDITING, false); continuousUpdate = properties.optBoolean(TiC.PROPERTY_CONTINUOUS_UPDATE, false); + forceUpdate = properties.optBoolean("forceUpdates", false); if (properties.optBoolean(TiC.PROPERTY_FIXED_SIZE, false)) { this.recyclerView.setHasFixedSize(true); @@ -398,6 +401,8 @@ public KrollDict generateScrollPayload() payload.put(TiC.PROPERTY_FIRST_VISIBLE_SECTION, null); payload.put(TiC.PROPERTY_FIRST_VISIBLE_SECTION_INDEX, -1); } + + payload.put(TiC.PROPERTY_TOP, recyclerView.computeVerticalScrollOffset()); } // Define visible item count. @@ -627,7 +632,7 @@ public void setSeparator(int color, int height) } /** - * Starts dragging programatically. + * Starts dragging programmatically. * * @param vHolder The dedicated view holder */ @@ -662,6 +667,7 @@ public void update(boolean force) || properties.containsKeyAndNotNull(TiC.PROPERTY_FOOTER_VIEW); String query = properties.optString(TiC.PROPERTY_SEARCH_TEXT, filterQuery); + filterQuery = query; final boolean caseInsensitive = properties.optBoolean(TiC.PROPERTY_CASE_INSENSITIVE_SEARCH, true); if (query != null && caseInsensitive) { query = query.toLowerCase(); @@ -817,6 +823,11 @@ public void setContinousUpdate(boolean value) continuousUpdate = value; } + public void setForceUpdates(boolean value) + { + forceUpdate = value; + } + public void update() { this.update(false); diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiNestedRecyclerView.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiNestedRecyclerView.java index ca3a18e6e53..659bb6094f2 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiNestedRecyclerView.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiNestedRecyclerView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiRecyclerViewAdapter.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiRecyclerViewAdapter.java index 7fe53e5c763..cca19084f9b 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiRecyclerViewAdapter.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiRecyclerViewAdapter.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -117,7 +117,7 @@ public void update(List newModels, boolean force) return; } - final var diffResult = DiffUtil.calculateDiff(new DiffCallback(newModelsClone, this.models)); + final var diffResult = DiffUtil.calculateDiff(new AsyncListDiffer(newModelsClone, this.models)); // Update models. this.models = newModelsClone; @@ -129,13 +129,13 @@ public void update(List newModels, boolean force) /** * Define DiffUtil.Callback to optimize updating the adapter. */ - private class DiffCallback extends DiffUtil.Callback + private class AsyncListDiffer extends DiffUtil.Callback { List newViews; List oldViews; - public DiffCallback(List newViews, List oldViews) + public AsyncListDiffer(List newViews, List oldViews) { this.newViews = newViews; this.oldViews = oldViews; diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiRecyclerViewHolder.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiRecyclerViewHolder.java index a031321b7c1..ed14fd3f194 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiRecyclerViewHolder.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiRecyclerViewHolder.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUIDatePicker.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUIDatePicker.java index 4d1462acad1..1f0c29e857c 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUIDatePicker.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUIDatePicker.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -7,6 +7,7 @@ package ti.modules.titanium.ui.widget.picker; import android.os.Build; +import android.view.Gravity; import android.view.View; import android.widget.DatePicker; import android.widget.DatePicker.OnDateChangedListener; @@ -100,6 +101,15 @@ public TiUIDatePicker(@NonNull PickerProxy proxy) }; textInputLayout.getEditText().setOnClickListener(clickListener); textInputLayout.setEndIconOnClickListener(clickListener); + + if (proxy.hasPropertyAndNotNull(TiC.PROPERTY_TEXT_ALIGN)) { + String textAlign = TiConvert.toString(proxy.getProperty(TiC.PROPERTY_TEXT_ALIGN)); + if (textAlign.equals("center")) { + textInputLayout.getEditText().setGravity(Gravity.CENTER_VERTICAL | Gravity.CENTER); + } else if (textAlign.equals("right")) { + textInputLayout.getEditText().setGravity(Gravity.CENTER_VERTICAL | Gravity.END); + } + } view = textInputLayout; } } diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUIPlainDropDownPicker.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUIPlainDropDownPicker.java index 93430873f21..751a38e36ba 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUIPlainDropDownPicker.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUIPlainDropDownPicker.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUIPlainPicker.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUIPlainPicker.java index fb87e1369ed..2ddf4b3dc41 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUIPlainPicker.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUIPlainPicker.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUIPlainSpinnerPicker.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUIPlainSpinnerPicker.java index 8c6323090e2..52b78c7b9ec 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUIPlainSpinnerPicker.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUIPlainSpinnerPicker.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUITimePicker.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUITimePicker.java index 82c071c95f6..1fe6d1e4618 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUITimePicker.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/picker/TiUITimePicker.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/searchbar/TiUISearchBar.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/searchbar/TiUISearchBar.java index 1beb9d1f5d0..9730dc4f64a 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/searchbar/TiUISearchBar.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/searchbar/TiUISearchBar.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/searchview/TiUISearchView.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/searchview/TiUISearchView.java index 11bfb293d7e..fe5227e0795 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/searchview/TiUISearchView.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/searchview/TiUISearchView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUIAbstractTabGroup.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUIAbstractTabGroup.java index 12221d51955..67957c1309b 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUIAbstractTabGroup.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUIAbstractTabGroup.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -357,7 +357,7 @@ protected boolean hasCustomBackground(TiViewProxy tabProxy) } /** - * Method for creating a RippleDrawable to be used as a bacgkround for an item in the Controller. + * Method for creating a RippleDrawable to be used as a background for an item in the Controller. * Creates the RippleDrawable for two states - the provided state and its negative value. * If the properties are not set the method falls back to the colorPrimary of the current theme. * The previous implementation of TabGroup added the ripple effect by default for tabs, thus this 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 03f69a23a1c..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 @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -25,7 +25,7 @@ import com.google.android.material.bottomnavigation.BottomNavigationItemView; import com.google.android.material.bottomnavigation.BottomNavigationMenuView; import com.google.android.material.bottomnavigation.BottomNavigationView; -import com.google.android.material.bottomnavigation.LabelVisibilityMode; +import com.google.android.material.navigation.NavigationBarView; import com.google.android.material.shape.CornerFamily; import com.google.android.material.shape.MaterialShapeDrawable; import com.google.android.material.shape.ShapeAppearanceModel; @@ -180,6 +180,14 @@ public void onLayoutChange( // Set the ViewPager as a native view. setNativeView(this.tabGroupViewPager); + if (!TiConvert.toBoolean(this.proxy.getProperty(TiC.PROPERTY_TAB_BAR_VISIBLE), true)) { + TiCompositeLayout.LayoutParams params = new TiCompositeLayout.LayoutParams(); + params.autoFillsWidth = true; + params.optionBottom = new TiDimension(0, TiDimension.TYPE_BOTTOM); + this.tabGroupViewPager.setLayoutParams(params); + // FIXME change "500" to a calculate value https://github.com/tidev/titanium-sdk/issues/13900 + this.mBottomNavigationView.setTranslationY(500); + } } /** @@ -230,14 +238,14 @@ public void addTabItemInController(TiViewProxy tabProxy) final int shiftMode = proxy.getProperties().optInt(TiC.PROPERTY_SHIFT_MODE, 1); switch (shiftMode) { case 0: - this.mBottomNavigationView.setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_LABELED); + this.mBottomNavigationView.setLabelVisibilityMode(NavigationBarView.LABEL_VISIBILITY_LABELED); break; case 1: - this.mBottomNavigationView.setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_AUTO); + this.mBottomNavigationView.setLabelVisibilityMode(NavigationBarView.LABEL_VISIBILITY_AUTO); break; case 2: // NOTE: Undocumented for now, will create new property that has parity with iOS. - this.mBottomNavigationView.setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_UNLABELED); + this.mBottomNavigationView.setLabelVisibilityMode(NavigationBarView.LABEL_VISIBILITY_UNLABELED); break; } } @@ -336,11 +344,17 @@ public void updateTabBackgroundDrawable(int index) try { // BottomNavigationMenuView rebuilds itself after adding a new item, so we need to reset the colors each time. TiViewProxy tabProxy = tabs.get(index).getProxy(); - if (hasCustomBackground(tabProxy) || hasCustomIconTint(tabProxy)) { + boolean hasTouchFeedbackColor = tabProxy.hasPropertyAndNotNull(TiC.PROPERTY_TOUCH_FEEDBACK_COLOR); + if (hasCustomBackground(tabProxy) || hasCustomIconTint(tabProxy) || hasTouchFeedbackColor) { BottomNavigationMenuView bottomMenuView = ((BottomNavigationMenuView) this.mBottomNavigationView.getChildAt(0)); Drawable drawable = createBackgroundDrawableForState(tabProxy, android.R.attr.state_checked); - drawable = new RippleDrawable(createRippleColorStateListFrom(getActiveColor(tabProxy)), drawable, null); + int color = getActiveColor(tabProxy); + if (hasTouchFeedbackColor) { + color = TiConvert.toColor(tabProxy.getProperty(TiC.PROPERTY_TOUCH_FEEDBACK_COLOR), + tabProxy.getActivity()); + } + drawable = new RippleDrawable(createRippleColorStateListFrom(color), drawable, null); bottomMenuView.getChildAt(index).setBackground(drawable); } } catch (Exception e) { @@ -435,11 +449,24 @@ public void updateBadgeColor(int index) // TODO: reset to default value when property is null if (tabProxy.hasPropertyAndNotNull(TiC.PROPERTY_BADGE_COLOR)) { + Log.w(TAG, "badgeColor is deprecated. Use badgeBackgroundColor instead."); int menuItemId = this.mBottomNavigationView.getMenu().getItem(index).getItemId(); BadgeDrawable badgeDrawable = this.mBottomNavigationView.getOrCreateBadge(menuItemId); badgeDrawable.setBackgroundColor( TiConvert.toColor(tabProxy.getProperty(TiC.PROPERTY_BADGE_COLOR), tabProxy.getActivity())); } + if (tabProxy.hasPropertyAndNotNull(TiC.PROPERTY_BADGE_BACKGROUND_COLOR)) { + int menuItemId = this.mBottomNavigationView.getMenu().getItem(index).getItemId(); + BadgeDrawable badgeDrawable = this.mBottomNavigationView.getOrCreateBadge(menuItemId); + badgeDrawable.setBackgroundColor( + TiConvert.toColor(tabProxy.getProperty(TiC.PROPERTY_BADGE_BACKGROUND_COLOR), tabProxy.getActivity())); + } + if (tabProxy.hasPropertyAndNotNull(TiC.PROPERTY_BADGE_TEXT_COLOR)) { + int menuItemId = this.mBottomNavigationView.getMenu().getItem(index).getItemId(); + BadgeDrawable badgeDrawable = this.mBottomNavigationView.getOrCreateBadge(menuItemId); + badgeDrawable.setBadgeTextColor( + TiConvert.toColor(tabProxy.getProperty(TiC.PROPERTY_BADGE_TEXT_COLOR), tabProxy.getActivity())); + } } @Override @@ -474,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/TiUITab.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUITab.java index e193bf15723..cedabd77715 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUITab.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUITab.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. 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 6d5196a2264..97d81da263e 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 @@ -1,11 +1,12 @@ /** - * TiDev Titanium Mobile + * 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.widget.tabgroup; +import org.appcelerator.kroll.KrollDict; import org.appcelerator.kroll.common.Log; import org.appcelerator.titanium.TiBaseActivity; import org.appcelerator.titanium.TiC; @@ -329,10 +330,21 @@ public void updateBadgeColor(int index) // TODO: reset to default value when property is null if (tabProxy.hasPropertyAndNotNull(TiC.PROPERTY_BADGE_COLOR)) { + Log.w(TAG, "badgeColor is deprecated. Use badgeBackgroundColor instead."); BadgeDrawable badgeDrawable = this.mTabLayout.getTabAt(index).getOrCreateBadge(); badgeDrawable.setBackgroundColor( TiConvert.toColor(tabProxy.getProperty(TiC.PROPERTY_BADGE_COLOR), tabProxy.getActivity())); } + if (tabProxy.hasPropertyAndNotNull(TiC.PROPERTY_BADGE_BACKGROUND_COLOR)) { + BadgeDrawable badgeDrawable = this.mTabLayout.getTabAt(index).getOrCreateBadge(); + badgeDrawable.setBackgroundColor( + TiConvert.toColor(tabProxy.getProperty(TiC.PROPERTY_BADGE_BACKGROUND_COLOR), tabProxy.getActivity())); + } + if (tabProxy.hasPropertyAndNotNull(TiC.PROPERTY_BADGE_TEXT_COLOR)) { + BadgeDrawable badgeDrawable = this.mTabLayout.getTabAt(index).getOrCreateBadge(); + badgeDrawable.setBadgeTextColor( + TiConvert.toColor(tabProxy.getProperty(TiC.PROPERTY_BADGE_TEXT_COLOR), tabProxy.getActivity())); + } } @Override @@ -350,6 +362,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 @@ -400,6 +413,22 @@ public void onTabUnselected(TabLayout.Tab tab) @Override public void onTabReselected(TabLayout.Tab tab) { + if (tab != null) { + int index = tab.getPosition(); + if ((index >= 0) && (index < this.tabs.size())) { + TiViewProxy tabProxy = this.tabs.get(index).getProxy(); + if (tabProxy != null && tabProxy.hasListeners(TiC.EVENT_SELECTED)) { + KrollDict data = new KrollDict(); + data.put("index", index); + tabProxy.fireEvent(TiC.EVENT_SELECTED, data, false); + } + } + } + } + + public void setTabMode(int value) + { + this.mTabLayout.setTabMode(value); } private LinearLayout getTabLinearLayoutForIndex(int index) diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TableViewAdapter.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TableViewAdapter.java index d56b02e58f1..2cdf03bed21 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TableViewAdapter.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TableViewAdapter.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TableViewHolder.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TableViewHolder.java index dd3f55b1363..64475c68cbd 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TableViewHolder.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TableViewHolder.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TiTableView.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TiTableView.java index 9349652c58a..68de264bf0b 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TiTableView.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TiTableView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiUIWebView.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiUIWebView.java index c12a149c79d..e7099c1dee4 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiUIWebView.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiUIWebView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -456,6 +456,14 @@ public void processProperties(KrollDict d) if (d.containsKey(TiC.PROPERTY_ZOOM_LEVEL)) { zoomBy(getWebView(), TiConvert.toFloat(d, TiC.PROPERTY_ZOOM_LEVEL)); } + + if (d.containsKey(TiC.PROPERTY_SCROLLBARS)) { + int scrollbarValue = TiConvert.toInt(d, TiC.PROPERTY_SCROLLBARS); + webView.setVerticalScrollBarEnabled(scrollbarValue == AndroidModule.WEBVIEW_SCROLLBARS_DEFAULT + || scrollbarValue == AndroidModule.WEBVIEW_SCROLLBARS_HIDE_HORIZONTAL); + webView.setHorizontalScrollBarEnabled(scrollbarValue == AndroidModule.WEBVIEW_SCROLLBARS_DEFAULT + || scrollbarValue == AndroidModule.WEBVIEW_SCROLLBARS_HIDE_VERTICAL); + } } @Override @@ -496,6 +504,12 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP zoomBy(webView, TiConvert.toFloat(newValue, 1.0f)); } else if (TiC.PROPERTY_USER_AGENT.equals(key)) { ((WebViewProxy) getProxy()).setUserAgent(TiConvert.toString(newValue)); + } else if (TiC.PROPERTY_SCROLLBARS.equals(key)) { + int scrollbarValue = TiConvert.toInt(newValue); + webView.setVerticalScrollBarEnabled(scrollbarValue == AndroidModule.WEBVIEW_SCROLLBARS_DEFAULT + || scrollbarValue == AndroidModule.WEBVIEW_SCROLLBARS_HIDE_HORIZONTAL); + webView.setHorizontalScrollBarEnabled(scrollbarValue == AndroidModule.WEBVIEW_SCROLLBARS_DEFAULT + || scrollbarValue == AndroidModule.WEBVIEW_SCROLLBARS_HIDE_VERTICAL); } else { super.propertyChanged(key, oldValue, newValue, proxy); } diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebChromeClient.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebChromeClient.java index 275005a43d0..9dc644f4e28 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebChromeClient.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebChromeClient.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -135,7 +135,7 @@ public void onRequestPermissionsResult( /** * Called when the HTML is requesting permission to do WebRTC audio/video capture or access a media resource. * This method will prompt the end-user for permission to grant access to the requested web resource. - * @param request Object providing the grant/deny callback and the resoruces being requested. + * @param request Object providing the grant/deny callback and the resources being requested. */ @Override public void onPermissionRequest(final PermissionRequest request) @@ -539,7 +539,7 @@ public void onError(Activity activity, int requestCode, Exception ex) } }; - // Display the file chooser or catpure activity. + // Display the file chooser or capture activity. try { Intent intent = createFileChooserIntentFrom(chooserParams); activity.launchActivityForResult(intent, activity.getUniqueResultCode(), resultHandler); diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebViewBinding.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebViewBinding.java index bf0548b1ab4..3b12250d2b0 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebViewBinding.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebViewBinding.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -22,6 +22,7 @@ import org.appcelerator.kroll.common.Log; import org.appcelerator.kroll.util.KrollAssetHelper; import org.appcelerator.titanium.TiApplication; +import org.appcelerator.titanium.proxy.TiViewProxy; import org.appcelerator.titanium.util.TiConvert; import org.json.JSONException; import org.json.JSONObject; @@ -88,12 +89,14 @@ public class TiWebViewBinding private AppBinding appBinding; private TiReturn tiReturn; private WebView webView; + private TiViewProxy proxy; private boolean interfacesAdded = false; - public TiWebViewBinding(WebView webView) + public TiWebViewBinding(WebView webView, TiViewProxy proxy) { codeSnippets = new Stack(); this.webView = webView; + this.proxy = proxy; apiBinding = new ApiBinding(); appBinding = new AppBinding(); tiReturn = new TiReturn(); @@ -238,6 +241,7 @@ public void fireEvent(String event, String json) if (json != null && !json.equals("undefined")) { dict = new KrollDict(new JSONObject(json)); } + dict.put("source", proxy); module.fireEvent(event, dict); } catch (JSONException e) { Log.e(TAG, "Error parsing event JSON", e); diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebViewClient.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebViewClient.java index 81f6f9ffd85..3d455af0654 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebViewClient.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebViewClient.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -45,7 +45,7 @@ public TiWebViewClient(TiUIWebView tiWebView, WebView webView) { super(); this.webView = tiWebView; - binding = new TiWebViewBinding(webView); + binding = new TiWebViewBinding(webView, tiWebView.getProxy()); } @Override diff --git a/android/modules/utils/src/java/ti/modules/titanium/utils/UtilsModule.java b/android/modules/utils/src/java/ti/modules/titanium/utils/UtilsModule.java index ce42048551a..67b6266c4c5 100644 --- a/android/modules/utils/src/java/ti/modules/titanium/utils/UtilsModule.java +++ b/android/modules/utils/src/java/ti/modules/titanium/utils/UtilsModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/AttrProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/AttrProxy.java index b79018cc334..7072ff184bc 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/AttrProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/AttrProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/CDATASectionProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/CDATASectionProxy.java index bf3def1c1bd..d72fa76833d 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/CDATASectionProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/CDATASectionProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/CharacterDataProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/CharacterDataProxy.java index 3015aa012ea..ffa9a11bea9 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/CharacterDataProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/CharacterDataProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/CommentProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/CommentProxy.java index 2a128371fd6..9e67f80a978 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/CommentProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/CommentProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/DOMImplementationProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/DOMImplementationProxy.java index 6a0d2f26fab..106fcd2b7df 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/DOMImplementationProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/DOMImplementationProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/DocumentFragmentProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/DocumentFragmentProxy.java index 8165ff557a6..171015477bf 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/DocumentFragmentProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/DocumentFragmentProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/DocumentProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/DocumentProxy.java index 8ab64f9261f..c1034d09d2c 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/DocumentProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/DocumentProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/DocumentTypeProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/DocumentTypeProxy.java index 12b6e375df3..310ea3c4621 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/DocumentTypeProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/DocumentTypeProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/ElementProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/ElementProxy.java index 783fcc25f3e..2af678120b0 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/ElementProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/ElementProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/EntityProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/EntityProxy.java index 2d549005d7c..24575b12453 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/EntityProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/EntityProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/EntityReferenceProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/EntityReferenceProxy.java index e2b69f8e3fe..8825fadfdd8 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/EntityReferenceProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/EntityReferenceProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/NamedNodeMapProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/NamedNodeMapProxy.java index de09c95f5d1..2170ba3b4a8 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/NamedNodeMapProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/NamedNodeMapProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -25,6 +25,9 @@ public NamedNodeMapProxy(NamedNodeMap map) @Kroll.getProperty public int getLength() { + if (map == null) { + return 0; + } return map.getLength(); } diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/NodeListProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/NodeListProxy.java index 47f5beea128..7b074df935a 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/NodeListProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/NodeListProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/NodeProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/NodeProxy.java index 5cf5889838c..3ddd3631e34 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/NodeProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/NodeProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/NotationProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/NotationProxy.java index 33d757fbbb4..18c9cfc50c9 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/NotationProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/NotationProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/ProcessingInstructionProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/ProcessingInstructionProxy.java index 38e75875da6..8a14deabbbf 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/ProcessingInstructionProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/ProcessingInstructionProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/TextProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/TextProxy.java index 24306ac1052..561e7be924e 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/TextProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/TextProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/XMLModule.java b/android/modules/xml/src/java/ti/modules/titanium/xml/XMLModule.java index 3ec0c112e94..b8cfa27af81 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/XMLModule.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/XMLModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/XPathNodeListProxy.java b/android/modules/xml/src/java/ti/modules/titanium/xml/XPathNodeListProxy.java index f1d35f8cb50..766c481efbe 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/XPathNodeListProxy.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/XPathNodeListProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/modules/xml/src/java/ti/modules/titanium/xml/XPathUtil.java b/android/modules/xml/src/java/ti/modules/titanium/xml/XPathUtil.java index f0fb7413c97..e264a015a7b 100644 --- a/android/modules/xml/src/java/ti/modules/titanium/xml/XPathUtil.java +++ b/android/modules/xml/src/java/ti/modules/titanium/xml/XPathUtil.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/notes.md b/android/notes.md index a7140dc4a46..af6e08f5d2e 100644 --- a/android/notes.md +++ b/android/notes.md @@ -19,7 +19,7 @@ TODOs!!! Testing V8-inspector/debugger ======== The goal is to be able to debug apps via Chrome Devtools or Studio. -We hook up a websocket server in JSDebugger.java to talk to DevTools. This carries the messages back and forth (basically wbesaockets are the "base" protocol that the isnpector protocol travels over) +We hook up a websocket server in JSDebugger.java to talk to DevTools. This carries the messages back and forth (basically websockets are the "base" protocol that the inspector protocol travels over) - Use multiple terminal tabs/windows: - One for running a test app to debug with: diff --git a/android/package.json b/android/package.json index e44b893a543..cb890f2d580 100644 --- a/android/package.json +++ b/android/package.json @@ -1,7 +1,7 @@ { "name": "titanium-mobile-android", "title": "Android", - "description": "TiDev Titanium Mobile Android", + "description": "Titanium SDK Android", "keywords": [ "tidev", "titanium", @@ -19,15 +19,15 @@ "minSDKVersion": "21", "compileSDKVersion": "33", "vendorDependencies": { - "android sdk": ">=23.x <=33.x", - "android build tools": ">=30.0.2 <=33.x", + "android sdk": ">=23.x <=34.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" }, "engines": { - "node": ">=12.13.0" + "node": ">=16.0.0" }, "repository": { "type": "git", diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/JSError.java b/android/runtime/common/src/java/org/appcelerator/kroll/JSError.java index 5f48b01ae07..339b4ce94f3 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/JSError.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/JSError.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/KrollApplication.java b/android/runtime/common/src/java/org/appcelerator/kroll/KrollApplication.java index 695cd69d264..8048027c64e 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/KrollApplication.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/KrollApplication.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/KrollEvaluator.java b/android/runtime/common/src/java/org/appcelerator/kroll/KrollEvaluator.java index bfbadcb3794..c61ef567697 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/KrollEvaluator.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/KrollEvaluator.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/KrollEventCallback.java b/android/runtime/common/src/java/org/appcelerator/kroll/KrollEventCallback.java index cae41b42b26..6a436e840ff 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/KrollEventCallback.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/KrollEventCallback.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/KrollException.java b/android/runtime/common/src/java/org/appcelerator/kroll/KrollException.java index a07c2e76e78..ab44b10199d 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/KrollException.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/KrollException.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/KrollExceptionHandler.java b/android/runtime/common/src/java/org/appcelerator/kroll/KrollExceptionHandler.java index c9342a80460..cd4ce021338 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/KrollExceptionHandler.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/KrollExceptionHandler.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/KrollExternalModule.java b/android/runtime/common/src/java/org/appcelerator/kroll/KrollExternalModule.java index e20b8df2edf..9cdc13b2c8e 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/KrollExternalModule.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/KrollExternalModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/KrollFunction.java b/android/runtime/common/src/java/org/appcelerator/kroll/KrollFunction.java index 880b5b21214..36d3db849ab 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/KrollFunction.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/KrollFunction.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/KrollInvocation.java b/android/runtime/common/src/java/org/appcelerator/kroll/KrollInvocation.java index 2535f265540..afd13f4a978 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/KrollInvocation.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/KrollInvocation.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/KrollLogging.java b/android/runtime/common/src/java/org/appcelerator/kroll/KrollLogging.java index 4b10cc9eead..107c39ed9d5 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/KrollLogging.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/KrollLogging.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/KrollObject.java b/android/runtime/common/src/java/org/appcelerator/kroll/KrollObject.java index c650e2e963e..670a5d5d867 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/KrollObject.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/KrollObject.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/KrollProxySupport.java b/android/runtime/common/src/java/org/appcelerator/kroll/KrollProxySupport.java index 7ad6165ccee..bb309c0cdac 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/KrollProxySupport.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/KrollProxySupport.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/KrollRuntime.java b/android/runtime/common/src/java/org/appcelerator/kroll/KrollRuntime.java index 1ab88718e09..04a3edf2f77 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/KrollRuntime.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/KrollRuntime.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/common/AsyncResult.java b/android/runtime/common/src/java/org/appcelerator/kroll/common/AsyncResult.java index c4dd942d520..41739402734 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/common/AsyncResult.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/common/AsyncResult.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/common/CurrentActivityListener.java b/android/runtime/common/src/java/org/appcelerator/kroll/common/CurrentActivityListener.java index f41a38d8697..dc8eec96d85 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/common/CurrentActivityListener.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/common/CurrentActivityListener.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/common/Log.java b/android/runtime/common/src/java/org/appcelerator/kroll/common/Log.java index b6d8965952d..9cf579f8617 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/common/Log.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/common/Log.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/common/TiConfig.java b/android/runtime/common/src/java/org/appcelerator/kroll/common/TiConfig.java index 9f5a7c5aecc..737e07ba7d8 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/common/TiConfig.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/common/TiConfig.java @@ -1,13 +1,11 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. */ package org.appcelerator.kroll.common; -import android.util.Config; - /** * A replacement class for org.appcelerator.titanium.config.TitaniumConfig so that I can change * settings via tiapp.xml @@ -24,9 +22,9 @@ public class TiConfig * <property name="ti.android.debug" type="bool">true</property> * */ - public static boolean LOGD = Config.DEBUG; - public static boolean LOGV = Config.DEBUG; - public static boolean DEBUG = Config.DEBUG; - public static boolean RELEASE = !Config.DEBUG; - public static boolean PROFILE = Config.PROFILE; + public static boolean LOGD = false; + public static boolean LOGV = false; + public static boolean DEBUG = false; + public static boolean RELEASE = true; + public static boolean PROFILE = false; } diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/common/TiDeployData.java b/android/runtime/common/src/java/org/appcelerator/kroll/common/TiDeployData.java index 969b5b34574..33d1af83f41 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/common/TiDeployData.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/common/TiDeployData.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/common/TiMessenger.java b/android/runtime/common/src/java/org/appcelerator/kroll/common/TiMessenger.java index 3a93cd0fa51..9fc774e7de3 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/common/TiMessenger.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/common/TiMessenger.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/util/KrollAssetCache.java b/android/runtime/common/src/java/org/appcelerator/kroll/util/KrollAssetCache.java index 12c4c6a03d4..f7aad768b50 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/util/KrollAssetCache.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/util/KrollAssetCache.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/util/KrollAssetHelper.java b/android/runtime/common/src/java/org/appcelerator/kroll/util/KrollAssetHelper.java index d76c5e7b216..2b0e365e15f 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/util/KrollAssetHelper.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/util/KrollAssetHelper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/common/src/java/org/appcelerator/kroll/util/KrollStreamHelper.java b/android/runtime/common/src/java/org/appcelerator/kroll/util/KrollStreamHelper.java index ef96fa4214b..925e5dfa54c 100644 --- a/android/runtime/common/src/java/org/appcelerator/kroll/util/KrollStreamHelper.java +++ b/android/runtime/common/src/java/org/appcelerator/kroll/util/KrollStreamHelper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/GCWatcher.java b/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/GCWatcher.java index 3e29cda1e09..90003cad8ed 100644 --- a/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/GCWatcher.java +++ b/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/GCWatcher.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/JSDebugger.java b/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/JSDebugger.java index f102321f7b4..7bcce6ab960 100644 --- a/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/JSDebugger.java +++ b/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/JSDebugger.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -205,7 +205,7 @@ public void onMessage(WebSocket conn, String message) { inspectorMessages.offer(message); // put message into queue - // if we haven't initialied yet, sniff the incoming messages + // if we haven't initialized yet, sniff the incoming messages if (!JSDebugger.this.ready.get()) { // copy any waiting messages into our initial queue String nextMessage = inspectorMessages.poll(); diff --git a/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/ReferenceTable.java b/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/ReferenceTable.java index 3ff9421a664..b1a7e86949d 100644 --- a/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/ReferenceTable.java +++ b/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/ReferenceTable.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/V8Function.java b/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/V8Function.java index 9619d5f9b82..580c6729104 100644 --- a/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/V8Function.java +++ b/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/V8Function.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/V8Object.java b/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/V8Object.java index 28bf89265e4..91f74de371a 100644 --- a/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/V8Object.java +++ b/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/V8Object.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/V8Runtime.java b/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/V8Runtime.java index 7c6552200cb..7013952bdf1 100644 --- a/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/V8Runtime.java +++ b/android/runtime/v8/src/java/org/appcelerator/kroll/runtime/v8/V8Runtime.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/AndroidUtil.cpp b/android/runtime/v8/src/native/AndroidUtil.cpp index f26e5f5d3a0..3a6944f59cd 100644 --- a/android/runtime/v8/src/native/AndroidUtil.cpp +++ b/android/runtime/v8/src/native/AndroidUtil.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/AndroidUtil.h b/android/runtime/v8/src/native/AndroidUtil.h index c724ddffb08..4cd8a8721d3 100644 --- a/android/runtime/v8/src/native/AndroidUtil.h +++ b/android/runtime/v8/src/native/AndroidUtil.h @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/CMakeLists.txt b/android/runtime/v8/src/native/CMakeLists.txt index 2a4cbc9cafe..4c363604f1b 100644 --- a/android/runtime/v8/src/native/CMakeLists.txt +++ b/android/runtime/v8/src/native/CMakeLists.txt @@ -1,11 +1,11 @@ ################################################################################ -# TiDev Titanium Mobile +# Titanium SDK # Copyright TiDev, Inc. 04/07/2022-Present # Licensed under the terms of the Apache Public License # 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/runtime/v8/src/native/EventEmitter.cpp b/android/runtime/v8/src/native/EventEmitter.cpp index 714b584fefe..61cf78cacec 100644 --- a/android/runtime/v8/src/native/EventEmitter.cpp +++ b/android/runtime/v8/src/native/EventEmitter.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/EventEmitter.h b/android/runtime/v8/src/native/EventEmitter.h index 37030934d99..9b2e77922c6 100644 --- a/android/runtime/v8/src/native/EventEmitter.h +++ b/android/runtime/v8/src/native/EventEmitter.h @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/InspectorClient.cpp b/android/runtime/v8/src/native/InspectorClient.cpp index 56ad737d032..ef3cc91fa9d 100644 --- a/android/runtime/v8/src/native/InspectorClient.cpp +++ b/android/runtime/v8/src/native/InspectorClient.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -112,7 +112,7 @@ void InspectorClient::CallAndPauseOnStart(const v8::FunctionCallbackInfoIsString()); assert(args[1]->IsString()); - // Note that this differs from Node's implementation wher ethey expect the first arg to be a pre-compiled function + // Note that this differs from Node's implementation where they expect the first arg to be a pre-compiled function // And a variable number of additional arguments to pass to that function. // They wrap the source with a function just like Module.wrap for standard code // Then compile the function and pass it into this method to schedule a pause and then invoke it. diff --git a/android/runtime/v8/src/native/InspectorClient.h b/android/runtime/v8/src/native/InspectorClient.h index 9b0f610f9b5..e6498c847b8 100644 --- a/android/runtime/v8/src/native/InspectorClient.h +++ b/android/runtime/v8/src/native/InspectorClient.h @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/InspectorFrontend.cpp b/android/runtime/v8/src/native/InspectorFrontend.cpp index bf9850c9e8a..1fc8472425c 100644 --- a/android/runtime/v8/src/native/InspectorFrontend.cpp +++ b/android/runtime/v8/src/native/InspectorFrontend.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/InspectorFrontend.h b/android/runtime/v8/src/native/InspectorFrontend.h index 5880690cb19..94a9c445942 100644 --- a/android/runtime/v8/src/native/InspectorFrontend.h +++ b/android/runtime/v8/src/native/InspectorFrontend.h @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/JNIUtil.cpp b/android/runtime/v8/src/native/JNIUtil.cpp index 83f9a8a7c88..5edc315647c 100644 --- a/android/runtime/v8/src/native/JNIUtil.cpp +++ b/android/runtime/v8/src/native/JNIUtil.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/JNIUtil.h b/android/runtime/v8/src/native/JNIUtil.h index d6eadfcd9a7..5c9f088016b 100644 --- a/android/runtime/v8/src/native/JNIUtil.h +++ b/android/runtime/v8/src/native/JNIUtil.h @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/JSDebugger.cpp b/android/runtime/v8/src/native/JSDebugger.cpp index 47e8dbceb66..845db05eecb 100644 --- a/android/runtime/v8/src/native/JSDebugger.cpp +++ b/android/runtime/v8/src/native/JSDebugger.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/JSDebugger.h b/android/runtime/v8/src/native/JSDebugger.h index acb8137fa12..9c96301db1a 100644 --- a/android/runtime/v8/src/native/JSDebugger.h +++ b/android/runtime/v8/src/native/JSDebugger.h @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/JSException.cpp b/android/runtime/v8/src/native/JSException.cpp index 0207143f3e0..ae39f863cee 100644 --- a/android/runtime/v8/src/native/JSException.cpp +++ b/android/runtime/v8/src/native/JSException.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/JSException.h b/android/runtime/v8/src/native/JSException.h index 83230200639..414df87f4e9 100644 --- a/android/runtime/v8/src/native/JSException.h +++ b/android/runtime/v8/src/native/JSException.h @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/JavaObject.cpp b/android/runtime/v8/src/native/JavaObject.cpp index 253fdeb7195..de506240d2c 100644 --- a/android/runtime/v8/src/native/JavaObject.cpp +++ b/android/runtime/v8/src/native/JavaObject.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/JavaObject.h b/android/runtime/v8/src/native/JavaObject.h index 9038a1bbac5..0c7349eeb34 100644 --- a/android/runtime/v8/src/native/JavaObject.h +++ b/android/runtime/v8/src/native/JavaObject.h @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -15,7 +15,7 @@ namespace titanium { // Provides an interface between a JavaScript object // and a Java object instance. This class is also responsible -// for mangaging the lifetime of the Java object reference +// for managing the lifetime of the Java object reference // so that it is properly collected once becoming unreachable // from the JavaScript code. class JavaObject : public EventEmitter diff --git a/android/runtime/v8/src/native/KrollBindings.cpp b/android/runtime/v8/src/native/KrollBindings.cpp index 88bde71df9f..777f856b9cf 100644 --- a/android/runtime/v8/src/native/KrollBindings.cpp +++ b/android/runtime/v8/src/native/KrollBindings.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/KrollBindings.h b/android/runtime/v8/src/native/KrollBindings.h index 009f69cd421..afc5cfce969 100644 --- a/android/runtime/v8/src/native/KrollBindings.h +++ b/android/runtime/v8/src/native/KrollBindings.h @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/NativeObject.h b/android/runtime/v8/src/native/NativeObject.h index 6387361f2ff..0d4c8b71a3b 100644 --- a/android/runtime/v8/src/native/NativeObject.h +++ b/android/runtime/v8/src/native/NativeObject.h @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/Proxy.cpp b/android/runtime/v8/src/native/Proxy.cpp index 7adc6f44a65..b129dbcfca4 100644 --- a/android/runtime/v8/src/native/Proxy.cpp +++ b/android/runtime/v8/src/native/Proxy.cpp @@ -1,5 +1,5 @@ /* - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/Proxy.h b/android/runtime/v8/src/native/Proxy.h index f71dc37f1db..67825fcdc5c 100644 --- a/android/runtime/v8/src/native/Proxy.h +++ b/android/runtime/v8/src/native/Proxy.h @@ -1,5 +1,5 @@ /* - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/ProxyFactory.cpp b/android/runtime/v8/src/native/ProxyFactory.cpp index a2fa565d91c..85ad129561d 100644 --- a/android/runtime/v8/src/native/ProxyFactory.cpp +++ b/android/runtime/v8/src/native/ProxyFactory.cpp @@ -1,5 +1,5 @@ /* - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/ProxyFactory.h b/android/runtime/v8/src/native/ProxyFactory.h index cfbf8106416..61725148af5 100644 --- a/android/runtime/v8/src/native/ProxyFactory.h +++ b/android/runtime/v8/src/native/ProxyFactory.h @@ -1,5 +1,5 @@ /* - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/ReferenceTable.cpp b/android/runtime/v8/src/native/ReferenceTable.cpp index 897d90bf836..97010e67c12 100644 --- a/android/runtime/v8/src/native/ReferenceTable.cpp +++ b/android/runtime/v8/src/native/ReferenceTable.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/ReferenceTable.h b/android/runtime/v8/src/native/ReferenceTable.h index b5b27304a7d..3cd1db4e16c 100644 --- a/android/runtime/v8/src/native/ReferenceTable.h +++ b/android/runtime/v8/src/native/ReferenceTable.h @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/TypeConverter.cpp b/android/runtime/v8/src/native/TypeConverter.cpp index ce8f8e9c015..4ecb93062e9 100644 --- a/android/runtime/v8/src/native/TypeConverter.cpp +++ b/android/runtime/v8/src/native/TypeConverter.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/TypeConverter.h b/android/runtime/v8/src/native/TypeConverter.h index 99abcdfad97..5a79c637f81 100644 --- a/android/runtime/v8/src/native/TypeConverter.h +++ b/android/runtime/v8/src/native/TypeConverter.h @@ -1,5 +1,5 @@ /* - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/V8Function.cpp b/android/runtime/v8/src/native/V8Function.cpp index 22a9a315e1f..9de6b41d3ed 100644 --- a/android/runtime/v8/src/native/V8Function.cpp +++ b/android/runtime/v8/src/native/V8Function.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/V8Object.cpp b/android/runtime/v8/src/native/V8Object.cpp index cb1b1ea18b8..35d98925797 100644 --- a/android/runtime/v8/src/native/V8Object.cpp +++ b/android/runtime/v8/src/native/V8Object.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/V8Promise.cpp b/android/runtime/v8/src/native/V8Promise.cpp index 8e7ab74ba66..79c0647674d 100644 --- a/android/runtime/v8/src/native/V8Promise.cpp +++ b/android/runtime/v8/src/native/V8Promise.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/V8Runtime.cpp b/android/runtime/v8/src/native/V8Runtime.cpp index 154f80855ce..a5fa38068d6 100644 --- a/android/runtime/v8/src/native/V8Runtime.cpp +++ b/android/runtime/v8/src/native/V8Runtime.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/V8Runtime.h b/android/runtime/v8/src/native/V8Runtime.h index 98926a4f8fa..8fc28c74914 100644 --- a/android/runtime/v8/src/native/V8Runtime.h +++ b/android/runtime/v8/src/native/V8Runtime.h @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/V8Util.cpp b/android/runtime/v8/src/native/V8Util.cpp index ee8ea1883e0..18de9f46732 100644 --- a/android/runtime/v8/src/native/V8Util.cpp +++ b/android/runtime/v8/src/native/V8Util.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/V8Util.h b/android/runtime/v8/src/native/V8Util.h index e8faec73605..a9623323e7e 100644 --- a/android/runtime/v8/src/native/V8Util.h +++ b/android/runtime/v8/src/native/V8Util.h @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/runtime/v8/src/native/modules/APIModule.cpp b/android/runtime/v8/src/native/modules/APIModule.cpp index 29582824928..a2628327880 100644 --- a/android/runtime/v8/src/native/modules/APIModule.cpp +++ b/android/runtime/v8/src/native/modules/APIModule.cpp @@ -1,5 +1,5 @@ /* - * TiDev Titanium Mobile + * 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. @@ -48,7 +48,7 @@ void APIModule::Initialize(Local target, Local context) // Hook methods to the API prototype, notice these aren't hooked to API // itself, instead we return a singleton of an API instance and export it // as Ti.API - // Not sure why we then hook apiName as instance proprty, since + // Not sure why we then hook apiName as instance property, since // the difference is made moot by the singleton! SetProtoMethod(isolate, constructor, "debug", logDebug); SetProtoMethod(isolate, constructor, "info", logInfo); diff --git a/android/runtime/v8/src/native/modules/APIModule.h b/android/runtime/v8/src/native/modules/APIModule.h index c48c3f63f1d..2a4e6233d00 100644 --- a/android/runtime/v8/src/native/modules/APIModule.h +++ b/android/runtime/v8/src/native/modules/APIModule.h @@ -1,6 +1,6 @@ /* - * Appcelerator Titanium Mobile - * Copyright (c) 2011-2016 by Appcelerator, Inc. All Rights Reserved. + * 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. */ diff --git a/android/runtime/v8/src/native/modules/AssetsModule.cpp b/android/runtime/v8/src/native/modules/AssetsModule.cpp index 844fb5f211b..400ffa08c28 100644 --- a/android/runtime/v8/src/native/modules/AssetsModule.cpp +++ b/android/runtime/v8/src/native/modules/AssetsModule.cpp @@ -1,5 +1,5 @@ /* - * TiDev Titanium Mobile + * 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. diff --git a/android/runtime/v8/src/native/modules/AssetsModule.h b/android/runtime/v8/src/native/modules/AssetsModule.h index 2b978e48fb7..49fcaeab88b 100644 --- a/android/runtime/v8/src/native/modules/AssetsModule.h +++ b/android/runtime/v8/src/native/modules/AssetsModule.h @@ -1,6 +1,6 @@ /* - * Appcelerator Titanium Mobile - * Copyright (c) 2011-2016 by Appcelerator, Inc. All Rights Reserved. + * 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. */ diff --git a/android/runtime/v8/src/native/modules/ScriptsModule.cpp b/android/runtime/v8/src/native/modules/ScriptsModule.cpp index 59d79645dda..40092181e64 100644 --- a/android/runtime/v8/src/native/modules/ScriptsModule.cpp +++ b/android/runtime/v8/src/native/modules/ScriptsModule.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -253,7 +253,7 @@ void WrappedScript::EvalMachine(const FunctionCallbackInfo& args) // Use the passed in context MaybeLocal contextArg = args[sandbox_index]->ToObject(currentContext); if (contextArg.IsEmpty()) { - // FIXME Will this ever happen? This is not likley and probably the wrong way to handle this. We should at least log it... + // FIXME Will this ever happen? This is not likely and probably the wrong way to handle this. We should at least log it... context.Reset(isolate, Context::New(isolate)); } else { nContext = WrappedContext::Unwrap(isolate, contextArg.ToLocalChecked()); @@ -261,7 +261,7 @@ void WrappedScript::EvalMachine(const FunctionCallbackInfo& args) } } - // Explicitly set up var to track context we shoudl use for compile/run of script. + // Explicitly set up var to track context we should use for compile/run of script. // When "thisContext", use teh current context from the isolate. Otherwise use the context we set in the Persistent above Local contextToUse = (context_flag == thisContext) ? currentContext : context.Get(isolate); diff --git a/android/runtime/v8/src/native/modules/ScriptsModule.h b/android/runtime/v8/src/native/modules/ScriptsModule.h index 3e82bdfb60c..e8c961c989f 100644 --- a/android/runtime/v8/src/native/modules/ScriptsModule.h +++ b/android/runtime/v8/src/native/modules/ScriptsModule.h @@ -1,6 +1,6 @@ /** - * Appcelerator Titanium Mobile - * Copyright (c) 2011-2016 by Appcelerator, Inc. All Rights Reserved. + * 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. */ diff --git a/android/runtime/v8/src/ndk-modules/libv8/CMakeLists.txt b/android/runtime/v8/src/ndk-modules/libv8/CMakeLists.txt index d9979f8a329..07268433dbd 100644 --- a/android/runtime/v8/src/ndk-modules/libv8/CMakeLists.txt +++ b/android/runtime/v8/src/ndk-modules/libv8/CMakeLists.txt @@ -1,5 +1,5 @@ ################################################################################ -# TiDev Titanium Mobile +# Titanium SDK # Copyright TiDev, Inc. 04/07/2022-Present # Licensed under the terms of the Apache Public License # Please see the LICENSE included with this distribution for details. diff --git a/android/templates/build/AppInfo.java b/android/templates/build/AppInfo.java index 45ce3eb7c8c..5fa19fa689c 100644 --- a/android/templates/build/AppInfo.java +++ b/android/templates/build/AppInfo.java @@ -52,10 +52,6 @@ public String getIcon() { return "<%- tiapp.icon %>"; } - public boolean isAnalyticsEnabled() { - return <%- !!tiapp.analytics %>; - } - public String getGUID() { return "<%- tiapp.guid %>"; } 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/templates/build/root.build.gradle b/android/templates/build/root.build.gradle index 8df90e3f35f..c8b563a07cc 100644 --- a/android/templates/build/root.build.gradle +++ b/android/templates/build/root.build.gradle @@ -21,6 +21,6 @@ allprojects { project.apply from: "${rootDir}/ti.constants.gradle" } -task clean(type: Delete) { +tasks.register('clean', Delete) { delete rootProject.buildDir } diff --git a/android/templates/build/ti.constants.gradle b/android/templates/build/ti.constants.gradle index 0ea332c1cf9..503c2f006f1 100644 --- a/android/templates/build/ti.constants.gradle +++ b/android/templates/build/ti.constants.gradle @@ -1,6 +1,6 @@ /** - * Appcelerator Titanium Mobile - * Copyright (c) 2009-2021 by Axway. All Rights Reserved. + * 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. */ diff --git a/android/templates/module/generated/CommonJsSourceProvider.java b/android/templates/module/generated/CommonJsSourceProvider.java index ba2a6e99218..dbb9c3a15b0 100644 --- a/android/templates/module/generated/CommonJsSourceProvider.java +++ b/android/templates/module/generated/CommonJsSourceProvider.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/templates/module/generated/KrollGeneratedBindings.h b/android/templates/module/generated/KrollGeneratedBindings.h index b0556e4e269..f6c9af5f3b1 100644 --- a/android/templates/module/generated/KrollGeneratedBindings.h +++ b/android/templates/module/generated/KrollGeneratedBindings.h @@ -1,5 +1,5 @@ /** - * Axway TiDev Titanium Mobile + * Titanium SDK SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/templates/module/generated/TiModuleBootstrap.cpp b/android/templates/module/generated/TiModuleBootstrap.cpp index 05a5e1dc5a1..940f6541b50 100644 --- a/android/templates/module/generated/TiModuleBootstrap.cpp +++ b/android/templates/module/generated/TiModuleBootstrap.cpp @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/templates/module/generated/TiModuleBootstrap.java b/android/templates/module/generated/TiModuleBootstrap.java index df0e0f01e38..dad00dde4c4 100644 --- a/android/templates/module/generated/TiModuleBootstrap.java +++ b/android/templates/module/generated/TiModuleBootstrap.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/templates/module/generated/bootstrap.js b/android/templates/module/generated/bootstrap.js index 33c0c13c41c..17fb3c6ee5b 100644 --- a/android/templates/module/generated/bootstrap.js +++ b/android/templates/module/generated/bootstrap.js @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/templates/module/generated/build.gradle b/android/templates/module/generated/build.gradle index f28a5aee09c..35106af223b 100644 --- a/android/templates/module/generated/build.gradle +++ b/android/templates/module/generated/build.gradle @@ -16,6 +16,7 @@ def tiModuleBindingsJsonPath = "${buildDir}/ti-generated/json/<%- moduleName %>. android { compileSdkVersion <%- compileSdkVersion %> + ndkVersion '22.1.7171670' defaultConfig { minSdkVersion 19 targetSdkVersion <%- compileSdkVersion %> @@ -59,7 +60,8 @@ android { arguments.addAll([ 'APP_STL:=c++_shared', "-j${Runtime.runtime.availableProcessors()}".toString(), - '--output-sync=none' + '--output-sync=none', + 'APP_LD=deprecated' ]) } } @@ -162,13 +164,13 @@ project.afterEvaluate { } // Hook into Java compile task. -tasks.withType(JavaCompile) { +tasks.withType(JavaCompile).configureEach { // Log all Java linting errors/warnings. options.compilerArgs << "-Xlint:all" // Execute our "generate-cpp-files.js" script after Java compile to finish generating C++ files. // Depends on the JSON file produced by our "kroll-apt" Java annotation processor. - // TODO: Our annnotation processor should do ALL of the proxy code generation. Don't piece-meal it. + // TODO: Our annotation processor should do ALL of the proxy code generation. Don't piece-meal it. doLast { exec { environment 'TI_MODULE_BINDINGS_JSON_FILE', tiModuleBindingsJsonPath @@ -246,7 +248,7 @@ publishing { } } -// Load the module developer's optional "build.gradle" file from "/android" directory. +// Load the module developer's optional "build.gradle" file from "/android" directory. // This gradle file is expected to provide the module's "dependencies". def moduleBuildGradlePath = "${projectDir}/../../build.gradle" if (file(moduleBuildGradlePath).exists()) { diff --git a/android/templates/module/generated/generate-cpp-files.js b/android/templates/module/generated/generate-cpp-files.js index 821bb3fa274..a383a506681 100644 --- a/android/templates/module/generated/generate-cpp-files.js +++ b/android/templates/module/generated/generate-cpp-files.js @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License. * Please see the LICENSE included with this distribution for details. @@ -60,7 +60,7 @@ function replacePlaceholders(text, placeholders) { /** Generates C++ source files for the module. */ async function main() { - // Load module's JSON file containing all proxy bindings generated by "kroll-apt" Java annotatation processor. + // Load module's JSON file containing all proxy bindings generated by "kroll-apt" Java annotation processor. const bindingJsonPath = process.env.TI_MODULE_BINDINGS_JSON_FILE; const bindingJson = JSON.parse(fs.readFileSync(bindingJsonPath)); const moduleClassName = Object.keys(bindingJson.modules)[0]; diff --git a/android/templates/module/java/template/android/src/{{ModuleIdAsFolder}}/ExampleProxy.java.ejs b/android/templates/module/java/template/android/src/{{ModuleIdAsFolder}}/ExampleProxy.java.ejs index 227f79b7027..24a2e987cac 100644 --- a/android/templates/module/java/template/android/src/{{ModuleIdAsFolder}}/ExampleProxy.java.ejs +++ b/android/templates/module/java/template/android/src/{{ModuleIdAsFolder}}/ExampleProxy.java.ejs @@ -1,6 +1,6 @@ /** * This file was auto-generated by the Titanium Module SDK helper for Android - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/templates/module/java/template/android/src/{{ModuleIdAsFolder}}/{{ModuleNameCamel}}Module.java.ejs b/android/templates/module/java/template/android/src/{{ModuleIdAsFolder}}/{{ModuleNameCamel}}Module.java.ejs index 9fe48dc4981..03e1a19cc62 100644 --- a/android/templates/module/java/template/android/src/{{ModuleIdAsFolder}}/{{ModuleNameCamel}}Module.java.ejs +++ b/android/templates/module/java/template/android/src/{{ModuleIdAsFolder}}/{{ModuleNameCamel}}Module.java.ejs @@ -1,6 +1,6 @@ /** * This file was auto-generated by the Titanium Module SDK helper for Android - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/templates/module/kotlin/template/android/src/{{ModuleIdAsFolder}}/ExampleProxy.kt.ejs b/android/templates/module/kotlin/template/android/src/{{ModuleIdAsFolder}}/ExampleProxy.kt.ejs index 623a20ac9f3..7a25418ef08 100644 --- a/android/templates/module/kotlin/template/android/src/{{ModuleIdAsFolder}}/ExampleProxy.kt.ejs +++ b/android/templates/module/kotlin/template/android/src/{{ModuleIdAsFolder}}/ExampleProxy.kt.ejs @@ -1,6 +1,6 @@ /** * This file was auto-generated by the Titanium Module SDK helper for Android - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/templates/module/kotlin/template/android/src/{{ModuleIdAsFolder}}/{{ModuleNameCamel}}Module.kt.ejs b/android/templates/module/kotlin/template/android/src/{{ModuleIdAsFolder}}/{{ModuleNameCamel}}Module.kt.ejs index 0861d703f0c..df28b627267 100644 --- a/android/templates/module/kotlin/template/android/src/{{ModuleIdAsFolder}}/{{ModuleNameCamel}}Module.kt.ejs +++ b/android/templates/module/kotlin/template/android/src/{{ModuleIdAsFolder}}/{{ModuleNameCamel}}Module.kt.ejs @@ -1,6 +1,6 @@ /** * This file was auto-generated by the Titanium Module SDK helper for Android - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/bootstrap.js.ejs b/android/titanium/bootstrap.js.ejs index 8a04b29df1c..1245bd33f09 100644 --- a/android/titanium/bootstrap.js.ejs +++ b/android/titanium/bootstrap.js.ejs @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/bootstrap.lazymodule.js.ejs b/android/titanium/bootstrap.lazymodule.js.ejs index 833adce2d8c..eafa53fbe17 100644 --- a/android/titanium/bootstrap.lazymodule.js.ejs +++ b/android/titanium/bootstrap.lazymodule.js.ejs @@ -4,7 +4,7 @@ if (!('__propertiesDefined__' in <%- name %>)) { if (mod.children) { for (const child of mod.children) { let fullAPIName = child.proxyAttrs.fullAPIName; - // Drop leading 'Tiatnium' if in full aAPI name + // Drop leading 'Titanium' if in full aAPI name if (fullAPIName.startsWith('Titanium.')) { fullAPIName = fullAPIName.slice(9); } @@ -42,4 +42,4 @@ _%> _%> } <%- name %>.__propertiesDefined__ = true; -return <%- name %>; \ No newline at end of file +return <%- name %>; diff --git a/android/titanium/build.gradle b/android/titanium/build.gradle index 383477d1487..2e78280442e 100644 --- a/android/titanium/build.gradle +++ b/android/titanium/build.gradle @@ -2,7 +2,7 @@ import com.android.build.gradle.tasks.ExternalNativeCleanTask import groovy.json.JsonSlurper /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License. * Please see the LICENSE included with this distribution for details. @@ -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" } } @@ -125,7 +125,7 @@ android { } // Downloads/extracts V8 library and creates a cmake file for it. To be executed before C/C++ "build" or "clean". -task updateV8Library() { +tasks.register('updateV8Library') { def packageJson = new JsonSlurper().parse(file("${projectDir}/../package.json")) def v8MakeFilePath = "${projectDir}/../runtime/v8/src/ndk-modules/libv8/V8Settings.cmake" inputs.property 'v8.version', packageJson.v8.version @@ -139,8 +139,8 @@ task updateV8Library() { def v8MakeFile = file(v8MakeFilePath) v8MakeFile.getParentFile().mkdirs() v8MakeFile.text = [ - "set(LIBV8_VERSION \"${packageJson.v8.version}\")", - "set(LIBV8_MODE \"${packageJson.v8.mode}\")" + "set(LIBV8_VERSION \"${packageJson.v8.version}\")", + "set(LIBV8_MODE \"${packageJson.v8.mode}\")" ].join('\n') + '\n' // Download/install the V8 library referenced in our "package.json", if not already done. @@ -152,24 +152,24 @@ task updateV8Library() { } } preBuild.dependsOn updateV8Library -tasks.withType(ExternalNativeCleanTask) { +tasks.withType(ExternalNativeCleanTask).configureEach { dependsOn updateV8Library } // Checks our Java code against our style guidelines and for common coding mistakes using "checkstyle.xml". // Will trigger a build failure if any violations have been detected. // Customize all the Checkstyle tasks -tasks.withType(Checkstyle) { +tasks.withType(Checkstyle).configureEach { // Specify all files that should be checked classpath = files() source android.sourceSets.main.java.srcDirs } // Execute Checkstyle on all files -task checkJavaStyle(type: Checkstyle) { +tasks.register('checkJavaStyle', Checkstyle) { // include '**/*.java' } // Execute Checkstyle on all modified files -task checkstyleChanged(type: Checkstyle) { +tasks.register('checkstyleChanged', Checkstyle) { include getChangedFiles() } @@ -196,7 +196,7 @@ def getChangedFiles() { // Performs a transpile/polyfill/rollup of our "titanium_mobile/common/Resources" directory tree's JS files, // takes a V8 snapshot of rolled-up files, and then generates a C++ header file of that snapshot to be compiled-in. // Note: This supports incremental builds. Only executes when JS files change or snapshot output file is missing. -task snapshotTiCommonFiles() { +tasks.register('snapshotTiCommonFiles') { inputs.dir "${projectDir}/../../common/Resources" inputs.file "${projectDir}/../../build/lib/builder.js" inputs.file "${projectDir}/../../build/lib/android/index.js" @@ -221,7 +221,7 @@ project.afterEvaluate { // Runs our "prebuild.js" script before the C/C++ compile, but after Java compile. (Mid-build script?) // Generates C/C++ files providing our Android-only JS files via byte arrays. -tasks.withType(JavaCompile) { +tasks.withType(JavaCompile).configureEach { dependsOn checkJavaStyle dependsOn snapshotTiCommonFiles doLast { @@ -254,7 +254,7 @@ dependencies { implementation 'androidx.exifinterface:exifinterface:1.3.6' implementation "androidx.fragment:fragment:${project.ext.tiAndroidXFragmentLibVersion}" implementation 'androidx.media:media:1.6.0' - implementation 'androidx.recyclerview:recyclerview:1.3.0' + implementation 'androidx.recyclerview:recyclerview:1.3.2' implementation 'androidx.recyclerview:recyclerview-selection:1.1.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'androidx.transition:transition:1.4.1' @@ -281,7 +281,7 @@ dependencies { implementation fileTree(dir: 'lib', include: ['*.jar']) // CameraX - def camerax_version = '1.2.2' + def camerax_version = '1.2.3' implementation "androidx.camera:camera-core:$camerax_version" implementation "androidx.camera:camera-camera2:$camerax_version" implementation "androidx.camera:camera-video:$camerax_version" diff --git a/android/titanium/libv8-services.js b/android/titanium/libv8-services.js index 5645a67cff9..cd737d24ad3 100644 --- a/android/titanium/libv8-services.js +++ b/android/titanium/libv8-services.js @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License. * Please see the LICENSE included with this distribution for details. @@ -125,7 +125,7 @@ async function generateSnapshot(v8SnapshotHeaderFilePath, rollupFileContent) { } // Delete snapshot blob. - await fs.unlink(blobPath); + await fs.remove(blobPath); } // Generate 'V8Snapshots.h' from template @@ -171,33 +171,26 @@ async function createSnapshot() { // Requests our server to create snapshot of rolled-up "ti.main" in a C++ header file. let wasSuccessful = false; try { - // Post rolled-up "ti.main" script to server and obtain a snapshot ID as a response. - // We will send an HTTP request for the snapshot code later. + // Post rolled-up "ti.main" script to server and obtain the V8Snapshot.h as a response. console.log('Attempting to request snapshot...'); - const snapshotUrl = 'http://v8-snapshot.appcelerator.com'; // TODO: Migrate to Github Artifacts once ready + const snapshotUrl = 'https://v8-snapshot.titaniumsdk.com/gen'; const packageJsonData = await loadPackageJson(); const requestOptions = { body: { v8: packageJsonData.v8.version, script: rollupFileContent }, - json: true + json: true, + resolveWithFullResponse: true, + timeout: 60 * 1000 * 5 }; - const snapshotId = await request.post(snapshotUrl, requestOptions); - // Request generated snapshot from server using `snapshotId` obtained from server above. const MAX_ATTEMPTS = 20; // Time-out after two minutes. let attempts; for (attempts = 1; attempts <= MAX_ATTEMPTS; attempts++) { - const response = await request.get(`${snapshotUrl}/snapshot/${snapshotId}`, { - simple: false, - resolveWithFullResponse: true - }); + const response = await request.post(snapshotUrl, requestOptions); if (response.statusCode === 200) { - - // Server has finished creating a C++ header file containing all V8 snapshots. - // Write it to file and flag that we're done. console.log('Writing snapshot...'); await fs.writeFile(v8SnapshotHeaderFilePath, response.body); wasSuccessful = true; @@ -208,7 +201,6 @@ async function createSnapshot() { console.log('Waiting for snapshot generation...'); await new Promise(resolve => setTimeout(resolve, 6000)); } else { - // Give up if received an unexpected response. console.error('Could not generate snapshot, skipping...'); break; @@ -230,7 +222,7 @@ async function createSnapshot() { process.exit(1); } - // Generaet an empty C++ header. Allows build to succeed and app will load "ti.main.js" normally instead. + // Generate an empty C++ header. Allows build to succeed and app will load "ti.main.js" normally instead. await fs.writeFile(v8SnapshotHeaderFilePath, '// Failed to generate V8 snapshots. See build log.'); } } @@ -285,7 +277,7 @@ function createSnapshotThenExit() { /** * Checks if the V8 library referenced by the "titanium_mobile/android/package.json" file is installed. - * If not, then this function will automatically download/install it. Function will do nothing if alredy installed. + * If not, then this function will automatically download/install it. Function will do nothing if already installed. * * Will exit the process when the async operation ends. Intended to be called from the command line. */ diff --git a/android/titanium/prebuild.js b/android/titanium/prebuild.js index 77e3fcb11d8..07a62e2f2b3 100644 --- a/android/titanium/prebuild.js +++ b/android/titanium/prebuild.js @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License. * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/kroll/KrollDict.java b/android/titanium/src/java/org/appcelerator/kroll/KrollDict.java index daeaafb9e3a..ef9e6fddf90 100644 --- a/android/titanium/src/java/org/appcelerator/kroll/KrollDict.java +++ b/android/titanium/src/java/org/appcelerator/kroll/KrollDict.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/kroll/KrollModule.java b/android/titanium/src/java/org/appcelerator/kroll/KrollModule.java index 8b4a7d22939..3c250804bcf 100644 --- a/android/titanium/src/java/org/appcelerator/kroll/KrollModule.java +++ b/android/titanium/src/java/org/appcelerator/kroll/KrollModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/kroll/KrollModuleInfo.java b/android/titanium/src/java/org/appcelerator/kroll/KrollModuleInfo.java index d639b300c4b..a9d5cb17ead 100644 --- a/android/titanium/src/java/org/appcelerator/kroll/KrollModuleInfo.java +++ b/android/titanium/src/java/org/appcelerator/kroll/KrollModuleInfo.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/kroll/KrollNativeConverter.java b/android/titanium/src/java/org/appcelerator/kroll/KrollNativeConverter.java index 0891a5367c4..33d1e0eac96 100644 --- a/android/titanium/src/java/org/appcelerator/kroll/KrollNativeConverter.java +++ b/android/titanium/src/java/org/appcelerator/kroll/KrollNativeConverter.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/kroll/KrollPropertyChange.java b/android/titanium/src/java/org/appcelerator/kroll/KrollPropertyChange.java index f5788a94349..198dc2f592f 100644 --- a/android/titanium/src/java/org/appcelerator/kroll/KrollPropertyChange.java +++ b/android/titanium/src/java/org/appcelerator/kroll/KrollPropertyChange.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/kroll/KrollProxy.java b/android/titanium/src/java/org/appcelerator/kroll/KrollProxy.java index f50e1d12a6f..110371b523b 100644 --- a/android/titanium/src/java/org/appcelerator/kroll/KrollProxy.java +++ b/android/titanium/src/java/org/appcelerator/kroll/KrollProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -513,7 +513,7 @@ public void extend(KrollDict options) Object oldValue = properties.get(name); Object value = options.get(name); - // dont just fire the change event, make sure we set the property back on the KrollObject + // don't just fire the change event, make sure we set the property back on the KrollObject // since the property change may not be driven from JS (KrollObject->Java proxy) setProperty(name, value); diff --git a/android/titanium/src/java/org/appcelerator/kroll/KrollProxyListener.java b/android/titanium/src/java/org/appcelerator/kroll/KrollProxyListener.java index 6cf53276aca..7b01f959f7e 100644 --- a/android/titanium/src/java/org/appcelerator/kroll/KrollProxyListener.java +++ b/android/titanium/src/java/org/appcelerator/kroll/KrollProxyListener.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/ITiAppInfo.java b/android/titanium/src/java/org/appcelerator/titanium/ITiAppInfo.java index 2a8236efa05..a2dba973523 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/ITiAppInfo.java +++ b/android/titanium/src/java/org/appcelerator/titanium/ITiAppInfo.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -15,7 +15,6 @@ public interface ITiAppInfo { String getCopyright(); String getDescription(); String getIcon(); - boolean isAnalyticsEnabled(); String getGUID(); boolean isFullscreen(); String getDeployType(); diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiActivity.java b/android/titanium/src/java/org/appcelerator/titanium/TiActivity.java index c30b1b9ac59..01848f332c2 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiActivity.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiActivity.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiActivitySupportHelpers.java b/android/titanium/src/java/org/appcelerator/titanium/TiActivitySupportHelpers.java index 5a43a28d500..3906c1b19f9 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiActivitySupportHelpers.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiActivitySupportHelpers.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiActivityWindow.java b/android/titanium/src/java/org/appcelerator/titanium/TiActivityWindow.java index 9ab42591d34..030f239f876 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiActivityWindow.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiActivityWindow.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiActivityWindows.java b/android/titanium/src/java/org/appcelerator/titanium/TiActivityWindows.java index 26859c19866..e0021b9ce28 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiActivityWindows.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiActivityWindows.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java b/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java index b1d3d9223bb..cbaef3950dd 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -14,6 +14,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.res.Configuration; +import android.os.Build; import android.os.Looper; import android.os.SystemClock; import android.util.DisplayMetrics; @@ -99,7 +100,6 @@ public abstract class TiApplication extends Application implements KrollApplicat protected ITiAppInfo appInfo; protected TiStylesheet stylesheet; protected HashMap> modules; - protected String[] filteredAnalyticsEvents; public static AtomicBoolean isActivityTransition = new AtomicBoolean(false); protected static ArrayList activityTransitionListeners = new ArrayList<>(); @@ -738,11 +738,6 @@ public KrollProxy unregisterProxy(String proxyId) return proxy; } - public boolean isAnalyticsEnabled() - { - return false; - } - /** * Determines if Titanium's JavaScript runtime should run on the main UI thread or not * based on the "tiapp.xml" property "run-on-main-thread". @@ -755,26 +750,6 @@ public boolean runOnMainThread() return true; } - public void setFilterAnalyticsEvents(String[] events) - { - filteredAnalyticsEvents = events; - } - - public boolean isAnalyticsFiltered(String eventName) - { - if (filteredAnalyticsEvents == null) { - return false; - } - - for (int i = 0; i < filteredAnalyticsEvents.length; ++i) { - String currentName = filteredAnalyticsEvents[i]; - if (eventName.equals(currentName)) { - return true; - } - } - return false; - } - @Override public String getDeployType() { @@ -987,7 +962,13 @@ public void onReceive(Context context, Intent intent) } }; - registerReceiver(localeReceiver, new IntentFilter(Intent.ACTION_LOCALE_CHANGED)); + if (Build.VERSION.SDK_INT > Build.VERSION_CODES.TIRAMISU + && TiApplication.getInstance().getApplicationInfo().targetSdkVersion > Build.VERSION_CODES.TIRAMISU) { + int receiverFlags = Context.RECEIVER_EXPORTED; + registerReceiver(localeReceiver, new IntentFilter(Intent.ACTION_LOCALE_CHANGED), receiverFlags); + } else { + registerReceiver(localeReceiver, new IntentFilter(Intent.ACTION_LOCALE_CHANGED)); + } } private void stopLocaleMonitor() diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiApplicationLifecycle.java b/android/titanium/src/java/org/appcelerator/titanium/TiApplicationLifecycle.java index 38efa4f561e..13443d124d1 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiApplicationLifecycle.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiApplicationLifecycle.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -10,8 +10,6 @@ import android.app.Application; import android.os.Bundle; -import com.appcelerator.aps.APSAnalytics; - import org.appcelerator.kroll.KrollModule; public class TiApplicationLifecycle implements Application.ActivityLifecycleCallbacks @@ -50,11 +48,6 @@ public void onActivityStarted(Activity activity) } appModule.fireEvent(TiC.EVENT_RESUMED, null); } - - // Post analytics for this event, if enabled. - if (this.tiApp.isAnalyticsEnabled()) { - APSAnalytics.getInstance().sendAppForegroundEvent(); - } } // Increment number of "started" activities. These are activities that are currently in the foreground. @@ -76,11 +69,6 @@ public void onActivityStopped(Activity activity) appModule.fireEvent(TiC.EVENT_PAUSE, null); appModule.fireEvent(TiC.EVENT_PAUSED, null); } - - // Post analytics for this event, if enabled. - if (this.tiApp.isAnalyticsEnabled()) { - APSAnalytics.getInstance().sendAppBackgroundEvent(); - } } // Decrement count of started/visible activities. diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiBaseActivity.java b/android/titanium/src/java/org/appcelerator/titanium/TiBaseActivity.java index 4f168e70d2f..8421b066570 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiBaseActivity.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiBaseActivity.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -34,6 +34,7 @@ import org.appcelerator.titanium.util.TiActivityResultHandler; import org.appcelerator.titanium.util.TiActivitySupport; import org.appcelerator.titanium.util.TiActivitySupportHelper; +import org.appcelerator.titanium.util.TiColorHelper; import org.appcelerator.titanium.util.TiConvert; import org.appcelerator.titanium.util.TiLocaleManager; import org.appcelerator.titanium.util.TiMenuSupport; @@ -46,6 +47,8 @@ import org.appcelerator.titanium.view.TiInsetsProvider; import android.app.Activity; + +import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AppCompatActivity; import android.app.Dialog; import android.content.Context; @@ -67,6 +70,9 @@ import androidx.appcompat.widget.Toolbar; import androidx.core.app.ActivityCompat; +import android.text.Spannable; +import android.text.SpannableStringBuilder; +import android.text.style.ForegroundColorSpan; import android.view.KeyEvent; import android.view.Menu; import android.view.MenuItem; @@ -338,6 +344,7 @@ protected void updateTitle() if (window.hasProperty(TiC.PROPERTY_TITLE)) { String oldTitle = (String) getTitle(); String newTitle = TiConvert.toString(window.getProperty(TiC.PROPERTY_TITLE)); + int colorInt = -1; if (oldTitle == null) { oldTitle = ""; @@ -347,12 +354,32 @@ protected void updateTitle() newTitle = ""; } + if (window.hasProperty(TiC.PROPERTY_TITLE_ATTRIBUTES)) { + KrollDict innerAttributes = window.getProperties().getKrollDict(TiC.PROPERTY_TITLE_ATTRIBUTES); + colorInt = TiColorHelper.parseColor( + TiConvert.toString(innerAttributes.getString(TiC.PROPERTY_COLOR)), this); + } + if (!newTitle.equals(oldTitle)) { final String fnewTitle = newTitle; + final int finalColorInt = colorInt; runOnUiThread(new Runnable() { public void run() { setTitle(fnewTitle); + + ActionBar actionBar = getSupportActionBar(); + if (actionBar != null) { + if (finalColorInt != -1) { + SpannableStringBuilder ssb; + ssb = new SpannableStringBuilder(fnewTitle); + ssb.setSpan(new ForegroundColorSpan(finalColorInt), + 0, ssb.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE); + actionBar.setTitle(ssb); + } else { + actionBar.setTitle(fnewTitle); + } + } } }); } @@ -1575,7 +1602,7 @@ protected void onDestroy() // "isFinishing" will return true if the Android OS won't restore this destroyed activity later. // This happens when finish() method is called of end-user back navigates out of the activity. - // Note: Will breturn false if system intends to restore the activity later, which happens if + // Note: Will return false if system intends to restore the activity later, which happens if // system setting "Don't keep activities" is enabled or "Background process limit" was exceeded. boolean isFinishing = isFinishing(); diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiBaseService.java b/android/titanium/src/java/org/appcelerator/titanium/TiBaseService.java index d47b35faa9f..644e14bd3cc 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiBaseService.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiBaseService.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -150,7 +150,7 @@ public void unsubscribe() /** * Called just before the JavaScript runtime is terminated. *

- * Stops the service since the JavaScript file binded to it can no longer control it. + * Stops the service since the JavaScript file bound to it can no longer control it. * @param runtime The runtime instance that is about to be terminated/disposed. */ @Override diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiBlob.java b/android/titanium/src/java/org/appcelerator/titanium/TiBlob.java index d07f45c9f30..aa8c61cbf36 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiBlob.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiBlob.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -59,6 +59,7 @@ public class TiBlob extends KrollProxy private int height; private int uprightWidth; private int uprightHeight; + private Object rotation; // This handles the memory cache of images. private final TiBlobLruCache mMemoryCache = TiBlobLruCache.getInstance(); @@ -74,6 +75,7 @@ private TiBlob(int type, Object data, String mimetype) this.height = 0; this.uprightWidth = 0; this.uprightHeight = 0; + this.rotation = KrollRuntime.UNDEFINED; } /** @@ -89,7 +91,7 @@ public static TiBlob blobFromString(String data) /** * Creates a blob from a file and sets a mimeType based on the file name. * @param file the file used to create blob. - * @return new instane of TiBlob. + * @return new instance of TiBlob. */ public static TiBlob blobFromFile(TiBaseFile file) { @@ -239,6 +241,7 @@ public void loadBitmapInfo() this.height = opts.outHeight; int rotation = getImageOrientation(); + this.rotation = rotation; if ((rotation == 90) || (rotation == 270)) { this.uprightWidth = opts.outHeight; this.uprightHeight = opts.outWidth; @@ -411,6 +414,12 @@ public int getUprightWidth() return this.uprightWidth; } + @Kroll.getProperty + public Object getRotation() + { + return this.rotation; + } + @Kroll.getProperty public int getSize() { diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiC.java b/android/titanium/src/java/org/appcelerator/titanium/TiC.java index b4e525c55e2..040d9a003fd 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiC.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiC.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -142,6 +142,8 @@ public class TiC public static final String EVENT_PROPERTY_TAB = "tab"; public static final String EVENT_PROPERTY_THUMB_OFFSET = "thumbOffset"; public static final String EVENT_PROPERTY_THUMB_SIZE = "thumbSize"; + public static final String PROPERTY_THUMB_COLOR = "thumbColor"; + public static final String PROPERTY_ON_THUMB_COLOR = "onThumbColor"; public static final String EVENT_PROPERTY_TYPE = "type"; public static final String EVENT_PROPERTY_VELOCITY = "velocity"; public static final String EVENT_PROPERTY_X = "x"; @@ -228,6 +230,7 @@ public class TiC public static final String PROPERTY_ACCESSIBILITY_HINT = "accessibilityHint"; public static final String PROPERTY_ACCESSIBILITY_LABEL = "accessibilityLabel"; public static final String PROPERTY_ACCESSIBILITY_VALUE = "accessibilityValue"; + public static final String PROPERTY_ACCESSIBILITY_DISABLE_LONG = "accessibilityDisableLongPress"; public static final String PROPERTY_ACCESSORY_TYPE = "accessoryType"; public static final String PROPERTY_ACTION = "action"; public static final String PROPERTY_ACTION_VIEW = "actionView"; @@ -292,7 +295,9 @@ public class TiC public static final String PROPERTY_BACKGROUND_SELECTED_COLOR = "backgroundSelectedColor"; public static final String PROPERTY_BACKGROUND_SELECTED_IMAGE = "backgroundSelectedImage"; public static final String PROPERTY_BADGE = "badge"; - public static final String PROPERTY_BADGE_COLOR = "badgeColor"; + public static final String PROPERTY_BADGE_COLOR = "badgeColor"; // DEPRECATED: Superseded by PROPERTY_BADGE_BACKGROUND_COLOR. + public static final String PROPERTY_BADGE_BACKGROUND_COLOR = "badgeBackgroundColor"; + public static final String PROPERTY_BADGE_TEXT_COLOR = "badgeTextColor"; public static final String PROPERTY_TARGET_ITEM_INDEX = "targetItemIndex"; public static final String PROPERTY_TARGET_SECTION = "targetSection"; public static final String PROPERTY_TARGET_SECTION_INDEX = "targetSectionIndex"; @@ -300,6 +305,7 @@ public class TiC public static final String PROPERTY_TOUCH_FEEDBACK_COLOR = "touchFeedbackColor"; public static final String PROPERTY_TRANSITION_NAME = "transitionName"; public static final String PROPERTY_BAR_COLOR = "barColor"; + public static final String PROPERTY_STATUS_BAR_COLOR = "statusBarColor"; public static final String PROPERTY_BASE_URL = "baseUrl"; public static final String PROPERTY_BASE_URL_WEBVIEW = "baseURL"; public static final String PROPERTY_BIG_TEXT = "bigText"; @@ -317,6 +323,7 @@ public class TiC public static final String PROPERTY_BORDER_WIDTH = "borderWidth"; public static final String PROPERTY_BOTTOM = "bottom"; public static final String PROPERTY_BROTHER = "brother"; + public static final String PROPERTY_BREAK_STRATEGY = "breakStrategy"; public static final String PROPERTY_BUTTON = "button"; public static final String PROPERTY_BUBBLE_PARENT = "bubbleParent"; public static final String PROPERTY_BUBBLES = "bubbles"; @@ -458,6 +465,7 @@ public class TiC public static final String PROPERTY_FRAGMENT_ONLY = "fragmentOnly"; public static final String PROPERTY_HIDDEN_BEHAVIOR = "hiddenBehavior"; public static final String PROPERTY_HIDES_BACK_BUTTON = "hidesBackButton"; + public static final String PROPERTY_HYPHENATION_FREQUENCY = "hyphenationFrequency"; public static final String PROPERTY_FREQUENCY = "frequency"; public static final String PROPERTY_FRIEND = "friend"; public static final String PROPERTY_FROM = "from"; @@ -553,6 +561,7 @@ public class TiC public static final String PROPERTY_MAX_AGE = "maxAge"; public static final String PROPERTY_MAX_CLASSNAME = "maxClassname"; public static final String PROPERTY_MAX_ELEVATION = "maxElevation"; + public static final String PROPERTY_MAX_IMAGES = "maxImages"; public static final String PROPERTY_MAX_LENGTH = "maxLength"; public static final String PROPERTY_MAX_LINES = "maxLines"; public static final String PROPERTY_MAX_ROW_HEIGHT = "maxRowHeight"; @@ -603,6 +612,7 @@ public class TiC public static final String PROPERTY_ON_RESTART = "onRestart"; public static final String PROPERTY_ON_PAUSE = "onPause"; public static final String PROPERTY_ON_STOP = "onStop"; + public static final String PROPERTY_ON_TINT_COLOR = "onTintColor"; public static final String PROPERTY_TLS_VERSION = "tlsVersion"; public static final String PROPERTY_ON_DESTROY = "onDestroy"; public static final String PROPERTY_ON_CREATE_WINDOW = "onCreateWindow"; @@ -632,6 +642,7 @@ public class TiC public static final String PROPERTY_PASSWORD = "password"; public static final String PROPERTY_PASSWORD_MASK = "passwordMask"; public static final String PROPERTY_PATH = "path"; + public static final String PROPERTY_PATH_ONLY = "pathOnly"; public static final String PROPERTY_PERSISTENT = "persistent"; public static final String PROPERTY_PHONE = "phone"; public static final String PROPERTY_PIN_IMAGE = "pinImage"; @@ -685,6 +696,7 @@ public class TiC public static final String PROPERTY_SCROLL_ENABLED = "scrollEnabled"; public static final String PROPERTY_SCROLL_TYPE = "scrollType"; public static final String PROPERTY_SCROLLABLE = "scrollable"; + public static final String PROPERTY_SCROLLBARS = "scrollbars"; public static final String PROPERTY_SEARCH = "search"; public static final String PROPERTY_SEARCH_AS_CHILD = "searchAsChild"; public static final String PROPERTY_SEARCH_TEXT = "searchText"; @@ -749,8 +761,10 @@ public class TiC public static final String PROPERTY_SUPPORT_TOOLBAR = "supportToolbar"; public static final String PROPERTY_TABS = "tabs"; public static final String PROPERTY_TAB_OPEN = "tabOpen"; + public static final String PROPERTY_TAB_BAR_VISIBLE = "tabBarVisible"; public static final String PROPERTY_TABS_BACKGROUND_COLOR = "tabsBackgroundColor"; public static final String PROPERTY_TABS_BACKGROUND_SELECTED_COLOR = "tabsBackgroundSelectedColor"; + public static final String PROPERTY_TAB_MODE = "tabMode"; public static final String PROPERTY_TAG = "tag"; public static final String PROPERTY_TEMPLATE = "template"; public static final String PROPERTY_TEMPLATES = "templates"; @@ -767,6 +781,7 @@ public class TiC public static final String PROPERTY_TINT = "tint"; public static final String PROPERTY_TINT_COLOR = "tintColor"; public static final String PROPERTY_TITLE = "title"; + public static final String PROPERTY_TITLE_ATTRIBUTES = "titleAttributes"; public static final String PROPERTY_TITLE_COLOR = "titleColor"; public static final String PROPERTY_TITLE_CONDENSED = "titleCondensed"; public static final String PROPERTY_TITLEID = "titleid"; diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiDimension.java b/android/titanium/src/java/org/appcelerator/titanium/TiDimension.java index e32fa93137b..15b0482677c 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiDimension.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiDimension.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiExceptionHandler.java b/android/titanium/src/java/org/appcelerator/titanium/TiExceptionHandler.java index 3defeaa7fc4..19b298815b6 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiExceptionHandler.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiExceptionHandler.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiFileProxy.java b/android/titanium/src/java/org/appcelerator/titanium/TiFileProxy.java index a34ab1ec8d6..ef15fb744fc 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiFileProxy.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiFileProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiLaunchActivity.java b/android/titanium/src/java/org/appcelerator/titanium/TiLaunchActivity.java index 3bedde8b31d..0e0f0b44c2f 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiLaunchActivity.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiLaunchActivity.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiLifecycle.java b/android/titanium/src/java/org/appcelerator/titanium/TiLifecycle.java index 0b94e91140b..918744eb043 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiLifecycle.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiLifecycle.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiPoint.java b/android/titanium/src/java/org/appcelerator/titanium/TiPoint.java index 943a1ec2945..584727e5d07 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiPoint.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiPoint.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiProperties.java b/android/titanium/src/java/org/appcelerator/titanium/TiProperties.java index be87b0653d2..e1283921d14 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiProperties.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiProperties.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -38,7 +38,7 @@ public TiProperties(Context context, String name, boolean clear) { preferences = context.getSharedPreferences(name, Context.MODE_PRIVATE); if (clear) { - preferences.edit().clear().commit(); + preferences.edit().clear().apply(); } } @@ -103,7 +103,7 @@ public void setString(String key, String value) } else { editor.putString(key, value); } - editor.commit(); + editor.apply(); } /** @@ -160,7 +160,7 @@ public void setInt(String key, int value) SharedPreferences.Editor editor = preferences.edit(); editor.putInt(key, value); - editor.commit(); + editor.apply(); } /** @@ -208,7 +208,7 @@ public void setDouble(String key, double value) SharedPreferences.Editor editor = preferences.edit(); editor.putString(key, value + ""); - editor.commit(); + editor.apply(); } /** @@ -266,7 +266,7 @@ public void setBool(String key, boolean value) SharedPreferences.Editor editor = preferences.edit(); editor.putBoolean(key, value); - editor.commit(); + editor.apply(); } /** @@ -311,7 +311,7 @@ public void setList(String key, String[] value) } editor.putInt(key + ".length", value.length); - editor.commit(); + editor.apply(); } /** @@ -377,7 +377,7 @@ public void removeProperty(String key) if (preferences.contains(key)) { SharedPreferences.Editor editor = preferences.edit(); editor.remove(key); - editor.commit(); + editor.apply(); } } @@ -386,7 +386,7 @@ public void removeProperty(String key) */ public void removeAllProperties() { - preferences.edit().clear().commit(); + preferences.edit().clear().apply(); } public static void setSystemProperties(JSONObject prop) diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiRootActivity.java b/android/titanium/src/java/org/appcelerator/titanium/TiRootActivity.java index c12b6a62b16..7603287301b 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiRootActivity.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiRootActivity.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -186,7 +186,7 @@ protected void onCreate(Bundle savedInstanceState) // Recreate this activity on the current task. if (isActivityForResult) { - // This activtiy was created via startActivityForResult(). + // This activity was created via startActivityForResult(). // "Forward" the result handling to the next activity we're about to start-up. Intent relaunchIntent = newIntent; if (relaunchIntent == null) { @@ -304,9 +304,9 @@ public void onDisposing(KrollRuntime runtime) } }); if (KrollRuntime.getActivityRefCount() > 0) { - Activity currentActvitiy = getTiApp().getCurrentActivity(); - if (currentActvitiy != null) { - currentActvitiy.finishAffinity(); + Activity currentActivity = getTiApp().getCurrentActivity(); + if (currentActivity != null) { + currentActivity.finishAffinity(); } TiApplication.terminateActivityStack(); } else { diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiStylesheet.java b/android/titanium/src/java/org/appcelerator/titanium/TiStylesheet.java index cced378c5ed..61c9e47de19 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiStylesheet.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiStylesheet.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiTranslucentActivity.java b/android/titanium/src/java/org/appcelerator/titanium/TiTranslucentActivity.java index ec67d7920b9..4c3898ac6e1 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiTranslucentActivity.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiTranslucentActivity.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/io/TiBaseFile.java b/android/titanium/src/java/org/appcelerator/titanium/io/TiBaseFile.java index 6780fd9ca1f..1c999464db9 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/io/TiBaseFile.java +++ b/android/titanium/src/java/org/appcelerator/titanium/io/TiBaseFile.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/io/TiContentFile.java b/android/titanium/src/java/org/appcelerator/titanium/io/TiContentFile.java index 0360f574d8a..1268e5ed2db 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/io/TiContentFile.java +++ b/android/titanium/src/java/org/appcelerator/titanium/io/TiContentFile.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/io/TiFile.java b/android/titanium/src/java/org/appcelerator/titanium/io/TiFile.java index 58e10388990..bcd12aca1b3 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/io/TiFile.java +++ b/android/titanium/src/java/org/appcelerator/titanium/io/TiFile.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -100,7 +100,7 @@ public boolean isWriteable() /** * Attempts to create a directory named by the trailing filename of this file. * @param recursive whether to recursively create any missing parent directories in the path. - * @return true if directory was sucessfully created, false otherwise. + * @return true if directory was successfully created, false otherwise. */ @Override public boolean createDirectory(boolean recursive) diff --git a/android/titanium/src/java/org/appcelerator/titanium/io/TiFileFactory.java b/android/titanium/src/java/org/appcelerator/titanium/io/TiFileFactory.java index ff2f2a5f6df..9d609af38c7 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/io/TiFileFactory.java +++ b/android/titanium/src/java/org/appcelerator/titanium/io/TiFileFactory.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/io/TiFileProvider.java b/android/titanium/src/java/org/appcelerator/titanium/io/TiFileProvider.java index 3377141c721..79f935db4e0 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/io/TiFileProvider.java +++ b/android/titanium/src/java/org/appcelerator/titanium/io/TiFileProvider.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/io/TiInputStreamWrapper.java b/android/titanium/src/java/org/appcelerator/titanium/io/TiInputStreamWrapper.java index f635f19f87d..6ee4507532b 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/io/TiInputStreamWrapper.java +++ b/android/titanium/src/java/org/appcelerator/titanium/io/TiInputStreamWrapper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/io/TiMockFile.java b/android/titanium/src/java/org/appcelerator/titanium/io/TiMockFile.java index 4bbdcd69b39..4cc717de02f 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/io/TiMockFile.java +++ b/android/titanium/src/java/org/appcelerator/titanium/io/TiMockFile.java @@ -1,5 +1,5 @@ /* - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/io/TiResourceFile.java b/android/titanium/src/java/org/appcelerator/titanium/io/TiResourceFile.java index 615c8ef7e4c..6749c42fe30 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/io/TiResourceFile.java +++ b/android/titanium/src/java/org/appcelerator/titanium/io/TiResourceFile.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/io/TiStream.java b/android/titanium/src/java/org/appcelerator/titanium/io/TiStream.java index f6ee32aceeb..087a17369a3 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/io/TiStream.java +++ b/android/titanium/src/java/org/appcelerator/titanium/io/TiStream.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -15,8 +15,8 @@ public interface TiStream { /** * Implementing classes should use this method to read data into a buffer. - * Refer to Stream Spec for more details. - * @param args arguments passed in. Must match the arguments listed in the Stream Spec. + * Refer to Stream Spec for more details. + * @param args arguments passed in. Must match the arguments listed in the Stream Spec. * @return number of bytes read, -1 if no data is available. * @throws Exception on error. */ @@ -34,8 +34,8 @@ public interface TiStream { /** * Implementing classes should use this method to write data from a buffer to this stream. - * Refer to Stream Spec for more details. - * @param args arguments passed in. Must match the arguments listed in the Stream Spec. + * Refer to Stream Spec for more details. + * @param args arguments passed in. Must match the arguments listed in the Stream Spec. * @return number of bytes written, -1 if no data is available. * @throws Exception on error. */ 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 c05c09e4c64..e49244cc65c 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/proxy/ActionBarProxy.java +++ b/android/titanium/src/java/org/appcelerator/titanium/proxy/ActionBarProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -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/ActivityProxy.java b/android/titanium/src/java/org/appcelerator/titanium/proxy/ActivityProxy.java index c7113b3d27d..8628b135417 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/proxy/ActivityProxy.java +++ b/android/titanium/src/java/org/appcelerator/titanium/proxy/ActivityProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/proxy/ColorProxy.java b/android/titanium/src/java/org/appcelerator/titanium/proxy/ColorProxy.java index 1ca69af0ee2..002e2b41a60 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/proxy/ColorProxy.java +++ b/android/titanium/src/java/org/appcelerator/titanium/proxy/ColorProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/proxy/DecorViewProxy.java b/android/titanium/src/java/org/appcelerator/titanium/proxy/DecorViewProxy.java index f22d3bd6fe5..0d53785d908 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/proxy/DecorViewProxy.java +++ b/android/titanium/src/java/org/appcelerator/titanium/proxy/DecorViewProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/proxy/IntentProxy.java b/android/titanium/src/java/org/appcelerator/titanium/proxy/IntentProxy.java index c56b2dce51f..3eda037156d 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/proxy/IntentProxy.java +++ b/android/titanium/src/java/org/appcelerator/titanium/proxy/IntentProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/proxy/MenuItemProxy.java b/android/titanium/src/java/org/appcelerator/titanium/proxy/MenuItemProxy.java index 68f117c6a09..1651b09f9ae 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/proxy/MenuItemProxy.java +++ b/android/titanium/src/java/org/appcelerator/titanium/proxy/MenuItemProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/proxy/MenuProxy.java b/android/titanium/src/java/org/appcelerator/titanium/proxy/MenuProxy.java index b6f4f9f63db..a108947a82e 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/proxy/MenuProxy.java +++ b/android/titanium/src/java/org/appcelerator/titanium/proxy/MenuProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/proxy/RProxy.java b/android/titanium/src/java/org/appcelerator/titanium/proxy/RProxy.java index 9329dada2fb..dea6fbbab8e 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/proxy/RProxy.java +++ b/android/titanium/src/java/org/appcelerator/titanium/proxy/RProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/proxy/ServiceProxy.java b/android/titanium/src/java/org/appcelerator/titanium/proxy/ServiceProxy.java index 5eeee9319f1..c4d963aab68 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/proxy/ServiceProxy.java +++ b/android/titanium/src/java/org/appcelerator/titanium/proxy/ServiceProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/proxy/TiViewProxy.java b/android/titanium/src/java/org/appcelerator/titanium/proxy/TiViewProxy.java index 5080429c042..77a86fafa7f 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/proxy/TiViewProxy.java +++ b/android/titanium/src/java/org/appcelerator/titanium/proxy/TiViewProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -53,10 +53,6 @@ TiC.PROPERTY_BACKGROUND_SELECTED_IMAGE, TiC.PROPERTY_BACKGROUND_FOCUSED_IMAGE, TiC.PROPERTY_BACKGROUND_DISABLED_IMAGE, - TiC.PROPERTY_BACKGROUND_COLOR, - TiC.PROPERTY_BACKGROUND_SELECTED_COLOR, - TiC.PROPERTY_BACKGROUND_FOCUSED_COLOR, - TiC.PROPERTY_BACKGROUND_DISABLED_COLOR, TiC.PROPERTY_BACKGROUND_PADDING, TiC.PROPERTY_BACKGROUND_GRADIENT, // border properties @@ -98,7 +94,8 @@ TiC.PROPERTY_TOUCH_FEEDBACK_COLOR, TiC.PROPERTY_TRANSITION_NAME, TiC.PROPERTY_HIDDEN_BEHAVIOR, - TiC.PROPERTY_ANCHOR_POINT + TiC.PROPERTY_ANCHOR_POINT, + TiC.PROPERTY_ACCESSIBILITY_DISABLE_LONG }) public abstract class TiViewProxy extends KrollProxy { @@ -1068,6 +1065,12 @@ public TiViewProxy getParent() return this.parent.get(); } + @Kroll.setProperty + public void setBackgroundColor(String color) + { + setPropertyAndFire(TiC.PROPERTY_BACKGROUND_COLOR, color); + } + @Kroll.getProperty public String getBackgroundColor() { @@ -1100,6 +1103,12 @@ public String getBackgroundColor() return TiUIHelper.getBackgroundColorForState(tiBackgroundDrawable, TiUIHelper.BACKGROUND_DEFAULT_STATE_1); } + @Kroll.setProperty + public void setBackgroundSelectedColor(String color) + { + setPropertyAndFire(TiC.PROPERTY_BACKGROUND_SELECTED_COLOR, color); + } + @Kroll.getProperty public String getBackgroundSelectedColor() { @@ -1122,6 +1131,12 @@ public String getBackgroundSelectedColor() return TiUIHelper.getBackgroundColorForState(backgroundDrawable, TiUIHelper.BACKGROUND_SELECTED_STATE); } + @Kroll.setProperty + public void setBackgroundFocusedColor(String color) + { + setPropertyAndFire(TiC.PROPERTY_BACKGROUND_FOCUSED_COLOR, color); + } + @Kroll.getProperty public String getBackgroundFocusedColor() { @@ -1144,6 +1159,12 @@ public String getBackgroundFocusedColor() return TiUIHelper.getBackgroundColorForState(backgroundDrawable, TiUIHelper.BACKGROUND_FOCUSED_STATE); } + @Kroll.setProperty + public void setBackgroundDisabledColor(String color) + { + setPropertyAndFire(TiC.PROPERTY_BACKGROUND_DISABLED_COLOR, color); + } + @Kroll.getProperty public String getBackgroundDisabledColor() { 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 963bbf8b9ef..237924bbb95 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/proxy/TiWindowProxy.java +++ b/android/titanium/src/java/org/appcelerator/titanium/proxy/TiWindowProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -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/TiActivityResultHandler.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiActivityResultHandler.java index 93c5d221eea..96ffa3752c1 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiActivityResultHandler.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiActivityResultHandler.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiActivitySupport.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiActivitySupport.java index a2a9d758c13..08512e131f3 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiActivitySupport.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiActivitySupport.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiActivitySupportHelper.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiActivitySupportHelper.java index 00d5dd097d8..a0c11f1fe99 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiActivitySupportHelper.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiActivitySupportHelper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationBuilder.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationBuilder.java index f36a653dcbb..32ed3fc6957 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationBuilder.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationBuilder.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationCurve.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationCurve.java index fb8e9b31acc..402b92cac0b 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationCurve.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationCurve.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationFactory.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationFactory.java index 4a89595746a..dbf99fa26c5 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationFactory.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationFactory.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationPair.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationPair.java index 9059d44c44d..85ea11716f8 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationPair.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationPair.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiBlobLruCache.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiBlobLruCache.java index 0bcf8fc15e6..0857388c16f 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiBlobLruCache.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiBlobLruCache.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiColorHelper.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiColorHelper.java index a84794be418..5bb0e6a9e9e 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiColorHelper.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiColorHelper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiConvert.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiConvert.java index 38cae5901eb..34e371dd234 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiConvert.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiConvert.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiDeviceOrientation.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiDeviceOrientation.java index ac9418f6a60..8a974798c34 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiDeviceOrientation.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiDeviceOrientation.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -165,7 +165,7 @@ public static TiDeviceOrientation fromAndroidSurfaceRotationId(int value) boolean isUprightOrientationPortrait = displayInfo.isUprightOrientationPortrait(); // Configure display info object with given rotation and device's upright orientation. - // Note: The below width/height doesn't need to match the device's actual dispaly size. + // Note: The below width/height doesn't need to match the device's actual display size. // They just need to indicate if the device is portrait/landscape for given rotation. switch (value) { case Surface.ROTATION_0: @@ -302,7 +302,7 @@ public static TiDeviceOrientation from(Display display) * Returns a portrait or landscape orientation if the display's upright orientation * was successfully acquired. *

- * Returns UNKNOWN if failed to aquire the default display's information. + * Returns UNKNOWN if failed to acquire the default display's information. */ public static TiDeviceOrientation fromUprightPositionOfDefaultDisplay() { @@ -321,7 +321,7 @@ public static TiDeviceOrientation fromUprightPositionOfDefaultDisplay() * Returns a portrait or landscape orientation if the display's upright orientation * was successfully acquired. *

- * Returns UNKNOWN if given a null argument or failed to aquire display info. + * Returns UNKNOWN if given a null argument or failed to acquire display info. */ public static TiDeviceOrientation fromUprightPositionOf(Display display) { @@ -395,7 +395,7 @@ public int getHeight() public boolean isUprightOrientationPortrait() { // Determine if the display size is portrait. - // Note: A square display size is considred portrait. (The most commonly used orientation.) + // Note: A square display size is considered portrait. (The most commonly used orientation.) boolean result; switch (this.rotationId) { case Surface.ROTATION_0: diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiDigestUtils.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiDigestUtils.java index 64c06ef7a56..997f5699993 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiDigestUtils.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiDigestUtils.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiDownloadListener.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiDownloadListener.java index 6e03b789698..4104229afad 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiDownloadListener.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiDownloadListener.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiDownloadManager.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiDownloadManager.java index b93f8c1b19c..e22eb5580e9 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiDownloadManager.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiDownloadManager.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -211,7 +211,7 @@ public InputStream blockingDownload(final URI uri) throws Exception } } - // If we've acquried an HTTP/HTTPS download stream, then wrap the stream. + // If we've acquired an HTTP/HTTPS download stream, then wrap the stream. // The stream wrapper will automatically close the HTTP connection when the stream has been closed. if ((inputStream != null) && (connection instanceof HttpURLConnection)) { final HttpURLConnection httpConnection = (HttpURLConnection) connection; diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiEventHelper.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiEventHelper.java index eb333c7653e..03f646e41b9 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiEventHelper.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiEventHelper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiExifOrientation.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiExifOrientation.java index 94991f1a842..62d0b1deaf7 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiExifOrientation.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiExifOrientation.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiFileHelper.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiFileHelper.java index feb7bfead2b..174c4e5a81d 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiFileHelper.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiFileHelper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiFileHelper2.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiFileHelper2.java index f86fbf18263..060100776ac 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiFileHelper2.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiFileHelper2.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -29,7 +29,7 @@ public static String getResourcesPath(String path) /** * Joins many String path segments into one path * @param segments A vararg (or String array) of path segments - * @return The passed-in segements normalized and joined by "/" + * @return The passed-in segments normalized and joined by "/" */ public static String joinSegments(String... segments) { diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiImageCache.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiImageCache.java index a7490790d63..a7221aa6b71 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiImageCache.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiImageCache.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiImageHelper.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiImageHelper.java index 50a2e660656..7ae78c6fb24 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiImageHelper.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiImageHelper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiImageInfo.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiImageInfo.java index c0b6e02e4c3..210f0bf91e5 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiImageInfo.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiImageInfo.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiIntentWrapper.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiIntentWrapper.java index dcfb34e93fc..46037096234 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiIntentWrapper.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiIntentWrapper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiLoadImageManager.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiLoadImageManager.java index 5d3b8f29647..db82f91da70 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiLoadImageManager.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiLoadImageManager.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiLocaleManager.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiLocaleManager.java index 34c14b2ff88..9a6e4b59093 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiLocaleManager.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiLocaleManager.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiLocationHelper.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiLocationHelper.java index 3e03cd3cbb8..7ec31b8ee4b 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiLocationHelper.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiLocationHelper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiMenuSupport.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiMenuSupport.java index eab1bd87121..0d51b6bc0e5 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiMenuSupport.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiMenuSupport.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiMimeTypeHelper.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiMimeTypeHelper.java index cfcad36dbb7..5608161a2aa 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiMimeTypeHelper.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiMimeTypeHelper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. 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 fb0ef23ae6a..0509e6ef62c 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiNinePatchHelper.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiNinePatchHelper.java @@ -1,13 +1,11 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. */ 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/org/appcelerator/titanium/util/TiPlatformHelper.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiPlatformHelper.java index 4e935e92dfa..e704ca4975a 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiPlatformHelper.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiPlatformHelper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiPropertyResolver.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiPropertyResolver.java index 7ce1253fc07..53737cdbb7c 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiPropertyResolver.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiPropertyResolver.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiRHelper.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiRHelper.java index 3690b46abfe..eb6cbc50135 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiRHelper.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiRHelper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiResponseCache.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiResponseCache.java index 4bc2b252571..abbae3d34d4 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiResponseCache.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiResponseCache.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -231,7 +231,7 @@ public static boolean peekFollowingRedirects(URI uri) * @param uri The URI to fetch the endpoint of. Can be null. * @return * If the given URI is cached and references a redirect response, then the returned URI will - * be the redirect's "location" URI. + * be the redirects "location" URI. *

* If the given URI does not reference a redirect, then the given URI is returned. *

diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiSensorHelper.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiSensorHelper.java index 86af769f912..d158c8097c5 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiSensorHelper.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiSensorHelper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiStreamHelper.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiStreamHelper.java index e90b8047c5e..26035ee5309 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiStreamHelper.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiStreamHelper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiUIHelper.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiUIHelper.java index 16520a073d5..126de992a6d 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiUIHelper.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiUIHelper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -713,7 +713,7 @@ public ImageDrawableLoader() /** * Loads the given image and returns it's decode bitmap wrapped in a drawable. * @param filePath Path or URL to the image file to be loaded. Can be null. - * @return Returns a drawble object used to draw the give image file. + * @return Returns a drawable object used to draw the give image file. *

* Returns null if failed to load the image or if given a null argument. */ diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiUrl.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiUrl.java index 414cec1a076..b3d5972513c 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiUrl.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiUrl.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiWeakList.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiWeakList.java index 6fe8e2a4405..b00e832e7bf 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiWeakList.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiWeakList.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/util/TiWeakMap.java b/android/titanium/src/java/org/appcelerator/titanium/util/TiWeakMap.java index 03eac9436ad..6f6ad86ba5d 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/util/TiWeakMap.java +++ b/android/titanium/src/java/org/appcelerator/titanium/util/TiWeakMap.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/ITiWindowHandler.java b/android/titanium/src/java/org/appcelerator/titanium/view/ITiWindowHandler.java index 9e97dc8cda4..31e1841a83d 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/ITiWindowHandler.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/ITiWindowHandler.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/Ti2DMatrix.java b/android/titanium/src/java/org/appcelerator/titanium/view/Ti2DMatrix.java index d9c5e07b3a2..273d5e4ec81 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/Ti2DMatrix.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/Ti2DMatrix.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiActionBarStyleHandler.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiActionBarStyleHandler.java index b44c5f8051b..af373edf546 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiActionBarStyleHandler.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiActionBarStyleHandler.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiActivitySafeAreaMonitor.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiActivitySafeAreaMonitor.java index 61a75fadac9..35233b11a46 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiActivitySafeAreaMonitor.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiActivitySafeAreaMonitor.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiAnimation.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiAnimation.java index fc77e738c3e..dbbe2c63739 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiAnimation.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiAnimation.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiBackgroundColorWrapper.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiBackgroundColorWrapper.java index b015ffff69d..d2a7923a14d 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiBackgroundColorWrapper.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiBackgroundColorWrapper.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiBackgroundDrawable.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiBackgroundDrawable.java index b2ec67dc936..290e9178e2e 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiBackgroundDrawable.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiBackgroundDrawable.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiBorderWrapperView.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiBorderWrapperView.java index 947b15de033..1b9c6a94dbe 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiBorderWrapperView.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiBorderWrapperView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiCompositeLayout.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiCompositeLayout.java index 7b59254c8b8..4ad50ad3d7d 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiCompositeLayout.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiCompositeLayout.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -60,13 +60,13 @@ public enum LayoutArrangement { private boolean needsSort; protected LayoutArrangement arrangement; - // Used by horizonal arrangement calculations + // Used by horizontal arrangement calculations private int horizontalLayoutTopBuffer = 0; private int horizontalLayoutCurrentLeft = 0; private int horizontalLayoutLineHeight = 0; private boolean enableHorizontalWrap = true; private int horizontalLayoutLastIndexBeforeWrap = 0; - private int horiztonalLayoutPreviousRight = 0; + private int horizontalLayoutPreviousRight = 0; int[] horizontal = new int[2]; int[] vertical = new int[2]; /** @@ -252,7 +252,7 @@ public void setChildRelativeSizingTo(int width, int height) /** * Configures this layout to size and position child views that use a percentage based - * width/height and top/bottom/left/right/center properties reatlive to this parent + * width/height and top/bottom/left/right/center properties relative to this parent * layout's width and height. *

* This is the default setting. @@ -875,7 +875,7 @@ protected void onLayout(boolean changed, int l, int t, int r, int b) horizontalLayoutLineHeight = 0; horizontalLayoutTopBuffer = 0; horizontalLayoutLastIndexBeforeWrap = 0; - horiztonalLayoutPreviousRight = 0; + horizontalLayoutPreviousRight = 0; updateRowForHorizontalWrap(right, i); } computeHorizontalLayoutPosition(params, childMeasuredWidth, childMeasuredHeight, right, top, bottom, @@ -1002,19 +1002,19 @@ private void computeHorizontalLayoutPosition(TiCompositeLayout.LayoutParams para TiDimension optionLeft = params.optionLeft; TiDimension optionRight = params.optionRight; - int left = horizontalLayoutCurrentLeft + horiztonalLayoutPreviousRight; + int left = horizontalLayoutCurrentLeft + horizontalLayoutPreviousRight; int optionLeftValue = 0; if (optionLeft != null) { optionLeftValue = optionLeft.getAsPixels(this); left += optionLeftValue; } - horiztonalLayoutPreviousRight = (optionRight == null) ? 0 : optionRight.getAsPixels(this); + horizontalLayoutPreviousRight = (optionRight == null) ? 0 : optionRight.getAsPixels(this); // If it's fill width with horizontal wrap, just take up remaining // space. int right = left + measuredWidth; - if (enableHorizontalWrap && ((right + horiztonalLayoutPreviousRight) > layoutRight || left >= layoutRight)) { + if (enableHorizontalWrap && ((right + horizontalLayoutPreviousRight) > layoutRight || left >= layoutRight)) { // Too long for the current "line" that it's on. Need to move it // down. left = optionLeftValue; diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiDrawableReference.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiDrawableReference.java index 0fa8a0aeb0b..bcfb1f89777 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiDrawableReference.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiDrawableReference.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -272,7 +272,7 @@ public static TiDrawableReference fromDictionary(Activity activity, HashMap dict * Does its best to determine the type of reference (url, blob, etc) based on object parameter. *

* Uses the given proxy to resolve relative paths to an image file, if applicable. - * @param proxy Used to acquire an activty and resolve relative paths if given object is a string path. + * @param proxy Used to acquire an activity and resolve relative paths if given object is a string path. * @param object Reference to the image to be loaded such as a file, path, blob, etc. * @return Returns an instance of TiDrawableReference wrapping the given object. */ diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiGradientDrawable.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiGradientDrawable.java index dccba21b5f7..8c9e133334a 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiGradientDrawable.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiGradientDrawable.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiInsetsProvider.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiInsetsProvider.java index f162c663868..887379e2ccf 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiInsetsProvider.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiInsetsProvider.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiToolbarStyleHandler.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiToolbarStyleHandler.java index 89cf0ef3e36..7dea2d5287c 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiToolbarStyleHandler.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiToolbarStyleHandler.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiUIDecorView.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiUIDecorView.java index 57ee401fab3..a8f96c9fc98 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiUIDecorView.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiUIDecorView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiUIFragment.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiUIFragment.java index e7189380b02..51f60f8eda2 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiUIFragment.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiUIFragment.java @@ -131,7 +131,7 @@ public Fragment getFragment() public boolean handleMessage(Message msg) { - //overwriting so descendents don't have to + //overwriting so descendants don't have to return true; } diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java index ac0541d1344..73630f0c02a 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * Titanium SDK * Copyright TiDev, Inc. 04/07/2022-Present * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. @@ -45,7 +45,10 @@ import android.graphics.drawable.ShapeDrawable; import android.os.Build; import androidx.annotation.NonNull; +import androidx.core.view.AccessibilityDelegateCompat; import androidx.core.view.ViewCompat; +import androidx.core.view.accessibility.AccessibilityNodeInfoCompat; + import android.text.TextUtils; import android.util.Pair; import android.util.SparseArray; @@ -1915,6 +1918,12 @@ protected void registerForTouch(final View touchable) boolean soundEnabled = TiConvert.toBoolean(proxy.getProperty(TiC.PROPERTY_SOUND_EFFECTS_ENABLED), true); touchable.setSoundEffectsEnabled(soundEnabled); } + + if (proxy.hasPropertyAndNotNull(TiC.PROPERTY_ACCESSIBILITY_DISABLE_LONG)) { + if (TiConvert.toBoolean(proxy.getProperty(TiC.PROPERTY_ACCESSIBILITY_DISABLE_LONG))) { + removeAccessibilityLongClick(); + } + } registerTouchEvents(touchable); // Previously, we used the single tap handling above to fire our click event. It doesn't @@ -2363,4 +2372,19 @@ public String composeContentDescription() } return composeContentDescription(proxy.getProperties()); } + + public void removeAccessibilityLongClick() + { + ViewCompat.setAccessibilityDelegate(nativeView, new AccessibilityDelegateCompat() + { + @Override + public void onInitializeAccessibilityNodeInfo(@NonNull View host, + @NonNull AccessibilityNodeInfoCompat info) + { + super.onInitializeAccessibilityNodeInfo(host, info); + info.removeAction(AccessibilityNodeInfoCompat.AccessibilityActionCompat.ACTION_LONG_CLICK); + info.setLongClickable(false); + } + }); + } } diff --git a/android/titanium/src/java/ti/modules/titanium/BufferProxy.java b/android/titanium/src/java/ti/modules/titanium/BufferProxy.java index 1207750d45a..1825b2082df 100644 --- a/android/titanium/src/java/ti/modules/titanium/BufferProxy.java +++ b/android/titanium/src/java/ti/modules/titanium/BufferProxy.java @@ -1,14 +1,11 @@ /** - * TiDev Titanium Mobile + * 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; -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/android/titanium/src/java/ti/modules/titanium/TitaniumModule.java b/android/titanium/src/java/ti/modules/titanium/TitaniumModule.java index 20cfb254ba6..365e373862a 100644 --- a/android/titanium/src/java/ti/modules/titanium/TitaniumModule.java +++ b/android/titanium/src/java/ti/modules/titanium/TitaniumModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. @@ -263,7 +263,7 @@ public String stringFormat(String format, Object[] args) } } catch (Exception ex) { - Log.e(TAG, "Error occured while formatting string", ex); + Log.e(TAG, "Error occurred while formatting string", ex); return null; } } diff --git a/android/titanium/src/java/ti/modules/titanium/codec/CodecModule.java b/android/titanium/src/java/ti/modules/titanium/codec/CodecModule.java index 2a4e4363ff7..84ca4595e84 100644 --- a/android/titanium/src/java/ti/modules/titanium/codec/CodecModule.java +++ b/android/titanium/src/java/ti/modules/titanium/codec/CodecModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/titanium/src/java/ti/modules/titanium/stream/BlobStreamProxy.java b/android/titanium/src/java/ti/modules/titanium/stream/BlobStreamProxy.java index 5c029c0add5..3c24a288ce3 100644 --- a/android/titanium/src/java/ti/modules/titanium/stream/BlobStreamProxy.java +++ b/android/titanium/src/java/ti/modules/titanium/stream/BlobStreamProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/titanium/src/java/ti/modules/titanium/stream/BufferStreamProxy.java b/android/titanium/src/java/ti/modules/titanium/stream/BufferStreamProxy.java index d2bb8f0f8bc..a289e2b2fa2 100644 --- a/android/titanium/src/java/ti/modules/titanium/stream/BufferStreamProxy.java +++ b/android/titanium/src/java/ti/modules/titanium/stream/BufferStreamProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/titanium/src/java/ti/modules/titanium/stream/FileStreamProxy.java b/android/titanium/src/java/ti/modules/titanium/stream/FileStreamProxy.java index 8cc8c87b442..3a0688dd513 100644 --- a/android/titanium/src/java/ti/modules/titanium/stream/FileStreamProxy.java +++ b/android/titanium/src/java/ti/modules/titanium/stream/FileStreamProxy.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/titanium/src/java/ti/modules/titanium/stream/StreamModule.java b/android/titanium/src/java/ti/modules/titanium/stream/StreamModule.java index 36fa784c318..34930656894 100644 --- a/android/titanium/src/java/ti/modules/titanium/stream/StreamModule.java +++ b/android/titanium/src/java/ti/modules/titanium/stream/StreamModule.java @@ -1,5 +1,5 @@ /** - * TiDev Titanium Mobile + * 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. diff --git a/android/untar.gradle b/android/untar.gradle index d6a9b0531b0..145bb23b4eb 100644 --- a/android/untar.gradle +++ b/android/untar.gradle @@ -1,36 +1,36 @@ -/** - * TiDev Titanium Mobile - * Copyright TiDev, Inc. 04/07/2022-Present - * Licensed under the terms of the Apache Public License. - * Please see the LICENSE included with this distribution for details. - */ - -// Extracts a "*.tar" file using the same parameters as the ant task. -// Used by our prebuild step to extract our "libv8-*.tar.bz2" file. -task untar() { - // Throw an error if required gradle property has not been set. - if (!project.hasProperty('src')) { - throw new InvalidUserDataException('You must set a "src" property.') - } - - // Assign a default value to any unassigned properties. - if (!project.hasProperty('compression')) { - project.ext.compression = 'none' - } - if (!project.hasProperty('overwrite')) { - project.ext.overwrite = 'true' - } - if (!project.hasProperty('dest')) { - def sourceFile = new File(src) - project.ext.dest = sourceFile.getParentFile().getPath() - } - - // Use "ant" to extract the given tarball. - ant.untar( - compression: project.properties.compression, - overwrite: project.properties.overwrite, - src: project.properties.src, - dest: project.properties.dest) -} - -defaultTasks 'untar' +/** + * Titanium SDK + * Copyright TiDev, Inc. 04/07/2022-Present + * Licensed under the terms of the Apache Public License. + * Please see the LICENSE included with this distribution for details. + */ + +// Extracts a "*.tar" file using the same parameters as the ant task. +// Used by our prebuild step to extract our "libv8-*.tar.bz2" file. +tasks.register('untar') { + // Throw an error if required gradle property has not been set. + if (!project.hasProperty('src')) { + throw new InvalidUserDataException('You must set a "src" property.') + } + + // Assign a default value to any unassigned properties. + if (!project.hasProperty('compression')) { + project.ext.compression = 'none' + } + if (!project.hasProperty('overwrite')) { + project.ext.overwrite = 'true' + } + if (!project.hasProperty('dest')) { + def sourceFile = new File(src) + project.ext.dest = sourceFile.getParentFile().getPath() + } + + // Use "ant" to extract the given tarball. + ant.untar( + compression: project.properties.compression, + overwrite: project.properties.overwrite, + src: project.properties.src, + dest: project.properties.dest) +} + +defaultTasks 'untar' \ No newline at end of file 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/Android/Menu.yml b/apidoc/Titanium/Android/Menu.yml index 25c672c2fe3..a59bdf70259 100644 --- a/apidoc/Titanium/Android/Menu.yml +++ b/apidoc/Titanium/Android/Menu.yml @@ -30,7 +30,7 @@ description: | Menus must be added to tab groups using the tab group's activity. These changes were required to support the Android 3.0 action bar. - The TabGroup activity is available using [TabGroup.getActivity](Titanium.UI.TabGroup.getActivity). + The TabGroup activity is available using [TabGroup.activity](Titanium.UI.TabGroup.activity). However, unlike a window's activity it is not currently possible to set properties on the tab group's activity before the tab group is opened. To add a menu to a tab group, set the `onCreateOptionsMenu` property to the tab group's `open` event listener, and diff --git a/apidoc/Titanium/App/App.yml b/apidoc/Titanium/App/App.yml index 94fc3cc3756..1cb0f8c7827 100644 --- a/apidoc/Titanium/App/App.yml +++ b/apidoc/Titanium/App/App.yml @@ -543,7 +543,7 @@ properties: - name: idleTimerDisabled summary: Determines whether the screen is locked when the device is idle. - description: Set to `true` to disable the timer. + description: Set to `true` to disable the timer. For Android look at [Titanium.UI.View.keepScreenOn](Titanium.UI.View.keepScreenOn). type: Boolean platforms: [iphone, ipad, macos] diff --git a/apidoc/Titanium/App/Properties/Properties.yml b/apidoc/Titanium/App/Properties/Properties.yml index 8cfaa63d118..b4f8da99569 100644 --- a/apidoc/Titanium/App/Properties/Properties.yml +++ b/apidoc/Titanium/App/Properties/Properties.yml @@ -21,22 +21,20 @@ description: | Then, you can retrieve the property during runtime with the following API call: ``` js - var foo = Ti.App.Properties.getString('foo'); + const foo = Ti.App.Properties.getString('foo'); ``` - As of Release 3.2.0, any application properties defined in the `tiapp.xml` file are stored in the + Any application properties defined in the `tiapp.xml` file are stored in the device's secure storage, making them read-only. Additionally, external access to these properties is now restricted. Other iOS applications cannot access these properties and - native Android modules must use the Titanium module API - [TiApplication.getAppProperties](https://docs.appcelerator.com/module-apidoc/latest/android/org/appcelerator/platform/TiApplication.html#getAppProperties()) + native Android modules must use the Titanium module API TiApplication.getAppProperties() method to access these properties. If you need to change the values during runtime, initially create the property with these APIs rather than defining them in the `tiapp.xml` file. - Prior to Release 3.2.0, application properties defined in the `tiapp.xml` file could be - overwritten by these APIs and accessed externally by other applications and modules. - + **Important**: Using this API in the Apple ecosystem requires the `NSPrivacyAccessedAPICategoryUserDefaults` + property set in the privacy manifest that was introduced in iOS 17. You can learn more about it [here](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api). extends: Titanium.Module since: "0.5" diff --git a/apidoc/Titanium/App/iOS/UserDefaults.yml b/apidoc/Titanium/App/iOS/UserDefaults.yml index 7b67ff2fd22..b3c9e57c123 100644 --- a/apidoc/Titanium/App/iOS/UserDefaults.yml +++ b/apidoc/Titanium/App/iOS/UserDefaults.yml @@ -4,6 +4,9 @@ summary: | The UserDefaults module is used for storing application-related data in property/value pairs that persist beyond application sessions and device power cycles. UserDefaults allows the suiteName of the UserDefaults to be specified at creation time. + + **Important**: Using this API requires the `NSPrivacyAccessedAPICategoryUserDefaults` property set in the + privacy manifest that was introduced in iOS 17. You can learn more about it [here](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api). description: | Unlike Titanium.App.Properties, Titanium.App.iOS.UserDefaults does not pull properties defined in the `tiapp.xml` file. diff --git a/apidoc/Titanium/App/iOS/UserNotificationCenter.yml b/apidoc/Titanium/App/iOS/UserNotificationCenter.yml index 75d8708585b..f9b32f8d54a 100644 --- a/apidoc/Titanium/App/iOS/UserNotificationCenter.yml +++ b/apidoc/Titanium/App/iOS/UserNotificationCenter.yml @@ -133,7 +133,7 @@ properties: - name: userInfo summary: Custom data object. - type: Dictionary + type: UserInfoDictionary - name: category summary: Category identifier of the notification. @@ -160,6 +160,19 @@ properties: - identifier: The identifier of the region. type: Dictionary +--- +name: UserInfoDictionary +summary: | + Dictionary object of parameters. +platforms: [iphone, ipad, macos] + +properties: + - name: showInForground + summary: Show notification if app is in foreground + description: | + Boolean if a notification banner is shown if the app is in foreground. + type: Number + --- name: GetUserNotificationSettings summary: | diff --git a/apidoc/Titanium/Blob.yml b/apidoc/Titanium/Blob.yml index 1a11dc10039..9e3fbd8c6c3 100644 --- a/apidoc/Titanium/Blob.yml +++ b/apidoc/Titanium/Blob.yml @@ -142,6 +142,13 @@ properties: since: {android: "7.2.0", iphone: "0.9.0", ipad: "0.9.0", macos: "9.2.0"} permission: read-only + - name: rotation + type: Number + summary: EXIF rotation of the image if available. Can be `undefined` if no orientation was found. + platforms: [android] + since: {android: "12.3.0"} + permission: read-only + methods: - name: toString returns: diff --git a/apidoc/Titanium/CHANGELOG/1.3.mdoc b/apidoc/Titanium/CHANGELOG/1.3.mdoc index eb78bacff87..436a7722a42 100644 --- a/apidoc/Titanium/CHANGELOG/1.3.mdoc +++ b/apidoc/Titanium/CHANGELOG/1.3.mdoc @@ -6,8 +6,6 @@ Please see the updated [Titanium Mobile Reference Documentation for 1.3](/apidoc ### Bug Fixes / Fixes -You can also [view the details](https://appcelerator.lighthouseapp.com/projects/32238/milestones/68346-release-130) for the 1.3 milestone. - #### Android - [#618] HTML WebView with Unicode Fails @@ -191,4 +189,3 @@ As of the 1.3 release, this means you can directly build from within XCode (once When building from XCode, make sure you set the proper configuration and target when doing a final build for release since Titanium does this for you when you run from inside Titanium Developer. When building for release, make sure you set the appropriate SDK version, iPhone Device target and the `Release` configuration. If you're using a third-party Titanium module, you should not have to do anything different in 1.3 than you did before. Once you set the `` configuration in your `tiapp.xml` file, Titanium will appropriately reconfigure your XCode project with the appropriate library and library path - whether you initiate your build from inside XCode or Titanium Developer. - diff --git a/apidoc/Titanium/CHANGELOG/1.4.mdoc b/apidoc/Titanium/CHANGELOG/1.4.mdoc index 3c2a661b162..906f4284cb5 100644 --- a/apidoc/Titanium/CHANGELOG/1.4.mdoc +++ b/apidoc/Titanium/CHANGELOG/1.4.mdoc @@ -4,7 +4,7 @@ Titanium Mobile 1.4.0 - 7/26/2010 This release includes general bug fixes and enhancements for Android and iPhone. Please see the updated [Titanium Mobile Reference Documentation for 1.4](/apidoc/mobile/1.4). -We have [fixed](https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets?q=milestone%3A%22Release+1.4.0%22+state%3Aclosed) 200+ reported (and unreported) issues since 1.3. Thanks for everyone's reported issues and patience as we have worked a little longer on this release than we had original anticipated. +We have fixed reported (and unreported) issues since 1.3. Thanks for everyone's reported issues and patience as we have worked a little longer on this release than we had original anticipated. We encountered many differences between the latest version of iOS 4 and the previous version we supported (3.1.3) and many differences between the various devices than we have never experienced before with iPhone OS. @@ -83,4 +83,3 @@ Please note that we do not offer any support for running from master (unless dir version of Titanium from a stable release. We appreciate everyone's desire to help us test and run through issues as they're being developed! However, please remember that master means unstable until officially released. Please use with caution! - diff --git a/apidoc/Titanium/CHANGELOG/1.5.0.mdoc b/apidoc/Titanium/CHANGELOG/1.5.0.mdoc index 0f00b222506..a8bc06a6305 100644 --- a/apidoc/Titanium/CHANGELOG/1.5.0.mdoc +++ b/apidoc/Titanium/CHANGELOG/1.5.0.mdoc @@ -4,7 +4,7 @@ Titanium Mobile 1.5.0 - 12/10/2010 This release includes general bug fixes and enhancements for Android and iPhone. Please see the updated [Titanium Mobile Reference Documentation for 1.5.0](/apidoc/mobile/1.5.0) *These will be updated by Monday* -We have [addressed](https://appcelerator.lighthouseapp.com/tickets?q=milestone:%22Release+1.5.0%22+tagged:android+state:resolved&filter=) almost 300 issues since 1.4.0. Thanks for everyone's reported issues and patience as we have worked a little longer on this release than we had original anticipated. +We have addressed almost 300 issues since 1.4.0. Thanks for everyone's reported issues and patience as we have worked a little longer on this release than we had original anticipated. Android Breaking Change --------------------------- @@ -14,7 +14,7 @@ There is one breaking change. The `Ti.UI.Android.createOptionMenu` and `Ti.UI.An Android Changes --------------- -This is a big release for our Android platform. We added over 60 [features](https://appcelerator.lighthouseapp.com/tickets?q=milestone:%22Release+1.5.0%22+tagged:android+tagged:feature+state:resolved&filter=) and addressed over 200 [other issues](https://appcelerator.lighthouseapp.com/tickets?q=milestone:%22Release+1.5.0%22+tagged:android+tagged:defect+state:resolved&filter=). +This is a big release for our Android platform. We added over 60 features and addressed over 200 other issues. - Android Activity exposed into each Javascript context as `Ti.Android.currentActivity` - Core Android Objects: Activity, Intent, PendingIntent, Service, Menu, and MenuItem diff --git a/apidoc/Titanium/CHANGELOG/1.6.0.mdoc b/apidoc/Titanium/CHANGELOG/1.6.0.mdoc index bee698c8915..a9601f47494 100644 --- a/apidoc/Titanium/CHANGELOG/1.6.0.mdoc +++ b/apidoc/Titanium/CHANGELOG/1.6.0.mdoc @@ -4,7 +4,7 @@ Titanium Mobile 1.6.0 - 02/23/2011 This release includes general bug fixes and enhancements for Android and iPhone. Please see the updated [Titanium Mobile Reference Documentation for 1.6.0](/apidoc/mobile/1.6.0) -We [addressed](https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets?q=milestone%3A%22Release+1.6.0%22+state%3Aresolved&filter=) close to 300 issues since 1.5.0. A little over 150 for [android](https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets?q=milestone%3A%22Release+1.6.0%22+state%3Aresolved+tagged%3Aandroid&filter=), and about 120 for [iOS](https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets?q=milestone%3A%22Release+1.6.0%22+state%3Aresolved+tagged%3Aios&filter=), and several apidoc issues. +We addressed close to 300 issues since 1.5.0. A little over 150 for android, and several apidoc issues. Android Changes --------------- @@ -48,4 +48,3 @@ Platform Developer Changes -------------------------- - Beta Android NDK support in the tooling. - Module declarations in `tiapp.xml` now accept a `platform` attribute - diff --git a/apidoc/Titanium/CHANGELOG/1.6.1.mdoc b/apidoc/Titanium/CHANGELOG/1.6.1.mdoc index 6c25df26a14..c1656ca7b59 100644 --- a/apidoc/Titanium/CHANGELOG/1.6.1.mdoc +++ b/apidoc/Titanium/CHANGELOG/1.6.1.mdoc @@ -4,23 +4,23 @@ Titanium Mobile 1.6.1 - 03/15/2011 This release includes general bug fixes for Android and iPhone. Please see the updated [Titanium Mobile Reference Documentation for 1.6.1](/apidoc/mobile/1.6.1) -[Full list of Issues that were addressed in 1.6.1](https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets?q=tagged%3Arelease-1.6.1+state%3Aresolved&filter=) +Full list of Issues that were addressed in 1.6. Android Changes --------------- -We addressed a few [issues](https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets?q=tagged%3Aandroid+tagged%3Arelease-1.6.1+state%3Aresolved&filter=), including: +We addressed a few[issues -- Added support for flags on Intents. [Ticket 3248](https://appcelerator.lighthouseapp.com/projects/32238/tickets/3248-android-support-intent-flags) -- Use UTF8 encoding when compiling JS to bytecode [Ticket 3080](https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/3080-android-deploy-corrupts-utf-8-characters) -- Handle some edge cases for absolute app:// URL handling in compiled JS [Ticket 3312](https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/3312-android-correctly-handle-app-urls-in-compiled-js) -- Support custom backgroundColor for TabGroup, allow default activity overriding in tiapp.xml [Ticket 3290](https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/3290-android-tabgroup-never-translucent-even-if-translucent-theme-applied-to-titabactivity) -- Only create 1 ActivityProxy for lightweight windows, fixing activity lifecycle event listeners bring broken in some cases [Ticket 3220](https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/3220-android-new-activityproxy-being-created-for-light-weight-windows) +- Added support for flags on Intents. Ticket 3248 +- Use UTF8 encoding when compiling JS to bytecode Ticket 3080 +- Handle some edge cases for absolute app:// URL handling in compiled JS Ticket 3312 +- Support custom backgroundColor for TabGroup, allow default activity overriding in tiapp.xml Ticket 3290 +- Only create 1 ActivityProxy for lightweight windows, fixing activity lifecycle event listeners bring broken in some cases Ticket 3220 iOS Changes ----------- -We addressed a few [issues](https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets?q=tagged%3Aios+tagged%3Arelease-1.6.1+state%3Aresolved&filter=), including: +We addressed a few issues, including: -- XCode4 support. [Ticket 3220](https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/3320-ios-xcode-4-unable-to-use-push-cert-with-ks) [Ticket 3250](https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/3250-timobile-160170-xcode-4-code-sign-errors-when-installing-to-device) [Ticket 3330](https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/3330-ios-xcode-4-packaged-apps-fail-to-launch-in-organizer) +- XCode4 support. Ticket 3220 Ticket 3250 Ticket 3330 - Fixes to allow support for Ti+ Barcode module. -- Fixes for Facebook authorization on 3.1.x and Safari-disabled devices. [Ticket 3211](https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/3211-ios-facebook-module-loggedin-never-true-when-safari-restricted) +- Fixes for Facebook authorization on 3.1.x and Safari-disabled devices. Ticket 3211 diff --git a/apidoc/Titanium/CHANGELOG/1.6.2.mdoc b/apidoc/Titanium/CHANGELOG/1.6.2.mdoc index dd4e80ac54c..6e532a71b61 100644 --- a/apidoc/Titanium/CHANGELOG/1.6.2.mdoc +++ b/apidoc/Titanium/CHANGELOG/1.6.2.mdoc @@ -4,11 +4,11 @@ Titanium Mobile 1.6.2 - 04/18/2011 This release includes general bug fixes for Android and iPhone. Please see the updated [Titanium Mobile Reference Documentation for 1.6.2](/apidoc/mobile/1.6.2) -[Full list of Issues that were addressed in 1.6.2](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=10133) +Full list of Issues that were addressed in 1.6.2 iOS Changes ----------- -We addressed a few [issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=10132), including: +We addressed a few issues, including: - iOS: Push Notifications causing rejections. [TIMOB-3595](https://jira-archive.titaniumsdk.com/TIMOB-3595) Apple changed their screening process for App Store submissions for iOS. If a binary contains the call for registering for push notifications, it must include an entitlement resource. The 1.6.2 SDK for iOS checks to see if the API is used and if it's not, strips out the push notification registration call so it can pass review. - iOS: Remote Streaming 2 - no spinner is invoked on load [TIMOB-2743](https://jira-archive.titaniumsdk.com/TIMOB-2743) The spinner should be properly invoked when loading for remote streaming. @@ -16,7 +16,7 @@ We addressed a few [issues](http://jira.appcelerator.org/secure/IssueNavigator.j Android Changes --------------- -We addressed a few [issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=10131), including: +We addressed a few issues, including: - Added support for Custom Fonts [TIMOB-3418](https://jira-archive.titaniumsdk.com/TIMOB-3418) - Custom Attributes on Pickers [TIMOB-3225](https://jira-archive.titaniumsdk.com/TIMOB-3225) diff --git a/apidoc/Titanium/CHANGELOG/1.7.0.mdoc b/apidoc/Titanium/CHANGELOG/1.7.0.mdoc index 5b8286d62f5..0a42425f63f 100644 --- a/apidoc/Titanium/CHANGELOG/1.7.0.mdoc +++ b/apidoc/Titanium/CHANGELOG/1.7.0.mdoc @@ -4,7 +4,7 @@ Titanium Mobile 1.7.0 - 06/06/2011 This release candidate includes general bug fixes for Android and iPhone. Please see the updated [Titanium Mobile Reference Documentation for 1.7.0](/apidoc/mobile/1.7.0) -[Full list of Issues that were addressed in 1.7.0](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=10188) +Full list of Issues that were addressed in 1.7.0 New Features on iOS and Android ------------------------------- @@ -18,7 +18,7 @@ New Features on iOS and Android Android Changes --------------- -We addressed a few [issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=10189), including: +We addressed a few issues, including: - Fastdev - [TIMOB-3599 - Android: Remote Images not showing up](https://jira-archive.titaniumsdk.com/TIMOB-3599) @@ -44,7 +44,7 @@ We addressed a few [issues](http://jira.appcelerator.org/secure/IssueNavigator.j iOS Changes ----------- -We addressed a few [issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=10190), including: +We addressed a few issues, including: - [TIMOB-3210 - iPad: Popover PassThroughViews property exposure](https://jira-archive.titaniumsdk.com/TIMOB-3210) - [TIMOB-3169 - iOS: Implement forceDialogAuth property in Facebook module](https://jira-archive.titaniumsdk.com/TIMOB-3169) diff --git a/apidoc/Titanium/CHANGELOG/1.7.1.mdoc b/apidoc/Titanium/CHANGELOG/1.7.1.mdoc index bbea3e163d2..11cbce686d4 100644 --- a/apidoc/Titanium/CHANGELOG/1.7.1.mdoc +++ b/apidoc/Titanium/CHANGELOG/1.7.1.mdoc @@ -7,5 +7,5 @@ Android did not change. Please see the updated [Titanium Mobile Reference Documentation for 1.7.1](/apidoc/mobile/1.7.1) -[Full list of Issues that were addressed in 1.7.1](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=10545) +Full list of Issues that were addressed in 1.7.1 diff --git a/apidoc/Titanium/CHANGELOG/1.7.2.mdoc b/apidoc/Titanium/CHANGELOG/1.7.2.mdoc index ccdfa6d598e..c2bfd9a5b79 100644 --- a/apidoc/Titanium/CHANGELOG/1.7.2.mdoc +++ b/apidoc/Titanium/CHANGELOG/1.7.2.mdoc @@ -4,14 +4,14 @@ Titanium Mobile 1.7.2 - 07/20/2011 This release candidate includes general bug fixes for Android and iPhone. Please see the updated [Titanium Mobile Reference Documentation for 1.7.2](/apidoc/mobile/1.7.2) -[Full list of Issues that were addressed in 1.7.2](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=10946) +Full list of Issues that were addressed in 1.7.2 Android Changes --------------- With release 1.7.2 we support deploying applications to Honeycomb tablet devices (API 11+). Support for tablet specific controls will come in a later release. -We addressed several [issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=10945), including: +We addressed several issues, including: - [TIMOB-4612 - Android: Reading and writing large files cause ANR / Exceptions in Fastdev](https://jira-archive.titaniumsdk.com/TIMOB-4612) - [TIMOB-4527 - Android: Can't build project that has "xlarge" art in it.](https://jira-archive.titaniumsdk.com/TIMOB-4527) @@ -29,7 +29,7 @@ We addressed several [issues](http://jira.appcelerator.org/secure/IssueNavigator iOS Changes ----------- -We addressed several [issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=10947), including: +We addressed several issues, including: - [TIMOB-4611 - Debugger: Evaluation does not handle objects properly](https://jira-archive.titaniumsdk.com/TIMOB-4611) - [TIMOB-4610 - iOS: app crashes when processing xml](https://jira-archive.titaniumsdk.com/TIMOB-4610) diff --git a/apidoc/Titanium/CHANGELOG/1.7.3.mdoc b/apidoc/Titanium/CHANGELOG/1.7.3.mdoc index e443a8be0d5..a2ad32c1554 100644 --- a/apidoc/Titanium/CHANGELOG/1.7.3.mdoc +++ b/apidoc/Titanium/CHANGELOG/1.7.3.mdoc @@ -4,12 +4,12 @@ Titanium Mobile 1.7.3 - 10/17/2011 This release candidate includes general bug fixes for Android and iPhone. Please see the updated [Titanium Mobile Reference Documentation for 1.7.3](/apidoc/mobile/1.7.3) -[Full list of Issues that were addressed in 1.7.3](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=11530) +Full list of Issues that were addressed in 1.7.3 Android Changes --------------- -We addressed several [issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=11931), including: +We addressed several issues, including: - [TIMOB-5123 - CommonJS Modules not included/functional in distribution build](https://jira-archive.titaniumsdk.com/TIMOB-5123) - [TIMOB-4936 - require() raises an exception for JS module in 1.7.2](https://jira-archive.titaniumsdk.com/TIMOB-4936) @@ -21,7 +21,7 @@ iOS Changes The changes for iOS focused on addressing items identified as problems with iOS 5. -We addressed several [issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=11932), including: +We addressed several issues, including: - [TIMOB-5313 - iOS5: Popover is not being displayed correctly and buttons are overlayed and message blogs are getting covered](https://jira-archive.titaniumsdk.com/TIMOB-5313) - [TIMOB-5285 - Showing and Hiding Popover Causing App Crash](https://jira-archive.titaniumsdk.com/TIMOB-5285) diff --git a/apidoc/Titanium/CHANGELOG/1.7.4.mdoc b/apidoc/Titanium/CHANGELOG/1.7.4.mdoc index 09218206a85..2322ad0d15f 100644 --- a/apidoc/Titanium/CHANGELOG/1.7.4.mdoc +++ b/apidoc/Titanium/CHANGELOG/1.7.4.mdoc @@ -4,12 +4,12 @@ Titanium Mobile 1.7.4 - 10/31/2011 This release candidate includes general bug fixes for Android and iPhone. Please see the updated [Titanium Mobile Reference Documentation for 1.7.4](/apidoc/mobile/1.7.4) -[Full list of Issues that were addressed in 1.7.4](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=11934) +Full list of Issues that were addressed in 1.7.4 Android Changes --------------- -We addressed several [issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12041), including: +We addressed several issues, including: - [TIMOB-5819 - Android: Percentage-based views need to be re-drawn on device rotation](https://jira-archive.titaniumsdk.com/TIMOB-5819) - [TIMOB-5123 - CommonJS Modules not included/functional in distribution build](https://jira-archive.titaniumsdk.com/TIMOB-5123) @@ -22,7 +22,7 @@ iOS Changes ----------- Note on TIMOB-5805 below that `Titanium.Platform.id` was reverted to returning the UDID. Release 1.7.3 should not have returned the new ID since UDID was still available. -We addressed several [issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12042), including: +We addressed several issues, including: - [TIMOB-1419 - Update Titanium.Facebook to use Facebook's New OAuth 2.0 Authentication](https://jira-archive.titaniumsdk.com/TIMOB-1419) - [TIMOB-5804 - iOS: Cannot launch app on device](https://jira-archive.titaniumsdk.com/TIMOB-5804) diff --git a/apidoc/Titanium/CHANGELOG/1.7.5.mdoc b/apidoc/Titanium/CHANGELOG/1.7.5.mdoc index 82caa431e1c..49bb58aba5d 100644 --- a/apidoc/Titanium/CHANGELOG/1.7.5.mdoc +++ b/apidoc/Titanium/CHANGELOG/1.7.5.mdoc @@ -11,7 +11,7 @@ No changes iOS Changes ----------- -We addressed two [issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12047), including: +We addressed two issues, including: - [TIMOB-5494 - iOS: userDefaults not remembering the properties that were set](https://jira-archive.titaniumsdk.com/TIMOB-5494) - [TIMOB-5229 - iOS: Cannot compile any projects to simulator when running Xcode 4.2 with iOS SDK 4.3](https://jira-archive.titaniumsdk.com/TIMOB-5229) diff --git a/apidoc/Titanium/CHANGELOG/1.8.0.1.mdoc b/apidoc/Titanium/CHANGELOG/1.8.0.1.mdoc index a710d9f4051..0dfb19c20df 100644 --- a/apidoc/Titanium/CHANGELOG/1.8.0.1.mdoc +++ b/apidoc/Titanium/CHANGELOG/1.8.0.1.mdoc @@ -15,16 +15,16 @@ Please note, the shipping version of the platform is versioned as *1.8.0.1*. All Please see the updated [Titanium Mobile Reference Documentation for 1.8.0](/apidoc/mobile/1.8.0.1). -[Full list of Issues that were addressed in 1.8.0](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12036) +Full list of Issues that were addressed in 1.8.0 Significant Changes In Titanium Mobile -------------------------------------- -- [Several changes for platform parity.](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12128) -- V8 is the default runtime for Android devices providing a higher level of performance than the Rhino engine. If you would rather use Rhino, see the [tiapp.xml guide](http://wiki.appcelerator.org/display/guides/tiapp.xml+and+timodule.xml+Reference) and look for `ti.android.runtime`. Set it to `rhino` in your `tiapp.xml` file. Or in Titanium Studio, edit `tiapp.xml` and select a runtime from the Android Runtime list (on the Overview tab of the TiApp editor). +- Several changes for platform parity. +- V8 is the default runtime for Android devices providing a higher level of performance than the Rhino engine. If you would rather use Rhino, see the tiapp.xml guide and look for `ti.android.runtime`. Set it to `rhino` in your `tiapp.xml` file. Or in Titanium Studio, edit `tiapp.xml` and select a runtime from the Android Runtime list (on the Overview tab of the TiApp editor). - We no longer support Android 2.1 (API 7). - We no longer support iOS versions less than 4.0. -- The new Android runtime support required updating modules support. Modules will have to be ported to `apiversion` 2. [Android Modules Porting Guide](http://wiki.appcelerator.org/display/guides/Android+Module+Porting+Guide+for+1.8.0.1) +- The new Android runtime support required updating modules support. Modules will have to be ported to `apiversion` 2. Android Modules Porting Guide - Replace deprecated API `globalPoint` with a member function on View called `convertPointToView`. [Android-TIMOB-5122](https://jira-archive.titaniumsdk.com/TIMOB-5122), [iOS-TIMOB-5121](https://jira-archive.titaniumsdk.com/TIMOB-5121) - `Titanium.Platform.id` is deprecated in this release. A future release will provide alternative API(s). [TIMOB-5980](https://jira-archive.titaniumsdk.com/TIMOB-5980) - `Titanium.UI.create3DMatrix` is deprecated, use `Titanium.UI.iOS.create3DMatrix` instead. [TIMOB-4990](https://jira-archive.titaniumsdk.com/TIMOB-4990) @@ -49,12 +49,12 @@ The following is a regression in 1.8.0.1: Introducing MobileWeb (Beta) ----------------------------- -This version of Titanium Mobile now ships with a beta version of our MobileWeb platform. The MobileWeb platform allows you to use the Titanium tooling and APIs you are familiar with to target devices that support HTML5. [JIRA list of MobileWeb issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12123) +This version of Titanium Mobile now ships with a beta version of our MobileWeb platform. The MobileWeb platform allows you to use the Titanium tooling and APIs you are familiar with to target devices that support HTML5. JIRA list of MobileWeb issues APIDoc Changes -------------- -Another exciting addition to our product is an improved documentation system for our APIDocs. We published our [TDoc Specification](http://wiki.appcelerator.org/display/guides/TDoc+Specification) for our APIDoc and have been reworking the docs to comply with the spec. While the real magic is hidden in the source, we're able to actually use the documentation as the specification for the Titanium Mobile API. Our documentation now gets used as an HTML reference, in content assist, provides coverage data for platform parity analysis, and may be generated in other formats as required. Another gain is that we can annotate APIs to the method and property level with supported platforms, versions supported, deprecations, exclusions, and more. We have also worked on content changes and clarifications for many APIs. +Another exciting addition to our product is an improved documentation system for our APIDocs. We published our TDoc Specification for our APIDoc and have been reworking the docs to comply with the spec. While the real magic is hidden in the source, we're able to actually use the documentation as the specification for the Titanium Mobile API. Our documentation now gets used as an HTML reference, in content assist, provides coverage data for platform parity analysis, and may be generated in other formats as required. Another gain is that we can annotate APIs to the method and property level with supported platforms, versions supported, deprecations, exclusions, and more. We have also worked on content changes and clarifications for many APIs. The new APIDoc format uses some new conventions and annotations which may be unfamiliar. These include new conventions for describing types, and new annotations for describing how properties can be accessed. @@ -75,11 +75,11 @@ Properties can be annotated with *permission* and *availability* annotations. Ne Note that the new APIDocs include detail pages for events and properties, in addition to methods. The detail pages may contain additional information, such as longer descriptions, code samples, or default values. -[JIRA List of APIDoc changes](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12039) +JIRA List of APIDoc changes Android Changes --------------- -We addressed a significant number of [issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12037), including: +We addressed a significant number of issues, including: *Features:* @@ -92,7 +92,7 @@ We addressed a significant number of [issues](http://jira.appcelerator.org/secur - Expose Window Pixel Format on Heavyweight Windows [TIMOB-4104](https://jira-archive.titaniumsdk.com/TIMOB-4104) - Enable plugins for WebViews [TIMOB-1607](https://jira-archive.titaniumsdk.com/TIMOB-1607) - Expose Keep Screen On for Views [TIMOB-2102](https://jira-archive.titaniumsdk.com/TIMOB-2102) -- [JIRA List of all Android Features](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12124) +- JIRA List of all Android Features *Bug Fixes:* @@ -107,13 +107,13 @@ We addressed a significant number of [issues](http://jira.appcelerator.org/secur - Webview crashes on reopen [TIMOB-4357](https://jira-archive.titaniumsdk.com/TIMOB-4357) - Support for SDK Tools r14/r15 style add-on folders [TIMOB-6135](https://jira-archive.titaniumsdk.com/TIMOB-6135) - Android emulator fails to launch on Windows if there is a space in the SDCard path. [TIMOB-5393](https://jira-archive.titaniumsdk.com/TIMOB-5393) -- [JIRA List of over 200 Android bug fixes](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12127) +- JIRA List of over 200 Android bug fixes iOS Changes ----------- -We addressed a significant number of [issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12038), including: +We addressed a significant number of issues, including: *Features:* @@ -125,7 +125,7 @@ We addressed a significant number of [issues](http://jira.appcelerator.org/secur - Iteration on proxy keys and values [TIMOB-3299](https://jira-archive.titaniumsdk.com/TIMOB-3299) - TLS Versioning for HttpClient [TIMOB-6311](https://jira-archive.titaniumsdk.com/TIMOB-6311) - XML DOM Level 2 [TIMOB-4867](https://jira-archive.titaniumsdk.com/TIMOB-4867) [TIMOB-4868](https://jira-archive.titaniumsdk.com/TIMOB-4868) [TIMOB-5024](https://jira-archive.titaniumsdk.com/TIMOB-5024) [TIMOB-5029](https://jira-archive.titaniumsdk.com/TIMOB-5029) -- [JIRA List of all iOS Features](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12125) +- JIRA List of all iOS Features *Bug Fixes:* @@ -147,4 +147,4 @@ We addressed a significant number of [issues](http://jira.appcelerator.org/secur - CommonJS: Module variables not updated. [TIMOB-6688](https://jira-archive.titaniumsdk.com/TIMOB-6688) - Packaging: Failing to include all optional icons during packaging causes errors in Xcode pre-submission verification. [TIMOB-6575](https://jira-archive.titaniumsdk.com/TIMOB-6575) - Some modules designed for CommonJS not exporting, even with the "export" variable set. [TIMOB-6573](https://jira-archive.titaniumsdk.com/TIMOB-6573) -- [JIRA list of over 200 iOS bug fixes](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12126) +- JIRA list of over 200 iOS bug fixes diff --git a/apidoc/Titanium/CHANGELOG/1.8.1.mdoc b/apidoc/Titanium/CHANGELOG/1.8.1.mdoc index 8148d74edac..37f6edf027a 100644 --- a/apidoc/Titanium/CHANGELOG/1.8.1.mdoc +++ b/apidoc/Titanium/CHANGELOG/1.8.1.mdoc @@ -7,16 +7,14 @@ improvements. Please see the updated [Titanium Mobile Reference Documentation for 1.8.1](/apidoc/mobile/1.8.1). -[Full list of Issues that were addressed in 1.8.1](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12454) +Full list of Issues that were addressed in 1.8.1 Significant Changes In Titanium Mobile -------------------------------------- - As of Release 1.8.0.1, Xcode 3.2.6 is no longer supported. This was documented in - the [Titanium Compatibility - Matrix](https://wiki.appcelerator.org/display/guides/Titanium+Compatibility+Matrix), - but mistakenly omitted from the release notes. + the Titanium Compatibility Matrix, but mistakenly omitted from the release notes. Known Issues @@ -53,7 +51,7 @@ The following sections list notable new features and bug fixes in Android. - MapView not updating regions. [TIMOB-2104](https://jira-archive.titaniumsdk.com/TIMOB-2104)` -For a complete list of Android fixes in this release, see: [Fixed Android Issues in JIRA](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12455). +For a complete list of Android fixes in this release, see: Fixed Android Issues in JIRA. iOS Changes @@ -113,7 +111,7 @@ The following sections list notable new features and bug fixes in iOS. - The `getResponseHeader` method incorrectly used a case-sensitive match on response header names. [TIMOB-6832](https://jira-archive.titaniumsdk.com/TIMOB-6832) -For a complete list of iOS fixes in this release, see: [Fixed iOS Issues in JIRA](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12456). +For a complete list of iOS fixes in this release, see: Fixed iOS Issues in JIRA. Mobile Web Changes ------------------ @@ -135,7 +133,7 @@ following UI objects are at or near parity with the other platforms: - WebView - Window -For a complete list of Mobile Web fixes in this release, see: [Fixed Mobile Web Issues in JIRA](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12457). +For a complete list of Mobile Web fixes in this release, see: Fixed Mobile Web Issues in JIRA. @@ -152,9 +150,9 @@ This release includes a number of documentation fixes and enhancements, includin objects. - A new guide section, - [Debugging and Profiling](https://wiki.appcelerator.org/display/guides/Debugging+and+Profiling). + Debugging and Profiling. -[Fixed Documentation Issues in JIRA](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=12458) +Fixed Documentation Issues in JIRA diff --git a/apidoc/Titanium/CHANGELOG/2.0.1.GA.mdoc b/apidoc/Titanium/CHANGELOG/2.0.1.GA.mdoc index c5caa120847..7e59da2f4fc 100644 --- a/apidoc/Titanium/CHANGELOG/2.0.1.GA.mdoc +++ b/apidoc/Titanium/CHANGELOG/2.0.1.GA.mdoc @@ -42,12 +42,12 @@ includes all fixes included in Releases 1.8.1 and 1.8.2. For a list of issues addressed in these releases, see the release notes for the previous releases: -* [Release Notes for Release 1.8.1](https://docs.appcelerator.com/titanium/release-notes/?version=1.8.1) -* [Release Notes for Release 1.8.2](https://docs.appcelerator.com/titanium/release-notes/?version=1.8.2) +* [Release Notes for Release 1.8.1](https://titaniumsdk.com/api/) +* [Release Notes for Release 1.8.2](https://titaniumsdk.com/api/) Note that Release 1.8.1 included fixes related to developing modules. If you are developing iOS or Android modules, see the 1.8.1 Release Notes for more information. -Further information is available in the [Titanium Mobile SDK and Titanium Studio Documentation](https://docs.appcelerator.com/titanium/2.0/). +Further information is available in the [Titanium Mobile SDK and Titanium Studio Documentation](https://titaniumsdk.com/api/). @@ -68,7 +68,7 @@ Further information is available in the [Titanium Mobile SDK and Titanium Studio ### Layout System Updates This release implements the [Composite Layout -Specification](https://docs.appcelerator.com/titanium/latest/#!/guide/UI_Composite_Layout_Behavior_Spec), +Specification](https://titaniumsdk.com/api/), a major update to the UI layout system. The composite layout specification involves several changes to the way the UI system lays out controls, so that all platforms can follow a common layout model. @@ -105,15 +105,12 @@ module: To use ACS services, you must enable ACS for your project. See [Appcelerator Cloud -Services](https://docs.appcelerator.com/titanium/2.0/#!/guide/Appcelerator_Cloud_Services) +Services](https://titaniumsdk.com/api/) in the Titanium Mobile Guides for details on how to enable ACS in a Titanium project. For further documentation and examples of using ACS in Titanium, see the API reference for -[`Titanium.Cloud`](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Cloud). - -ACS also provides a REST API and native SDKs for many platforms. For more information, -visit [cloud.appcelerator.com](http://cloud.appcelerator.com). +[`Titanium.Cloud`](https://titaniumsdk.com/api/). @@ -152,7 +149,7 @@ expose a device's contacts data to applications running in the browser. Certain APIs are subject to limitations on Mobile Web because of the constraints imposed on application running in the browser. For more information, see -[Mobile Web Limitations](https://docs.appcelerator.com/titanium/#!/guide/Mobile_Web_Limitations). +[Mobile Web Limitations](https://titaniumsdk.com/api/). @@ -175,7 +172,7 @@ This release includes several improvements for geolocation on Android, and a new For details on the new geolocation support, see: -* [Titanium.Geolocation](https://docs.appcelerator.com/titanium/2.0/#!/api/Titanium.Geolocation) +* [Titanium.Geolocation](https://titaniumsdk.com/api/) @@ -185,9 +182,9 @@ In this release, the native APIs that can be used by native Android and iOS modu been documented. The module APIs are not integrated into the main documentation site, but you can find them at the following locations: -* [Android Module API Reference](http://builds.appcelerator.com.s3.amazonaws.com/module-apidoc/2.0.0/android/index.html) +* Android Module API Reference -* [iOS Module API Reference](http://builds.appcelerator.com.s3.amazonaws.com/module-apidoc/2.0.0/ios/index.html) +* iOS Module API Reference @@ -329,10 +326,10 @@ what is currently supported in Mobile Web as well as known limitations. This release includes a number of documentation fixes and enhancements, including the new unified documentation site for the Titanium Mobile SDK and Titanium Studio: -* [Titanium Mobile SDK and Titanium Studio Documentation](https://docs.appcelerator.com/titanium/2.0/) +* [Titanium Mobile SDK and Titanium Studio Documentation](https://titaniumsdk.com/api/) *Known Issues With the Documentation Site* * Left-hand navigation tree occasionally stops scrolling. Reloading the site should fix this problem. -* Display anomalies when a large number of tabs are open. \ No newline at end of file +* Display anomalies when a large number of tabs are open. diff --git a/apidoc/Titanium/CHANGELOG/2.1.0.GA.mdoc b/apidoc/Titanium/CHANGELOG/2.1.0.GA.mdoc index a170d6443a6..51968718d17 100644 --- a/apidoc/Titanium/CHANGELOG/2.1.0.GA.mdoc +++ b/apidoc/Titanium/CHANGELOG/2.1.0.GA.mdoc @@ -28,10 +28,10 @@ in Release 2.0.2. For a list of issues addressed in Release 2.0.2, see the release notes for the previous releases: -* [Release Notes for Release 2.0.2](https://docs.appcelerator.com/titanium/release-notes/?version=2.0.2.GA) +* [Release Notes for Release 2.0.2](https://titaniumsdk.com/api/) Further information is available in the updated [Titanium Mobile SDK and Titanium Studio -Documentation](https://docs.appcelerator.com/titanium/2.1/). +Documentation](https://titaniumsdk.com/api/). @@ -45,7 +45,7 @@ Documentation](https://docs.appcelerator.com/titanium/2.1/). * Parity enhancements for horizontal layouts. Horizontal layouts now follow the same rules on iOS, Android and Mobile Web. - A new property, [horizontalWrap](https://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.UI.View-property-horizontalWrap), + A new property, [horizontalWrap](https://titaniumsdk.com/api/), has been added to enable or disable wrapping on horizontal layouts. With `horizontalWrap` set to `false`, a horizontal layout lays out its children in a single row, left to right. With `horizontalWrap` set to `true` (default) horizontal layout @@ -54,7 +54,7 @@ Documentation](https://docs.appcelerator.com/titanium/2.1/). this matches the iOS behavior in previous releases. See the discussion of horizontal layout in the description for the - [layout](https://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.UI.View-property-layout) + [layout](https://titaniumsdk.com/api/) property for more details. * Support for Android and iOS modules combining JavaScript and native code @@ -74,7 +74,7 @@ Documentation](https://docs.appcelerator.com/titanium/2.1/). it. * Added `setObject` and `getObject` methods to - [Ti.App.Properties](https://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.App.Properties) + [Ti.App.Properties](https://titaniumsdk.com/api/) ([TIMOB-322](https://jira-archive.titaniumsdk.com/TIMOB-322)). * New unit test framework. This release includes the first version of the new Anvil unit @@ -93,7 +93,7 @@ Documentation](https://docs.appcelerator.com/titanium/2.1/). back into the common namespace and the previous deprecation is being reversed. In this release, the - [3DMatrix](https://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.UI.3DMatrix) + [3DMatrix](https://titaniumsdk.com/api/) object and the `ANIMATION_CURVE` constants are being moved back into the common namespace. @@ -165,7 +165,7 @@ The following section lists notable new iOS features and bug fixes in this relea * TLS version fallback. With iOS Release 5.0, Apple changed the default TLS version for secure HTTP from 1.0 to 1.2, causing secure HTTP connections to fail when communicating with older servers. With this fix, when using - [HTTPClient](https://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.Network.HTTPClient) + [HTTPClient](https://titaniumsdk.com/api/) to access an HTTPS URL, if the initial connection fails _and no TLS version was specified_, the HTTP client retries the connection using TLS 1.0. @@ -178,7 +178,7 @@ The following section lists notable new iOS features and bug fixes in this relea TLS 1.0. * Enhancements to - [ScrollableView](https://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.UI.ScrollableView). + [ScrollableView](https://titaniumsdk.com/api/). Improvements include new properties for customizing the paging control appearance and position: `pagingControlAlpha`, `pagingControlOnTop`, and `overlayEnabled` ([TIMOB-8995](https://jira-archive.titaniumsdk.com/TIMOB-8995)). @@ -191,20 +191,20 @@ The following section lists notable new iOS features and bug fixes in this relea * Support for custom `Info.plist` values in `tiapp.xml`. Many of the existing iOS-specific `tiapp.xml` values are deprecated in favor of the new values. - See [`tiapp.xml` and `timodule.xml` Reference](https://docs.appcelerator.com/titanium/2.1/index.html#!/guide/tiapp.xml_and_timodule.xml_Reference) + See [`tiapp.xml` and `timodule.xml` Reference](https://titaniumsdk.com/api/) for details. * Added drag and drop for map annotations ([TIMOB-1242](https://jira-archive.titaniumsdk.com/TIMOB-1242)). -* Added `dragStart` and `dragEnd` events on [`TableView`](https://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.UI.TableView) objects. +* Added `dragStart` and `dragEnd` events on [`TableView`](https://titaniumsdk.com/api/) objects. -* Added [`TableView.setContentInsets`](https://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.UI.TableView-method-setContentInsets) +* Added [`TableView.setContentInsets`](https://titaniumsdk.com/api/) method to define padding around the table's contents. * `Ti.App` supports a new [`paused`](Titanium.App.paused) event. * Support for iOS system textures. The following constants, defined in - [Ti.UI.iOS](https://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.UI.iOS), + [Ti.UI.iOS](https://titaniumsdk.com/api/), can be used wherever a color value is required: * `COLOR_GROUP_TABLEVIEW_BACKGROUND`. Background color for group table views. diff --git a/apidoc/Titanium/CHANGELOG/2.1.2.GA.mdoc b/apidoc/Titanium/CHANGELOG/2.1.2.GA.mdoc index c994eb7b854..90a4bc649e4 100644 --- a/apidoc/Titanium/CHANGELOG/2.1.2.GA.mdoc +++ b/apidoc/Titanium/CHANGELOG/2.1.2.GA.mdoc @@ -176,7 +176,7 @@ New Feature: ([TIMOB-10041](https://jira-archive.titaniumsdk.com/TIMOB-10041)). This new feature adds the ability to receive location updates on significant location changes only, greatly reducing battery usage. Enable this feature by setting the - [trackSignificantLocationChange](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Geolocation-property-trackSignificantLocationChange) + [trackSignificantLocationChange](https://titaniumsdk.com/api/) property to `true`. Bug Fixes: @@ -227,25 +227,21 @@ version of the `ti.cloudpush` module, version 2.0.7. New features and fixes in t The data that the application must store depends on the type of authentication in use. * If using 2-legged OAuth or access key authentication, you must store and restore - the [sessionId](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Cloud.sessionId) value. + the [sessionId](https://titaniumsdk.com/api/) value. * If using 3-legged OAuth, introduced in this release, you must store and restore the - [accessToken](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Cloud.accessToken) value. Unlike session IDs, access + [accessToken](https://titaniumsdk.com/api/) value. Unlike session IDs, access tokens expire after a set period of time. After the access token expires, the user will need to reauthenticate. The - [expiresIn](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Cloud.expiresIn) + [expiresIn](https://titaniumsdk.com/api/) property is set when a secure login succeeds, and gives the lifespan of the new access token, in seconds. * The Ti.Cloud module now supports secure login and secure user creation using 3-legged OAuth. For more information, see: - * [Users.secureCreate](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Cloud.Users-method-secureCreate) + * [Users.secureCreate](https://titaniumsdk.com/api/) - * [Users.secureLogin](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Cloud.Users-method-secureLogin) - - For general information on ACS Authentication, see: - - * + * [Users.secureLogin](https://titaniumsdk.com/api/) * The Ti.CloudPush module fixes an issue where badge numbers were not displayed on Android 4.x devices. @@ -267,22 +263,22 @@ This release includes a number of documentation fixes and enhancements, includin The following APIs are new in this release: -* [Titanium.Geolocation.trackSignificantLocationChange](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Geolocation-property-trackSignificantLocationChange) +* [Titanium.Geolocation.trackSignificantLocationChange](https://titaniumsdk.com/api/) (iOS only) -* [Titanium.UI.TextField.setSelection](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TextArea-method-setSelection) +* [Titanium.UI.TextField.setSelection](https://titaniumsdk.com/api/) (Android only) -* [Titanium.UI.TextArea.setSelection](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TextArea-method-setSelection) +* [Titanium.UI.TextArea.setSelection](https://titaniumsdk.com/api/) (Android only) -* [Titanium.UI.TextArea.scrollsToTop](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TextArea-property-scrollsToTop) +* [Titanium.UI.TextArea.scrollsToTop](https://titaniumsdk.com/api/) (iOS only) -* [Titanium.UI.TableView.scrollsToTop](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableView-property-scrollsToTop) +* [Titanium.UI.TableView.scrollsToTop](https://titaniumsdk.com/api/) (iOS only) -* [Titanium.Cloud.accessToken](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Cloud-property-accessToken) -* [Titanium.Cloud.expiresIn](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Cloud-property-expiresIn) -* [Titanium.Cloud.sessionId](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Cloud-property-sessionId) -* [Titanium.Cloud.Users.secureCreate](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Cloud.Users-method-secureCreate) -* [Titanium.Cloud.Users.secureLogin](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Cloud.Users-method-secureLogin) -* [Titanium.Cloud.Users.secureStatus](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Cloud.Users-method-secureStatus) +* [Titanium.Cloud.accessToken](https://titaniumsdk.com/api/) +* [Titanium.Cloud.expiresIn](https://titaniumsdk.com/api/) +* [Titanium.Cloud.sessionId](https://titaniumsdk.com/api/) +* [Titanium.Cloud.Users.secureCreate](https://titaniumsdk.com/api/) +* [Titanium.Cloud.Users.secureLogin](https://titaniumsdk.com/api/) +* [Titanium.Cloud.Users.secureStatus](https://titaniumsdk.com/api/) @@ -303,4 +299,3 @@ The following APIs are deprecated in this release: In the next major release, any APIs deprecated _prior to_ release 1.8 will be removed. - diff --git a/apidoc/Titanium/CHANGELOG/2.1.3.GA.mdoc b/apidoc/Titanium/CHANGELOG/2.1.3.GA.mdoc index eae2d72dc27..2eb48c71951 100644 --- a/apidoc/Titanium/CHANGELOG/2.1.3.GA.mdoc +++ b/apidoc/Titanium/CHANGELOG/2.1.3.GA.mdoc @@ -47,7 +47,7 @@ iOS 6 changed the way that applications access the device's contacts. As a resul 2.1.3 introduces a new API to check or request authorization to access contacts. Use the new -[Ti.Contacts.contactsAuthorization](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Contacts-property-contactsAuthorization) +[Ti.Contacts.contactsAuthorization](https://titaniumsdk.com/api/) property indicates whether the application is authorized to access contacts. It returns one of four values: @@ -58,13 +58,13 @@ one of four values: The application should not attempt to reauthorize in this case. * `AUTHORIZATION_UNKNOWN`. Current authorization state is unknown, and the application should call the - [requestAuthorization](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Contacts-method-requestAuthorization) + [requestAuthorization](https://titaniumsdk.com/api/) method to request authorization from the user. On iOS prior to iOS 6, and on Android, `contactsAuthorization` always returns `AUTHORIZATION_AUTHORIZED`. For more information and sample code using the new APIs, see the -[Titanium.Contacts](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Contacts) +[Titanium.Contacts](https://titaniumsdk.com/api/) reference page. ### iPhone 5 Assets and Splash Screens diff --git a/apidoc/Titanium/CHANGELOG/2.1.4.GA.mdoc b/apidoc/Titanium/CHANGELOG/2.1.4.GA.mdoc index 3fc6acf3fd2..08a98de98e8 100644 --- a/apidoc/Titanium/CHANGELOG/2.1.4.GA.mdoc +++ b/apidoc/Titanium/CHANGELOG/2.1.4.GA.mdoc @@ -18,7 +18,7 @@ Xcode 4.5.2. This release has been tested on computers running Windows 8. -* [Full list of Issues that were addressed in Release 2.1.4](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=14177) +* Full list of Issues that were addressed in Release 2.1.4 diff --git a/apidoc/Titanium/CHANGELOG/3.0.0.GA.mdoc b/apidoc/Titanium/CHANGELOG/3.0.0.GA.mdoc index 211a4e62191..c48300f0be2 100644 --- a/apidoc/Titanium/CHANGELOG/3.0.0.GA.mdoc +++ b/apidoc/Titanium/CHANGELOG/3.0.0.GA.mdoc @@ -36,13 +36,13 @@ Note that this release includes breaking changes. See This release includes over 500 bug fixes and improvements: -* [Full list of Issues that were addressed in Release 3.0.0](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=14142) +* Full list of Issues that were addressed in Release 3.0.0 -* [Fixed Android Issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=14143) +* Fixed Android Issues -* [Fixed iOS Issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=13739) +* Fixed iOS Issues -* [Fixed Mobile Web Issues](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=14145) +* Fixed Mobile Web Issues See [New Features](#new) for a summary of new features in this release. @@ -58,7 +58,7 @@ may require code changes to run your application on Titanium SDK 3.0. ### Node.js Requirement You must install Node.js to use the new Titanium command-line interface (CLI) and Titanium -SDK 3.0. See [Installing Node](https://docs.appcelerator.com/titanium/latest/#!/guide/Installing_Node) for +SDK 3.0. See [Installing Node](https://titaniumsdk.com/api/) for details. @@ -80,7 +80,7 @@ A subsequent blog post will describe how you can take advantage of the action ba In previous versions of the SDK, each tab group window was in its own activity. In SDK 3.0, the tab group has its own Android activity (exposed as TabGroup.activity). The individual tab windows all share the same activity. This may affect you, for example, if you are creating a different options menu for each window, since you can only associate a single onCreateOptionsMenu callback with the tab group. -To switch menu items when the tabs are switched, you can use the new Activity.invalidateOptionsMenu method whenever you want to change the contents of the options menu. For example, you could call invalidateOptionsMenu in the focus event handler for each tab window, and add logic in the onCreateOptionsMenu callback to create the appropriate menu items for the active tab. +To switch menu items when the tabs are switched, you can use the new Activity.invalidateOptionsMenu method whenever you want to change the contents of the options menu. For example, you could call invalidateOptionsMenu in the focus event handler for each tab window, and add logic in the onCreateOptionsMenu callback to create the appropriate menu items for the active tab. #### Application Title Bar @@ -93,11 +93,11 @@ To restore the previous behavior, set the TabGroup.navBarHidden pro ### Android ActivityIndicator Changes -In SDK 3.0, the Android ActivityIndicator has been reimplemented to create parity with iOS and Mobile Web. The old ActivityIndicator presented a modal dialog on Android. The new ActivityIndicator is a view that must be added to another view or window in order to be displayed, as on iOS and Mobile Web. (Unlike the iOS activity indicator, however, the Android activity indicator can't be placed in the window title bar.) +In SDK 3.0, the Android ActivityIndicator has been reimplemented to create parity with iOS and Mobile Web. The old ActivityIndicator presented a modal dialog on Android. The new ActivityIndicator is a view that must be added to another view or window in order to be displayed, as on iOS and Mobile Web. (Unlike the iOS activity indicator, however, the Android activity indicator can't be placed in the window title bar.) In addition, Android and Mobile Web now support Ti.UI.ActivityIndicatorStyle, which contains the same constants as Ti.UI.iPhone.ActivityIndicatorStyle. iOS will support Ti.UI.ActivityIndicatorStyle in a subsequent release. -A new, Android-specific ProgressIndicator object replaces the old Android activity indicator. You can use ProgressIndicator to create either a modal dialog or a progress bar in the window title. +A new, Android-specific ProgressIndicator object replaces the old Android activity indicator. You can use ProgressIndicator to create either a modal dialog or a progress bar in the window title. Code using the old Android activity indicator will break, since the new activity indicator must be added to a view. To update code for 3.0, you can switch to using the new activity indicator like you do on iOS or Mobile Web. Or to retain the previous behavior, switch to a ProgressIndicator. @@ -189,11 +189,11 @@ network. On Android, debugging takes places over a USB connection. For details, see the following topics in the Titanium Guides: -* [Debugging Titanium Applications](https://docs.appcelerator.com/titanium/latest/#!/guide/Debugging_Titanium_Applications) +* [Debugging Titanium Applications](https://titaniumsdk.com/api/) * [Debugging on Android -Devices](https://docs.appcelerator.com/titanium/latest/#!/guide/Debugging_on_Android_Devices) +Devices](https://titaniumsdk.com/api/) * [Debugging on iOS -Devices](https://docs.appcelerator.com/titanium/latest/#!/guide/Debugging_on_iOS_Devices) +Devices](https://titaniumsdk.com/api/) @@ -207,8 +207,8 @@ Titanium from the command line, you can install Alloy manually using `npm`. For installation instructions and an introduction to the Alloy framework, see: -* [Alloy Quick Start](https://docs.appcelerator.com/titanium/latest/#!/guide/Alloy_Quick_Start) -* [Alloy Concepts](https://docs.appcelerator.com/titanium/latest/#!/guide/Alloy_Concepts) +* [Alloy Quick Start](https://titaniumsdk.com/api/) +* [Alloy Concepts](https://titaniumsdk.com/api/) @@ -220,7 +220,7 @@ some tasks are delegated to the Python scripts, so Python is still required to b projects. To use this release, you must install Node.js. See -[Installing Node](https://docs.appcelerator.com/titanium/latest/#!/guide/Installing_Node) for +[Installing Node](https://titaniumsdk.com/api/) for details. For this release, Studio installs the new CLI and uses the new CLI when building with SDK @@ -239,7 +239,7 @@ to create and build iOS and Android native modules. For details, see: * [Titanium Command-Line Interface -Reference](https://docs.appcelerator.com/titanium/latest/#!/guide/Titanium_Command-Line_Interface_Reference) +Reference](https://titaniumsdk.com/api/) in the Titanium Guides. @@ -402,7 +402,7 @@ for each tab window, this will not work. For action items, you can add items to the action bar by creating menu items and specifying the new -[`showAsAction`](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Android.MenuItem-property-showAsAction) +[`showAsAction`](https://titaniumsdk.com/api/) property to `SHOW_AS_ACTION_ALWAYS`, `SHOW_AS_ACTION_IF_ROOM`, `SHOW_AS_ACTION_WITH_TEXT` or `SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW`. For example: @@ -468,9 +468,9 @@ show the "up" affordance on a tab group's action bar you could use code like thi See also: -* [Android Action Bar](https://docs.appcelerator.com/titanium/latest/#!/guide/Android_Action_Bar) in the Titanium Guides. +* [Android Action Bar](https://titaniumsdk.com/api/) in the Titanium Guides. * [Action Bar](https://developer.android.com/guide/topics/ui/actionbar.html) in the Android API Guides. -* [Android Themes](https://docs.appcelerator.com/titanium/latest/#!/guide/Android_Themes) in the Titanium Guides. +* [Android Themes](https://titaniumsdk.com/api/) in the Titanium Guides. @@ -503,13 +503,13 @@ specify the voice-over text associated with a given UI element.
In addition, there are several new system-level events related to accessibility. The new -[accessibilityChanged](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.App-event-accessibilitychanged), +[accessibilityChanged](https://titaniumsdk.com/api/), event is fired when the system's accessibility mode is changed. The application can also fire a system event to ask the system to make a voice announcement. On iOS the application can also fire events to notify the accessibility system that the layout or current screen has changed. For details on these events, see the discussion on -the [Ti.App](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.App) reference +the [Ti.App](https://titaniumsdk.com/api/) reference page. diff --git a/apidoc/Titanium/CHANGELOG/3.0.2.GA.mdoc b/apidoc/Titanium/CHANGELOG/3.0.2.GA.mdoc index 228195bc6df..0594e363dc8 100644 --- a/apidoc/Titanium/CHANGELOG/3.0.2.GA.mdoc +++ b/apidoc/Titanium/CHANGELOG/3.0.2.GA.mdoc @@ -75,8 +75,8 @@ the command line, you can install Alloy manually using `npm`. For installation instructions and an introduction to the Alloy framework, see: - * [Alloy Quick Start](https://docs.appcelerator.com/titanium/latest/#!/guide/Alloy_Quick_Start) - * [Alloy Framework](https://docs.appcelerator.com/titanium/latest/#!/guide/Alloy_Framework) + * [Alloy Quick Start](https://titaniumsdk.com/api/) + * [Alloy Framework](https://titaniumsdk.com/api/) @@ -104,8 +104,7 @@ localized splash screen image takes precedence over the default splash screen image. For more information, see the "Localized Splash Screen" section in the [Icon -and Splash Screens guide](https://docs.appcelerator.com/titanium/latest/#!/guid -e/Icons_and_Splash_Screens). +and Splash Screens guide](https://titaniumsdk.com/api/). @@ -124,8 +123,7 @@ Google API Level 11 (Android 3.0) and later, and the Android manifest `targetSDKVersion` key must be set in the `tiapp.xml` file. For more information and an example, see the [Titanium.UI.Android.SearchView]( -https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Android.Search -View) reference page. +https://titaniumsdk.com/api/) reference page. @@ -144,14 +142,13 @@ Previously, you had to copy sounds from the `Resources` directory into the external storage directory. For more information, see the [resRawDirectory -property](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium -.Filesystem-property-resRawDirectory). +property](https://titaniumsdk.com/api/). ## Fixed Issues and Enhancements - * [Full list of issues that were addressed in Release 3.0.2 RC](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=14693) + * Full list of issues that were addressed in Release 3.0.2 RC diff --git a/apidoc/Titanium/CHANGELOG/3.1.0.GA.mdoc b/apidoc/Titanium/CHANGELOG/3.1.0.GA.mdoc index 5f11dbb0bd5..2faa758138d 100644 --- a/apidoc/Titanium/CHANGELOG/3.1.0.GA.mdoc +++ b/apidoc/Titanium/CHANGELOG/3.1.0.GA.mdoc @@ -48,7 +48,7 @@ See [New Features](#features) for a summary of new features in this release. This release coincides with the General Availability Release of Tizen development support with the Titanium SDK. -Refer to [Installing the Tizen SDK](https://docs.appcelerator.com/titanium/latest/#!/guide/Installing_the_Tizen_SDK) +Refer to [Installing the Tizen SDK](https://titaniumsdk.com/api/) for information on getting started with Tizen development. @@ -62,13 +62,11 @@ Note that BlackBerry is *not* included in SDK 3.1.0. To build for BlackBerry, yo have the BlackBerry beta version of the Titanium SDK installed. For best results, use the BlackBerry SDK with a 3.1.1 preview build of Studio, which includes support for Alloy on BlackBerry. -The BlackBerry beta SDK and Studio preview are available from: - -* [http://preview.appcelerator.com/studio/bb](http://preview.appcelerator.com/studio/bb) +The BlackBerry beta SDK and Studio preview are available. Note that the BlackBerry beta SDK has not been tested for any other platforms. -Refer to [Installing the BlackBerry NDK](https://docs.appcelerator.com/titanium/latest/#!/guide/Installing_the_BlackBerry_NDK) +Refer to [Installing the BlackBerry NDK](https://titaniumsdk.com/api/) for information on getting started with BlackBerry 10 development. @@ -119,12 +117,7 @@ plugins: 1. Launch Titanium Studio. 2. Click **Help** > **Install New Software**. 3. In the **Work with** field, enter the update URL for the package you want to install - and press **Enter**. The update URLs are: - - * PHP - http://download.appcelerator.com/aptana/studio3/php/update/stable - * Ruby - http://download.appcelerator.com/aptana/studio3/ruby/update/stable - * Pydev - http://download.appcelerator.com/aptana/studio3/pydev/update/stable - + and press **Enter**. 4. In the **Available Software** dialog, select the checkbox next to the package name and click **Next**. 5. Follow the prompts to complete the installation wizard. @@ -148,7 +141,7 @@ The new add-on module behaves the same as the built-in `Titanium.Facebook` proxy supports the native iOS 6 Facebook login. For more information, refer to -[Modules.Facebook](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Facebook). +[Modules.Facebook](https://titaniumsdk.com/api/). @@ -189,7 +182,7 @@ exceptions: ANNOTATION_GREEN and ANNOTATION_RED. * **Support for custom annotation views.** Instead of a pin image, you can specify a custom view for the pin using the - [`customView`](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map.Annotation-property-customView) property. + [`customView`](https://titaniumsdk.com/api/) property. (This property has also been added to Titanium.Map.Annotation for iOS.) @@ -218,8 +211,8 @@ exceptions: constant instead. For more information, refer to -[Modules.Map](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map) and -[Google Maps v2 for Android](https://docs.appcelerator.com/titanium/latest/#!/guide/Google_Maps_v2_for_Android). +[Modules.Map](https://titaniumsdk.com/api/) and +[Google Maps v2 for Android](https://titaniumsdk.com/api/). @@ -320,8 +313,8 @@ The differences listed are for the final planned list view and the current table You have to manipulate them with the ListSection they are contained in. For more information, refer to -[Titanium.UI.ListView](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.ListView) -and the [ListView guide](https://docs.appcelerator.com/titanium/latest/#!/guide/ListViews). +[Titanium.UI.ListView](https://titaniumsdk.com/api/) +and the [ListView guide](https://titaniumsdk.com/api/). @@ -343,7 +336,7 @@ Studio 3.1.0 includes two new features related to Alloy: The iOS EventKit framework, allowing access to calendar events and reminders, is now available inside Titanium. See the -[Titanium.Calendar API reference](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Calendar) +[Titanium.Calendar API reference](https://titaniumsdk.com/api/) for details. @@ -353,7 +346,7 @@ for details. The iOS AutoPause API pauses the location updates when an application goes into the background. We've implemented access to this new API in Titanium. For more information, see -[pauseLocationUpdateAutomatically](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Geolocation-property-pauseLocationUpdateAutomatically) +[pauseLocationUpdateAutomatically](https://titaniumsdk.com/api/) in the Ti.Geolocation API reference. @@ -380,11 +373,11 @@ and device. For details on getting started with BlackBerry, see: -* [Installing the BlackBerry NDK](https://docs.appcelerator.com/titanium/3.0/#!/guide/Installing_the_BlackBerry_NDK) in the Titanium Guides. +* [Installing the BlackBerry NDK](https://titaniumsdk.com/api/) in the Titanium Guides. For details on getting started with Tizen, see: -* [Installing the Tizen SDK](https://docs.appcelerator.com/titanium/3.0/#!/guide/Installing_the_Tizen_SDK) in the Titanium Guides. +* [Installing the Tizen SDK](https://titaniumsdk.com/api/) in the Titanium Guides. Note that the platform support for these new platforms is *not* reflected in the API docs. @@ -397,13 +390,13 @@ and NFC (Android) modules. To support these new modules which are either currently packaged with the SDK or will be packaged with the SDK in the future, API docs for optional modules are now available in -the [Modules](https://docs.appcelerator.com/titanium/latest/#!/api/Modules) namespace in the API reference. +the [Modules](https://titaniumsdk.com/api/) namespace in the API reference. Docs for Facebook, Google Maps, and NFC are available on the documentation site: -* [Facebook Module API reference](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Facebook) -* [Google Maps v2 Module API reference](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map) -* [NFC Module API reference](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Nfc) +* [Facebook Module API reference](https://titaniumsdk.com/api/) +* [Google Maps v2 Module API reference](https://titaniumsdk.com/api/) +* [NFC Module API reference](https://titaniumsdk.com/api/) @@ -415,7 +408,7 @@ not guaranteed to remain the same, so updating an object when it is out of sync unpredictable results. To avoid this, listen for the -[`reload`](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Contacts-event-reload) event. +[`reload`](https://titaniumsdk.com/api/) event. When you receive a `reload` event, you should assume that any existing `Person` or `Group` objects are invalid, and reload them from the `Contacts` module before modifying them. @@ -460,7 +453,7 @@ The usage of the global context in CommonJS modules is unsupported and deprecate and will be removed in a future Titanium SDK release. For recommended practices, refer to -[CommonJS Modules in Titanium](https://docs.appcelerator.com/titanium/latest/#!/guide/CommonJS_Modules_in_Titanium) +[CommonJS Modules in Titanium](https://titaniumsdk.com/api/) @@ -610,4 +603,3 @@ The following APIs are deprecated in Release 3.1.0. Titanium.UI.iOS.AdView.error.messageevent property - diff --git a/apidoc/Titanium/CHANGELOG/3.1.1.GA.mdoc b/apidoc/Titanium/CHANGELOG/3.1.1.GA.mdoc index 5af32d04be0..e173dd56be8 100644 --- a/apidoc/Titanium/CHANGELOG/3.1.1.GA.mdoc +++ b/apidoc/Titanium/CHANGELOG/3.1.1.GA.mdoc @@ -90,7 +90,7 @@ To install the Android 2.3.3 SDK, launch the Android SDK manager and select to i **Android 2.3.3 (API 10)** package. For instructions, refer to the "Installing Android Packages with Android SDK Manager" section of the -[Installing the Android SDK guide](https://docs.appcelerator.com/titanium/latest/#!/guide/Installing_the_Android_SDK). +[Installing the Android SDK guide](https://titaniumsdk.com/api/). @@ -108,7 +108,7 @@ Starting with this Release, the minimum supported Tizen SDK version is 2.1. Due architecture changes with the Tizen platform, you are required to create and add an author certificate. For instructions, refer to the -[Install the Tizen SDK guide](https://docs.appcelerator.com/titanium/latest/#!/guide/Installing_the_Tizen_SDK) +[Install the Tizen SDK guide](https://titaniumsdk.com/api/) and review the "Create an Author Certificate", "Register an Author Certificate" and "Configuring Studio" sections. @@ -125,7 +125,7 @@ reference the `Titanium.Calendar` namespace. Previously, when taking a picture using the `Titanium.Media.showCamera` method, a copy of the picture would automatically be saved to the Android device's photo gallery, ignoring the setting of the -[saveToPhotoGallery property](https://docs.appcelerator.com/titanium/latest/#!/api/CameraOptionsType-property-saveToPhotoGallery). +[saveToPhotoGallery property](https://titaniumsdk.com/api/). As of this Release, this unsupported behavior has been removed. To save a copy of the picture to the device's photo gallery, you need to set the `saveToPhotoGallery` property to `true`. @@ -147,7 +147,7 @@ to be added to the beginning of the URL. Previously, you did not need to specif used the `Cloud.useSecure` property, which is removed, to enable or disable SSL. For more information, see the "tiapp.xml Properties" section in -[Titanium.Cloud](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Cloud). +[Titanium.Cloud](https://titaniumsdk.com/api/). @@ -166,13 +166,13 @@ a separate download of a specially-built SDK. BlackBerry for Titanium is current In this Release, the following API elements were added to the Android Google Maps v2 module: - * [Map.isGooglePlayServicesAvailable method](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map.View-method-isGooglePlayServicesAvailable) + * [Map.isGooglePlayServicesAvailable method](https://titaniumsdk.com/api/) -- checks to see Google Play Services is available on the device. - * [View.userLocationButton property](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map.View-property-userLocationButton) + * [View.userLocationButton property](https://titaniumsdk.com/api/) -- enables (set to `true`) or disables (set to `false`) the My Location button if the `userLocation` property is enabled. - * [View.regionchanged event](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map.View-event-regionchanged) + * [View.regionchanged event](https://titaniumsdk.com/api/) -- returns two additional properties: `latitudeDelta` and `longitudeDelta`. @@ -199,7 +199,7 @@ The Studio Node.ACS debugger does not catch breakpoints when a debug session fir ## Fixed Issues and Enhancements - * [Full list of issues that were addressed in Release 3.1.1](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=15204) + * Full list of issues that were addressed in Release 3.1.1 diff --git a/apidoc/Titanium/CHANGELOG/3.1.2.GA.mdoc b/apidoc/Titanium/CHANGELOG/3.1.2.GA.mdoc index cccb3e4a2be..548c1a1ccf2 100644 --- a/apidoc/Titanium/CHANGELOG/3.1.2.GA.mdoc +++ b/apidoc/Titanium/CHANGELOG/3.1.2.GA.mdoc @@ -42,7 +42,7 @@ This release coincides with the General Availability Release of BlackBerry 10 wi The Titanium SDK supports features of the BlackBerry 10.0.9.x NDK. You can use newer versions of the BlackBerry 10 NDK to develop and build BlackBerry Titanium applications, but the new features are not available in the Titanium SDK. -Refer to [Installing the BlackBerry NDK](https://docs.appcelerator.com/titanium/latest/#!/guide/Installing_the_BlackBerry_NDK) for information on getting started with BlackBerry 10 development. +Refer to [Installing the BlackBerry NDK](https://titaniumsdk.com/api/) for information on getting started with BlackBerry 10 development. @@ -61,7 +61,7 @@ This release includes preliminary support for iOS 7 beta and Xcode 5 Developer P This release coincides with the release of Alloy 1.2.0, which now supports dynamic styling, creating ListView objects in markup with data binding enabled, and the Tizen platform. - * [Dynamic Styles guide](https://docs.appcelerator.com/titanium/latest/#!/guide/Dynamic_Styles) + * [Dynamic Styles guide](https://titaniumsdk.com/api/) * [Dynamic Styling Sample](https://github.com/tidev/alloy/tree/master/test/apps/advanced/dynamic_styling) * [ListView Sample](https://github.com/tidev/alloy/tree/master/test/apps/ui/listview) * [ListView with Data Binding Sample](https://github.com/tidev/alloy/tree/master/test/apps/models/binding_listview) @@ -138,9 +138,9 @@ Previously, the map would not re-center itself, causing the info window to appea As of this Release, the Titanium SDK and Appcelerator Cloud Services use Google Cloud Messaging (GCM) as the default protocol to support push notifications for the Android platform. To use GCM, create a Google API project to obtain a **Google API key** and **GCM sender ID**, then supply this information to the **Manage ACS** console. For the client application, use the `Titanium.CloudPush` module to receive the push notifications. -For instructions on setting up GCM on the server side, see the "Configure Your App For Enabling Push Notifications" subsection under the "Push Notifications" section of the [ACS: Android SDK guide](https://docs.appcelerator.com/cloud/latest/#!/guide/android). +For instructions on setting up GCM on the server side, see the "Configure Your App For Enabling Push Notifications" subsection under the "Push Notifications" section of the [ACS: Android SDK guide](https://titaniumsdk.com/api/). -For instructions on configuring the client application to receive push notifications, see [Titanium.CloudPush](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.CloudPush). +For instructions on configuring the client application to receive push notifications, see [Titanium.CloudPush](https://titaniumsdk.com/api/). @@ -150,31 +150,31 @@ As of this Release, the Cloud module supports subscribing, unsubscribing and sen The following methods rely on the device token to send, subscribe or unsubscribe from push notifications: - * [Cloud.PushNotifications.notifyTokens](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Cloud.PushNotifications-method-notifyTokens) - * [Cloud.PushNotifications.subscribeToken](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Cloud.PushNotifications-method-subscribeToken) - * [Cloud.PushNotifications.unsubscribeToken](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Cloud.PushNotifications-method-unsubscribeToken) + * [Cloud.PushNotifications.notifyTokens](https://titaniumsdk.com/api/) + * [Cloud.PushNotifications.subscribeToken](https://titaniumsdk.com/api/) + * [Cloud.PushNotifications.unsubscribeToken](https://titaniumsdk.com/api/) To retrieve your device token: - * For Android, use the [CloudPush module](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.CloudPush). + * For Android, use the [CloudPush module](https://titaniumsdk.com/api/). - * For iOS, use the [Titanium.Network.registerForPushNotifications](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Network-method-registerForPushNotifications) method. + * For iOS, use the [Titanium.Network.registerForPushNotifications](https://titaniumsdk.com/api/) method. ### Android Activity Animations -Heavyweight windows support animated transitions when you open or close them. In the parameter dictionary you pass to the Window's `open` or `close` method, set the [activityEnterAnimation](https://docs.appcelerator.com/titanium/latest/#!/api/openWindowParams-property-activityEnterAnimation) and [activityExitAnimation](https://docs.appcelerator.com/titanium/latest/#!/api/openWindowParams-property-activityExitAnimation) keys to animation resources. `activityEnterAnimation` sets the animation you want to run on the incoming activity, while `activityExitAnimation` sets the animation you want to run on the outgoing activity. +Heavyweight windows support animated transitions when you open or close them. In the parameter dictionary you pass to the Window's `open` or `close` method, set the [activityEnterAnimation](https://titaniumsdk.com/api/) keys to animation resources. `activityEnterAnimation` sets the animation you want to run on the incoming activity, while `activityExitAnimation` sets the animation you want to run on the outgoing activity. Animation resources are available through the R object. Use either `Titanium.Android.R` for built-in resources or `Titanium.App.Android.R` for resources that you package in your application. -For more information, see the "Heavyweight Window Transitions in Android" section in the [Titanium.UI.Window API Reference guide](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Window). +For more information, see the "Heavyweight Window Transitions in Android" section in the [Titanium.UI.Window API Reference guide](https://titaniumsdk.com/api/). ### iOS Center Offset for Map Annotations -As of this Release, you can apply an (x, y) offset to a map annotation by specifying its [centerOffset property](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Map.Annotation-property-centerOffset). This property is only for the iOS platform. +As of this Release, you can apply an (x, y) offset to a map annotation by specifying its [centerOffset property](https://titaniumsdk.com/api/). This property is only for the iOS platform. @@ -182,8 +182,8 @@ As of this Release, you can apply an (x, y) offset to a map annotation by specif This release introduces two new read-only properties to retrieve the last Titanium.Analytics event and Titanium.Geolocation location: - * [Titanium.Analytics.lastEvent](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Analytics-property-lastEvent) - * [Titanium.Geolocation.lastGeolocation](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Geolocation-property-lastGeolocation) + * [Titanium.Analytics.lastEvent](https://titaniumsdk.com/api/) + * [Titanium.Geolocation.lastGeolocation](https://titaniumsdk.com/api/) @@ -222,7 +222,7 @@ Alloy 1.2.1 GA is expected to be released next week with the fix fully tested. ## Fixed Issues and Enhancements - * [Full list of issues that were addressed in Release 3.1.2](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=15324) + * Full list of issues that were addressed in Release 3.1.2 diff --git a/apidoc/Titanium/CHANGELOG/3.1.3.GA.mdoc b/apidoc/Titanium/CHANGELOG/3.1.3.GA.mdoc index be2a80052f9..52ed423ce8a 100644 --- a/apidoc/Titanium/CHANGELOG/3.1.3.GA.mdoc +++ b/apidoc/Titanium/CHANGELOG/3.1.3.GA.mdoc @@ -38,7 +38,7 @@ including the 64-bit iPhone 5S. A future SDK will provide support for 64-bit iOS ### Summary of Changes to the Titanium SDK This section briefly lists the changes made to the Titanium SDK to support iOS 7. For details, see -the [iOS 7 Migration guide](https://docs.appcelerator.com/titanium/latest/#!/guide/iOS_7_Migration_Guide). +the [iOS 7 Migration guide](https://titaniumsdk.com/api/). * New App icons and Spotlight & Settings icons for iOS 7. * New Windows UI architecture: @@ -113,8 +113,8 @@ removed in Release 3.2.0. Use the new `Titanium.UI.iOS.NavigationWindow` object navigation controller. For details about this new object, see the "Titanium.UI.iOS.NavigationWindow" section in the [iOS 7 -Migration guide](https://docs.appcelerator.com/titanium/latest/#!/guide/iOS_7_Migration_Guide) and -[Titanium.UI.iOS.NavigationWindow API reference](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.iOS.NavigationWindow). +Migration guide](https://titaniumsdk.com/api/) and +[Titanium.UI.iOS.NavigationWindow API reference](https://titaniumsdk.com/api/). @@ -137,7 +137,7 @@ unexpectedly ## Fixed Issues and Enhancements - * [Full list of issues that were addressed in Release 3.1.3](http://jira.appcelerator.org/secure/IssueNavigator.jspa?mode=hide&requestId=15473) + * Full list of issues that were addressed in Release 3.1.3 diff --git a/apidoc/Titanium/CHANGELOG/3.2.0.GA.mdoc b/apidoc/Titanium/CHANGELOG/3.2.0.GA.mdoc index 0d5582ab42e..a3492537a92 100644 --- a/apidoc/Titanium/CHANGELOG/3.2.0.GA.mdoc +++ b/apidoc/Titanium/CHANGELOG/3.2.0.GA.mdoc @@ -131,8 +131,8 @@ later.** * Upgrade from Eclipse 3.7 (Indigo) to 4.3 (Kepler) to support Mac OS X 10.9 (Mavericks) * Support for creating Github forks -For more details, see [Studio 3.2.0 Changes](https://docs.appcelerator.com/titanium/latest/#!/guide/Studio_3.2.0_Changes) -and [Titanium Studio Release Notes](https://docs.appcelerator.com/titanium/latest/#!/guide/Titanium_Studio_Release_Notes). +For more details, see [Studio 3.2.0 Changes](https://titaniumsdk.com/api/) +and [Titanium Studio Release Notes](https://titaniumsdk.com/api/). ### Tizen 2.2.1 Support @@ -244,7 +244,7 @@ application to use the GCM protocol. #### Fastdev Support As of this Release, Fastdev support is deprecated and is disabled by default. To re-enable Fastdev, -follow the directions in the [Fastdev Reference guide](https://docs.appcelerator.com/titanium/latest/#!/guide/Fastdev_Reference_for_Android). +follow the directions in the [Fastdev Reference guide](https://titaniumsdk.com/api/). #### Lightweight Windows @@ -308,7 +308,7 @@ As of this Release, the Titanium SDK no longer supports iOS 5.x and the #### Native Map Support The `Titanium.Map` namespace no longer supports native maps on the iOS platform. This functionality -is now available on the [ti.map add-on module](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map) +is now available on the [ti.map add-on module](https://titaniumsdk.com/api/) with additional features only available for iOS 7. The API calls are similar except the `addRoute` method no longer accepts a dictionary as a @@ -384,11 +384,11 @@ No additions or changes were made to the existing APIs. As of this Release, the application can create broadcast intents to pass to broadcast receivers. To create a BroadcastIntent, use the -[Titanium.Android.createBroadcastIntent](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Android-method-createBroadcastIntent) +[Titanium.Android.createBroadcastIntent](https://titaniumsdk.com/api/) method, then use either the -[Titanium.Android.sendBroadcast](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Android.Activity-method-sendBroadcast) +[Titanium.Android.sendBroadcast](https://titaniumsdk.com/api/) or -[Titanium.Android.sendBroadcastWithPermission](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Android.Activity-method-sendBroadcastWithPermission) +[Titanium.Android.sendBroadcastWithPermission](https://titaniumsdk.com/api/) method to pass the intent to a BroadcastReceiver. If you are using the `sendBroadcastWithPermssion` method, modify the `tiapp.xml` file to declare a @@ -452,13 +452,13 @@ The ti.cloudpush module version number changed to 3.2.0 to match the SDK version #### Cookie Management This Release introduces the -[Titanium.Network.Cookie](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Network.Cookie) +[Titanium.Network.Cookie](https://titaniumsdk.com/api/) object and a number of new Titanium.Network methods to help the application manage cookies between the Android system cookie store, utilized by WebViews, and the HTTPClient's cookie store. For more information, see the "Android Platform Implementation Notes" in either -[Titanium.Network.HTTPClient](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Network.HTTPClient) -or [Titanium.UI.WebView](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.WebView). +[Titanium.Network.HTTPClient](https://titaniumsdk.com/api/) +or [Titanium.UI.WebView](https://titaniumsdk.com/api/). #### Extra, Extra High Density Support @@ -478,19 +478,19 @@ The following ListView features were completed in this Release: * Dynamic item loading * Search support -For more information, see the [ListViews guide](https://docs.appcelerator.com/titanium/latest/#!/guide/ListViews) -and [Titanium.UI.ListView API reference](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.ListView). +For more information, see the [ListViews guide](https://titaniumsdk.com/api/) +and [Titanium.UI.ListView API reference](https://titaniumsdk.com/api/). #### Map Module The ti.map module supports the following new APIs: - * [Map.Annotation.showInfoWindow](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map.Annotation-property-showInfoWindow) + * [Map.Annotation.showInfoWindow](https://titaniumsdk.com/api/) property. Shows or hides the view that is displayed on the annotation when clicked. - * [Map.View.longclick](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map.View-event-longclick) + * [Map.View.longclick](https://titaniumsdk.com/api/) event. Fired when the user makes a long gesture on the map view. - * [Map.View.zOrderOnTop](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map.View-property-zOrderOnTop) + * [Map.View.zOrderOnTop](https://titaniumsdk.com/api/) property. Controls whether the map view's surface is placed on top of its window. Note that this will cover all other views that could appear on the map (e.g., the zoom controls, the my location button). @@ -501,9 +501,9 @@ The ti.map module supports the following new APIs: The `Titanium.UI.WebView` class exposes two Android WebSettings APIs as two new properties: - * [cacheMode](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.WebView-property-cacheMode): + * [cacheMode](https://titaniumsdk.com/api/): assign a `Titanium.Android.WEBVIEW_*` constant to this property to override how the cache is used. - * [lightTouchEnabled](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.WebView-property-lightTouchEnabled): + * [lightTouchEnabled](https://titaniumsdk.com/api/): controls using light touches to make a selection and activate mouseovers, for example, highlighting links in response to user interaction. Enabled by default (set to `true`). To workaround [Android Issue 33651](https://code.google.com/p/android/issues/detail?id=33651), set @@ -536,13 +536,13 @@ and apply specific attributes, such as font and kerning, to characters or range string. Create a -[Titanium.UI.iOS.AttributedString](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.iOS.AttributedString) +[Titanium.UI.iOS.AttributedString](https://titaniumsdk.com/api/) object and assign it to one of the following properties: - * [Titanium.UI.Label.attributedString](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Label-property-attributedString) - * [Titanium.UI.TextArea.attributedString](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TextArea-property-attributedString) - * [Titanium.UI.TextField.attributedString](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TextField-property-attributedString) - * [Titanium.UI.TextField.attributedHintText](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TextField-property-attributedHintText) + * [Titanium.UI.Label.attributedString](https://titaniumsdk.com/api/) + * [Titanium.UI.TextArea.attributedString](https://titaniumsdk.com/api/) + * [Titanium.UI.TextField.attributedString](https://titaniumsdk.com/api/) + * [Titanium.UI.TextField.attributedHintText](https://titaniumsdk.com/api/) @@ -580,13 +580,13 @@ The `Titanium.UI.iOS.Animator` object provides support for the built-in iOS dyna which are supported on iOS 7 and later. The animator provides physics-related capabilities and animations using the iOS physics engine. -For more information, see the [Titanium.UI.iOS.Animator API reference](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.iOS.Animator). +For more information, see the [Titanium.UI.iOS.Animator API reference](https://titaniumsdk.com/api/). #### Font Text Styles The `Font` object supports a new property, -[textStyle](https://docs.appcelerator.com/titanium/latest/#!/api/Font-property-textStyle), available +[textStyle](https://titaniumsdk.com/api/), available for iOS 7 and later. Assign this property a `Titanium.UI.TEXT_STYLE_*` constant to use a predefined text style. If this property is assigned a valid value, all other font properties are ignored. @@ -595,10 +595,10 @@ text style. If this property is assigned a valid value, all other font properti iOS 7 introduced new animation capabilities for transitioning Windows in a NavigationWindow or Tab. Create a transition animation object with the -[Titanium.UI.iOS.createTransitionAnimation](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.iOS-method-createTransitionAnimation) +[Titanium.UI.iOS.createTransitionAnimation](https://titaniumsdk.com/api/) method to specify animation objects to hide the current window and show the new window, then assign the transition animation object to the Window's -[transitionAnimation](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Window-property-transitionAnimation) +[transitionAnimation](https://titaniumsdk.com/api/) property. @@ -607,16 +607,16 @@ property. iOS 7 introduced new background execution modes allowing the application to download large content while its in the background. These background modes are exposed as the following Titanium APIs: - * [URL session module](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.URLSession): a + * [URL session module](https://titaniumsdk.com/api/): a wrapper for the NSURLSession class that allows the application to download large content in the background. This module provides the main functionality for the background execution modes, such as creating the background download task and monitoring the download once it starts. - * [backgroundfetch](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.App.iOS-event-backgroundfetch) + * [backgroundfetch](https://titaniumsdk.com/api/) event: use to monitor signals from iOS to update the application while in the background. - * [silentpush](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.App.iOS-event-silentpush) + * [silentpush](https://titaniumsdk.com/api/) event: use to monitor a push notification to tell the application there is content to download. -For more information, see the [iOS Background Services guide](https://docs.appcelerator.com/titanium/latest/#!/guide/iOS_Background_Services). +For more information, see the [iOS Background Services guide](https://titaniumsdk.com/api/). #### ListView Phase 2 @@ -629,8 +629,8 @@ The following ListView features were completed in this Release: * Pull-to-refresh support * Search support -For more information, see the [ListViews guide](https://docs.appcelerator.com/titanium/latest/#!/guide/ListViews) -and [Titanium.UI.ListView API reference](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.ListView). +For more information, see the [ListViews guide](https://titaniumsdk.com/api/) +and [Titanium.UI.ListView API reference](https://titaniumsdk.com/api/). #### Map Module @@ -639,13 +639,13 @@ As of this Release, the ti.map module provides native map support on the iOS pla new iOS 7 feature that allows the map to be viewed in a 3D perspective. For more information, see -[iOS Map Kit](https://docs.appcelerator.com/titanium/latest/#!/guide/iOS_Map_Kit). +[iOS Map Kit](https://titaniumsdk.com/api/). #### Popover Content The `Titanium.UI.iPad.Popover` class supports a new property, -[contentView](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.iPad.Popover-property-contentView), +[contentView](https://titaniumsdk.com/api/), used to assign a view object as the content area of the popover before showing the popover. This is now the preferred way to set the content area of a popover instead of using the `add` method. @@ -659,7 +659,7 @@ controller. iOS 6 introduced a new refresh control that can be used to implement the pull-to-refresh mechanism for `ListView` and `TableView`. The Titanium SDK exposes this control as the -[Titanium.UI.RefreshControl](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.RefreshControl) +[Titanium.UI.RefreshControl](https://titaniumsdk.com/api/) object. #### StoreKit Module @@ -674,7 +674,7 @@ Note that the ti.storekit module cannot be tested on the iOS simulator. #### Window Title Attributes The `Titanium.UI.Window` class supports a new property, -[titleAttributes](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Window-property-titleAttributes), +[titleAttributes](https://titaniumsdk.com/api/), used to specify the color, font, and shadow of the window's title. Previously, the only way to specify these attributes was to create a custom Label object and assign diff --git a/apidoc/Titanium/CHANGELOG/3.2.1.GA.mdoc b/apidoc/Titanium/CHANGELOG/3.2.1.GA.mdoc index 1b4ac93b57a..8dee02f73a6 100644 --- a/apidoc/Titanium/CHANGELOG/3.2.1.GA.mdoc +++ b/apidoc/Titanium/CHANGELOG/3.2.1.GA.mdoc @@ -45,7 +45,7 @@ For a complete list of issues addressed in Alloy 1.3.1, see the Alloy This Release coincides with the release of Studio 3.2.1. For a complete list of issues addressed in Studio 3.2.1, see the Studio -[Release Notes](https://docs.appcelerator.com/titanium/latest/#!/guide/Titanium_Studio_Release_Notes). +[Release Notes](https://titaniumsdk.com/api/). @@ -96,7 +96,7 @@ As of this Release, Tizen support is deprecated. Tizen support will be removed Support for lightweight windows is deprecated in this Release and will be removed in Release 3.3.0. -As [noted](https://docs.appcelerator.com/titanium/release-notes/?version=3.2.0.GA#lightweight_windows) +As [noted](https://titaniumsdk.com/api/) in Release 3.2.0, all windows are heavyweight and you cannot control the type of window created. To re-add support for lightweight windows in Release 3.2.x, add the following to your tiapp.xml file: @@ -107,14 +107,14 @@ To re-add support for lightweight windows in Release 3.2.x, add the following to ### Default Android SDK -As [noted](https://docs.appcelerator.com/titanium/release-notes/?version=3.2.0.GA#build_command) +As [noted](https://titaniumsdk.com/api/) in Release 3.2.0, the latest installed Android SDK is used to build your application unless otherwise specified in your `tiapp.xml` file. Previously, the minimum required SDK was used (Android 2.3.x/API level 10). Because of this change, the appearance and behavior of your application will change if you did not specify an Android SDK to build against. For examples of these changes, see -[Android UI Differences](https://docs.appcelerator.com/titanium/latest/#!/guide/Android_UI_Differences). +[Android UI Differences](https://titaniumsdk.com/api/). If you want to keep the appearance or behavior of a specific Android SDK, add the `uses-sdk` element to the Android manifest section of the `tiapp.xml` file with the `android:targetSdkVersion` attribute diff --git a/apidoc/Titanium/CHANGELOG/3.2.3.GA.mdoc b/apidoc/Titanium/CHANGELOG/3.2.3.GA.mdoc index d3fa9e26d40..996f88a74c0 100644 --- a/apidoc/Titanium/CHANGELOG/3.2.3.GA.mdoc +++ b/apidoc/Titanium/CHANGELOG/3.2.3.GA.mdoc @@ -86,7 +86,7 @@ Studio 3.2.3 includes the following enhancements: * Display ACS OAuth keys and secrets in the tiapp.xml GUI overview tab * Support Alloy data binding attributes in content assist -For more information, see the [Release Notes](https://docs.appcelerator.com/titanium/latest/#!/guide/Titanium_Studio_Release_Notes). +For more information, see the [Release Notes](https://titaniumsdk.com/api/). @@ -109,7 +109,7 @@ Use the ActionBar's `subtitle` property to set the subtitle of the ActionBar. ### Cloud Module The ti.cloud module included with this release exposes the ACS -[push_notification/subscription/update.json](https://docs.appcelerator.com/cloud/latest/#!/api/PushNotifications-method-subscription_update) +[push_notification/subscription/update.json](https://titaniumsdk.com/api/) method as the `updateSubscription` method. @@ -123,7 +123,7 @@ The following features are available only for the iOS platform: #### Low Memory Warning Event Monitor the -[Titanium.App.memorywarning](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.App-event-memorywarning) +[Titanium.App.memorywarning](https://titaniumsdk.com/api/) event to receive a warning from the operating system about low memory availability. As part of the low memoy warning from the OS, Titanium applications will automatically clean up @@ -135,7 +135,7 @@ would not know when this occurred. #### ScrollView Deceleration Rate Use the ScrollView's -[decelerationRate](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.ScrollView-property-decelerationRate) +[decelerationRate](https://titaniumsdk.com/api/) property to control the rate of deceleration when the user releases their finger to stop scrolling. This property accepts a floating point number, and the `Titanium.UI.iOS.SCROLL_DECELERATION_RATE_NORMAL` and @@ -147,7 +147,7 @@ points for the deceleration rate. #### ScrollView Scroll Event ScrollView's -[scroll](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.ScrollView-event-scroll) +[scroll](https://titaniumsdk.com/api/) event now returns two additional fields: * `curZoomScale`: float value indicating the current zoom level @@ -166,13 +166,13 @@ The ti.map module included with this release contains a bug fix for iOS The following properties were added to the View class: - * [compassEnabled](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map.View-property-compassEnabled): Enable/disable the compass on the map - * [maxZoomLevel](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map.View-property-maxZoomLevel): Returns max zoom level of the map - * [minZoomLevel](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map.View-property-minZoomLevel): Returns min zoom level of the map + * [compassEnabled](https://titaniumsdk.com/api/): Enable/disable the compass on the map + * [maxZoomLevel](https://titaniumsdk.com/api/): Returns max zoom level of the map + * [minZoomLevel](https://titaniumsdk.com/api/): Returns min zoom level of the map **Map Region Object** -The following properties were added to the [Map Region object](https://docs.appcelerator.com/titanium/latest/#!/api/MapRegionTypev2) to modify the camera +The following properties were added to the [Map Region object](https://titaniumsdk.com/api/) to modify the camera view of the map region: * `bearing`: Direction that the camera is pointing, in degrees clockwise from north @@ -183,8 +183,8 @@ view of the map region: The following APIs were added to the View class to support capturing an image of the map view: - * [onsnapshotready](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map.View-event-onsnapshotready) event: Fired when the snapshot is ready - * [snapshot()](https://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map.View-method-snapshot) method: Takes a snapshot of the map + * [onsnapshotready](https://titaniumsdk.com/api/) event: Fired when the snapshot is ready + * [snapshot()](https://titaniumsdk.com/api/) method: Takes a snapshot of the map diff --git a/apidoc/Titanium/CHANGELOG/3.3.0.GA.mdoc b/apidoc/Titanium/CHANGELOG/3.3.0.GA.mdoc index 4e6a31f20bb..3ec7c98427d 100644 --- a/apidoc/Titanium/CHANGELOG/3.3.0.GA.mdoc +++ b/apidoc/Titanium/CHANGELOG/3.3.0.GA.mdoc @@ -72,15 +72,15 @@ Note that this release includes feature and behavior changes. See [Notice of Fea This release includes over 300 bug fixes and improvements: - * [Full list of Issues that were addressed in Release 3.3.0](https://jira.appcelerator.org/issues/?filter=16132) + * Full list of Issues that were addressed in Release 3.3.0 - * [Fixed Android Issues](https://jira.appcelerator.org/issues/?filter=16133) + * Fixed Android Issues - * [Fixed BlackBerry Issues](https://jira.appcelerator.org/issues/?filter=16134) + * Fixed BlackBerry Issues - * [Fixed iOS Issues](https://jira.appcelerator.org/issues/?filter=16135) + * Fixed iOS Issues - * [Fixed CLI Issues](https://jira.appcelerator.org/issues/?filter=16136) + * Fixed CLI Issues @@ -124,7 +124,7 @@ This release coincides with the release of Studio 3.3.0. * Genymotion virtual device support * New Windows installer -For more details, see the [Studio Release Notes](https://docs.appcelerator.com/titanium/latest/#!/guide/Titanium_Studio_Release_Notes). +For more details, see the [Studio Release Notes](https://titaniumsdk.com/api/). ### Titanium CLI 3.3.0 @@ -183,13 +183,13 @@ Studio. For information on getting started, see: - * [Getting Started with the Windows Phone SDK](https://docs.appcelerator.com/titanium/latest/#!/guide/Getting_Started_with_the_Windows_Phone_SDK) - * [Getting Started with the Windows 8 SDK](https://docs.appcelerator.com/titanium/latest/#!/guide/Getting_Started_with_the_Windows_8_SDK) + * [Getting Started with the Windows Phone SDK](https://titaniumsdk.com/api/) + * [Getting Started with the Windows 8 SDK](https://titaniumsdk.com/api/) To access native features of the Windows Phone platform, create a module that uses the Titanium Windows Phone 8 Reflection API to make calls to the native Windows Phone 8 API. For details on adding native Windows Phone 8 functionality to your application, see -[Windows Phone 8 Module Development Guide](https://docs.appcelerator.com/titanium/latest/#!/guide/Windows_Phone_8_Module_Development_Guide). +[Windows Phone 8 Module Development Guide](https://titaniumsdk.com/api/). @@ -208,13 +208,13 @@ Previously, you had to set a theme to display the action bar. To hide the action bar, the application needs to wait for the main window or tab group to open, then call the Activity's -[actionbar.hide()](https://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Android.ActionBar-method-hide) +[actionbar.hide()](https://titaniumsdk.com/api/) method; or create a theme that hides the action bar. As of this Release, the `tiapp.xml` element, ``, which used to be able to hide the action bar, has no effect on Android applications. -For information about hiding the action bar, see [Android Action Bar: Hiding the Action Bar](https://docs.appcelerator.com/titanium/latest/#!/guide/Android_Action_Bar-section-36735509_AndroidActionBar-HidingtheActionBar). +For information about hiding the action bar, see [Android Action Bar: Hiding the Action Bar](https://titaniumsdk.com/api/). @@ -223,7 +223,7 @@ For information about hiding the action bar, see [Android Action Bar: Hiding the As of this Release, support for lightweight windows (windows without an Android Activity) is removed and using the `ti.android.useLegacyWindow` property in the `tiapp.xml` file has no effect. -As previously mentioned, +As previously mentioned, all windows are heavyweight, and you cannot control the type of window created. Prior to Release 3.2.0, all windows were lightweight by default and you had to explicitly create @@ -265,14 +265,14 @@ use an AppCompat theme as the parent, for example: