一、打开一个网页,类别是Intent.ACTION_VIEWUri uri = Uri.parse("http://www.android-study.com/");Intent intent = new Intent(Intent.ACTION_VIEW, uri);二、打开地图并定位到一个点Ur...
分类:
移动开发 时间:
2014-07-28 14:31:03
阅读次数:
280
我们需要用以下方式来启动service:
Intent intent = new Intent();
intent.setClass(MainActivity.this, MyService.class);
bindService(intent,conn,BIND_AUTO_CREATE);
ServiceConnection conn = new ServiceConn...
分类:
移动开发 时间:
2014-07-28 00:28:29
阅读次数:
214
MainActivity如下:
package cc.cv;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import and...
分类:
其他好文 时间:
2014-07-28 00:06:39
阅读次数:
248
一直显示Android字样,只需要删除目录下的snapshots.img
找到sdk的目录下的\tools\lib\emulator,然后删除上面的文件snapshots.img即可,我的sdk路径是下面的,所以进入这里杀出它就好了
D:\adt-bundle-windows-x86-20140321\adt-bundle-windows-x86-20140321\sdk\tools\lib\...
分类:
移动开发 时间:
2014-07-27 23:57:49
阅读次数:
425
onCreateView是Fragment生命周期方法中最重要的一个。因为在该 方法中会创建在Fragment中显示的View。public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInst...
分类:
其他好文 时间:
2014-07-27 23:13:49
阅读次数:
410
直接从网上下载适合当前系统的jdk(eclipse需要一个java虚拟器的环境)直接从android上下载最新的adt-bundle-windows-x86(64)-xxxxxx.zip(集成好的eclipse加adt加sdk等环境)开始环境安装及配置了:1、安装jdk,记录下来安装路径,之后配置环...
分类:
移动开发 时间:
2014-07-27 22:47:19
阅读次数:
254
package com.kale.screen;import android.annotation.SuppressLint;import android.app.Activity;import android.graphics.Point;import android.os.Bundle;impo...
分类:
移动开发 时间:
2014-07-27 22:23:29
阅读次数:
196
在上一篇的基础上,我们收到了广播,现在我们想做点什么。。比如启动一个服务,或者启动一个activity。以activity为例,下面聊一聊具体做法。在onReceive方法里跳转到activity即可,需要注意的是在startActivity之前要setFlags(Intent.FLAG_ACT.....
分类:
移动开发 时间:
2014-07-27 22:01:00
阅读次数:
285
Android中通过Intent传递对象类型的方法有两种,一种是Bundle.putSerializable(Key,Object),另一种是Bundle.putParcelable(Key,Object).传递这些对象要满足一定的条件,前者是实现Serializable接口,后一种是实现...
分类:
其他好文 时间:
2014-07-27 12:14:30
阅读次数:
243
上面的程序用到了一个PendingIntent对象,PendingIntent是对Intent的包装,表示即将发生的意图,主要用在:通知Notificatio的发送,短消息SmsManager的发送和警报器AlarmManager的执行等等。一般通过调用PendingIntent的 getActivity(Context,int, Intent, int), getBroadcast(Context, int, Intent,int), getService(Context, int, Intent, in...
分类:
移动开发 时间:
2014-07-27 11:15:42
阅读次数:
213