android
change_for_you
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
android组件信使--Intetn之CompontentName属性
Intent查找组件策略,其中一种方法就是显示查找,即通过组件名称(Component name)来查找。Intent的组件名称对象由CompontentName类来封装,组件名称包含包名称和类名称,被声明在AndroidManifest.xml文件中。组件名称通过setComponent()、setClass()、setClassName()设置,通过getComponent()获得。原创 2016-09-28 17:01:12 · 690 阅读 · 0 评论 -
VM Linux 无法打开,无法上网
今天主管说让我装个虚拟机,操作部署下tomcat,熟悉下基本命名,后面的调试,日志等都是在linux环境下的因为我很久之前装过VM,今天打开的时候,突然发现打不开了,打不开!!!看着它的报错,突然想起是不是我的服务没有起啊。ps:为了追求开机效率和运行速度,我把这些非windows的服务都给弄成手动了,自己挖的坑,自己填啊;打开VM,启动终于可以啦;然而我连不上网,连不原创 2016-09-29 16:38:07 · 852 阅读 · 0 评论 -
android四大组件--Activity生命周期
在android系统中Activity作为Activity栈(Stack)被管理,当前活动的Activity处于栈顶,之前的非活动Activity被压入下面成为非活动Activity,等待是否可能被恢复为活动状态。在上图中我们可以将Activity的生命周期分为以下三个过程:1、 整个完整生命周期:从onCreate()方法开始到onDestory()方法结束。2原创 2016-09-27 11:21:11 · 421 阅读 · 0 评论 -
android四大组件--Activity
Activity提供了和用户交互的可视化界面。1、创建:创建一个Activity一般是继承Activity(当然也可以继承ListActivity,MapActivity等),覆盖Activity的onCreate()方法,该方法中调用setContentView()方法展示要显示的视图,调用findViewById()方法实例化组件。这里需要注意的是Activity只有在清单文件原创 2016-09-27 11:12:10 · 332 阅读 · 0 评论 -
android----adb命令
adb,一个shell命令窗口,可以看到模拟器上的类似手机上的各种各种文件,今天主要是介绍它的sqlite,一个轻数据库1、首先我们要配置下环境。找到我们下载的sdk目录2、配置好路径后,验证是否配置正确3、开始进行adb的操作了4、 1、cd data 2、 ls -l3、cd data4、可以看到很多的文件夹,这些就是应用程序的包名原创 2016-09-26 22:11:12 · 308 阅读 · 0 评论 -
LinearLayout布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >原创 2016-09-22 15:59:26 · 260 阅读 · 0 评论 -
RelativeLayout布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" >原创 2016-09-22 15:58:32 · 247 阅读 · 0 评论 -
FrameLayout布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >原创 2016-09-22 15:56:17 · 227 阅读 · 0 评论 -
AbsoluteLayout布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >原创 2016-09-22 15:49:48 · 258 阅读 · 0 评论 -
android-TableLayout布局中几个参数的作用
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="match_parent" android:orientation="vertical" > <原创 2016-09-22 15:14:00 · 358 阅读 · 0 评论 -
Service组件 Android 5.0中出现的警告:Service Intent must be explicit
在学习Service组件时,按照书上的例子的,写好,运行点击后,应用闪退,后台报错去网上找了下,发现是因为android 5.0存在的问题,正好我编译程序的sdk是5.0.1的。Android 5.0一出来后,其中有个特性就是Service Intent must be explitict,也就是说从Lollipop开始,service服务必须采用显示方式启动。而andr原创 2016-10-10 16:17:51 · 407 阅读 · 0 评论 -
android系统自带的适配布局activity_list_item
理想:注册页面,信息填写后,跳转到另外一个activity结果:一点注册,app就闪退日志显示:java.lang.IllegalStateException: ArrayAdapter requires the resource ID to be a TextView Caused by: java.lang.ClassCastException: android.widget.原创 2016-09-23 14:32:23 · 1911 阅读 · 0 评论 -
android组件间信使--Intent简介
Intent的中文意思是“意图,意向”,可以把它理解为不同组件之间通信的“媒介”或者“信使”。也就是“把我的意思或意图告诉它”。举个例子,你逛淘宝,你想买一个东西,你把你东西大小,形状等筛选项填好,然后系统就会按照你的要求去找物品了。在这里的,“你”是源组件(例如,一个Activity),“淘宝系统”就是Intent,“目标物品”就是目标组件。这样源组件通过Intent找到了目标组件。原创 2016-09-27 16:56:46 · 925 阅读 · 0 评论 -
android组件间信使--Intent之Action属性
Action是指Intent要完成的动作,是一个字符串常量。在Intent类里面定义了大量的Action常量属性,例如:ACTION_CALL(打电话)、ACTION_EDIT(编辑数据)、ACTION_BATTERY_LOW(低电量广播action)等。我们也可以自定义Action来使用。setAction()设置IntentAction属性,使用getAction来获得Intent的Act原创 2016-09-27 16:59:17 · 9574 阅读 · 0 评论 -
android四大组件--Service简介
Service是运行在后台的一钟服务程序,一般很少和用户交互,因此没有交互界面。 定义一个Service类非常简单,只需要继承Service类,实现其生命周期中的方法即可。 需要注意的是定义的service必须在AndroidMainfest.xml配置文件中,通过元素声明才能使用。Service类中与自身周期相关的方法:onBind(Intent intent):是必须实现的原创 2016-10-08 14:07:56 · 354 阅读 · 0 评论
分享