diff --git a/Habitica/res/layout/skill_list_item.xml b/Habitica/res/layout/skill_list_item.xml index f1ac42441..bd4efe8f2 100644 --- a/Habitica/res/layout/skill_list_item.xml +++ b/Habitica/res/layout/skill_list_item.xml @@ -12,7 +12,7 @@ + android:textColor="@android:color/white" + android:layout_gravity="center_vertical" + android:layout_marginLeft="8dp" /> \ No newline at end of file diff --git a/Habitica/src/com/habitrpg/android/habitica/ui/adapter/SkillsRecyclerViewAdapter.java b/Habitica/src/com/habitrpg/android/habitica/ui/adapter/SkillsRecyclerViewAdapter.java index 80d1d341d..6e57b2c09 100644 --- a/Habitica/src/com/habitrpg/android/habitica/ui/adapter/SkillsRecyclerViewAdapter.java +++ b/Habitica/src/com/habitrpg/android/habitica/ui/adapter/SkillsRecyclerViewAdapter.java @@ -52,6 +52,8 @@ public class SkillsRecyclerViewAdapter extends RecyclerView.Adapter skillList; + public Double mana; + public void setSkillList(List skillList) { this.skillList = skillList; this.notifyDataSetChanged(); @@ -102,6 +104,18 @@ public class SkillsRecyclerViewAdapter extends RecyclerView.Adapter mana) { + priceButton.setEnabled(false); + priceButton.setBackgroundResource(R.color.task_gray); + skillNameTextView.setTextColor(resources.getColor(R.color.task_gray)); + skillNotesTextView.setTextColor(resources.getColor(R.color.task_gray)); + } else { + skillNameTextView.setTextColor(resources.getColor(android.R.color.black)); + skillNotesTextView.setTextColor(resources.getColor(android.R.color.black)); + priceButton.setEnabled(true); + } + } } } diff --git a/Habitica/src/com/habitrpg/android/habitica/ui/fragments/SkillsFragment.java b/Habitica/src/com/habitrpg/android/habitica/ui/fragments/SkillsFragment.java index cbf86833d..6ff2d5f30 100644 --- a/Habitica/src/com/habitrpg/android/habitica/ui/fragments/SkillsFragment.java +++ b/Habitica/src/com/habitrpg/android/habitica/ui/fragments/SkillsFragment.java @@ -53,7 +53,7 @@ public class SkillsFragment extends BaseFragment { view = inflater.inflate(R.layout.fragment_skills, container, false); adapter = new SkillsRecyclerViewAdapter(); - + adapter.mana = this.user.getStats().getMp(); loadSkills(); return view;