summaryrefslogtreecommitdiffstats
path: root/java/AJCode.java
diff options
context:
space:
mode:
authorxC3FFF0E <78732474+xC3FFF0E@users.noreply.github.com>2021-02-08 15:18:42 +0100
committerGitHub <noreply@github.com>2021-02-08 15:18:42 +0100
commit6f57869e5b45322b3397ab7714faf443473110f0 (patch)
tree9cbc1b388968c082602524c79040bba12006c077 /java/AJCode.java
parentCreate a (diff)
downloadxManager-6f57869e5b45322b3397ab7714faf443473110f0.tar
xManager-6f57869e5b45322b3397ab7714faf443473110f0.tar.gz
xManager-6f57869e5b45322b3397ab7714faf443473110f0.tar.bz2
xManager-6f57869e5b45322b3397ab7714faf443473110f0.tar.lz
xManager-6f57869e5b45322b3397ab7714faf443473110f0.tar.xz
xManager-6f57869e5b45322b3397ab7714faf443473110f0.tar.zst
xManager-6f57869e5b45322b3397ab7714faf443473110f0.zip
Diffstat (limited to 'java/AJCode.java')
-rw-r--r--java/AJCode.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/java/AJCode.java b/java/AJCode.java
new file mode 100644
index 0000000..6860b0b
--- /dev/null
+++ b/java/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