Standard original XML file for a tooglebutton

Asked

Viewed 44 times

0

I am customizing buttons in the application and some questions have arisen regarding some attributes.

I’d like access to the archive default Android and make the changes in a copy of it, would make it much easier.

Where do I see it?

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
     <shape 
        android:shape="rectangle"> 
     <corners  
        android:bottomLeftRadius="20dp"  
        android:bottomRightRadius="20dp"  
        android:topLeftRadius="20dp"  
        android:topRightRadius="20dp" />  
     <stroke android:width="1dip" 
        android:color="#598e96" /> 
      <gradient android:angle="-90" 
        android:endColor="#7fbac6" 
        android:startColor="#27646c" /> 
       </shape> 
</item> 
<item android:state_checked="false"> 
    <shape android:shape="rectangle"> 
        <corners  
 android:bottomLeftRadius="20dp"  
 android:bottomRightRadius="20dp"  
 android:topLeftRadius="20dp"  
 android:topRightRadius="20dp" /> 
        <stroke android:width="5dip" 
             /> 
          <gradient 

        android:angle="-45"
        android:endColor="#707070" 
        android:startColor="#303030" /> 
    </shape> 
</item>
<item android:state_checked="true"> 
    <shape android:shape="rectangle"> 
        <corners  
 android:bottomLeftRadius="20dp"  
 android:bottomRightRadius="20dp"  
 android:topLeftRadius="20dp"  
 android:topRightRadius="20dp" /> 
        <stroke android:width="5dip" 
             /> 

         <gradient 

        android:angle="-45"
        android:endColor="#2020ff" 
        android:startColor="#000030" /> 

    </shape>

</item>

Today I did it by hand, but if I wanted to use a file like this to match the default only with one change, I wanted the default. wanted one that matched the default option.

  • 1

    I will put once again: http://meta.pt.stackoverflow.com/questions/846/sauda%C3%A7%C3%B5es-e-acknowledgments

  • What do you mean default file? Are you saying the look (style)? You could put an example of code/xml?

  • edited the question, see if you understand @wakim

1 answer

1


Browser other questions tagged

You are not signed in. Login or sign up in order to post.