Example usage for android.graphics Typeface BOLD

List of usage examples for android.graphics Typeface BOLD

Introduction

In this page you can find the example usage for android.graphics Typeface BOLD.

Prototype

int BOLD

To view the source code for android.graphics Typeface BOLD.

Click Source Link

Usage

From source file:biz.wiz.android.wallet.ui.TransactionsListFragment.java

@Override
public void onLoadFinished(final Loader<List<Transaction>> loader, final List<Transaction> transactions) {
    adapter.replace(transactions);//from  w  w w. j av  a2  s  .  co  m

    final SpannableStringBuilder emptyText = new SpannableStringBuilder(
            getString(direction == Direction.SENT ? R.string.wallet_transactions_fragment_empty_text_sent
                    : R.string.wallet_transactions_fragment_empty_text_received));
    emptyText.setSpan(new StyleSpan(Typeface.BOLD), 0, emptyText.length(),
            SpannableStringBuilder.SPAN_POINT_MARK);
    if (direction != Direction.SENT)
        emptyText.append("\n\n").append(getString(R.string.wallet_transactions_fragment_empty_text_howto));

    setEmptyText(emptyText);
    setEmptyText("wallet bip32 seed is " + wallet.getKeyChainSeed().getMnemonicCode());
}

From source file:com.borax12.materialdaterangepicker.date.MonthView.java

/**
 * Sets up the text and style properties for painting. Override this if you
 * want to use a different paint./*w  w  w .ja  va 2 s. com*/
 */
protected void initView() {
    mMonthTitlePaint = new Paint();
    mMonthTitlePaint.setFakeBoldText(true);
    mMonthTitlePaint.setAntiAlias(true);
    mMonthTitlePaint.setTextSize(MONTH_LABEL_TEXT_SIZE);
    mMonthTitlePaint.setTypeface(Typeface.create(mMonthTitleTypeface, Typeface.BOLD));
    mMonthTitlePaint.setColor(mDayTextColor);
    mMonthTitlePaint.setTextAlign(Align.CENTER);
    mMonthTitlePaint.setStyle(Style.FILL);

    mSelectedCirclePaint = new Paint();
    mSelectedCirclePaint.setFakeBoldText(true);
    mSelectedCirclePaint.setAntiAlias(true);
    mSelectedCirclePaint.setColor(mTodayNumberColor);
    mSelectedCirclePaint.setTextAlign(Align.CENTER);
    mSelectedCirclePaint.setStyle(Style.FILL);
    mSelectedCirclePaint.setAlpha(SELECTED_CIRCLE_ALPHA);

    mMonthDayLabelPaint = new Paint();
    mMonthDayLabelPaint.setAntiAlias(true);
    mMonthDayLabelPaint.setTextSize(MONTH_DAY_LABEL_TEXT_SIZE);
    mMonthDayLabelPaint.setColor(mMonthDayTextColor);
    mMonthDayLabelPaint.setTypeface(TypefaceHelper.get(getContext(), "Roboto-Medium"));
    mMonthDayLabelPaint.setStyle(Style.FILL);
    mMonthDayLabelPaint.setTextAlign(Align.CENTER);
    mMonthDayLabelPaint.setFakeBoldText(true);

    mMonthNumPaint = new Paint();
    mMonthNumPaint.setAntiAlias(true);
    mMonthNumPaint.setTextSize(MINI_DAY_NUMBER_TEXT_SIZE);
    mMonthNumPaint.setStyle(Style.FILL);
    mMonthNumPaint.setTextAlign(Align.CENTER);
    mMonthNumPaint.setFakeBoldText(false);
}

From source file:info.hl.mediam.GroupProfileActivity.java

