我有按钮活动。OnClick 打开 CustomTab:
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button button = findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
builder.build().launchUrl(MainActivity.this, Uri.parse("https://www.google.com"));
}
});
}
}
关闭 CustomTab 后,MainActivity 闪烁黑色。为什么会这样?我怎样才能解决这个问题?例如,Nexus 5X android 8.0、Pixel 2 android 8.0 重现了该问题
使用自定义动画: