From f90479b7fd679cfd899b6381123d969db8824c41 Mon Sep 17 00:00:00 2001 From: xC3FFF0E <78732474+xC3FFF0E@users.noreply.github.com> Date: Fri, 17 Sep 2021 18:00:09 +0800 Subject: Add files via upload --- .../main/java/com/xc3fff0e/xmanager/xC3FFF0E.java | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 app/src/main/java/com/xc3fff0e/xmanager/xC3FFF0E.java (limited to 'app/src/main/java/com/xc3fff0e/xmanager/xC3FFF0E.java') diff --git a/app/src/main/java/com/xc3fff0e/xmanager/xC3FFF0E.java b/app/src/main/java/com/xc3fff0e/xmanager/xC3FFF0E.java new file mode 100644 index 0000000..737f3ea --- /dev/null +++ b/app/src/main/java/com/xc3fff0e/xmanager/xC3FFF0E.java @@ -0,0 +1,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); +} +} \ No newline at end of file -- cgit v1.2.3