I am developing an android application I'd like to display alphabets in a single circular area and I also need the circular area to be white and the alphabet to have primaryColor
of my application,
this is my textView
:
<TextView
android:id="@+id/first"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="A"
android:background="@drawable/circle" />
This is the code for circle.xml
in the drawable
folder:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval" >
<stroke android:width="1dp" android:color="@color/colorPrimaryDark" />
<gradient android:startColor="@color/white" android :endColor="@color/white"
android:angle="270"
/>
</shape>
This is the code of the filled_circle
:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval" >
<stroke android:width="1dp" android:color="@color/colorPrimaryLight" />
<gradient android:startColor="@color/colorPrimaryLight"
android:endColor="@color/colorPrimaryLight"
android:angle="270"
/>
</shape>
and code in the java
file:
@Override
public void onClick(View v) {
}
Question
when each textarea of alphabet is clicked the white color should be fading out and the primaryColor
should be fading in, with animation.
can someone help , get this done with help of animation
library in android 4 and above?
I am currently trying to replace the background of textview
with another resource and applying animation to it, but I am completely open to any new suggestion and new way of performing this,
I also provide my current code above but let me know if I have to make a fundamental change or modification to get it working with animation
library?