安卓:使用默认高亮颜色的自定义按钮 [英] Android: Use default highlight colors in a custom button

查看:245
本文介绍了安卓:使用默认高亮颜色的自定义按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的Andr​​oid应用程序使用一个按钮,但我想定制它的外观。不过,我想的亮点和按钮的选择的颜色是一样的默认颜色(即黑暗与光明橙色渐变,或任何主题色用品)。

I want to use a Button in my android app but I want to customize how it looks. However, I want the highlight and selected colors of the button to be the same as the default colors (i.e. the dark and light orange gradients, or whatever the theme color supplies).

反正是有得到默认的高亮/选择可绘制,并使用它作为填充我的按钮,选定并高亮状态?

Is there anyway to get the default highlight/selected drawables and to use that as the fill for my buttons on the selected and highlighted states?

谢谢!

推荐答案

您所要求的两个不同的东西,你想的可绘制或彩色code?

You are asking for two different things, do you want the drawables or the colorcode?

无论如何,你可以在这里找到可绘制的名称: http://androiddrawableexplorer.appspot.com/
我不知道,如果你可以从你的应用程序直接使用它们,或者如果你必须将它们保存到您可绘制第一个文件夹,但您可以在SDK中找到它们。如果你想要的颜色codeS,使用GIMP从图片中提取它们。

Anyway, you can find the name of the drawables here: http://androiddrawableexplorer.appspot.com/ I don't know if you can use them directly from your app or if you have to save them to your drawables folder first, but you can find them in your sdk. If you want the colorcodes, use gimp to extract them from the pictures.

这篇关于安卓:使用默认高亮颜色的自定义按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