Back to project page FisgoDroid.
The source code is released under:
The smiley icons bundled with this application belong to Meneame.NET and are licensed under the Creative Commons by-sa 3.0 license. For more information, please visit http://creativecommons.org/licens...
If you think the Android project FisgoDroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.meneame.fisgodroid; //from w w w.j av a2 s . com import android.content.Context; import android.view.View; public class ChatBubbleView extends ChatBaseView { private View mMessageLayout; public ChatBubbleView(Context context) { super(context, R.layout.chat_bubble_line); if ( !isInEditMode() ) { init(); } } private void init() { mMessageLayout = findViewById(R.id.message_layout); } @Override public void setChatMessage(ChatMessage chatMsg, boolean highlight) { super.setChatMessage(chatMsg, highlight); switch (chatMsg.getType()) { case ADMIN: mMessageLayout.setBackgroundResource(R.drawable.chatbubble_admin); break; case FRIENDS: mMessageLayout.setBackgroundResource(R.drawable.chatbubble_friends); break; case PUBLIC: mMessageLayout.setBackgroundResource(R.drawable.chatbubble_public); break; } } }