本文整理汇总了Java中org.telegram.tgnet.TLRPC.WebPage方法的典型用法代码示例。如果您正苦于以下问题:Java TLRPC.WebPage方法的具体用法?Java TLRPC.WebPage怎么用?Java TLRPC.WebPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.telegram.tgnet.TLRPC
的用法示例。
在下文中一共展示了TLRPC.WebPage方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sendMessage
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void sendMessage(String message, long peer, MessageObject reply_to_msg, TLRPC.WebPage webPage, boolean searchLinks, ArrayList<TLRPC.MessageEntity> entities, TLRPC.ReplyMarkup replyMarkup, HashMap<String, String> params) {
sendMessage(message, null, null, null, null, null, peer, null, reply_to_msg, webPage, searchLinks, null, entities, replyMarkup, params);
}
示例2: openWebView
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
private void openWebView(TLRPC.WebPage webPage) {
BottomSheet.Builder builder = new BottomSheet.Builder(getParentActivity());
builder.setCustomView(new WebFrameLayout(getParentActivity(), builder.create(), webPage.site_name, webPage.description, webPage.url, webPage.embed_url, webPage.embed_width, webPage.embed_height));
builder.setUseFullWidth(true);
showDialog(builder.create());
}
示例3: didClickedImage
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
private void didClickedImage() {
if (currentMessageObject.type == 1 || currentMessageObject.type == 13) {
if (buttonState == -1) {
delegate.didPressedImage(this);
} else if (buttonState == 0) {
didPressedButton(false);
}
} else if (currentMessageObject.type == 12) {
TLRPC.User user = MessagesController.getInstance().getUser(currentMessageObject.messageOwner.media.user_id);
delegate.didPressedUserAvatar(this, user);
} else if (currentMessageObject.type == 8) {
if (buttonState == -1) {
if (MediaController.getInstance().canAutoplayGifs()) {
delegate.didPressedImage(this);
} else {
buttonState = 2;
currentMessageObject.audioProgress = 1;
photoImage.setAllowStartAnimation(false);
photoImage.stopAnimation();
radialProgress.setBackground(getDrawableForCurrentState(), false, false);
invalidate();
}
} else if (buttonState == 2 || buttonState == 0) {
didPressedButton(false);
}
} else if (documentAttachType == DOCUMENT_ATTACH_TYPE_VIDEO) {
if (buttonState == 0 || buttonState == 3) {
didPressedButton(false);
}
} else if (currentMessageObject.type == 4) {
delegate.didPressedImage(this);
} else if (documentAttachType == DOCUMENT_ATTACH_TYPE_DOCUMENT) {
if (buttonState == -1) {
delegate.didPressedImage(this);
}
} else if (documentAttachType == DOCUMENT_ATTACH_TYPE_GIF) {
if (buttonState == -1) {
TLRPC.WebPage webPage = currentMessageObject.messageOwner.media.webpage;
if (Build.VERSION.SDK_INT >= 16 && webPage.embed_url != null && webPage.embed_url.length() != 0) {
delegate.needOpenWebView(webPage.embed_url, webPage.site_name, webPage.description, webPage.url, webPage.embed_width, webPage.embed_height);
} else {
Browser.openUrl(getContext(), webPage.url);
}
}
}
}
示例4: setWebPage
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void setWebPage(TLRPC.WebPage webPage, boolean searchWebPages) {
messageWebPage = webPage;
messageWebPageSearch = searchWebPages;
}
示例5: sendMessage
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void sendMessage(String message, long peer, MessageObject reply_to_msg, TLRPC.WebPage webPage, boolean searchLinks, ArrayList<TLRPC.MessageEntity> entities, TLRPC.ReplyMarkup replyMarkup, HashMap<String, String> params) {
sendMessage(message, null, null, null, null, null, null, peer, null, reply_to_msg, webPage, searchLinks, null, entities, replyMarkup, params);
}
示例6: didClickedImage
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
private void didClickedImage() {
if (currentMessageObject.type == 1 || currentMessageObject.type == 13) {
if (buttonState == -1) {
delegate.didPressedImage(this);
} else if (buttonState == 0) {
didPressedButton(false);
}
} else if (currentMessageObject.type == 12) {
TLRPC.User user = MessagesController.getInstance().getUser(currentMessageObject.messageOwner.media.user_id);
delegate.didPressedUserAvatar(this, user);
} else if (currentMessageObject.type == 8) {
if (buttonState == -1) {
if (MediaController.getInstance().canAutoplayGifs()) {
delegate.didPressedImage(this);
} else {
buttonState = 2;
currentMessageObject.audioProgress = 1;
photoImage.setAllowStartAnimation(false);
photoImage.stopAnimation();
radialProgress.setBackground(getDrawableForCurrentState(), false, false);
invalidate();
}
} else if (buttonState == 2 || buttonState == 0) {
didPressedButton(false);
}
} else if (documentAttachType == DOCUMENT_ATTACH_TYPE_VIDEO) {
if (buttonState == 0 || buttonState == 3) {
didPressedButton(false);
}
} else if (currentMessageObject.type == 4) {
delegate.didPressedImage(this);
} else if (documentAttachType == DOCUMENT_ATTACH_TYPE_DOCUMENT) {
if (buttonState == -1) {
delegate.didPressedImage(this);
}
} else if (documentAttachType == DOCUMENT_ATTACH_TYPE_GIF) {
if (buttonState == -1) {
TLRPC.WebPage webPage = currentMessageObject.messageOwner.media.webpage;
if (webPage != null) {
if (Build.VERSION.SDK_INT >= 16 && webPage.embed_url != null && webPage.embed_url.length() != 0) {
delegate.needOpenWebView(webPage.embed_url, webPage.site_name, webPage.description, webPage.url, webPage.embed_width, webPage.embed_height);
} else {
Browser.openUrl(getContext(), webPage.url);
}
}
}
}
}
示例7: needOpenWebView
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
void needOpenWebView(TLRPC.WebPage webPage);