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


Java TLRPC.BotInlineResult方法代码示例

本文整理汇总了Java中org.telegram.tgnet.TLRPC.BotInlineResult方法的典型用法代码示例。如果您正苦于以下问题:Java TLRPC.BotInlineResult方法的具体用法?Java TLRPC.BotInlineResult怎么用?Java TLRPC.BotInlineResult使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.telegram.tgnet.TLRPC的用法示例。


在下文中一共展示了TLRPC.BotInlineResult方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setLink

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void setLink(TLRPC.BotInlineResult contextResult, boolean media, boolean divider, boolean shadow) {
    needDivider = divider;
    needShadow = shadow;
    if (needShadow && shadowDrawable == null) {
        shadowDrawable = getContext().getResources().getDrawable(R.drawable.header_shadow);
    }
    inlineResult = contextResult;
    if (inlineResult != null && inlineResult.document != null) {
        documentAttach = inlineResult.document;
    } else {
        documentAttach = null;
    }
    mediaWebpage = media;
    requestLayout();
    updateButtonState(false);
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:17,代码来源:ContextLinkCell.java

示例2: setLink

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void setLink(TLRPC.BotInlineResult contextResult, boolean media, boolean divider, boolean shadow) {
    needDivider = divider;
    needShadow = shadow;
    if (needShadow && shadowDrawable == null) {
        shadowDrawable = getContext().getResources().getDrawable(R.drawable.header_shadow);
    }
    inlineResult = contextResult;
    if (inlineResult != null && inlineResult.document != null) {
        documentAttach = inlineResult.document;
    } else {
        documentAttach = null;
    }
    mediaWebpage = media;
    setAttachType();
    requestLayout();
    updateButtonState(false);
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:18,代码来源:ContextLinkCell.java

示例3: sendBotInlineResult

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
private void sendBotInlineResult(TLRPC.BotInlineResult result) {
    int uid = mentionsAdapter.getContextBotId();
    HashMap<String, String> params = new HashMap<>();
    params.put("id", result.id);
    params.put("query_id", "" + result.query_id);
    params.put("bot", "" + uid);
    params.put("bot_name", mentionsAdapter.getContextBotName());
    SendMessagesHelper.prepareSendingBotContextResult(result, params, dialog_id, replyingMessageObject);
    chatActivityEnterView.setFieldText("");
    showReplyPanel(false, null, null, null, false, true);
    SearchQuery.increaseInlineRaiting(uid);
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:13,代码来源:ChatActivity.java

示例4: updateCaptionTextForCurrentPhoto

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
private void updateCaptionTextForCurrentPhoto(Object object) {
    CharSequence caption = null;
    if (object instanceof MediaController.PhotoEntry) {
        caption = ((MediaController.PhotoEntry) object).caption;
    } else if (object instanceof TLRPC.BotInlineResult) {
        //caption = ((TLRPC.BotInlineResult) object).send_message.caption;
    } else if (object instanceof MediaController.SearchImage) {
        caption = ((MediaController.SearchImage) object).caption;
    }
    if (caption == null || caption.length() == 0) {
        captionEditText.setFieldText("");
    } else {
        captionEditText.setFieldText(caption);
    }
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:16,代码来源:PhotoViewer.java

示例5: getResult

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public TLRPC.BotInlineResult getResult() {
    return inlineResult;
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:4,代码来源:ContextLinkCell.java

示例6: getFileName

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
private String getFileName(int index) {
    if (index < 0) {
        return null;
    }
    if (!imagesArrLocations.isEmpty() || !imagesArr.isEmpty()) {
        if (!imagesArrLocations.isEmpty()) {
            if (index >= imagesArrLocations.size()) {
                return null;
            }
            TLRPC.FileLocation location = imagesArrLocations.get(index);
            return location.volume_id + "_" + location.local_id + ".jpg";
        } else if (!imagesArr.isEmpty()) {
            if (index >= imagesArr.size()) {
                return null;
            }
            return FileLoader.getMessageFileName(imagesArr.get(index).messageOwner);
        }
    } else if (!imagesArrLocals.isEmpty()) {
        if (index >= imagesArrLocals.size()) {
            return null;
        }
        Object object = imagesArrLocals.get(index);
        if (object instanceof MediaController.SearchImage) {
            MediaController.SearchImage searchImage = ((MediaController.SearchImage) object);
            if (searchImage.document != null) {
                return FileLoader.getAttachFileName(searchImage.document);
            } else if (searchImage.type != 1 && searchImage.localUrl != null && searchImage.localUrl.length() > 0) {
                File file = new File(searchImage.localUrl);
                if (file.exists()) {
                    return file.getName();
                } else {
                    searchImage.localUrl = "";
                }
            }
            return Utilities.MD5(searchImage.imageUrl) + "." + ImageLoader.getHttpUrlExtension(searchImage.imageUrl, "jpg");
        } else if (object instanceof TLRPC.BotInlineResult) {
            TLRPC.BotInlineResult botInlineResult = (TLRPC.BotInlineResult) object;
            if (botInlineResult.document != null) {
                return FileLoader.getAttachFileName(botInlineResult.document);
            }  else if (botInlineResult.photo != null) {
                TLRPC.PhotoSize sizeFull = FileLoader.getClosestPhotoSizeWithSize(botInlineResult.photo.sizes, AndroidUtilities.getPhotoSize());
                return FileLoader.getAttachFileName(sizeFull);
            } else if (botInlineResult.content_url != null) {
                return Utilities.MD5(botInlineResult.content_url) + "." + ImageLoader.getHttpUrlExtension(botInlineResult.content_url, "jpg");
            }
        }
    }
    return null;
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:50,代码来源:PhotoViewer.java

示例7: getSearchResultBotContext

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public ArrayList<TLRPC.BotInlineResult> getSearchResultBotContext() {
    return searchResultBotContext;
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:4,代码来源:MentionsAdapter.java

示例8: onContextClick

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


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