本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
示例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);
}
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例13: drawUnderLine
import android.widget.TextView; //导入方法依赖的package包/类
public static void drawUnderLine(TextView textView) {
textView.setPaintFlags(textView.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
}
示例14: undrawUnderLine
import android.widget.TextView; //导入方法依赖的package包/类
public static void undrawUnderLine(TextView textView) {
textView.setPaintFlags(textView.getPaintFlags() | ~Paint.UNDERLINE_TEXT_FLAG);
}
示例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);
}