Commit 65afaca0 by chengfengpiaopiao

点击获取验证码crash

parent b23235c2
......@@ -27,7 +27,7 @@
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
......
......@@ -3,6 +3,7 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/DuoBaoJingCai.iml" filepath="$PROJECT_DIR$/DuoBaoJingCai.iml" />
<module fileurl="file://$PROJECT_DIR$/DuoBaoJingCai2.iml" filepath="$PROJECT_DIR$/DuoBaoJingCai2.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
<module fileurl="file://$PROJECT_DIR$/multi-image-selector/multi-image-selector.iml" filepath="$PROJECT_DIR$/multi-image-selector/multi-image-selector.iml" />
</modules>
......
......@@ -70,7 +70,7 @@
<activity
android:name=".view.activity.MainActivity"
android:exported="true"
android:launchMode="singleTask"
android:launchMode="singleTop"
android:theme="@android:style/Theme.Translucent"
android:screenOrientation="portrait">
<intent-filter>
......
......@@ -9,6 +9,7 @@ import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.SystemClock;
import android.util.Log;
import android.view.View;
import android.view.Window;
......@@ -153,6 +154,7 @@ public class LoginActivity extends Activity implements ILoginView {
//自动登录
private void autoLogin(String token){
// 手机 phone + token
// 微信 openid + token
RetrofitManager.getInstance().createReq(LoginApiService.class).autoLogin(token).subscribeOn(Schedulers.io())
......@@ -207,9 +209,18 @@ public class LoginActivity extends Activity implements ILoginView {
public static void startEntranceActivity(Context context) {
Intent intent = new Intent(context, MainActivity.class);
context.startActivity(intent);
if (mContext != null) {
((Activity) mContext).finish();
}
new Thread(new Runnable() {
@Override
public void run() {
Log.d("删除LoginActivity", "starting....");
SystemClock.sleep(2000);
if (mContext != null) {
Log.d("删除LoginActivity", "done!");
((Activity) mContext).finish();
}
}
}).start();
}
@Override
......
......@@ -359,6 +359,7 @@ public class MainActivity extends FragmentActivity implements IWebView ,Activity
// 上传到服务器
final String userFace = CameraUtil.imgToBase64(null, bitmap);
Log.d("userFace", "updateHeadImage: "+userFace);
// PreferencesManager preferencesManager = PreferencesManager.getSharedPreference(getApplicationContext(),
// IPreferencesIds.DEFAULT_SHAREPREFERENCES_FILE,
// Context.MODE_PRIVATE);
......
......@@ -77,6 +77,7 @@ public class PhoneLayer extends RelativeLayout implements View.OnFocusChangeLi
private boolean mIsSendingCheckCode;
private SmsReceiver mSmsReceiver;
private MyCountDownTimer mCountDownTimer;
private Context mContxt;
public PhoneLayer(Context context) {
super(context);
......@@ -94,6 +95,7 @@ public class PhoneLayer extends RelativeLayout implements View.OnFocusChangeLi
}
private void init(Context context) {
mContxt = context;
View view = LayoutInflater.from(context).inflate(R.layout.layer_login_phone, this);
ButterKnife.inject(view, this);
initAnimation();
......@@ -350,7 +352,7 @@ public class PhoneLayer extends RelativeLayout implements View.OnFocusChangeLi
@Override
public void onTick(long millisUntilFinished) {
mSendCheckCodeView.setText(String.format(BaseApplication.getAppContext().getResources().getString(R.string.login_input_checkcode_clock),
mSendCheckCodeView.setText(String.format(mContxt.getResources().getString(R.string.login_input_checkcode_clock),
millisUntilFinished / 1000));
}
......@@ -358,7 +360,7 @@ public class PhoneLayer extends RelativeLayout implements View.OnFocusChangeLi
public void onFinish() {
mSendCheckCodeView.setBackgroundResource(R.drawable.input_send_checkcode_bg);
mSendCheckCodeView.disallowTouch(false);
mSendCheckCodeView.setText(BaseApplication.getAppContext().getResources().getString(R.string.login_input_checkcode_send));
mSendCheckCodeView.setText(mContxt.getResources().getString(R.string.login_input_checkcode_send));
mIsSendingCheckCode = false;
}
}
......
......@@ -9,6 +9,7 @@
tools:context=".view.activity.MainActivity">
<LinearLayout
android:background="#FFFFFF"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.view.ViewPager
......
......@@ -6,7 +6,7 @@ param[3] = "apkV2Name签名后的包名: " duobaojingcai_v2.0.0_release_v2
param[4] = "apkV2Path签名后的包所在路? " G:\Apks\DuoBaoJingCai\v2\
param[5] = "apkWallleName多渠道基础包名: " duobaojingcai_v2.0.0_release
param[6] = "apkWallePath多渠道打包输出位? " G:\Apks\DuoBaoJingCai\walleBase\
param[7] = "currentSdkBuildToolsPath当前环境下的build-tools所在路径和使用版本: " D:\Android\AndroidSDK\build-tools\25.0.0
param[7] = "currentSdkBuildToolsPath当前环境下的build-tools所在路径和使用版本: " D:\2_android\as_client\sdk\build-tools\25.0.0
param[8] = "utilsPath工具路径: " G:\Apks\DuoBaoJingCai\tools\
加固包工具路径: G:\Apks\DuoBaoJingCai\tools\jiagubao\jiagu
加固包输入路径:G:\Apks\DuoBaoJingCai\duobaojingcai_baseflavor_v2.0.0_release.apk
......
......@@ -26,7 +26,7 @@ org.gradle.jvmargs=-XX:MaxPermSize=1024m
?android.useDeprecatedNdk=true
#\uFFFD\uFFFD\u02FE & \uFFFD\uFFFD\u0365
IN_COMPONENY = false
IN_COMPONENY = true
#Project
PROJECT_NAME = DuoBaoJingCai
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment