Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24688] Android: Add support for adaptive-icons

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2020-02-07T23:16:55.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, icon
ReporterCarlos Henrique Zinato
AssigneeGary Mathews
Created2017-05-05T14:49:13.000+0000
Updated2020-03-23T16:53:05.000+0000

Description

Attachments

FileDateSize
NB_Icon_Layers_3D_03_ext.gif2017-05-05T14:48:51.000+00001724477
Screenshot_20191029-154836.png2019-10-30T14:26:51.000+0000742112

Comments

  1. Hans Knöchel 2017-05-05

    Should be similar to do as TIMOB-24659. Can you try adding the related attribute there? Should be an easy one. *EDIT*: Using the above change (already merged), couldn't you just specify the following in your res directory / theme:
       <adaptive-icon>
           <background android:drawable="@color/ic_background"/>
           <foreground android:drawable="@mipmap/ic_foreground"/>
       </adaptive-icon>
       
    If that works, we should document it somewhere, no idea what docs would be proper.
  2. Donovan Lewis 2020-02-01

    Really think we should get this working, would be very nice to have.
  3. Hans Knöchel 2020-02-01

    @ Donovan: This already works since a long time. Just see the [hyperloop-example](https://github.com/appcelerator/hyperloop-examples/) app, especially the tiapp.xml and app/platform/android. Works great. This ticket should be closed.
  4. Gary Mathews 2020-02-07

    Closing, this feature is already implemented.
  5. Donovan Lewis 2020-02-09

    @Hans The hyperloop example worked great for getting this working. Thanks for letting me know about it. This probably should be added to the documentation somewhere because I never came across it even after 2 weeks of googling. Hopefully I just missed it.
  6. Joshua Quick 2020-02-11

    [~dlewis23], in this case, you can following Google's documentation here... https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive#creating_adaptive_icons_in_xml You can set your "AndroidManifest.xml" settings via your "tiapp.xml". You can add native Android "res" files to Titanium project directory.
       ./platform/android/res
       
  7. Joshua Quick 2020-03-23

    Everyone, [~michael] has written a tutorial on how to do this here... https://github.com/m1ga/from_zero_to_app/blob/master/android_adaptive_icons.md

JSON Source