diff options
author | xC3FFF0E <78732474+xC3FFF0E@users.noreply.github.com> | 2021-02-11 17:47:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-11 17:47:57 +0100 |
commit | 7af2e6457e8b64aa0dfc049ff1d447d3056523da (patch) | |
tree | 9468286fb7baf1eaa502a3fa64e0d52d498db005 /app/src/main/java/com/xc3fff0e/xmanager/AJCode.java | |
parent | Delete MainActivity.java (diff) | |
download | xManager-7af2e6457e8b64aa0dfc049ff1d447d3056523da.tar xManager-7af2e6457e8b64aa0dfc049ff1d447d3056523da.tar.gz xManager-7af2e6457e8b64aa0dfc049ff1d447d3056523da.tar.bz2 xManager-7af2e6457e8b64aa0dfc049ff1d447d3056523da.tar.lz xManager-7af2e6457e8b64aa0dfc049ff1d447d3056523da.tar.xz xManager-7af2e6457e8b64aa0dfc049ff1d447d3056523da.tar.zst xManager-7af2e6457e8b64aa0dfc049ff1d447d3056523da.zip |
Diffstat (limited to 'app/src/main/java/com/xc3fff0e/xmanager/AJCode.java')
-rw-r--r-- | app/src/main/java/com/xc3fff0e/xmanager/AJCode.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/src/main/java/com/xc3fff0e/xmanager/AJCode.java b/app/src/main/java/com/xc3fff0e/xmanager/AJCode.java new file mode 100644 index 0000000..6860b0b --- /dev/null +++ b/app/src/main/java/com/xc3fff0e/xmanager/AJCode.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 AJCode{
+
+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 |