Created
October 18, 2016 15:05
-
-
Save dmi3coder/779f8e6899f2c676ad594df38120273d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MessageInternalUserTextViewHolder extends MessageTextViewHolder { | |
public MessageInternalUserTextViewHolder(View itemView, CustomSettings customSettings) { | |
super(itemView, customSettings); | |
avatar = (ImageView) itemView.findViewById(R.id.message_user_text_image_view_avatar); | |
carrot = (ImageView) itemView.findViewById(R.id.message_user_text_image_view_carrot); | |
initials = (TextView) itemView.findViewById(R.id.message_user_text_text_view_initials); | |
text = (TextView) itemView.findViewById(R.id.message_user_text_text_view_text); | |
timestamp = (TextView) itemView.findViewById(R.id.message_user_text_text_view_timestamp); | |
avatarContainer = (ViewGroup) itemView.findViewById(R.id.message_user_text_view_group_avatar); | |
bubble = (FrameLayout) itemView.findViewById(R.id.message_user_text_view_group_bubble); | |
// | |
Drawable drawable = ContextCompat.getDrawable(itemView.getContext(), R.drawable.shape_rounded_rectangle_white); | |
// // Drawable drawable = itemView.getContext().getDrawable(); | |
drawable.setColorFilter(customSettings.localBubbleBackgroundColor, PorterDuff.Mode.SRC_ATOP); | |
bubble.setBackground(drawable); | |
carrot.setColorFilter(customSettings.localBubbleBackgroundColor); | |
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); | |
params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); | |
carrot.setLayoutParams(params); | |
text.setTextColor(customSettings.localBubbleTextColor); | |
timestamp.setTextColor(customSettings.timestampColor); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment