优化掉线问题
This commit is contained in:
@ -15,11 +15,13 @@ import com.gh.base.BaseActivity;
|
||||
import com.gh.common.util.PackageUtils;
|
||||
import com.gh.common.util.StringUtils;
|
||||
import com.gh.gamecenter.manager.UpdateManager;
|
||||
import com.tencent.bugly.beta.tinker.TinkerManager;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.OnClick;
|
||||
import butterknife.OnLongClick;
|
||||
|
||||
/**
|
||||
* Created by khy on 2017/2/28.
|
||||
@ -32,6 +34,8 @@ public class AboutActivity extends BaseActivity {
|
||||
RelativeLayout mAboutUpdateRl;
|
||||
@BindView(R.id.about_version_pb)
|
||||
ProgressBar mAboutPb;
|
||||
@BindView(R.id.about_tv_version)
|
||||
TextView mVersionName;
|
||||
|
||||
private Handler handler = new MyHandler(this);
|
||||
|
||||
@ -52,7 +56,7 @@ public class AboutActivity extends BaseActivity {
|
||||
initTitle(getString(R.string.title_about));
|
||||
|
||||
// ((TextView) findViewById(R.id.about_tv_version)).setText("V" + PackageUtils.getVersionName(this));
|
||||
((TextView) findViewById(R.id.about_tv_version)).setText("V" + PackageUtils.getPatchVersionName()); // TODO 版本号暂时与gradle versionName不一致
|
||||
mVersionName.setText("V" + PackageUtils.getPatchVersionName()); // TODO 版本号暂时与gradle versionName不一致
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -71,6 +75,15 @@ public class AboutActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@OnLongClick(R.id.about_tv_version)
|
||||
public boolean OnLongClick(View view) {
|
||||
if (view.getId() == R.id.about_tv_version) {
|
||||
String tinkerId = TinkerManager.getTinkerId();
|
||||
mVersionName.setText("V" + PackageUtils.getPatchVersionName() + "." + tinkerId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static class MyHandler extends Handler {
|
||||
|
||||
private WeakReference<AboutActivity> mWeakReference;
|
||||
|
||||
Reference in New Issue
Block a user