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