<android.support.percent.PercentRelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:id="@+id/leaderboardRowRelativeLayout"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/apk/res-auto"
android:layout_height="match_parent">
<View
android:id="@+id/percentile_scored"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_widthPercent="50%"
app:layout_heightPercent="15%"
android:background="@drawable/leaderboard_row_color"
/>
<View
android:id="@+id/percentile_left_scoring"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_widthPercent="50%"
app:layout_heightPercent="15%"
android:background="@color/leaderboard_percent_left_scoring"
android:layout_toRightOf="@+id/percentile_scored"
/>
</android.support.percent.PercentRelativeLayout>
if(String.valueOf(userId).equals(leaderBoardDb.getUserId())){
leaderboardFriendsViewHolder.percent_scored.setBackgroundColor(ContextCompat.getColor(getApplicationContext(),
R.color.leaderboard_user_color));
}else {
leaderboardFriendsViewHolder.percent_scored.setBackground(ContextCompat.getDrawable(getApplicationContext(),R.drawable.leaderboard_row_color));
}
The background remains white
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/13d696c3-3a6b-46d8-820c-98340bc0ea9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.