Android的自定义按钮可绘制XML文件 [英] Android Custom Button Drawable XML File
问题描述
我最近发现,您可以在一个XML文件,然后可以用一个按钮(和其他看法,我猜)使用描述一个Android定制的绘制,这启发了我问这个问题:
I recently discovered that you can describe an Android custom drawable in an XML file, which you can then use with a button (and other View, I guess), and this inspired me to ask this question:
有谁知道(或知道在哪里可以找到)是precisely描述了确切的默认按钮,在Android应用程序中显示出来,如果你不改变一个细节的XML文件。
Does anyone know (or know where I can find) an XML file that precisely describes the exact default button that shows up in an Android application if you don't change a single detail.
在我看来,这将是一个非常有用的出发点。
It seems to me, that would be a very helpful starting point.
谢谢,
R上。
Thanks, R.
推荐答案
默认的Android浏览,如按钮,其选择XML文件是特别Android平台的资源文件夹中。
The default Android Views, like Button, and its selector XML files are available in resource folder of particular Android platform.
例如,
\\ Android的SDK-WINDOWS \\平台\\ Android的8 \\ DATA \\资源\\文件夹绘制
For example, \android-sdk-windows\platforms\android-8\data\res\drawable folders.
这些可绘制和XML文件在我们的应用程序code访问,使用android.R。
例如:android.R.drawable.btn_check
These drawables and XML files are accessible in our application code, using 'android.R'. For example: android.R.drawable.btn_check
这篇关于Android的自定义按钮可绘制XML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!