Ejemplo n.º 1
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);
  }
Ejemplo n.º 2
0
 @Override
 public void onClick(View v) {
   //   Toast.makeText(context,""+getPosition(),Toast.LENGTH_LONG).show();
   SurahName surahName = (SurahName) v.getTag();
   Toast.makeText(context, "" + surahName.getSurahName(), Toast.LENGTH_LONG).show();
 }