當前位置: 首頁>>代碼示例>>Java>>正文


Java TextView.setPaintFlags方法代碼示例

本文整理匯總了Java中android.widget.TextView.setPaintFlags方法的典型用法代碼示例。如果您正苦於以下問題:Java TextView.setPaintFlags方法的具體用法?Java TextView.setPaintFlags怎麽用?Java TextView.setPaintFlags使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.widget.TextView的用法示例。


在下文中一共展示了TextView.setPaintFlags方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setTypeface

import android.widget.TextView; //導入方法依賴的package包/類
/**
 * Apply the typeface to the given viewId, and enable subpixel rendering.
 */
public BaseViewHolder setTypeface(@IdRes int viewId, Typeface typeface) {
    TextView view = getView(viewId);
    view.setTypeface(typeface);
    view.setPaintFlags(view.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
    return this;
}
 
開發者ID:GaoGersy,項目名稱:SimpleMutiTypeAdapter,代碼行數:10,代碼來源:BaseViewHolder.java

示例2: setTypeface

import android.widget.TextView; //導入方法依賴的package包/類
@Override
public HelperViewHolder setTypeface(Typeface typeface, int... viewIds) {
    for (int viewId : viewIds) {
        TextView view = getView(viewId);
        view.setTypeface(typeface);
        view.setPaintFlags(view.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
    }
    return this;
}
 
開發者ID:jeasinlee,項目名稱:AndroidBasicLibs,代碼行數:10,代碼來源:HelperViewHolder.java

示例3: setTypeface

import android.widget.TextView; //導入方法依賴的package包/類
public ViewHolderHelper setTypeface(Typeface typeface, int... viewIds) {
    for (int viewId : viewIds) {
        TextView view = getView(viewId);
        view.setTypeface(typeface);
        view.setPaintFlags(view.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
    }
    return this;
}
 
開發者ID:wp521,項目名稱:MyFire,代碼行數:9,代碼來源:ViewHolderHelper.java

示例4: setTypeface

import android.widget.TextView; //導入方法依賴的package包/類
@Override
public EasyLVHolder setTypeface(int viewId, Typeface typeface) {
    TextView view = getView(viewId);
    view.setTypeface(typeface);
    view.setPaintFlags(view.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
    return this;
}
 
開發者ID:zwmlibs,項目名稱:BookReader-master,代碼行數:8,代碼來源:EasyLVHolder.java

示例5: setTypeface

import android.widget.TextView; //導入方法依賴的package包/類
public ViewHolder setTypeface(Typeface typeface, int... viewIds) {
    for (int viewId : viewIds) {
        TextView view = getView(viewId);
        view.setTypeface(typeface);
        view.setPaintFlags(view.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
    }
    return this;
}
 
開發者ID:VK2012,項目名稱:AppCommonFrame,代碼行數:9,代碼來源:ViewHolder.java

示例6: setTypeface

import android.widget.TextView; //導入方法依賴的package包/類
@Override
public EasyRVHolder setTypeface(int viewId, Typeface typeface) {
    TextView view = getView(viewId);
    view.setTypeface(typeface);
    view.setPaintFlags(view.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
    return this;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:8,代碼來源:EasyRVHolder.java

示例7: onClickCheckBox

import android.widget.TextView; //導入方法依賴的package包/類
@Override
public void onClickCheckBox(int p,CheckBox checkBox,TextView title)
{
    HashMap<String,String> map = mArrayList.get(p);

    if(checkBox.isChecked())
    {
        title.setPaintFlags(title.getPaintFlags()|Paint.STRIKE_THRU_TEXT_FLAG);
        MediaPlayer player = MediaPlayer.create(getContext(),R.raw.ding);
        player.setAudioStreamType(AudioManager.STREAM_MUSIC);

        if(player.isPlaying())
            player.stop();
        else
            player.start();


        mTodo.updateData(keyName,1,map.get("id"));
        mArrayList = mTodo.getData(keyName);

    }
    else
    {
        title.setPaintFlags(title.getPaintFlags()&(~Paint.STRIKE_THRU_TEXT_FLAG));
        mTodo.updateData(keyName,0,map.get("id"));
        mArrayList = mTodo.getData(keyName);

    }
}
 
開發者ID:Salman544,項目名稱:Todo_App,代碼行數:30,代碼來源:TodoFragment.java

示例8: setBold

import android.widget.TextView; //導入方法依賴的package包/類
public static void setBold(TextView textView, boolean work) {
    int flags = textView.getPaintFlags();
    if (work) {
        textView.setPaintFlags(flags | Paint.FAKE_BOLD_TEXT_FLAG);
    } else {
        textView.setPaintFlags(flags | ~Paint.FAKE_BOLD_TEXT_FLAG);
    }
}
 
開發者ID:Break369,項目名稱:MyLife,代碼行數:9,代碼來源:TextViewUtils.java

示例9: setTypeface

import android.widget.TextView; //導入方法依賴的package包/類
public BaseViewHolder setTypeface(Typeface typeface, int... viewIds) {
    for (int viewId : viewIds) {
        TextView view = getView(viewId);
        view.setTypeface(typeface);
        view.setPaintFlags(view.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
    }
    return this;
}
 
開發者ID:yangchong211,項目名稱:YCBaseAdapter,代碼行數:9,代碼來源:BaseViewHolder.java

示例10: setTypeface

import android.widget.TextView; //導入方法依賴的package包/類
/**
 * Apply the typeface to the given viewId, and enable subpixel rendering.
 */
public BaseViewHolder setTypeface(int viewId, Typeface typeface) {
    TextView view = getView(viewId);
    view.setTypeface(typeface);
    view.setPaintFlags(view.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
    return this;
}
 
開發者ID:abook23,項目名稱:godlibrary,代碼行數:10,代碼來源:BaseViewHolder.java

示例11: initView

import android.widget.TextView; //導入方法依賴的package包/類
private void initView() {
	v=LayoutInflater.from(getContext()).inflate(R.layout.tariff_view, null);
	jarak=(TextView) v.findViewById(R.id.tariffviewJarak);
	oldprice=(TextView) v.findViewById(R.id.tariffviewOldPrice);
	normprice=(TextView) v.findViewById(R.id.tariffviewNormalPrice);
	lowprice=(TextView) v.findViewById(R.id.tariffviewLowPrice);
	reload=(TextView) v.findViewById(R.id.tariffviewReload);
	rb1=(RadioButton) v.findViewById(R.id.sbRadioButton1);
	rb2=(RadioButton) v.findViewById(R.id.sbRadioButton2);
	jarakBar=v.findViewById(R.id.tariffviewLinearLayout1);
	myLoc=v.findViewById(R.id.tariffviewMyLoc);
	rootv=v.findViewById(R.id.tariffviewLinearLayout2);
	oldprice.setPaintFlags(oldprice.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
	myLoc.setOnClickListener(new View.OnClickListener(){
			@Override
			public void onClick(View p1) {
				if(callmyloc!=null) callmyloc.onMyLocationButtonClick();
			}
		});
	post(new Runnable(){
			@Override
			public void run() {
				myHeight=getHeight();
			}
		});
	rb1.setOnCheckedChangeListener(this);
	rb2.setOnCheckedChangeListener(this);
	rb2.setChecked(true);
	addView(v);
}
 
開發者ID:agusibrahim,項目名稱:go-jay,代碼行數:31,代碼來源:TariffView.java

示例12: setTypeface

import android.widget.TextView; //導入方法依賴的package包/類
/**
 * Apply the typeface to all the given viewIds, and enable subpixel rendering.
 */
public BaseViewHolder setTypeface(Typeface typeface, int... viewIds) {
    for (int viewId : viewIds) {
        TextView view = getView(viewId);
        view.setTypeface(typeface);
        view.setPaintFlags(view.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
    }
    return this;
}
 
開發者ID:bigjelly,項目名稱:ShaddockVideoPlayer,代碼行數:12,代碼來源:BaseViewHolder.java

示例13: drawUnderLine

import android.widget.TextView; //導入方法依賴的package包/類
public static void drawUnderLine(TextView textView) {
    textView.setPaintFlags(textView.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
}
 
開發者ID:Break369,項目名稱:MyLife,代碼行數:4,代碼來源:TextViewUtils.java

示例14: undrawUnderLine

import android.widget.TextView; //導入方法依賴的package包/類
public static void undrawUnderLine(TextView textView) {
    textView.setPaintFlags(textView.getPaintFlags() | ~Paint.UNDERLINE_TEXT_FLAG);
}
 
開發者ID:Break369,項目名稱:MyLife,代碼行數:4,代碼來源:TextViewUtils.java

示例15: setTypeface

import android.widget.TextView; //導入方法依賴的package包/類
public final void setTypeface(TextView target, Typeface t) {
    if (t == null) return;
    int flags = target.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG;
    target.setPaintFlags(flags);
    target.setTypeface(t);
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:7,代碼來源:MaterialDialog.java


注:本文中的android.widget.TextView.setPaintFlags方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。