How to create a custom gradient in Android?

I want to know if this gradient color is feasible in android?
How about if possible?
http://www.techandall.com/wp-content/uploads/2013/10/techandall_mobile-analytics-UI-concept_preview1.jpg

Thank you,
Bskania.< /p>

int startColor=Color.parseColor("#a6c1de");
/ /you can add as many gradient colors as you want here
//and include it in the int array while initializing GradientDrawable
int endColor=Color.parseColor("#aa82b7");
GradientDrawable mDrawable=new GradientDrawable(Orientation.LEFT_RIGHT, new int[] startColor,endColor});

LinearLayout mLayout=(LinearLayout)findViewById(R.id.your_id);
mLayout.setBackgroundDrawable( mDrawable);

I want to know if this gradient color is feasible in android?
How about if possible?
http://www.techandall.com/wp-content/uploads/2013/10/techandall_mobile-analytics-UI-concept_preview1.jpg

Thank you,
Bskania.< /p>

int startColor=Color.parseColor("#a6c1de");
//you can add as many gradient colors as you want here
//and include it in the int array while initializing GradientDrawable
int endColor=Color.parseColor("#aa82b7");
GradientDrawable mDrawable=new GradientDrawable(Orientation.LEFT_RIGHT, new int[ ] startColor,endColor});

LinearLayout mLayout=(LinearLayout)findViewById(R.id.your_id);
mLayout.setBackgroundDrawable(mDrawable);

< p>

Leave a Comment

Your email address will not be published.