colorful swipe-to-refresh spinner
closes sk22#455
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user