Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23538] iOS: Refactor default new app-projects

GitHub Issuen/a
TypeImprovement
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-07-30T19:00:48.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.0.0
ComponentsAndroid, iOS
Labelsproject, splash-screen, template
ReporterHans Knöchel
AssigneeHans Knöchel
Created2016-06-17T17:54:29.000+0000
Updated2016-09-15T22:55:05.000+0000

Description

For our Release 6.0.0, we should really refresh our default app templates that are used when we create a new project. We still have those iOS3-like icons with no retina etc. Same for Android: We should use our latest design for the splash-screens and ensure that we use 9-patch for that. In Addition to that, Alloy and classic projects should both use the same assets and interface. So we need an Alloy PR as well to cover the Alloy templates.

Comments

  1. Hans Knöchel 2016-06-17

    [~cbarber] Anything I need to be aware of here? For now, I would just replace some images and clean-up the default code. Does the CLI do anything else?
  2. Chris Barber 2016-06-17

    Not really, just update this template: https://github.com/appcelerator/titanium_mobile/tree/master/templates/app/default/template. I know there are some duplicate files, but that's the one you want. You can also add new templates along side "default" such as "two-tabbed" or whatever.
  3. Hans Knöchel 2016-06-17

    Thanks Chris! [~jgo] Can you make a new Launchscreen-design as a replacement for [these files](https://github.com/appcelerator/titanium_mobile/tree/master/iphone/templates/app/default/template/Resources/iphone)? To realize the 9-patch concept in Android, our Titanium Logo should placed in the middle and background should be flat, so we can render it dynamically in Android. That are all requirements I have, you will know what looks best! :-)
  4. Hans Knöchel 2016-06-17

    PR (wip): https://github.com/appcelerator/titanium_mobile/pull/8073
  5. Chris Barber 2016-06-18

    [~hansknoechel] For iOS, the "launch screen" isn't supposed to be a splash screen. It's supposed to look like the app's UI without data. Perhaps that is was we should start evangelizing? CC [~emerriman] just in case he wants to chime in. If we want to keep the notion of a splash screen, then what's wrong with the existing files? They are just fine. If anything, I'd say let's switch to a storyboard-based launch screen. For Android, I agree this is in a bad state. We only have a [single image](https://github.com/appcelerator/titanium_mobile/blob/master/android/templates/app/default/template/Resources/android/default.png). I don't necessary agree that it should be a 9-patch. It would probably be better to create separate launch screens for ldpi, mdpi, hdpi, xhdpi, xxhdpi, and xxxhdpi. Another thing we should be consistent on is we use the Titanium logo for the app icon and the iOS storyboard launch screens. We use the Appcelerator logo for the png launch screens and the icons on the default app's tabs. I highly recommend using the Titanium logo for everything.
  6. Hans Knöchel 2016-06-18

    I would welcome the default UI-state for iOS, good idea! On Android, the 9-patch images are best-practice around the native development, so we should keep it simple there.
  7. Ashraf Abu 2016-07-26

    Just passing through since I see the component tag "Android". [~hansknoechel] Any help needed and any movement for this for Feature Freeze 6.0.0?
  8. Hans Knöchel 2016-07-26

    Yes, please. Can you create splash-screens for all new densities that have not been covered, yet? Although I think 9-patches are a good way, in this ticket we should stick to the (fullscreen) images like before.
  9. Ashraf Abu 2016-07-28

    I took a look deeper into this. Not entirely true that there's only one image default.png. There's already the other images [here](https://github.com/appcelerator/titanium_mobile/tree/master/android/templates/app/default/template/Resources/android/images) in each folder for each different type of configuration. I think it's totally fine. You can see that it's being used when you run a tablet emulator that has a natural landscape orientation. If you want to do a 9 patch splash, you would need to follow the instructions [here](https://developer.android.com/training/multiscreen/screensizes.html#TaskUse9Patch) to create a 9 patch image. Then you would need to to be called background.9.png and put it platform/android/res/drawable-nodpi/background.9.png. See [here](https://developer.android.com/guide/practices/screens_support.html) for nodpi info. After doing that you would need to remove the directory Resources/android/images/ that is located [here](https://github.com/appcelerator/titanium_mobile/tree/master/android/templates/app/default/template/Resources/android/images). But for the argument of new densities, it's all already covered in here [https://github.com/appcelerator/titanium_mobile/tree/master/android/templates/app/default/template/Resources/android/images] extensively. If it's not, Android will actually scale it to fit. Thus, an improvement would indeed be the 9 patch as mentioned above. TL;DR Summary: Android densities all covered for the fullscreen. No issue. (For future, I am advocating it should be 9 patch) Improvements that can be done: Create a 9 patch splash. Would probably want a designer (or someone good at designing) to create a good resizable image according to the [9 patch spec](https://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch). I think your main purpose of this ticket was for the iOS icons (retina issue). For android, perhaps we can get the images done for 6.1.0? As mentioned, Android already has all the images. [~hansknoechel] Reference: [http://docs.appcelerator.com/platform/latest/#!/guide/Icons_and_Splash_Screens-section-29004897_IconsandSplashScreens-SplashScreen]
  10. Chris Barber 2016-07-28

    What about having density specific 9 patch images? It will look much better on the various displays. This would be analogous to iOS storyboard launch screens where there are 3 different density specific versions of the LaunchLogo.png.
  11. Ashraf Abu 2016-07-29

    Having density specific 9 patch images would indeed make it look sharper/better. Info [here](https://developer.android.com/guide/practices/screens_support.html) Eg:- platform/android/res/drawable-ldpi/background.9.png platform/android/res/drawable-mdpi/background.9.png platform/android/res/drawable-hdpi/background.9.png platform/android/res/drawable-xhdpi/background.9.png platform/android/res/drawable-xxhdpi/background.9.png platform/android/res/drawable-xxxhdpi/background.9.png We actually don't need to have all. But having them all won't hurt either. (Just takes up space for the image) {quote} Be aware that, when the Android system picks which resources to use at runtime, it uses certain logic to determine the "best matching" resources. That is, the qualifiers you use don't have to exactly match the current screen configuration in all cases in order for the system to use them. Specifically, when selecting resources based on the size qualifiers, the system will use resources designed for a screen smaller than the current screen if there are no resources that better match (for example, a large-size screen will use normal-size screen resources if necessary). However, if the only available resources are larger than the current screen, the system will not use them and your application will crash if no other resources match the device configuration (for example, if all layout resources are tagged with the xlarge qualifier, but the device is a normal-size screen). For more information about how the system selects resources, read How Android Finds the Best-matching Resource. {quote} So yup. That is a good idea. Different density specific 9 patch images.
  12. Ashraf Abu 2016-07-29

    [~hansknoechel] can we change this ticket for iOS only and resolve this issue? And then create an Android ticket to get 9 patch images done?
  13. Hans Knöchel 2016-07-29

    Agree. We can merge this one and I'll file an Android-ticket for density-specific 9-patch screens for 6.1.0.
  14. Hans Knöchel 2016-08-01

    Steps to test: 1. Create a new project 2. Build the project 3. Verify that the new icons are visible and the application does not crash
  15. Lokesh Choudhary 2016-09-15

    Verified the fix for Android & IOS for the classic app. App shows the new icons & does not crash. Closing. Environment: Appc Studio : 4.8.0.201609061702 Ti SDK : 6.0.0.v20160913184210 Ti CLI : 5.0.9 Alloy : 1.9.1 MAC El Capitan : 10.11.6 Appc NPM : 4.2.8-6 Appc CLI : 6.0.0-38 Node: 4.4.4 Nexus 6 - Android 6.0.1

JSON Source