Custom controls: add a null check to fixing crash

This commit is contained in:
Duy Tran Khanh 2021-02-24 17:11:42 +07:00 committed by GitHub
parent 12ebe828fd
commit aa426268ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ public class CustomControlsActivity extends BaseActivity
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getIntent().getExtras().getBoolean("fromMainActivity", false)) {
if (getIntent().getExtras() != null && getIntent().getExtras().getBoolean("fromMainActivity", false)) {
// TODO translucent!
// setTheme(androidx.appcompat.R.style.Theme_AppCompat_Translucent);
}