// Path: app/src/main/java/com/hotbitmapgg/leisureread/app/AppConstant.java
// public class AppConstant {
// 
//   public static final float SCALE_END = 1.13F;
// 
//   public static final int ANIMATION_DURATION = 2000;
// 
//   public static final String EXTRA_ID = "extra_id";
// 
//   public static final String EXTRA_NAME = "extra_name";
// 
//   public static final String EXTRA_TYPE = "extra_type";
// 
//   public static final String EXTRA_COMMENT_ID = "comment_id";
// 
//   public static final String EXTRA_COMMENT_NUM = "comment_num";
// 
//   public static final String EXTRA_LONG_COMMENT_NUM = "long_comment_num";
// 
//   public static final String EXTRA_SHORT_COMMENT_NUM = "short_comment_num";
// 
//   public static final String EXTRA_LONG_COMMENT_ID = "long_comment_id";
// 
//   public static final String EXTRA_SHORT_COMMENT_ID = "short_comment_id";
// }


import butterknife.Bind;
import butterknife.ButterKnife;
import com.hotbitmapgg.leisureread.app.AppConstant;
import com.hotbitmapgg.rxzhihu.R;
import java.util.concurrent.TimeUnit;
import rx.Observable;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;
package com.hotbitmapgg.leisureread.ui.activity;



/**
 * Created by hcc on 2016/12/28 13:35
 * 100332338@qq.com
 * LeisureRead
 *
 * @HotBitmapGG 启动页界面
 */
public class SplashActivity extends Activity {

  @Bind(R.id.iv_splash)
  ImageView mSplashImageView;

  private Subscription subscribe;


  @Override
  protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_splash);
    ButterKnife.bind(this);
    initSplashImage();
  }


  private void initSplashImage() {

    subscribe = Observable.timer(2000, TimeUnit.MILLISECONDS)
        .observeOn(AndroidSchedulers.mainThread())
        .subscribe(aLong -> {
          animateImage();
        });
  }


  public void animateImage() {

    ObjectAnimator animatorX = ObjectAnimator.ofFloat(mSplashImageView, "scaleX", 1f,
// Path: app/src/main/java/com/hotbitmapgg/leisureread/app/AppConstant.java
// public class AppConstant {
// 
//   public static final float SCALE_END = 1.13F;
// 
//   public static final int ANIMATION_DURATION = 2000;
// 
//   public static final String EXTRA_ID = "extra_id";
// 
//   public static final String EXTRA_NAME = "extra_name";
// 
//   public static final String EXTRA_TYPE = "extra_type";
// 
//   public static final String EXTRA_COMMENT_ID = "comment_id";
// 
//   public static final String EXTRA_COMMENT_NUM = "comment_num";
// 
//   public static final String EXTRA_LONG_COMMENT_NUM = "long_comment_num";
// 
//   public static final String EXTRA_SHORT_COMMENT_NUM = "short_comment_num";
// 
//   public static final String EXTRA_LONG_COMMENT_ID = "long_comment_id";
// 
//   public static final String EXTRA_SHORT_COMMENT_ID = "short_comment_id";
// }


// Path: app/src/main/java/com/hotbitmapgg/leisureread/ui/activity/SplashActivity.java
import butterknife.Bind;
import butterknife.ButterKnife;
import com.hotbitmapgg.leisureread.app.AppConstant;
import com.hotbitmapgg.rxzhihu.R;
import java.util.concurrent.TimeUnit;
import rx.Observable;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;

package com.hotbitmapgg.leisureread.ui.activity;



/**
 * Created by hcc on 2016/12/28 13:35
 * 100332338@qq.com
 * LeisureRead
 *
 * @HotBitmapGG 启动页界面
 */
public class SplashActivity extends Activity {

  @Bind(R.id.iv_splash)
  ImageView mSplashImageView;

  private Subscription subscribe;


  @Override
  protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_splash);
    ButterKnife.bind(this);
    initSplashImage();
  }


  private void initSplashImage() {

    subscribe = Observable.timer(2000, TimeUnit.MILLISECONDS)
        .observeOn(AndroidSchedulers.mainThread())
        .subscribe(aLong -> {
          animateImage();
        });
  }


  public void animateImage() {

    ObjectAnimator animatorX = ObjectAnimator.ofFloat(mSplashImageView, "scaleX", 1f,
        AppConstant.SCALE_END);