本文整理汇总了Java中org.telegram.ui.Components.AvatarUpdater类的典型用法代码示例。如果您正苦于以下问题:Java AvatarUpdater类的具体用法?Java AvatarUpdater怎么用?Java AvatarUpdater使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AvatarUpdater类属于org.telegram.ui.Components包,在下文中一共展示了AvatarUpdater类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ChannelCreateActivity
import org.telegram.ui.Components.AvatarUpdater; //导入依赖的package包/类
public ChannelCreateActivity(Bundle args) {
super(args);
currentStep = args.getInt("step", 0);
if (currentStep == 0) {
avatarDrawable = new AvatarDrawable();
avatarUpdater = new AvatarUpdater();
TLRPC.TL_channels_checkUsername req = new TLRPC.TL_channels_checkUsername();
req.username = "1";
req.channel = new TLRPC.TL_inputChannelEmpty();
ConnectionsManager.getInstance().sendRequest(req, new RequestDelegate() {
@Override
public void run(TLObject response, final TLRPC.TL_error error) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public void run() {
canCreatePublic = error == null || !error.text.equals("CHANNELS_ADMIN_PUBLIC_TOO_MUCH");
}
});
}
});
} else {
if (currentStep == 1) {
canCreatePublic = args.getBoolean("canCreatePublic", true);
isPrivate = !canCreatePublic;
}
chatId = args.getInt("chat_id", 0);
}
}
示例2: ChannelCreateActivity
import org.telegram.ui.Components.AvatarUpdater; //导入依赖的package包/类
public ChannelCreateActivity(Bundle args) {
super(args);
currentStep = args.getInt("step", 0);
if (currentStep == 0) {
avatarDrawable = new AvatarDrawable();
avatarUpdater = new AvatarUpdater();
TLRPC.TL_channels_checkUsername req = new TLRPC.TL_channels_checkUsername();
req.username = "1";
req.channel = new TLRPC.TL_inputChannelEmpty();
ConnectionsManager.getInstance().sendRequest(req, new RequestDelegate() {
@Override
public void run(TLObject response, final TLRPC.TL_error error) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public void run() {
canCreatePublic = error == null || !error.text.equals("CHANNELS_ADMIN_PUBLIC_TOO_MUCH");
}
});
}
});
} else {
if (currentStep == 1) {
canCreatePublic = args.getBoolean("canCreatePublic", true);
isPrivate = !canCreatePublic;
if (!canCreatePublic) {
loadAdminedChannels();
}
}
chatId = args.getInt("chat_id", 0);
}
}
示例3: onFragmentCreate
import org.telegram.ui.Components.AvatarUpdater; //导入依赖的package包/类
@Override
public boolean onFragmentCreate() {
super.onFragmentCreate();
avatarDrawable = new AvatarDrawable();
chatId = getArguments().getInt("chat_id", 0);
avatarUpdater = new AvatarUpdater();
avatarUpdater.parentFragment = this;
avatarUpdater.delegate = this;
return true;
}
示例4: ChannelEditActivity
import org.telegram.ui.Components.AvatarUpdater; //导入依赖的package包/类
public ChannelEditActivity(Bundle args) {
super(args);
avatarDrawable = new AvatarDrawable();
avatarUpdater = new AvatarUpdater();
chatId = args.getInt("chat_id", 0);
}
示例5: ChannelEditInfoActivity
import org.telegram.ui.Components.AvatarUpdater; //导入依赖的package包/类
public ChannelEditInfoActivity(Bundle args) {
super(args);
avatarDrawable = new AvatarDrawable();
avatarUpdater = new AvatarUpdater();
chatId = args.getInt("chat_id", 0);
}