Refactoring

pull/194/merge
M66B 3 years ago
parent 48c79c5a23
commit 8a1b9cfdfe

@ -1204,19 +1204,19 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibAuth.setVisibility(View.GONE);
if (EntityMessage.PRIORITIY_HIGH.equals(message.ui_priority)) {
ibPriority.setImageLevel(0);
ibPriority.setImageLevel(message.ui_priority);
ibPriority.setVisibility(View.VISIBLE);
} else if (EntityMessage.PRIORITIY_LOW.equals(message.ui_priority)) {
ibPriority.setImageLevel(1);
ibPriority.setImageLevel(message.ui_priority);
ibPriority.setVisibility(View.VISIBLE);
} else
ibPriority.setVisibility(View.GONE);
if (EntityMessage.PRIORITIY_HIGH.equals(message.ui_importance)) {
ivImportance.setImageLevel(0);
ivImportance.setImageLevel(message.ui_importance);
ivImportance.setVisibility(View.VISIBLE);
} else if (EntityMessage.PRIORITIY_LOW.equals(message.ui_importance)) {
ivImportance.setImageLevel(1);
ivImportance.setImageLevel(message.ui_importance);
ivImportance.setVisibility(View.VISIBLE);
} else
ivImportance.setVisibility(View.GONE);

@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/baseline_arrow_upward_24"
android:drawable="@drawable/baseline_arrow_downward_24"
android:maxLevel="0" />
<item
android:drawable="@drawable/baseline_arrow_downward_24"
android:drawable="@drawable/twotone_horizontal_rule_24"
android:maxLevel="1" />
<item
android:drawable="@drawable/baseline_arrow_upward_24"
android:maxLevel="2" />
</level-list>

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/twotone_priority_high_24"
android:drawable="@drawable/twotone_low_priority_24"
android:maxLevel="0" />
<item
android:drawable="@drawable/twotone_low_priority_24"
android:maxLevel="1" />
android:drawable="@drawable/twotone_priority_high_24"
android:maxLevel="2" />
</level-list>

Loading…
Cancel
Save