Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1157] Creating sample app from advanced/android_density doesn't copy resolution-specific image folders

GitHub Issuen/a
TypeBug
PriorityMedium
StatusResolved
ResolutionFixed
Resolution Date2014-10-14T20:14:26.000+0000
Affected Version/sAlloy 1.6.0
Fix Version/sAlloy 1.7.0
ComponentsTooling
Labelsn/a
ReporterTim Statler
AssigneeTim Poulsen
Created2014-10-07T16:03:32.000+0000
Updated2014-10-23T20:13:42.000+0000

Description

*Steps:* 1. Create a new Alloy app from the advanced/android_density sample
titanium create --name=appname --id=com.domain.appname --platforms=all
cd appname
alloy new . --testapp advanced/android_density
Note that the source android_density code includes the following res-* folders each containing 'theImage.png' at different pixel densities.
├── assets
│   ├── android
│   │   ├── appicon.png
│   │   ├── default.png
│   │   └── images
│   │       ├── res-hdpi
│   │       │   └── theImage.png
│   │       ├── res-ldpi
│   │       │   └── theImage.png
│   │       ├── res-mdpi
│   │       │   └── theImage.png
│   │       └── res-xhdpi
│   │           └── theImage.png
│   └── images
│       └── theImage.png
2. Examine contents of the generated Alloy project's *appname/app/assets* directory. *Results* The res-* folders and contents were not copied into the new project's corresponding assets/android/images folder, as shown below:
│   ├── assets
│   │   ├── android
│   │   │   ├── appicon.png
│   │   │   ├── default.png
│   │   │   └── images
│   │   │       ├── res-long-land-hdpi
│   │   │       │   └── default.png
│   │   │       ├── res-long-land-ldpi
│   │   │       │   └── default.png
│   │   │       ├── res-long-land-mdpi
│   │   │       │   └── default.png
│   │   │       ├── res-long-land-xhdpi
│   │   │       │   └── default.png
│   │   │       ├── res-long-land-xxhdpi
│   │   │       │   └── default.png
│   │   │       ├── res-long-land-xxxhdpi
│   │   │       │   └── default.png
│   │   │       ├── res-long-port-hdpi
│   │   │       │   └── default.png
│   │   │       ├── res-long-port-ldpi
│   │   │       │   └── default.png
│   │   │       ├── res-long-port-mdpi
*Expected* The res-* folders and their contents are merged in with the existing assets/android/images folder contents.
│   ├── assets
│   │   ├── android
│   │   │   ├── appicon.png
│   │   │   ├── default.png
│   │   │   └── images
│   │   │       ├── res-hdpi
│   │   │       │   └── theImage.png
│   │   │       ├── res-ldpi
│   │   │       │   └── theImage.png
│   │   │       ├── res-mdpi
│   │   │       │   └── theImage.png
│   │   │       ├── res-xhdpi
│   │   │       │   └── theImage.png
│   │   │       ├── res-long-land-xxhdpi
│   │   │       │   └── default.png
│   │   │       ├── res-long-land-xxxhdpi
│   │   │       │   └── default.png
│   │   │       ├── res-long-port-hdpi
│   │   │       │   └── default.png
│   │   │       ├── res-long-port-ldpi
│   │   │       │   └── default.png
│   │   │       ├── res-long-port-mdpi

Comments

  1. Tim Statler 2014-10-10

    [~skypanther], there's a similar issue with Dynamic Styles sample, where the styles/app.tss file doesn't get copied over, which messes up things. So it's not specific to a particular test sample, as you you prolly already guessed.
  2. Tim Statler 2014-10-11

    [~skypanther], I submitted a PR that (I think) fixes the issues I've been seeing. The fix was to move the process of copying the contents of the testapp folder after copying the Resources from the host Ti app. https://github.com/appcelerator/alloy/pull/587
  3. Tim Poulsen 2014-10-14

    PR approved and merged. Confirm with steps in description above. Also with alloy new . --testapp advanced/dynamic_styling Also with jake test:spec\[new.js\] and in particular you should see \[PASS\] alloy new --> executes alloy new "/Users/admin/repos/alloy/test/projects/Harness" --testapp ui/listview with success

JSON Source