Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android stroke with multi color start , middle and end color

I want to implement a stroke in the android like the start colour white and in Middle Its Showing the shadowed black colour and at the end colour is again same as in start.I have a picture of stroke but I cant post here.Can we implement this??? Thanks in Advance

like image 260
malik M Avatar asked Feb 19 '23 01:02

malik M


1 Answers

You can have a shape like this, of course you will have to change colors based on your need

<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">

    <stroke android:width="6dp" android:color="#FFCCCCCC"/>

    <padding 
        android:left="5dp" 
        android:top="5dp" 
        android:right="5dp"
        android:bottom="5dp" />

    <corners android:radius="8dp" />

    <gradient
        android:angle="270"
        android:startColor="#FFCCCCCC"
        android:centerColor="#FFFFFFFF"
        android:endColor="#FFCCCCCC"
        android:type="linear" />

</shape> 

some link added as you requested,

http://blog.stylingandroid.com/

http://developer.android.com/guide/topics/ui/themes.html

http://developers.janrain.com/documentation/mobile-libraries/android/android-sdk/introduction-to-android-theme-customization/

like image 116
VendettaDroid Avatar answered Mar 07 '23 16:03

VendettaDroid