I need to programatically change the trasparency and color gradient gradually. Let's say I have a textview with background #FF0000FF (solid blue, no transparency) and i need it to change gradually to something that looks like #CC000000 (black background with 80% opacity). Let's say I also have a variable i that gradually goes from 0 to 100, how can I make #FF0000FF transform to #CC000000 along with it?
            Asked
            
        
        
            Active
            
        
            Viewed 1,232 times
        
    1 Answers
0
            
            
        check this link for Setting the transparent background color gradient
try this code
   <TextView
                            android:id="@+id/txtView"
                            android:layout_width="58dp"
                            android:layout_height="58dp"
                            android:gravity="center"
                            android:textColor="@color/white_font"
                            android:textSize="20sp"
                            android:background="#99000000"
                            android:textStyle="bold" />
Hope this helps...
- 
                    1Let's say you have a slider control. As the user slides from A to B, how do you change one color with one transparency to another color with another transparency and gradually? – nomongo Jul 24 '14 at 15:39
 
     
    