码迷,mamicode.com
首页 > 移动开发 > 详细

android四大组件&helloworld例子

时间:2019-08-23 17:31:38      阅读:115      评论:0      收藏:0      [点我收藏+]

标签:ref   tag   引入   系统   finish   str   mamicode   cas   tps   

四大组件

Activities——UI,app能看到的UI界面都是activities
Services——负责处理后台数据,用户看不到的,例如播放音乐等,上传数据,拉取视频资源
Broadcast Receivers——处理app和其他程序之前通信,例如app使用过程中有电话打来
Content Providers——可使用android提供api存储数据。请求由ContentResolver类的方法来处理。这些数据可以是存储在文件系统、数据库或者其他其他地方。

helloworld

https://www.runoob.com/android/android-hello-world-example.html

  • 注:packagename命名
    技术图片

Log

文件中引入,使用
import android.util.Log;

...
class{
private static final String TAG = "MainActivity";
Log.d(TAG, "create finish");
}

技术图片

android四大组件&helloworld例子

标签:ref   tag   引入   系统   finish   str   mamicode   cas   tps   

原文地址:https://blog.51cto.com/10541556/2432034

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!