0

I want to use that arrow image in a custom control I'm making, is there a way to get that asset?

I'm aware that I can download a similar one from the icons in the material design:

https://material.io/tools/icons/?icon=arrow_drop_down&style=baseline

But those are black, and the spinner's is grey. Also, if the spinner contains it, then the asset is already included in the app, so it feels dumb to have 2 near-identical assets.

Does it have an ID?

MichaelThePotato
  • 1,523
  • 2
  • 10
  • 19
  • I'm not completely sure about your requirements. Did you check this StackOverflow [question](https://stackoverflow.com/q/37411637/5180017)? And about the icon color you can download icon in SVG format, open it in text editor and change the color as per your requirement (like grey). – Shashanth Dec 31 '18 at 08:50
  • Thanks for your response! Perhaps I didn't phrase my question properly: I want to get that arrow's resource id/png and use it in another ImageView. It's not a case in which I have a spinner and I want to change it's drop down arrow image. – MichaelThePotato Dec 31 '18 at 08:54
  • you can change the color from "import vector drawable". it has a decent color picking tool – C Forge Dec 31 '18 at 09:10

1 Answers1

1

There isn't an image resource for spinner drop-down arrow, its an image resource for an btn_dropdown.

The btn_dropdown xml file location is:

C:\Users\Administrator\AppData\Local\Android\Sdk\platforms\android-28\data\res\drawable\btn_dropdown

and the following are its content:

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:state_window_focused="false" android:state_enabled="true"
        android:drawable="@drawable/btn_dropdown_normal" />
    <item
        android:state_window_focused="false" android:state_enabled="false"
        android:drawable="@drawable/btn_dropdown_disabled" />
    <item
        android:state_pressed="true"
        android:drawable="@drawable/btn_dropdown_pressed" />
    <item
        android:state_focused="true" android:state_enabled="true"
        android:drawable="@drawable/btn_dropdown_selected" />
    <item
        android:state_enabled="true"
        android:drawable="@drawable/btn_dropdown_normal" />
    <item
        android:state_focused="true"
        android:drawable="@drawable/btn_dropdown_disabled_focused" />
    <item
        android:drawable="@drawable/btn_dropdown_disabled" />
</selector>

You could find a specific drawable file in the above file, for example:

name: btn_dropdown_normal.9.png (this is your want!)

location: C:\Users\Administrator\AppData\Local\Android\Sdk\platforms\android-28\data\res\drawable-hdpi\

navylover
  • 12,383
  • 5
  • 28
  • 41