本文整理汇总了Java中org.telegram.ui.Components.ContextProgressView类的典型用法代码示例。如果您正苦于以下问题:Java ContextProgressView类的具体用法?Java ContextProgressView怎么用?Java ContextProgressView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ContextProgressView类属于org.telegram.ui.Components包,在下文中一共展示了ContextProgressView类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: BlockChannelCell
import org.telegram.ui.Components.ContextProgressView; //导入依赖的package包/类
public BlockChannelCell(Context context, int type) {
super(context);
setWillNotDraw(false);
backgroundPaint = new Paint();
currentType = type;
textView = new TextView(context);
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14);
textView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
textView.setText(LocaleController.getString("ChannelJoin", R.string.ChannelJoin));
textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT);
addView(textView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, 39, Gravity.RIGHT | Gravity.TOP));
textView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (currentState != 0) {
return;
}
setState(1, true);
joinChannel(BlockChannelCell.this, loadedChannel);
}
});
imageView = new ImageView(context);
imageView.setImageResource(R.drawable.list_check);
imageView.setScaleType(ImageView.ScaleType.CENTER);
addView(imageView, LayoutHelper.createFrame(39, 39, Gravity.RIGHT | Gravity.TOP));
progressView = new ContextProgressView(context, 0);
addView(progressView, LayoutHelper.createFrame(39, 39, Gravity.RIGHT | Gravity.TOP));
}