private void initialization() {

    // If opened from link hookup://group/[ime grupa]
    if (getIntent().getBooleanExtra(Const.GROUP_URI_INTENT, false)) {
        getIntent().removeExtra(Const.GROUP_URI_INTENT);
        String groupName = getIntent().getStringExtra(Const.GROUP_URI_NAME);
        try {//  ww w  .  j a va  2 s.com
            //            mGroup = new GetGroupByNameAsync(this).execute(groupName).get();
            mGroup = new mediamAsyncTask<Void, Void, List<Center>>(new CouchDB.FindGroupsByName(groupName),
                    null, GroupProfileActivity.this, true).execute().get().get(0);
        } catch (InterruptedException e) {
            e.printStackTrace();
        } catch (ExecutionException e) {
            e.printStackTrace();
        }
    } else {
        // If opened from another activity
        mGroup = UsersManagement.getToGroup();
        Logger.error("*** group password ***", mGroup.getPassword());
    }

    mRlGroupDescription = (RelativeLayout) findViewById(R.id.rlGroupDescription);
    mPasswordDialog = new HookUpPasswordDialog(this, true);
    mIvGroupImage = (ImageView) findViewById(R.id.ivGroupImage);
    mPbLoading = (ProgressBar) findViewById(R.id.pbLoadingForImage);

    Utils.displayImage(mGroup.getAvatarFileId(), mIvGroupImage, mPbLoading, ImageLoader.LARGE,
            R.drawable.group_stub, false);

    mTvGroupName = (TextView) findViewById(R.id.tvGroupName);
    mRlControlButtons = (RelativeLayout) findViewById(R.id.rlControlButtons);

    mBtnDeleteGroup = (Button) findViewById(R.id.btnDeleteGroup);
    mBtnDeleteGroup.setTypeface(MediamApp.getTfMyriadProBold(), Typeface.BOLD);

    mBtnFavorites = (Button) findViewById(R.id.btnFavorites);
    mBtnFavorites.setTypeface(MediamApp.getTfMyriadProBold(), Typeface.BOLD);
    mBtnBack = (Button) findViewById(R.id.btnBack);
    mBtnBack.setTypeface(MediamApp.getTfMyriadProBold(), Typeface.BOLD);
    mBtnBack.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            GroupProfileActivity.this.finish();
        }
    });
    mTvGroupOwner = (TextView) findViewById(R.id.tvGroupOwner);
    mTvGroupDescription = (TextView) findViewById(R.id.tvGroupDescription);
    mEtGroupDescription = (EditText) findViewById(R.id.etGroupDescription);
    mBtnSaveGroup = (Button) findViewById(R.id.btnSaveGroup);

    mRlBody = (RelativeLayout) findViewById(R.id.rlBody);
    mRlBody.bringToFront();

    mBtnEdit = (Button) findViewById(R.id.btnEdit);
    mBtnEdit.setTypeface(MediamApp.getTfMyriadProBold(), Typeface.BOLD);

    mEtGroupName = (EditText) findViewById(R.id.etGroupName);
    mEtGroupName.setTypeface(MediamApp.getTfMyriadPro());

    mIvArrow = (ImageView) findViewById(R.id.ivArrow);
    mRlGroupOwner = (RelativeLayout) findViewById(R.id.rlGroupOwner);

    mSpinnerCategory = (Spinner) findViewById(R.id.spinnerCategory);

    mBtnOpenWall = (Button) findViewById(R.id.btnOpenWall);
    mBtnOpenWall.setTypeface(MediamApp.getTfMyriadPro());
    mBtnOpenWall.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            openGroupWall(mGroup);

        }
    });
    mRlGroupPassword = (RelativeLayout) findViewById(R.id.rlGroupPassword);
    mEtGroupPassword = (EditText) findViewById(R.id.etGroupPassword);
    mEtGroupPassword.setTypeface(MediamApp.getTfMyriadPro());
    mEtGroupPassword.setOnTouchListener(new OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            mPasswordDialog.show();
            hideKeyboard();
            return false;
        }
    });

    mEtGroupPassword.setEnabled(false);
    mEtGroupName.setEnabled(false);
}

From source file:com.QuarkLabs.BTCeClient.fragments.HomeFragment.java

/**
 * Refreshes funds table with fetched data
 *
 * @param response JSONObject with funds data
 *//*w  w w.  jav  a2 s  .c o m*/
