Android : Android color background transition like css

on Friday, September 26, 2014


I need make the background color of my activity little bit different ( programatically ) i have this example in css:



<html>
<head>
<style type="text/css">
div{
width: 150px;
height: 150px;
background-color: #343;
transition: ease all 0.5s;
}
div:hover{
background-color: #ccc;
}
</style>
</head>
<body>
<div> </div>
</body>
</html>


http://jsfiddle.net/x199ax41/ ( please hover the div ), someone know how could i do the same effect when user click in a button for example?


This is a bad idea ( thinking usability )?


Thanks.


0 comments:

Post a Comment