I am trying to slowly fill a circle's background starting from the center in Android
Below is an example snippet that I found here, I am trying to do the exact same thing like the snippet below but in Android not on a web. I tried to google it but I only get results such as using TransitionDrawable to change from colors to colors which is not what I wanted
$('div').click(function() {
$(this).toggleClass('selected');
});
div.button {
height: 27px;
width: 27px;
border-radius: 50%;
background: green;
}
div.button:after {
content: ''; /* needed for rendering */
position: relative;
display: block; /* so we can set width and height */
border-radius: 50%;
height: 0%;
width: 0%;
margin: auto; /* center horizontally */
background: red;
top: 50%; /* center vertically */
transform: translateY(-50%); /* center vertically */
transition: 1s;
}
div.button.selected:after {
height: 100%;
width: 100%;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="button">
</div>