private void refreshFunds(JSONObject response) {
    try {
        if (response == null) {
            Toast.makeText(getActivity(), getResources().getString(R.string.GeneralErrorText),
                    Toast.LENGTH_LONG).show();
            return;
        }
        String notificationText;
        if (response.getInt("success") == 1) {

            View.OnClickListener fillAmount = new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    ScrollView scrollView = (ScrollView) getView();
                    if (scrollView != null) {
                        EditText tradeAmount = (EditText) scrollView.findViewById(R.id.TradeAmount);
                        tradeAmount.setText(((TextView) v).getText());
                        scrollView.smoothScrollTo(0, scrollView.findViewById(R.id.tradingSection).getBottom());
                    }
                }
            };

            notificationText = getResources().getString(R.string.FundsInfoUpdatedtext);
            TableLayout fundsContainer = (TableLayout) getView().findViewById(R.id.FundsContainer);
            fundsContainer.removeAllViews();
            JSONObject funds = response.getJSONObject("return").getJSONObject("funds");
            JSONArray fundsNames = response.getJSONObject("return").getJSONObject("funds").names();
            List<String> arrayList = new ArrayList<>();

            for (int i = 0; i < fundsNames.length(); i++) {
                arrayList.add(fundsNames.getString(i));
            }
            Collections.sort(arrayList);
            TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(0,
                    ViewGroup.LayoutParams.MATCH_PARENT, 1);

            for (String anArrayList : arrayList) {

                TableRow row = new TableRow(getActivity());
                TextView currency = new TextView(getActivity());
                TextView amount = new TextView(getActivity());
                currency.setText(anArrayList.toUpperCase(Locale.US));
                amount.setText(funds.getString(anArrayList));
                currency.setLayoutParams(layoutParams);
                currency.setTypeface(Typeface.DEFAULT, Typeface.BOLD);
                currency.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
                currency.setGravity(Gravity.CENTER);
                amount.setLayoutParams(layoutParams);
                amount.setGravity(Gravity.CENTER);
                amount.setOnClickListener(fillAmount);
                row.addView(currency);
                row.addView(amount);
                fundsContainer.addView(row);
            }

        } else {
            notificationText = response.getString("error");
        }

        mCallback.makeNotification(ConstantHolder.ACCOUNT_INFO_NOTIF_ID, notificationText);

    } catch (JSONException e) {
        e.printStackTrace();
    }
}

From source file:opt.android.datetimepicker.date.MonthView.java

/**
 * Sets up the text and style properties for painting. Override this if you
 * want to use a different paint./*from w  w w.  ja  v  a  2s  .co m*/
 */
protected void initView() {
    mMonthTitlePaint = new Paint();
    mMonthTitlePaint.setFakeBoldText(true);
    mMonthTitlePaint.setAntiAlias(true);
    mMonthTitlePaint.setTextSize(MONTH_LABEL_TEXT_SIZE);
    mMonthTitlePaint.setTypeface(Typeface.create(mMonthTitleTypeface, Typeface.BOLD));
    mMonthTitlePaint.setColor(mMonthTitleColor);
    mMonthTitlePaint.setTextAlign(Align.CENTER);
    mMonthTitlePaint.setStyle(Style.FILL);

    //        mMonthTitleBGPaint = new Paint();
    //        mMonthTitleBGPaint.setFakeBoldText(true);
    //        mMonthTitleBGPaint.setAntiAlias(true);
    //        mMonthTitleBGPaint.setColor(mMonthTitleBGColor);
    //        mMonthTitleBGPaint.setTextAlign(Align.CENTER);
    //        mMonthTitleBGPaint.setStyle(Style.FILL);

    mSelectedCirclePaint = new Paint();
    mSelectedCirclePaint.setFakeBoldText(true);
    mSelectedCirclePaint.setAntiAlias(true);
    mSelectedCirclePaint.setColor(mTodayNumberColor);
    mSelectedCirclePaint.setTextAlign(Align.CENTER);
    mSelectedCirclePaint.setStyle(Style.FILL);
    mSelectedCirclePaint.setAlpha(SELECTED_CIRCLE_ALPHA);

    mMonthDayLabelPaint = new Paint();
    mMonthDayLabelPaint.setAntiAlias(true);
    mMonthDayLabelPaint.setTextSize(MONTH_DAY_LABEL_TEXT_SIZE);
    mMonthDayLabelPaint.setColor(mDayTextColor);
    mMonthDayLabelPaint.setTypeface(Typeface.create(mDayOfWeekTypeface, Typeface.NORMAL));
    mMonthDayLabelPaint.setStyle(Style.FILL);
    mMonthDayLabelPaint.setTextAlign(Align.CENTER);
    mMonthDayLabelPaint.setFakeBoldText(true);

    mMonthNumPaint = new Paint();
    mMonthNumPaint.setAntiAlias(true);
    mMonthNumPaint.setTextSize(MINI_DAY_NUMBER_TEXT_SIZE);
    mMonthNumPaint.setStyle(Style.FILL);
    mMonthNumPaint.setTextAlign(Align.CENTER);
    mMonthNumPaint.setFakeBoldText(false);
}

