本文整理了Java中android.widget.TextView.getContext()
方法的一些代码示例,展示了TextView.getContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.getContext()
方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:getContext
暂无
代码示例来源:origin: commonsguy/cw-omnibus
HeaderController(View row) {
super(row);
label=(TextView)row.findViewById(R.id.label);
template=label.getContext().getString(R.string.header_template);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onClick(View v) {
Intent i=new Intent(Intent.ACTION_VIEW);
i.setDataAndType(videoUri, videoMimeType);
title.getContext().startActivity(i);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onClick(View v) {
Intent i=new Intent(Intent.ACTION_VIEW);
i.setDataAndType(videoUri, videoMimeType);
title.getContext().startActivity(i);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onClick(View v) {
Intent i=new Intent(Intent.ACTION_VIEW);
i.setDataAndType(videoUri, videoMimeType);
title.getContext().startActivity(i);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onClick(View v) {
Intent i=new Intent(Intent.ACTION_VIEW);
i.setDataAndType(videoUri, videoMimeType);
title.getContext().startActivity(i);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onClick(View v) {
Intent i=new Intent(Intent.ACTION_VIEW);
i.setDataAndType(videoUri, videoMimeType);
title.getContext().startActivity(i);
}
代码示例来源:origin: commonsguy/cw-omnibus
RowHolder(View row) {
super(row);
label=(TextView)row.findViewById(R.id.label);
size=(TextView)row.findViewById(R.id.size);
icon=(ImageView)row.findViewById(R.id.icon);
template=size.getContext().getString(R.string.size_template);
}
代码示例来源:origin: commonsguy/cw-omnibus
RowHolder(View row) {
super(row);
label=(TextView)row.findViewById(R.id.label);
size=(TextView)row.findViewById(R.id.size);
icon=(ImageView)row.findViewById(R.id.icon);
template=size.getContext().getString(R.string.size_template);
}
代码示例来源:origin: commonsguy/cw-omnibus
RowController(View row) {
super(row);
label=(TextView)row.findViewById(R.id.label);
size=(TextView)row.findViewById(R.id.size);
icon=(ImageView)row.findViewById(R.id.icon);
template=size.getContext().getString(R.string.size_template);
row.setOnClickListener(this);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onClick(View v) {
Uri video=Uri.fromFile(new File(videoUri));
Intent i=new Intent(Intent.ACTION_VIEW);
i.setDataAndType(video, videoMimeType);
title.getContext().startActivity(i);
}
代码示例来源:origin: commonsguy/cw-omnibus
RowController(ChoiceCapableAdapter adapter, View row) {
super(row);
this.row=row;
this.adapter=adapter;
label=(TextView)row.findViewById(R.id.label);
size=(TextView)row.findViewById(R.id.size);
icon=(ImageView)row.findViewById(R.id.icon);
template=size.getContext().getString(R.string.size_template);
row.setOnClickListener(this);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onClick(View v) {
Uri video=Uri.fromFile(new File(videoUri));
Intent i=new Intent(Intent.ACTION_VIEW);
i.setDataAndType(video, videoMimeType);
title.getContext().startActivity(i);
}
代码示例来源:origin: rey5137/material
public static void applyFont(TextView v, AttributeSet attrs, int defStyleAttr, int defStyleRes){
TypedArray a = v.getContext().obtainStyledAttributes(attrs, new int[]{R.attr.tv_fontFamily}, defStyleAttr, defStyleRes);
String fontFamily = a.getString(0);
if(fontFamily != null){
Typeface typeface = TypefaceUtil.load(v.getContext(), fontFamily, 0);
v.setTypeface(typeface);
}
a.recycle();
}
代码示例来源:origin: commonsguy/cw-omnibus
RowController(ChoiceCapableAdapter adapter, View row) {
super(row);
this.row=row;
this.adapter=adapter;
label=(TextView)row.findViewById(R.id.label);
size=(TextView)row.findViewById(R.id.size);
icon=(ImageView)row.findViewById(R.id.icon);
template=size.getContext().getString(R.string.size_template);
row.setOnClickListener(this);
}
代码示例来源:origin: commonsguy/cw-omnibus
RowController(ChoiceCapableAdapter adapter, View row) {
super(row);
this.row=row;
this.adapter=adapter;
label=(TextView)row.findViewById(R.id.label);
size=(TextView)row.findViewById(R.id.size);
icon=(ImageView)row.findViewById(R.id.icon);
template=size.getContext().getString(R.string.size_template);
row.setOnClickListener(this);
}
代码示例来源:origin: commonsguy/cw-omnibus
RowController(View row) {
super(row);
label=(TextView)row.findViewById(R.id.label);
size=(TextView)row.findViewById(R.id.size);
icon=(ImageView)row.findViewById(R.id.icon);
template=size.getContext().getString(R.string.size_template);
row.setOnClickListener(this);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onClick(View v) {
Uri video=Uri.fromFile(new File(videoUri));
Intent i=new Intent(Intent.ACTION_VIEW);
i.setDataAndType(video, videoMimeType);
title.getContext().startActivity(i);
}
代码示例来源:origin: commonsguy/cw-omnibus
RowController(View row) {
super(row);
title=row.findViewById(android.R.id.text1);
thumbnail=row.findViewById(R.id.thumbnail);
row.setOnClickListener(view -> {
Intent i=new Intent(Intent.ACTION_VIEW);
i.setDataAndType(videoUri, videoMimeType);
title.getContext().startActivity(i);
});
}
代码示例来源:origin: commonsguy/cw-omnibus
public void bind(Cursor cursor) {
number.setText(cursor.getString(0));
long time=cursor.getLong(1);
String formattedTime=DateUtils.formatDateTime(date.getContext(), time,
DateUtils.FORMAT_ABBREV_RELATIVE);
date.setText(formattedTime);
}
}
代码示例来源:origin: roughike/BottomBar
/**
* A convenience method for setting text appearance.
*
* @param textView a TextView which textAppearance to modify.
* @param resId a style resource for the text appearance.
*/
@SuppressWarnings("deprecation")
protected static void setTextAppearance(@NonNull TextView textView, @StyleRes int resId) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
textView.setTextAppearance(resId);
} else {
textView.setTextAppearance(textView.getContext(), resId);
}
}
内容来源于网络,如有侵权,请联系作者删除!