Back to project page personal-diary.
The source code is released under:
GNU Lesser General Public License
If you think the Android project personal-diary 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 com.rahul.pDiary; //from ww w.ja va2s . c o m import android.graphics.Color; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.fima.cardsui.objects.RecyclableCard; public class MyCard extends RecyclableCard { public MyCard(String titlePlay, String description, String color, String titleColor, Boolean hasOverflow, Boolean isClickable) { super(titlePlay, description, color, titleColor, hasOverflow, isClickable); } @Override protected int getCardLayoutId() { if(DiaryApp.isThemeDark()) return R.layout.card_play_dark; return R.layout.card_play_light; } @Override protected void applyTo(View convertView) { ((TextView) convertView.findViewById(R.id.title)).setText(titlePlay); ((TextView) convertView.findViewById(R.id.title)).setTextColor(Color .parseColor(titleColor)); ((TextView) convertView.findViewById(R.id.description)) .setText(description); ((ImageView) convertView.findViewById(R.id.stripe)) .setBackgroundColor(Color.parseColor(color)); if (isClickable == true) ((LinearLayout) convertView.findViewById(R.id.contentLayout)) .setBackgroundResource(R.drawable.selectable_background_cardbank); if (hasOverflow == true) ((ImageView) convertView.findViewById(R.id.overflow)) .setVisibility(View.VISIBLE); else ((ImageView) convertView.findViewById(R.id.overflow)) .setVisibility(View.GONE); } }