为了账号安全,请及时绑定邮箱和手机立即绑定
慕课网数字资源数据库体验端
Android攻城狮的第一门课(入门篇)_学习笔记_慕课网
为了账号安全,请及时绑定邮箱和手机立即绑定

Android攻城狮的第一门课(入门篇)

Amos
难度入门
时长 5小时 0分
  • SDK开发文档 1.所在位置:sdk/docs/index.html 2.常用选项:develope/API Guides,References,Tools
    查看全部
  • 要将自己的签名文件保存好
    查看全部
  • Toast.makeText(MainActivity.this, "bt1要执行的逻辑", 1).show(); 显示在界面上的tag Log.i("tag", "父类的onclick事件发生了!"); 显示在后台的tag
    查看全部
  • android项目
    查看全部
  • src
    查看全部
  • 如果数据较少,比如只要传一个字符串,可以使用如下代码: 在Activity A中: Intent intent = new Intent(A.this, B.class); intent.putExtra("Name", "慕课网"); startActivity(intent); 在Activity B中: Intent intent = this.getIntent(); String name = intent.getStringExtra("Name"); 如果数据比较多,就需要使用 Bundle类,代码如下: 在Activity A中传值: Intent intent = new Intent(A.this, B.class); //通过Bundle对象存储需要传递的数据 Bundle bundle = new Bundle(); //字符、字符串、布尔、字节数组、浮点数等等,都可以传 bundle.putString("Name", "慕课网"); bundle.putBoolean("Isgood", true); //把bundle对象assign给Intent intent.putExtras(bundle) startActivity(intent); 在Activity B中获取传递的值: //获取Intent中的Bundle对象 Bundle bundle = this.getIntent().getExtras(); //获取Bundle中的数据,注意类型和key String name = bundle.getString("Name"); boolean ismale = bundle.getBoolean("Isgood");
    查看全部
  • Button 可以设置文本内容的按钮 ImageButton 可以设置文本内容,background以及src 添加一个image,当前图片上可以做一个有文本内容的图片。
    查看全部
    0 采集 收起 来源:总结

    2015-07-07

  • Android开发环境
    查看全部
  • finish()销毁当前页面
    查看全部
  • Intent应用1---实现页面之间的跳转: 方法2:有返回结果的页面跳转 1)指明意图:Intent intent =new Intent(参数1:上下文对象,参数2:目标文件) 意图:从当前上下文环境跳转到目标文件 2)startActivityForResult(参数1:Intent对象,参数2:requestCode:请求的一个标志) 注意:在主Activity中接受返回的结果 protected void onActivityResult(int requestCode:请求标志,int resultCode:第二个页面返回的结果标志,Intent data:第二个页面回传的数据); 注意:在次Activity中返回结果,回传给第一个页面的实际上是一个Intent对象 setResult(resultCode,Intent intent:Intent对象)
    查看全部
  • Android四大组建: Intent:--意图 作用:协助完成android各个组件之间的通讯 应用1:Activity之间的联系---实现页面之间的跳转 ------方法:a) 1)创建一个Intent实例Intent intent=new Intent(参数1:上下文对象this,参数2:目标文件) 意图是:从当前的上下文环境跳转到目标文件 2)startActivity(intent)
    查看全部
  • 项目分析
    查看全部
  • arg0.setAlpha(0.5f); API11以下是没法这样写的 可以选择arg0.getbackground().setAlpha(50);或者去AndroidManifest里面去改最低API
    查看全部
  • Another syntactic sugar is isBoolean?resultA:resultB which means, if isBoolean is true, return resultA, otherwise return resultB
    查看全部
  • 1.use textOn and textOff attribute of ToggleButton to set the text of the button when repspective state is on and off 2.use checked attribute of ToggleButton to initiate the status of the button, either true of false
    查看全部

举报

0/150
提交
取消
课程须知
Android应用大部分是使用Java语言进行开发的,本门课程同样使用的是Java语言,所以,在学习本门课程前必须掌握Java的基础语法以及面向对象编程,同时要求童鞋们对Android应用有简单的认识,如不了解不妨度娘一下哦
老师告诉你能学到什么?
1、android环境搭建 2、android应用程序框架的认识 3、android基础控件的运用 4、android的不同布局形式
友情提示:

您好,此课程属于迁移课程,您已购买该课程,无需重复购买,感谢您对慕课网的支持!