当前位置: 首页>>代码示例>>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;未经允许,请勿转载。