protected final ShareParams formateShareData(Platform platform) { if (impl.formateShareData(platform)) { return impl.shareDataToShareParams(platform); } return null; }
public static OnekeyShareTheme fromValue(int value) { for (OnekeyShareTheme theme : OnekeyShareTheme.values()) { if (theme.value == value) { return theme; } } return CLASSIC; }
protected final boolean isUseClientToShare(Platform platform) { return impl.isUseClientToShare(platform); }
private void prepareForEditPage(Platform platform) { if (formateShareData(platform)) { ShareParams sp = shareDataToShareParams(platform); if (sp != null) { // 编辑分享内容的统计 ShareSDK.logDemoEvent(3, null); if (customizeCallback != null) { customizeCallback.onShare(platform, sp); } showEditPage(context, platform, sp); } } }
final void shareSilently(Platform platform) { if (formateShareData(platform)) { ShareParams sp = shareDataToShareParams(platform); if (sp != null) { toast("ssdk_oks_sharing"); if (customizeCallback != null) { customizeCallback.onShare(platform, sp); } if (disableSSO) { platform.SSOSetting(disableSSO); } platform.setPlatformActionListener(callback); platform.share(sp); } } }
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); } } } };
public void onPause() { DeviceHelper.getInstance(activity).hideSoftInput(getContentView()); super.onPause(); }
public void setActivity(Activity activity) { super.setActivity(activity); if (isDialogMode()) { // activity.setTheme(android.R.style.Theme_Dialog); // activity.requestWindowFeature(Window.FEATURE_NO_TITLE); // if (Build.VERSION.SDK_INT >= 11) { // try { // ReflectHelper.invokeInstanceMethod(activity, "setFinishOnTouchOutside", false); // } catch (Throwable e) {} // } } activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); }
/** 设置自己图标和点击事件,可以重复调用添加多次 */ public void setCustomerLogo(Bitmap logo, String label, OnClickListener ocl) { CustomerLogo cl = new CustomerLogo(); cl.logo = logo; cl.label = label; cl.listener = ocl; ArrayList<CustomerLogo> customers = com.mob.tools.utils.R.forceCast(params.get("customers")); customers.add(cl); }
protected final void shareSilently(Platform platform) { impl.shareSilently(platform); }
/** 设置分享界面的样式,目前只有一种,不需要设置 */ public void setTheme(OnekeyShareTheme theme) { params.put("theme", theme.getValue()); }
private void prepareForEditPage(Platform platform) { if (formateShareData(platform)) { ShareParams sp = shareDataToShareParams(platform); if (sp != null) { // 编辑分享内容的统计 ShareSDK.logDemoEvent(3, null); if (customizeCallback != null) { customizeCallback.onShare(platform, sp); } showEditPage(context, platform, sp); } } }
final void shareSilently(Platform platform) { if (formateShareData(platform)) { ShareParams sp = shareDataToShareParams(platform); if (sp != null) { toast("ssdk_oks_sharing"); if (customizeCallback != null) { customizeCallback.onShare(platform, sp); } if (disableSSO) { platform.SSOSetting(disableSSO); } platform.setPlatformActionListener(callback); platform.share(sp); } } }
protected final ShareParams formateShareData(Platform platform) { if (impl.formateShareData(platform)) { return impl.shareDataToShareParams(platform); } return null; }
public void onPause() { DeviceHelper.getInstance(activity).hideSoftInput(getContentView()); super.onPause(); }
/** 设置自己图标和点击事件,可以重复调用添加多次 */ public void setCustomerLogo(Bitmap logo, String label, OnClickListener ocl) { CustomerLogo cl = new CustomerLogo(); cl.logo = logo; cl.label = label; cl.listener = ocl; ArrayList<CustomerLogo> customers = ResHelper.forceCast(params.get("customers")); customers.add(cl); }
public static OnekeyShareTheme fromValue(int value) { for (OnekeyShareTheme theme : OnekeyShareTheme.values()) { if (theme.value == value) { return theme; } } return CLASSIC; }
protected final boolean isUseClientToShare(Platform platform) { return impl.isUseClientToShare(platform); }
protected final void shareSilently(Platform platform) { impl.shareSilently(platform); }
/** 设置分享界面的样式,目前只有一种,不需要设置 */ public void setTheme(OnekeyShareTheme theme) { params.put("theme", theme.getValue()); }