List of usage examples for android.text.style UnderlineSpan UnderlineSpan
public UnderlineSpan()
From source file:com.hichinaschool.flashcards.anki.Reviewer.java
private void updateScreenCounts() { if (mCurrentCard == null) { return;/*from www.j av a 2 s.com*/ } try { String[] title = mSched.getCol().getDecks().get(mCurrentCard.getDid()).getString("name").split("::"); AnkiDroidApp.getCompat().setTitle(this, title[title.length - 1], mInvertedColors); } catch (JSONException e) { throw new RuntimeException(e); } int[] counts = mSched.counts(mCurrentCard); int eta = mSched.eta(counts, false); // AnkiDroidApp.getCompat().setSubtitle(this, getResources().getQuantityString(R.plurals.reviewer_window_title, eta, eta), mInvertedColors); SpannableString newCount = new SpannableString(String.valueOf(counts[0])); SpannableString lrnCount = new SpannableString(String.valueOf(counts[1])); SpannableString revCount = new SpannableString(String.valueOf(counts[2])); if (mPrefHideDueCount) { revCount = new SpannableString("???"); } switch (mCurrentCard.getQueue()) { case Card.TYPE_NEW: newCount.setSpan(new UnderlineSpan(), 0, newCount.length(), 0); break; case Card.TYPE_LRN: lrnCount.setSpan(new UnderlineSpan(), 0, lrnCount.length(), 0); break; case Card.TYPE_REV: revCount.setSpan(new UnderlineSpan(), 0, revCount.length(), 0); break; } // mTextBarRed.setText(newCount); // mTextBarBlack.setText(lrnCount); // mTextBarBlue.setText(revCount); mTextBarRed.setText(getString(R.string.subtitle_new) + " " + newCount); mTextBarBlack.setText(getString(R.string.subtitle_learning) + " " + lrnCount); mTextBarBlue.setText(getString(R.string.subtitle_review) + " " + revCount); }