summaryrefslogtreecommitdiffstats
path: root/app/src/main/java/com/xc3fff0e/xmanager/xC3FFF0E.java
blob: 737f3ea464aa896e399aa04f5e91eb8b1228e53f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.xc3fff0e.xmanager;

import android.graphics.drawable.*;
import android.view.*;
import android.widget.*;
import android.content.res.*;
import android.graphics.*;
import android.view.Gravity;

public class xC3FFF0E{

public static void setBackgroundGradient(View view, int color1, int color2){
GradientDrawable gd = new GradientDrawable(GradientDrawable.Orientation.BL_TR, new int[] {color1,color2});
view.setBackgroundDrawable(gd);
}

public static void setRoundedRipple(View v,int LT,int RT,int RB,int LB,int color1,int size,int color2,int color3){
GradientDrawable shape = new GradientDrawable();
shape.setColor(color1);
shape.setCornerRadii(new float[]{(float)LT,(float)LT,(float)RT,(float)RT,(float)RB,(float)RB,(float)LB,(float)LB});
shape.setStroke(size, color2);
RippleDrawable ripdr = new RippleDrawable(new ColorStateList(new int[][]{new int[]{}}, new int[]{color3}), shape, null);
v.setBackgroundDrawable(ripdr);
}
}