Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3163] Tooling: Android Built-in Modules Need Native Resource Support

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-05-06T10:13:38.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.7.0, Sprint 2011-11
ComponentsAndroid
Labelsandroid, enterprise, feature, release-1.7.0, reported-1.6.0, rplist, tooling
ReporterDon Thorp
AssigneeBill Dawson
Created2011-04-15T03:38:25.000+0000
Updated2011-05-06T10:13:38.000+0000

Description

Ticket #3161 needs support added to the Android build to allow native resources to be used in components. For example the cancel icon on searchbar needs to be density aware. I can also forsee needing localization support as well.

Comments

  1. Bill Dawson 2011-04-15

    (from [ff2481b711104cb7726133642b3b6268ab1f39e8]) Oops, forgot to actually add the button pngs themselves. [#3163] https://github.com/appcelerator/titanium_mobile/commit/ff2481b711104cb7726133642b3b6268ab1f39e8"> https://github.com/appcelerator/titanium_mobile/commit/ff2481b71110...

  2. Bill Dawson 2011-04-15

    (from [87c5438f84f8469f790b2e3e41b9e4a731596b40]) Eliminate zip task warnings that were occurring for each module that didn't have a res file. [#3163] https://github.com/appcelerator/titanium_mobile/commit/87c5438f84f8469f790b2e3e41b9e4a731596b40"> https://github.com/appcelerator/titanium_mobile/commit/87c5438f84f8...

  3. Bill Dawson 2011-04-15

    (from [0dc764d5d260b291e6423b4aecf6afb66696ea69]) Move the facebook login/logout buttons also into the facebook module res folder, and change the LoginButton.java's handling of the button images to use these resources. [#3163] https://github.com/appcelerator/titanium_mobile/commit/0dc764d5d260b291e6423b4aecf6afb66696ea69"> https://github.com/appcelerator/titanium_mobile/commit/0dc764d5d260...

  4. Bill Dawson 2011-04-15

    (from [17444de26227b98acb48863da827a5b21bf551fc]) Remove "close.png",which is not used anywhere [#3163] https://github.com/appcelerator/titanium_mobile/commit/17444de26227b98acb48863da827a5b21bf551fc"> https://github.com/appcelerator/titanium_mobile/commit/17444de26227...

  5. Bill Dawson 2011-04-15

    Also these commits. Lord only knows how the agent decides to not list some commits.

    https://github.com/appcelerator/titanium_mobile/commit/17444de26227b98acb48863da827a5b21bf551fc"> https://github.com/appcelerator/titanium_mobile/commit/17444de26227...

    https://github.com/appcelerator/titanium_mobile/commit/14b5ed3c21c12180a575ecc3ea3f9c5cd5b1f046"> https://github.com/appcelerator/titanium_mobile/commit/14b5ed3c21c1...

    https://github.com/appcelerator/titanium_mobile/commit/26a407c3c16430966fcbd597f3769973b87a0fdd"> https://github.com/appcelerator/titanium_mobile/commit/26a407c3c164...

  6. Bill Dawson 2011-04-15

    QE testing:

    Use this app.js:

       Titanium.UI.setBackgroundColor('#000');
       var win = Titanium.UI.createWindow({  
           title:'Test', backgroundColor:'#000', exitOnClose: true
       });
       
       // This just ensures our Facebook module gets included 
       // when the app is built.
       Ti.Facebook.appid=1; 
       
       win.add( Ti.UI.createImageView({
           image: Ti.App.Android.R.drawable.facebook_icon,
           width: 'auto', height: 'auto'
       }));
       
       win.open();
       

    When you run it, you should see the small Facebook icon. What is this proving?? That facebook resources are included in your application (you accessed them with the Ti.App.Android.R.drawable.facebook_icon line of code). The facebook resources got included in your app because you have a line of code that accesses the facebook module: Ti.Facebook.appid=1.

  7. Bill Dawson 2011-04-15

    (from [fe5dc17191186669f6118f91db37311fb50c6bbf]) Drillbit test for module resource packaging [#3163] https://github.com/appcelerator/titanium_mobile/commit/fe5dc17191186669f6118f91db37311fb50c6bbf"> https://github.com/appcelerator/titanium_mobile/commit/fe5dc1719118...

  8. Bill Dawson 2011-04-15

    Need to re-open this because it fails on Windows. Apparently Python ZipFile module as packaged in Windows does not include the extractall method, which I'm using for this.

  9. Bill Dawson 2011-04-15

    (from [03daaf2fb140055184a57a0c7c14bb70c35f25b8]) In builder.py, when using python zipfile to get module resources, extract them manually since extractall() is not available in python 2.5. [#3163] https://github.com/appcelerator/titanium_mobile/commit/03daaf2fb140055184a57a0c7c14bb70c35f25b8"> https://github.com/appcelerator/titanium_mobile/commit/03daaf2fb140...

  10. Bill Dawson 2011-04-15

    QE: Same testing instructions above (March 22nd, 2011 @ 05:35 PM comment). But you may want to run it on Windows as well just to be sure.

  11. Bill Dawson 2011-04-15

    (from [659ed91cdb000cb8cdc4ed0f5c86d3c0d69e9a53]) Use the file-by-file zipfile extract on all platforms, not just windows. [#3163] https://github.com/appcelerator/titanium_mobile/commit/659ed91cdb000cb8cdc4ed0f5c86d3c0d69e9a53"> https://github.com/appcelerator/titanium_mobile/commit/659ed91cdb00...

  12. Don Thorp 2011-05-06

    Tested on Nexus One 2.3.4

JSON Source