public boolean onFinish() {
    if (finishing) {
      return super.onFinish();
    }

    if (animHide == null) {
      finishing = true;
      super.finish();
      return super.onFinish();
    }

    // 取消分享菜单的统计
    if (canceled) {
      ShareSDK.logDemoEvent(2, null);
    }
    finishing = true;
    animHide.setAnimationListener(
        new AnimationListener() {
          public void onAnimationStart(Animation animation) {}

          public void onAnimationRepeat(Animation animation) {}

          public void onAnimationEnd(Animation animation) {
            flPage.setVisibility(View.GONE);
            OnekeyShare.super.finish();
          }
        });
    flPage.clearAnimation();
    flPage.startAnimation(animHide);
    return super.onFinish();
  }
Ejemplo n.º 2
0
 public void setActivity(Activity activity) {
   super.setActivity(activity);
   int resId = getBitmapRes(activity, "ssdk_oks_shake_to_share_back");
   if (resId > 0) {
     activity.setTheme(android.R.style.Theme_Dialog);
     activity.requestWindowFeature(Window.FEATURE_NO_TITLE);
     Window win = activity.getWindow();
     win.setBackgroundDrawableResource(resId);
   }
 }
 public void setActivity(Activity activity) {
   super.setActivity(activity);
   Window win = activity.getWindow();
   int orientation = activity.getResources().getConfiguration().orientation;
   if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
     win.setSoftInputMode(
         WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN
             | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
   } else {
     win.setSoftInputMode(
         WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE
             | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
   }
 }
 public void show(Context context) {
   ShareSDK.initSDK(context);
   super.show(context, null);
 }