From source file:com.example.heya.GroupProfileActivity.java

private void initialization() {

    // If opened from link hookup://group/[ime grupa]
    if (getIntent().getBooleanExtra(Const.GROUP_URI_INTENT, false)) {
        getIntent().removeExtra(Const.GROUP_URI_INTENT);
        String groupName = getIntent().getStringExtra(Const.GROUP_URI_NAME);
        try {/*ww  w.  j a  v a  2  s.  c om*/

            Toast.makeText(getApplicationContext(), "initial", Toast.LENGTH_LONG).show();
            //            mGroup = new GetGroupByNameAsync(this).execute(groupName).get();
            mGroup = new SpikaAsyncTask<Void, Void, List<Group>>(new CouchDB.FindGroupsByName(groupName), null,
                    GroupProfileActivity.this, true).execute().get().get(0);
        } catch (InterruptedException e) {
            e.printStackTrace();
        } catch (ExecutionException e) {
            e.printStackTrace();
        }
    } else {
        // If opened from another activity
        mGroup = UsersManagement.getToGroup();
        Logger.error("*** group password ***", mGroup.getPassword());
    }

    mRlGroupDescription = (RelativeLayout) findViewById(R.id.rlGroupDescription);
    mPasswordDialog = new HookUpPasswordDialog(this, true);
    mIvGroupImage = (ImageView) findViewById(R.id.ivGroupImage);
    mPbLoading = (ProgressBar) findViewById(R.id.pbLoadingForImage);

    Utils.displayImage(mGroup.getAvatarFileId(), mIvGroupImage, mPbLoading, ImageLoader.LARGE,
            R.drawable.group_stub, false);

    mTvGroupName = (TextView) findViewById(R.id.tvGroupName);
    mRlControlButtons = (RelativeLayout) findViewById(R.id.rlControlButtons);

    mBtnDeleteGroup = (Button) findViewById(R.id.btnDeleteGroup);
    mBtnDeleteGroup.setTypeface(SpikaApp.getTfMyriadProBold(), Typeface.BOLD);

    mBtnFavorites = (Button) findViewById(R.id.btnFavorites);
    mBtnFavorites.setTypeface(SpikaApp.getTfMyriadProBold(), Typeface.BOLD);
    mBtnBack = (Button) findViewById(R.id.btnBack);
    mBtnBack.setTypeface(SpikaApp.getTfMyriadProBold(), Typeface.BOLD);
    mBtnBack.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            GroupProfileActivity.this.finish();
        }
    });
    mTvGroupOwner = (TextView) findViewById(R.id.tvGroupOwner);
    mTvGroupDescription = (TextView) findViewById(R.id.tvGroupDescription);
    mEtGroupDescription = (EditText) findViewById(R.id.etGroupDescription);
    mBtnSaveGroup = (Button) findViewById(R.id.btnSaveGroup);

    mRlBody = (RelativeLayout) findViewById(R.id.rlBody);
    mRlBody.bringToFront();

    mBtnEdit = (Button) findViewById(R.id.btnEdit);
    mBtnEdit.setTypeface(SpikaApp.getTfMyriadProBold(), Typeface.BOLD);

    mEtGroupName = (EditText) findViewById(R.id.etGroupName);
    mEtGroupName.setTypeface(SpikaApp.getTfMyriadPro());

    mIvArrow = (ImageView) findViewById(R.id.ivArrow);
    mRlGroupOwner = (RelativeLayout) findViewById(R.id.rlGroupOwner);

    mSpinnerCategory = (Spinner) findViewById(R.id.spinnerCategory);

    mBtnOpenWall = (Button) findViewById(R.id.btnOpenWall);
    mBtnOpenWall.setTypeface(SpikaApp.getTfMyriadPro());
    mBtnOpenWall.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            openGroupWall(mGroup);

        }
    });
    mRlGroupPassword = (RelativeLayout) findViewById(R.id.rlGroupPassword);
    mEtGroupPassword = (EditText) findViewById(R.id.etGroupPassword);
    mEtGroupPassword.setTypeface(SpikaApp.getTfMyriadPro());
    mEtGroupPassword.setOnTouchListener(new OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            mPasswordDialog.show();
            hideKeyboard();
            return false;
        }
    });

    mEtGroupPassword.setEnabled(false);
    mEtGroupName.setEnabled(false);
}

