コード例 #1
0
  public static SurahNameItemViewHolder newInstance(View parent) {

    GLOBAL.setTypefaceTrans(Fontface.get(parent.getContext(), GLOBAL.selectedEngFontName));
    TextView txtSurahName = (TextView) parent.findViewById(R.id.txtSurahName);

    return new SurahNameItemViewHolder(parent, txtSurahName);
  }
コード例 #2
0
  public void setItemText(SurahName surahName, Map<String, String> bookMarkStoreSurah) {
    int[] androidColors = context.getResources().getIntArray(R.array.androidcolors);
    int randomAndroidColor = androidColors[new Random().nextInt(androidColors.length)];
    int brown_500 = context.getResources().getColor(R.color.brown_500);
    card.setBackgroundColor(randomAndroidColor);
    card.setTag(surahName);

    txtSurahNo.setText(surahName.getSurahNo());
    txtSurahNo.setTypeface(GLOBAL.getTypefaceTrans());
    txtSurahNo.setTextSize(20);
    txtSurahNo.setTextColor(Color.DKGRAY);

    txtSurahName.setText(surahName.getSurahName());
    txtSurahName.setTypeface(GLOBAL.getTypefaceTrans());
    txtSurahName.setTextSize(23);
    txtSurahName.setTextColor(randomAndroidColor);

    txtAyahNo.setText(surahName.getVerseNo());
    txtAyahNo.setTypeface(GLOBAL.getTypefaceTrans());
    txtAyahNo.setTextSize(15);
    txtAyahNo.setTextColor(brown_500);

    checkBookmark(surahName);
  }
コード例 #3
0
 public SurahNameAdapter(Context context, Map<String, String> mapBookMarkStoreSurah) {
   this.context = context;
   this.bookMarkStoreSurah = mapBookMarkStoreSurah;
   mItemList = GLOBAL.getSurahNameList();
   mVerseTransList = GLOBAL.getVerseVerseTransList();
 }