/// Method Name : AdapterMyDocumentViewHolder /// Author : Sanket Prajapati /// Creation Date : 7 fab 2018 /// Purpose : Use for set icon and color /// Revision : /// </summary> public static void SetDocIconAndColor(string docType, ImageView DocIcon, LinearLayout linearLayoutRandomColor) { switch (docType) { case "0": DocIcon.SetImageResource(Resource.Drawable.icon_valuation); LeftCornerDrawable.CustomView(linearLayoutRandomColor, 0); linearLayoutRandomColor.SetBackgroundColor(Color.Rgb(226, 194, 131)); /// Valuation break; case "1": DocIcon.SetImageResource(Resource.Drawable.icon_rights_responsibilities); LeftCornerDrawable.CustomView(linearLayoutRandomColor, 0); linearLayoutRandomColor.SetBackgroundColor(Color.Rgb(131, 222, 226)); // Rights & responsibilities break; case "2": DocIcon.SetImageResource(Resource.Drawable.icon_pre_move_confrimation); LeftCornerDrawable.CustomView(linearLayoutRandomColor, 0); linearLayoutRandomColor.SetBackgroundColor(Color.Rgb(134, 172, 219)); //Estimate break; default: DocIcon.SetImageResource(Resource.Drawable.icon_day_of_service_check_in); LeftCornerDrawable.CustomView(linearLayoutRandomColor, 0); linearLayoutRandomColor.SetBackgroundColor(Color.Rgb(234, 65, 87)); //Others break; } }
public static void SetAlertIconAndColor(string alertType, ImageView alertIcon, LinearLayout mLinearLayoutRandomColor, TextView mTextViewTime) { switch (alertType) { case "0": alertIcon.SetImageResource(Resource.Drawable.icon_complete_wizard_reminder); LeftCornerDrawable.CustomView(mLinearLayoutRandomColor, 0); mLinearLayoutRandomColor.SetBackgroundColor(Color.Rgb(224, 139, 161)); mTextViewTime.SetTextColor(Color.Rgb(224, 139, 161)); break; case "1": alertIcon.SetImageResource(Resource.Drawable.icon_book_your_move); LeftCornerDrawable.CustomView(mLinearLayoutRandomColor, 0); mLinearLayoutRandomColor.SetBackgroundColor(Color.Rgb(224, 139, 161)); mTextViewTime.SetTextColor(Color.Rgb(224, 139, 161)); break; case "2": alertIcon.SetImageResource(Resource.Drawable.icon_pre_move_confrimation); LeftCornerDrawable.CustomView(mLinearLayoutRandomColor, 0); mLinearLayoutRandomColor.SetBackgroundColor(Color.Rgb(226, 194, 132)); mTextViewTime.SetTextColor(Color.Rgb(226, 194, 132)); break; case "3": alertIcon.SetImageResource(Resource.Drawable.icon_day_of_service_check_in); LeftCornerDrawable.CustomView(mLinearLayoutRandomColor, 0); mLinearLayoutRandomColor.SetBackgroundColor(Color.Rgb(134, 219, 180)); mTextViewTime.SetTextColor(Color.Rgb(134, 219, 180)); break; case "4": alertIcon.SetImageResource(Resource.Drawable.icon_end_of_service_check_in); LeftCornerDrawable.CustomView(mLinearLayoutRandomColor, 0); mLinearLayoutRandomColor.SetBackgroundColor(Color.Rgb(131, 205, 226)); mTextViewTime.SetTextColor(Color.Rgb(131, 205, 226)); break; case "5": alertIcon.SetImageResource(Resource.Drawable.icon_final_payment_made); LeftCornerDrawable.CustomView(mLinearLayoutRandomColor, 0); mLinearLayoutRandomColor.SetBackgroundColor(Color.Rgb(244, 191, 139)); mTextViewTime.SetTextColor(Color.Rgb(244, 191, 139)); break; case "6": alertIcon.SetImageResource(Resource.Drawable.icon_date_of_service_change); LeftCornerDrawable.CustomView(mLinearLayoutRandomColor, 0); mLinearLayoutRandomColor.SetBackgroundColor(Color.Rgb(134, 172, 219)); mTextViewTime.SetTextColor(Color.Rgb(134, 172, 219)); break; } }