From source file:com.cloverstudio.spika.GroupProfileActivity.java

private void initialization() {

    // If opened from link hookup://group/[ime grupa]
    if (getIntent().getBooleanExtra(Const.GROUP_URI_INTENT, false)) {
        getIntent().removeExtra(Const.GROUP_URI_INTENT);
        String groupName = getIntent().getStringExtra(Const.GROUP_URI_NAME);
        try {//w  w w.  j a va2s  . c o m
            //            mGroup = new GetGroupByNameAsync(this).execute(groupName).get();
            mGroup = new SpikaAsyncTask<Void, Void, List<Group>>(new CouchDB.FindGroupsByName(groupName), null,
                    GroupProfileActivity.this, true).execute().get().get(0);
        } catch (InterruptedException e) {
            e.printStackTrace();
        } catch (ExecutionException e) {
            e.printStackTrace();
        }
    } else {
        // If opened from another activity
        mGroup = UsersManagement.getToGroup();
        Logger.error("*** group password ***", mGroup.getPassword());
    }

    mRlGroupDescription = (RelativeLayout) findViewById(R.id.rlGroupDescription);
    mPasswordDialog = new HookUpPasswordDialog(this, true);
    mIvGroupImage = (ImageView) findViewById(R.id.ivGroupImage);
    mPbLoading = (ProgressBar) findViewById(R.id.pbLoadingForImage);

    Utils.displayImage(mGroup.getAvatarFileId(), mIvGroupImage, mPbLoading, ImageLoader.LARGE,
            R.drawable.group_stub, false);

    mTvGroupName = (TextView) findViewById(R.id.tvGroupName);
    mRlControlButtons = (RelativeLayout) findViewById(R.id.rlControlButtons);

    mBtnDeleteGroup = (Button) findViewById(R.id.btnDeleteGroup);
    mBtnDeleteGroup.setTypeface(SpikaApp.getTfMyriadProBold(), Typeface.BOLD);

    mBtnFavorites = (Button) findViewById(R.id.btnFavorites);
    mBtnFavorites.setTypeface(SpikaApp.getTfMyriadProBold(), Typeface.BOLD);
    mBtnBack = (Button) findViewById(R.id.btnBack);
    mBtnBack.setTypeface(SpikaApp.getTfMyriadProBold(), Typeface.BOLD);
    mBtnBack.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            GroupProfileActivity.this.finish();
        }
    });
    mTvGroupOwner = (TextView) findViewById(R.id.tvGroupOwner);
    mTvGroupDescription = (TextView) findViewById(R.id.tvGroupDescription);
    mEtGroupDescription = (EditText) findViewById(R.id.etGroupDescription);
    mBtnSaveGroup = (Button) findViewById(R.id.btnSaveGroup);

    mRlBody = (RelativeLayout) findViewById(R.id.rlBody);
    mRlBody.bringToFront();

    mBtnEdit = (Button) findViewById(R.id.btnEdit);
    mBtnEdit.setTypeface(SpikaApp.getTfMyriadProBold(), Typeface.BOLD);

    mEtGroupName = (EditText) findViewById(R.id.etGroupName);
    mEtGroupName.setTypeface(SpikaApp.getTfMyriadPro());

    mIvArrow = (ImageView) findViewById(R.id.ivArrow);
    mRlGroupOwner = (RelativeLayout) findViewById(R.id.rlGroupOwner);

    mSpinnerCategory = (Spinner) findViewById(R.id.spinnerCategory);

    mBtnOpenWall = (Button) findViewById(R.id.btnOpenWall);
    mBtnOpenWall.setTypeface(SpikaApp.getTfMyriadPro());
    mBtnOpenWall.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            openGroupWall(mGroup);

        }
    });
    mRlGroupPassword = (RelativeLayout) findViewById(R.id.rlGroupPassword);
    mEtGroupPassword = (EditText) findViewById(R.id.etGroupPassword);
    mEtGroupPassword.setTypeface(SpikaApp.getTfMyriadPro());
    mEtGroupPassword.setOnTouchListener(new OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            mPasswordDialog.show();
            hideKeyboard();
            return false;
        }
    });

    mEtGroupPassword.setEnabled(false);
    mEtGroupName.setEnabled(false);
}

