Commit 4ab445a4 authored by Varun Patil's avatar Varun Patil

Refactor, make going, interested buttons black text color

parent b75379ba
......@@ -146,8 +146,7 @@ public class EventFragment extends BaseFragment {
goingButton.setOnClickListener(getUESOnClickListener(2));
interestedButton.setBackgroundColor(getResources().getColor(event.getEventUserUes() == Constants.STATUS_INTERESTED ? R.color.colorAccent : R.color.colorWhite));
goingButton.setBackgroundColor(getResources().getColor(event.getEventUserUes() == Constants.STATUS_GOING ? R.color.colorAccent : R.color.colorWhite));
setFollowButtonColors(event.getEventUserUes());
navigateButton.setOnClickListener(new View.OnClickListener() {
@Override
......@@ -186,6 +185,11 @@ public class EventFragment extends BaseFragment {
}
}
void setFollowButtonColors(int status) {
interestedButton.setBackgroundColor(getResources().getColor(status == Constants.STATUS_INTERESTED ? R.color.colorAccent : R.color.colorWhite));
goingButton.setBackgroundColor(getResources().getColor(status == Constants.STATUS_GOING ? R.color.colorAccent : R.color.colorWhite));
}
View.OnClickListener getUESOnClickListener(final int status) {
return new View.OnClickListener() {
@Override
......@@ -198,8 +202,7 @@ public class EventFragment extends BaseFragment {
if (response.isSuccessful()) {
event.setEventUserUes(endStatus);
new updateDbEvent().execute(event);
interestedButton.setBackgroundColor(getResources().getColor(endStatus == Constants.STATUS_INTERESTED ? R.color.colorAccent : R.color.colorWhite));
goingButton.setBackgroundColor(getResources().getColor(endStatus == Constants.STATUS_GOING ? R.color.colorAccent : R.color.colorWhite));
setFollowButtonColors(endStatus);
}
}
......
......@@ -152,7 +152,7 @@
android:layout_margin="0dp"
android:layout_weight="1"
android:text="Going"
android:textColor="@color/colorGray" />
android:textColor="@color/secondaryTextColor" />
<View
android:layout_width="1dp"
......@@ -171,7 +171,7 @@
android:layout_margin="0dp"
android:layout_weight="1"
android:text="Interested"
android:textColor="@color/colorGray" />
android:textColor="@color/secondaryTextColor" />
</LinearLayout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment