|
@@ -9,6 +9,8 @@ import android.content.Intent;
|
|
|
import android.net.Uri;
|
|
import android.net.Uri;
|
|
|
import android.os.Build;
|
|
import android.os.Build;
|
|
|
import android.os.Bundle;
|
|
import android.os.Bundle;
|
|
|
|
|
+import android.os.Handler;
|
|
|
|
|
+import android.os.Message;
|
|
|
import android.provider.Settings;
|
|
import android.provider.Settings;
|
|
|
import android.support.annotation.NonNull;
|
|
import android.support.annotation.NonNull;
|
|
|
import android.support.v7.app.AlertDialog;
|
|
import android.support.v7.app.AlertDialog;
|
|
@@ -49,6 +51,8 @@ public class SplashAct extends BaseActivity implements SplashContract.View, Easy
|
|
|
@Inject
|
|
@Inject
|
|
|
SplashPresenter presenter;
|
|
SplashPresenter presenter;
|
|
|
|
|
|
|
|
|
|
+ private boolean isClick;
|
|
|
|
|
+
|
|
|
private static final int PERMISSON_REQUESTCODE = 1;
|
|
private static final int PERMISSON_REQUESTCODE = 1;
|
|
|
/**
|
|
/**
|
|
|
* 需要进行检测的权限数组
|
|
* 需要进行检测的权限数组
|
|
@@ -71,13 +75,26 @@ public class SplashAct extends BaseActivity implements SplashContract.View, Easy
|
|
|
EasyPermissions.requestPermissions(this, "应用需要这些权限", PERMISSON_REQUESTCODE, needPermissions);
|
|
EasyPermissions.requestPermissions(this, "应用需要这些权限", PERMISSON_REQUESTCODE, needPermissions);
|
|
|
} else {
|
|
} else {
|
|
|
// setContentView(R.layout.splash_activity);
|
|
// setContentView(R.layout.splash_activity);
|
|
|
- if(Build.VERSION.SDK_INT >= 21){
|
|
|
|
|
- animWelcomeImage();
|
|
|
|
|
|
|
+// if(Build.VERSION.SDK_INT >= 21){
|
|
|
|
|
+// animWelcomeImage();
|
|
|
|
|
+//
|
|
|
|
|
+// }else {
|
|
|
|
|
+// }
|
|
|
|
|
+ mHandler.sendEmptyMessageDelayed(0, 1000);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- }else {
|
|
|
|
|
|
|
+ Handler mHandler = new Handler(){
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void handleMessage(Message msg) {
|
|
|
|
|
+ super.handleMessage(msg);
|
|
|
|
|
+ if(!isClick){
|
|
|
|
|
+ isClick = true;
|
|
|
|
|
+ goMain();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
protected int getLayoutId() {
|
|
protected int getLayoutId() {
|
|
@@ -207,7 +224,10 @@ public class SplashAct extends BaseActivity implements SplashContract.View, Easy
|
|
|
public void onViewClicked(View view) {
|
|
public void onViewClicked(View view) {
|
|
|
switch (view.getId()){
|
|
switch (view.getId()){
|
|
|
case R.id.btn_join:
|
|
case R.id.btn_join:
|
|
|
- goMain();
|
|
|
|
|
|
|
+ if(!isClick){
|
|
|
|
|
+ isClick = true;
|
|
|
|
|
+ goMain();
|
|
|
|
|
+ }
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|