public void onCancel(Platform plat, int action) { UIHandler.sendEmptyMessage(0, new Callback() { public boolean handleMessage(Message msg) { activity.finish(); return false; } }); }
protected void calculateSize(Context context, ArrayList<Object> plats) { int screenWidth = ResHelper.getScreenWidth(context); float ratio = ((float) screenWidth) / DESIGN_SCREEN_WIDTH_L; int cellWidth = (int) (DESIGN_CELL_WIDTH_L * ratio); lineSize = screenWidth / cellWidth; sepLineWidth = (int) (DESIGN_SEP_LINE_WIDTH * ratio); sepLineWidth = sepLineWidth < 1 ? 1 : sepLineWidth; logoHeight = (int) (DESIGN_LOGO_HEIGHT * ratio); paddingTop = (int) (DESIGN_PADDING_TOP * ratio); bottomHeight = (int) (DESIGN_BOTTOM_HEIGHT * ratio); cellHeight = (screenWidth - sepLineWidth * 3) / (lineSize - 1); panelHeight = cellHeight + sepLineWidth; }
protected float getRatio() { float screenWidth = R.getScreenWidth(activity); return screenWidth / DESIGN_SCREEN_WIDTH; }
public final void onComplete(Platform platform, int action, HashMap<String, Object> res) { Message msg = new Message(); msg.arg1 = 1; msg.arg2 = action; msg.obj = platform; UIHandler.sendMessage(msg, this); }
public PlatformPage(OnekeyShareThemeImpl impl) { super(impl); this.impl = R.forceCast(impl); }
public boolean handleMessage(Message msg) { int resId = R.getStringRes(context, resOrName); if (resId > 0) { Toast.makeText(context, resId, Toast.LENGTH_SHORT).show(); } else { Toast.makeText(context, resOrName, Toast.LENGTH_SHORT).show(); } return false; } });
public PlatformPage(OnekeyShareThemeImpl impl) { super(impl); this.impl = ResHelper.forceCast(impl); }
public boolean handleMessage(Message msg) { int resId = ResHelper.getStringRes(context, resOrName); if (resId > 0) { Toast.makeText(context, resId, Toast.LENGTH_SHORT).show(); } else { Toast.makeText(context, resOrName, Toast.LENGTH_SHORT).show(); } return false; } });
private void toast(final String resOrName) { UIHandler.sendEmptyMessage(0, new Callback() { public boolean handleMessage(Message msg) { int resId = ResHelper.getStringRes(context, resOrName); if (resId > 0) { Toast.makeText(context, resId, Toast.LENGTH_SHORT).show(); } else { Toast.makeText(context, resOrName, Toast.LENGTH_SHORT).show(); } return false; } }); }
public final void onComplete(Platform platform, int action, HashMap<String, Object> res) { Message msg = new Message(); msg.arg1 = 1; msg.arg2 = action; msg.obj = platform; UIHandler.sendMessage(msg, this); }
protected float getRatio() { float screenWidth = R.getScreenWidth(activity); return screenWidth / DESIGN_SCREEN_WIDTH; }
/** 自定义不同平台分享不同内容的回调 */ public ShareContentCustomizeCallback getShareContentCustomizeCallback() { return com.mob.tools.utils.R.forceCast(params.get("customizeCallback")); }
protected float getRatio() { float screenWidth = ResHelper.getScreenWidth(activity); return screenWidth / DESIGN_SCREEN_WIDTH; }
/** 自定义不同平台分享不同内容的回调 */ public ShareContentCustomizeCallback getShareContentCustomizeCallback() { return ResHelper.forceCast(params.get("customizeCallback")); }
public void onCancel(Platform plat, int action) { UIHandler.sendEmptyMessage(0, new Callback() { public boolean handleMessage(Message msg) { activity.finish(); return false; } }); }
protected void calculateSize(Context context, ArrayList<Object> plats) { int screenWidth = R.getScreenWidth(context); float ratio = ((float) screenWidth) / DESIGN_SCREEN_WIDTH_L; int cellWidth = (int) (DESIGN_CELL_WIDTH_L * ratio); lineSize = screenWidth / cellWidth; sepLineWidth = (int) (DESIGN_SEP_LINE_WIDTH * ratio); sepLineWidth = sepLineWidth < 1 ? 1 : sepLineWidth; logoHeight = (int) (DESIGN_LOGO_HEIGHT * ratio); paddingTop = (int) (DESIGN_PADDING_TOP * ratio); bottomHeight = (int) (DESIGN_BOTTOM_HEIGHT * ratio); cellHeight = (screenWidth - sepLineWidth * 3) / (lineSize - 1); panelHeight = cellHeight + sepLineWidth; }
/** 添加一个隐藏的platform */ public void addHiddenPlatform(String platform) { HashMap<String, String> hiddenPlatforms = R.forceCast(params.get("hiddenPlatforms")); hiddenPlatforms.put(platform, platform); }
protected float getRatio() { float screenWidth = ResHelper.getScreenWidth(activity); return screenWidth / DESIGN_SCREEN_WIDTH; }
/** 添加一个隐藏的platform */ public void addHiddenPlatform(String platform) { HashMap<String, String> hiddenPlatforms = ResHelper.forceCast(params.get("hiddenPlatforms")); hiddenPlatforms.put(platform, platform); }
private void toast(final String resOrName) { UIHandler.sendEmptyMessage(0, new Callback() { public boolean handleMessage(Message msg) { int resId = R.getStringRes(context, resOrName); if (resId > 0) { Toast.makeText(context, resId, Toast.LENGTH_SHORT).show(); } else { Toast.makeText(context, resOrName, Toast.LENGTH_SHORT).show(); } return false; } }); }