Is it possible to set background color for only (1/4)th portion of a View in Android? I have a use case where I need to select a view and color it after dividing it in portions, Ive looked at developer docs but I am unable to find a way to do the same.
Edit: I need to make it banded something like "| | | |" and I need to do it dynamically.
it is useful for you
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="#FFFFFF"
android:endColor="#00000000"
android:angle="45"/>
</shape>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/gradient" >
</LinearLayout>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With