Jui*_*iCe 3 singleton android android-intent
我正在研究一个项目,让我的活动通过Intents互相传递信息.但是,我最近决定使用swithc并使用Singleton方法并使用Application类来保存我的所有数据.
我现在有点困惑:如何在没有意图的情况下开始我的活动?这是我切换之前的一个电话......
public boolean onOptionsItemSelected( MenuItem item ) {
switch( item.getItemId() ) {
case R.id.connect:
startActivityForResult( new Intent( this, DeviceList.class ), REQUEST_CONNECT_DEVICE );
return true;
Run Code Online (Sandbox Code Playgroud)
如果不使用意图,我会将其更改为启动DeviceList类?
你没有.使用意图开始您的活动.这就是Android的设计方式.
归档时间: |
|
查看次数: |
6924 次 |
最近记录: |