当前位置: 首页>>代码示例>>Java>>正文


Java TLRPC.WebPage方法代码示例

本文整理汇总了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);
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:4,代码来源:SendMessagesHelper.java

示例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());
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:7,代码来源:MediaActivity.java

示例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);
            }
        }
    }
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:47,代码来源:ChatMessageCell.java

示例4: setWebPage

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void setWebPage(TLRPC.WebPage webPage, boolean searchWebPages) {
    messageWebPage = webPage;
    messageWebPageSearch = searchWebPages;
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:5,代码来源:ChatActivityEnterView.java

示例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);
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:4,代码来源:SendMessagesHelper.java

示例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);
                }
            }
        }
    }
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:49,代码来源:ChatMessageCell.java

示例7: needOpenWebView

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
void needOpenWebView(TLRPC.WebPage webPage); 
开发者ID:MLNO,项目名称:airgram,代码行数:2,代码来源:SharedLinkCell.java


注:本文中的org.telegram.tgnet.TLRPC.WebPage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。