HeaderController(View row) { super(row); label=(TextView)row.findViewById(R.id.label); template=label.getContext().getString(R.string.header_template); }
@Override public void onClick(View v) { Intent i=new Intent(Intent.ACTION_VIEW); i.setDataAndType(videoUri, videoMimeType); title.getContext().startActivity(i); }
@Override public void onClick(View v) { Intent i=new Intent(Intent.ACTION_VIEW); i.setDataAndType(videoUri, videoMimeType); title.getContext().startActivity(i); }
@Override public void onClick(View v) { Intent i=new Intent(Intent.ACTION_VIEW); i.setDataAndType(videoUri, videoMimeType); title.getContext().startActivity(i); }
@Override public void onClick(View v) { Intent i=new Intent(Intent.ACTION_VIEW); i.setDataAndType(videoUri, videoMimeType); title.getContext().startActivity(i); }
@Override public void onClick(View v) { Intent i=new Intent(Intent.ACTION_VIEW); i.setDataAndType(videoUri, videoMimeType); title.getContext().startActivity(i); }
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); }
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); }
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); }
@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); }
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); }
@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); }
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(); }
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); }
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); }
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); }
@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); }
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); }); }
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); } }
/** * 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); } }