本文整理匯總了Java中cn.sharesdk.framework.ShareSDK.getPlatformList方法的典型用法代碼示例。如果您正苦於以下問題:Java ShareSDK.getPlatformList方法的具體用法?Java ShareSDK.getPlatformList怎麽用?Java ShareSDK.getPlatformList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cn.sharesdk.framework.ShareSDK
的用法示例。
在下文中一共展示了ShareSDK.getPlatformList方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: collectCells
import cn.sharesdk.framework.ShareSDK; //導入方法依賴的package包/類
protected ArrayList<Object> collectCells() {
ArrayList<Object> cells = new ArrayList<Object>();
Platform[] platforms = ShareSDK.getPlatformList();
if (platforms == null) {
platforms = new Platform[0];
}
HashMap<String, String> hides = getHiddenPlatforms();
if (hides == null) {
hides = new HashMap<String, String>();
}
for (Platform p : platforms) {
if (!hides.containsKey(p.getName())) {
cells.add(p);
}
}
ArrayList<CustomerLogo> customers = getCustomerLogos();
if (customers != null && customers.size() > 0) {
cells.addAll(customers);
}
return cells;
}
示例2: collectCells
import cn.sharesdk.framework.ShareSDK; //導入方法依賴的package包/類
protected ArrayList<Object> collectCells() {
ArrayList<Object> cells = new ArrayList<Object>();
Platform[] platforms = ShareSDK.getPlatformList();
if (platforms == null) {
platforms = new Platform[0];
}
HashMap<String, String> hides = getHiddenPlatforms();
if (hides == null) {
hides = new HashMap<String, String>();
}
for (Platform p : platforms) {
if (!hides.containsKey(p.getName())) {
cells.add(p);
}
}
ArrayList<CustomerLogo> customers = getCustomerLogos();
if (customers != null && customers.size() > 0) {
cells.addAll(customers);
}
return cells;
}
示例3: initSocialLogin
import cn.sharesdk.framework.ShareSDK; //導入方法依賴的package包/類
private void initSocialLogin() {
Platform[] platforms = ShareSDK.getPlatformList();
if (platforms == null) {
return;
}
for (Platform p : platforms) {
if ("QQ".equals(p.getName())) {
qqLoginView.setVisibility(View.VISIBLE);
otherLoginView.setVisibility(View.VISIBLE);
}
if ("Wechat".equals(p.getName())) {
wxLoginView.setVisibility(View.VISIBLE);
otherLoginView.setVisibility(View.VISIBLE);
}
}
}
示例4: AuthAdapter
import cn.sharesdk.framework.ShareSDK; //導入方法依賴的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);
}
}