1

I'd like to modify already existing drawable objects in an external resource-file, like:

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
        <drawable name="replyIcon" >
            <!--
            get icon from resources
            set color filter
            ...
            -->
        </drawable>
    </resources>

Is it possible? Because Android Studio suggests me "drawable" when I input an "<" inside a "< resources>"-file where I can also add style- and color- tags.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Michael Haas
  • 93
  • 2
  • 11
  • Possible duplicate of [Add a background image to shape in XML Android](https://stackoverflow.com/questions/21002224/add-a-background-image-to-shape-in-xml-android) – Vikasdeep Singh Jul 04 '18 at 07:27

1 Answers1

0

Solution:-

In android you are able to create drawable Resources by following steps:-

  • Firstly, Right Click on the drawable Directory.

  • After that Go New > Drawable resource file.

  • After that New Resource file dialog box open on your computer screen. Enter File name in the text box and then press OK.

  • finally that your drawable resource XML file will be created

Abdulmalek Dery
  • 996
  • 2
  • 15
  • 39
Mr. Roshan
  • 1,777
  • 13
  • 33
  • Thank you very much for the quick answer :) – Michael Haas Jul 04 '18 at 07:47
  • Maybe the formulation of my question is not exactly enough. I'd like to outsource the style / settings / ... of already existing drawables in an Resource file. Because Android Studio suggest me "drawable" in "" when input "<", but it suggest me nothing when I do it inside the " ". – Michael Haas Jul 04 '18 at 07:56
  • you may achieve this in your java code, by accessing resources over there. – Mr. Roshan Jul 04 '18 at 08:06