第六天 页面跳转和数据传递

1.  横竖屏切换是时候 会调用 oncreate , onstart  , 重建 。 在清单中 activity 中添加    。重建为横竖屏 适配  加载不同的 布局文件。

    android:configChanges="keyboardHidden|orientation|screenSize"     就不会重建。

 

2 。显示启动 Intent intent = new Intent();

       intent.setClass(this, second.class);  //启动本应用程序的

3. 隐式启动  Intent intent = new Intent();

       intent.setAction(Intent.ACTION_CALL);
            intent.setData(Uri.parse("tel+:110"));   

   在配置清单里面 设置 Action 和 data

4.  startActivityForResult activity 返回数据接受 

  onActivityResult 接受返回的数据

  setResult(resultCode, data)  发送返回数据。

 http://pan.baidu.com/s/1kVF8Jf5

posted @ 2016-05-14 16:01  一颗神豆  阅读(116)  评论(0)    收藏  举报