From source file:org.appcelerator.titanium.util.TiUIHelper.java

public static int toTypefaceStyle(final String fontWeight, final String fontStyle) {
    int style = Typeface.NORMAL;

    if (fontWeight != null) {
        if (fontWeight.equals("bold")) {
            if (fontStyle != null && fontStyle.equals("italic")) {
                style = Typeface.BOLD_ITALIC;
            } else {
                style = Typeface.BOLD;
            }//from   ww w.j  a va  2 s . co  m
        } else if (fontStyle != null && fontStyle.equals("italic")) {
            style = Typeface.ITALIC;
        }
    } else if (fontStyle != null && fontStyle.equals("italic")) {
        style = Typeface.ITALIC;
    }
    return style;
}

From source file:uk.co.threeonefour.android.snowball.activities.game.GameActivity.java

@Override
public void processCommand(String command) {

    if (!initialised) {
        return;// w  w  w  .j  av a  2s . com
    }

    SpannableString styledCommand = new SpannableString(command);
    styledCommand.setSpan(new StyleSpan(Typeface.BOLD), 0, styledCommand.length(),
            Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);

    textView.append(styledCommand);
    textView.append("\n");

    lastCommand = command;
    /* pre: intercept some commands like RESTORE */
    boolean continueExecute = true;
    if ("restore".equalsIgnoreCase(command)) {
        loadGame();
        continueExecute = false;
    }

    if (continueExecute) {
        /* execute command */
        level9.execute(command);
        String text = level9.getText().trim();

        /* post: intercept some commands */

        processOutput(text);
    }
}

From source file:com.timothy.android.api.fragment.PageFragment.java

