parent
a00ca599c1
commit
c05d0b600e
|
@ -489,8 +489,10 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||
for (Account.Role role : account.roles) {
|
||||
TextView roleText = new TextView(getActivity(), null, 0, R.style.role_label);
|
||||
roleText.setText(role.name);
|
||||
GradientDrawable bg = (GradientDrawable) roleText.getBackground().mutate();
|
||||
bg.setStroke(V.dp(2), Color.parseColor(role.color));
|
||||
if (!TextUtils.isEmpty(role.color) && role.color.startsWith("#")) try {
|
||||
GradientDrawable bg = (GradientDrawable) roleText.getBackground().mutate();
|
||||
bg.setStroke(V.dp(2), Color.parseColor(role.color));
|
||||
} catch (Exception ignored) {}
|
||||
rolesView.addView(roleText);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
android:shape="rectangle">
|
||||
<corners android:radius="4sp" />
|
||||
<solid android:color="?colorBackgroundLight" />
|
||||
<stroke android:width="2dp" android:color="#00ff00" />
|
||||
<stroke android:width="2dp" android:color="?android:colorAccent" />
|
||||
</shape>
|
Loading…
Reference in New Issue