【发布时间】:2017-06-16 18:20:07
【问题描述】:
我想在连接到蓝牙设备后立即更改活动,同时从蓝牙连续获取数据。 链接-https://github.com/googlesamples/android-BluetoothChat
【问题讨论】:
标签: android android-activity bluetooth chat
我想在连接到蓝牙设备后立即更改活动,同时从蓝牙连续获取数据。 链接-https://github.com/googlesamples/android-BluetoothChat
【问题讨论】:
标签: android android-activity bluetooth chat
没有所谓的“改变”活动。
要打开一个活动:
Intent intent = new Intent(this, TargetActivity.class);
startActivity(intent);
要关闭一个活动:
finish();
如果您想让 Activity 看起来像是更改而不是打开/关闭,则需要删除 styles.xml 文件中的打开/关闭动画:
<item name="android:windowAnimationStyle">@null</item>
【讨论】: