colorful swipe-to-refresh spinner

closes sk22#455
This commit is contained in:
sk
2023-03-20 23:25:29 +01:00
parent f9607a434a
commit bec47f40f7
13 changed files with 72 additions and 23 deletions

View File

@@ -338,12 +338,21 @@ public class UiUtils {
}
public static int getThemeColor(Context context, @AttrRes int attr) {
if (context == null) return 0xff00ff00;
TypedArray ta = context.obtainStyledAttributes(new int[]{attr});
int color = ta.getColor(0, 0xff00ff00);
ta.recycle();
return color;
}
public static int getThemeColorRes(Context context, @AttrRes int attr) {
if (context == null) return 0xff00ff00;
TypedArray ta = context.obtainStyledAttributes(new int[]{attr});
int color = ta.getResourceId(0, R.color.black);
ta.recycle();
return color;
}
public static void openProfileByID(Context context, String selfID, String id) {
Bundle args = new Bundle();
args.putString("account", selfID);