public void setAllComponent(List<HtmlCleanAPI.HtmlContent> hcList) {
    Log.i(LOG_TAG, "setAllComponent()...");
    for (HtmlCleanAPI.HtmlContent hc : hcList) {
        String tag = hc.getTag();
        String content = hc.getContent();
        String contentRBlank = StringUtil.rmvEnter(StringUtil.trim(StringUtil.mergeBlank(content)));
        String contentRSpecial = StringUtil.rmvSpecial(contentRBlank);

        if (StringUtil.isEmpty(content) || StringUtil.isEmpty(contentRBlank)
                || StringUtil.isEmpty(contentRSpecial)) {
            continue;
        }//from  w ww .  j av a 2  s . c  o m

        Log.i(LOG_TAG, "tag:" + tag);
        Log.i(LOG_TAG, "content:" + content);

        if (tag.equalsIgnoreCase("P")) {
            final TextView tagPTV = new TextView(mContext);
            tagPTV.setBackgroundResource(R.drawable.tag_p_drawable);
            LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,
                    LayoutParams.WRAP_CONTENT);
            lp.setMargins(2, 2, 2, 2);
            tagPTV.setLayoutParams(lp);
            tagPTV.setPadding(3, 3, 3, 3);
            tagPTV.setPaddingRelative(3, 3, 3, 3);
            tagPTV.setMovementMethod(ScrollingMovementMethod.getInstance());
            tagPTV.setTextColor(Color.BLACK);
            tagPTV.setText(contentRSpecial);
            tagPTV.setTextSize(TEXT_SIZE);
            tagPTV.setOnLongClickListener(new View.OnLongClickListener() {
                @Override
                public boolean onLongClick(View v) {
                    openDialog(tagPTV.getText().toString());
                    return false;
                }
            });
            lineLayout.addView(tagPTV);

        } else if (tag.equalsIgnoreCase("pre")) {
            final TextView tagPre = new TextView(mContext);
            tagPre.setBackgroundColor(Color.parseColor("#D2EADE"));
            LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,
                    LayoutParams.WRAP_CONTENT);
            lp.setMargins(2, 2, 2, 2);
            tagPre.setLayoutParams(lp);
            tagPre.setPadding(2, 2, 2, 2);
            tagPre.setPaddingRelative(2, 2, 2, 2);
            tagPre.setMovementMethod(ScrollingMovementMethod.getInstance());
            tagPre.setTextColor(Color.BLACK);
            //            String contentRSpecial = StringUtil.rmvSpecial(content);
            tagPre.setText(StringUtil.rmvSpecial(content));
            tagPre.setTextSize(TEXT_SIZE);
            tagPre.setOnLongClickListener(new View.OnLongClickListener() {
                @Override
                public boolean onLongClick(View v) {
                    openDialog(tagPre.getText().toString());
                    return false;
                }
            });
            lineLayout.addView(tagPre);
        } else if (tag.equalsIgnoreCase("dt") || tag.equalsIgnoreCase("H1") || tag.equalsIgnoreCase("H2")
                || tag.equalsIgnoreCase("H3")) {//title
            TextView tagDtHTV = new TextView(mContext);
            tagDtHTV.setBackgroundColor(Color.DKGRAY);
            tagDtHTV.setTypeface(null, Typeface.BOLD);
            LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,
                    LayoutParams.WRAP_CONTENT);
            lp.setMargins(2, 0, 2, 0);
            tagDtHTV.setLayoutParams(lp);
            tagDtHTV.setPadding(2, 2, 2, 2);
            tagDtHTV.setPaddingRelative(2, 2, 2, 2);
            tagDtHTV.setMovementMethod(ScrollingMovementMethod.getInstance());
            tagDtHTV.setTextColor(Color.WHITE);
            tagDtHTV.setText(contentRSpecial);
            tagDtHTV.setTextSize(TEXT_SIZE);
            lineLayout.addView(tagDtHTV);
        } else if (tag.equalsIgnoreCase("dd")) {
            final TextView tagDD = new TextView(mContext);
            tagDD.setBackgroundResource(R.drawable.tag_p_drawable);
            LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,
                    LayoutParams.WRAP_CONTENT);
            lp.setMargins(2, 2, 2, 2);
            tagDD.setLayoutParams(lp);
            tagDD.setPadding(3, 3, 3, 3);
            tagDD.setPaddingRelative(3, 3, 3, 3);
            tagDD.setMovementMethod(ScrollingMovementMethod.getInstance());
            tagDD.setTextColor(Color.BLACK);
            tagDD.setText(contentRSpecial);
            tagDD.setTextSize(TEXT_SIZE);
            tagDD.setOnLongClickListener(new View.OnLongClickListener() {
                @Override
                public boolean onLongClick(View v) {
                    openDialog(tagDD.getText().toString());
                    return false;
                }
            });
            lineLayout.addView(tagDD);
        } else if (tag.equalsIgnoreCase("li")) {
            final TextView tagLigTV = new TextView(mContext);
            tagLigTV.setBackgroundResource(R.drawable.tag_p_drawable);
            LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,
                    LayoutParams.WRAP_CONTENT);
            lp.setMargins(2, 2, 2, 2);
            tagLigTV.setLayoutParams(lp);
            tagLigTV.setPaddingRelative(2, 2, 2, 2);
            tagLigTV.setMovementMethod(ScrollingMovementMethod.getInstance());
            tagLigTV.setTextColor(Color.BLACK);
            tagLigTV.setText(contentRSpecial);
            tagLigTV.setTextSize(TEXT_SIZE);
            tagLigTV.setOnLongClickListener(new View.OnLongClickListener() {
                @Override
                public boolean onLongClick(View v) {
                    openDialog(tagLigTV.getText().toString());
                    return false;
                }
            });
            lineLayout.addView(tagLigTV);
        } else if (tag.equalsIgnoreCase("img")) {
            final TextView imgTV = new TextView(mContext);
            imgTV.setBackgroundResource(R.drawable.tag_p_drawable);
            LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,
                    LayoutParams.WRAP_CONTENT);
            lp.setMargins(2, 2, 2, 2);
            imgTV.setLayoutParams(lp);
            imgTV.setPaddingRelative(2, 2, 2, 2);
            imgTV.setMovementMethod(ScrollingMovementMethod.getInstance());
            imgTV.setTextColor(Color.BLACK);
            imgTV.setText(content);
            imgTV.setTextSize(TEXT_SIZE);
            imgTV.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    TextView tv = (TextView) v;
                    String path = tv.getText().toString();
                    if (path != null && path.trim().length() > 0) {
                        openDialog2(path);
                    }
                }
            });
            lineLayout.addView(imgTV);
        }
    }
}