本文整理匯總了Java中cn.sharesdk.framework.CustomPlatform類的典型用法代碼示例。如果您正苦於以下問題:Java CustomPlatform類的具體用法?Java CustomPlatform怎麽用?Java CustomPlatform使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
CustomPlatform類屬於cn.sharesdk.framework包,在下文中一共展示了CustomPlatform類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: showEditPage
import cn.sharesdk.framework.CustomPlatform; //導入依賴的package包/類
public final void showEditPage(final Platform platform) {
beforeFinish = new Runnable() {
public void run() {
boolean isSilent = isSilent();
boolean isCustomPlatform = platform instanceof CustomPlatform;
boolean isUseClientToShare = isUseClientToShare(platform);
if (isSilent || isCustomPlatform || isUseClientToShare) {
shareSilently(platform);
} else {
ShareParams sp = formateShareData(platform);
if (sp != null) {
// 編輯分享內容的統計
ShareSDK.logDemoEvent(3, null);
if (getCustomizeCallback() != null) {
getCustomizeCallback().onShare(platform, sp);
}
impl.showEditPage(activity, platform, sp);
}
}
}
};
finish();
}
示例2: show
import cn.sharesdk.framework.CustomPlatform; //導入依賴的package包/類
public final void show(Context context) {
this.context = context;
// 顯示方式是由platform和silent兩個字段控製的
// 如果platform設置了,則無須顯示九宮格,否則都會顯示;
// 如果silent為true,表示不進入編輯頁麵,否則會進入。
if (shareParamsMap.containsKey("platform")) {
String name = String.valueOf(shareParamsMap.get("platform"));
Platform platform = ShareSDK.getPlatform(name);
boolean isCustomPlatform = platform instanceof CustomPlatform;
boolean isUseClientToShare = isUseClientToShare(platform);
if (silent || isCustomPlatform || isUseClientToShare) {
shareSilently(platform);
} else {
prepareForEditPage(platform);
}
} else {
showPlatformPage(context);
}
}
示例3: showEditPage
import cn.sharesdk.framework.CustomPlatform; //導入依賴的package包/類
public final void showEditPage(final Platform platform) {
beforeFinish = new Runnable() {
public void run() {
boolean isSilent = isSilent();
boolean isCustomPlatform = platform instanceof CustomPlatform;
boolean isUseClientToShare = isUseClientToShare(platform);
if (isSilent || isCustomPlatform || isUseClientToShare) {
shareSilently(platform);
} else {
ShareParams sp = formateShareData(platform);
if (sp != null) {
// 編輯分享內容的統計
ShareSDK.logDemoEvent(3, null);
if (getCustomizeCallback() != null) {
getCustomizeCallback().onShare(platform, sp);
}
impl.showEditPage(activity, platform, sp);
}
}
}
};
finish();
}
示例4: AuthAdapter
import cn.sharesdk.framework.CustomPlatform; //導入依賴的package包/類
public AuthAdapter(Context context) {
this.context = context;
// 獲取平台列表
Platform[] tmp = ShareSDK.getPlatformList();
platforms = new ArrayList<Platform>();
if (tmp == null) {
return;
}
for (Platform p : tmp) {
String name = p.getName();
if ((p instanceof CustomPlatform)
|| !ShareCore.canAuthorize(p.getContext(), name)) {
continue;
}
if (p.getName().equals(Wechat.NAME)){
continue;
}
platforms.add(p);
}
}