本文整理匯總了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);
}