Android Open Source - personal-diary My Card






From Project

Back to project page personal-diary.

License

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.

Java Source Code

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);
  }
}




Java Source Code List

com.rahul.pDiary.DbHandler.java
com.rahul.pDiary.DiaryApp.java
com.rahul.pDiary.EditActivity.java
com.rahul.pDiary.GoProActivity.java
com.rahul.pDiary.ImageAdapter.java
com.rahul.pDiary.MenuActivity.java
com.rahul.pDiary.MyCard.java
com.rahul.pDiary.NoteCardActivity.java
com.rahul.pDiary.NoteListActivity.java
com.rahul.pDiary.PasswordActivity.java
com.rahul.pDiary.PrefsActivity.java
com.rahul.pDiary.TypeActivity.java
com.rahul.pDiary.ViewActivity.java