`
canofy
  • 浏览: 821265 次
  • 性别: Icon_minigender_1
  • 来自: 北京、四川
社区版块
存档分类
最新评论
文章列表

AsyncTask

here is a quick overview of how it works: You can specify the type of the parameters, the progress values, and the final value of the task, using generics The method doInBackground() executes automatically on a worker thread onPreExecute(), onPostExecute(), and onProgressUpdate() are all invoked on ...
需要在Tomcat中的catalina.bat中添加如下的一行代码 SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5888 然后在Eclispe中Run->Debug Configurations...->Remote Java Application中进行配置
转载:http://blog.csdn.net/Zengyangtech/archive/2010/11/21/6025676.aspx BroadcastReceiver     在Android中,Broadcast是一种广泛运用的在应用程序之间传输信息的机制。而BroadcastReceiver是对发送出来的 Broadcast进行过滤接受并响应的一类组件。下面将详细的阐述如何发送Broadcast和使用BroadcastReceiver过 滤接收的过程:     首先在需要发送信息的地方,把要发送的信息和用于过滤的信息(如Action、Category)装入一个Intent对象 ...

screen常用键

screen的安装 yum install screen 常用的键有: C-a ? 显示所有键绑定信息 C-a w 显示所有窗口列表 C-a C-a 切换到之前显示的窗口 C-a c 创建一个新的运行shell的窗口并切换到该窗口 C-a n 切换到下一个窗口 C-a p 切换到前一个窗口(与C-a n相对) C-a 0..9 切换到窗口0..9 C-a a 发送 C-a到当前窗口 C-a d 暂时断开screen会话 C-a k 杀掉当前窗口 C-a [ 进入拷贝/回滚模式
摘自ApiDemo 1、播放音频   a.第一种方式   MediaPlayer mMediaPlayer; mMediaPlayer = new MediaPlayer(); mMediaPlayer.setDataSource(path); mMediaPlayer.prepare(); mMediaPlayer.start();   b.第二种方式   mMediaPlayer = MediaPlayer.create(this, R.raw.test_cbr); mMediaPla ...
设置属性页面有两种方式 1、用xml完全的配置方式 2、完全使用代码的方式 xml配置方式: <?xml version="1.0" encoding="utf-8"?> <!-- This is a primitive example showing the different types of preferences available. --> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/ ...
下面是Android的设置壁纸的一些代码(ApiDemo) package com.example.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. import com.example.android.apis.R; import java.io.IOException; import android.app.Activity; import android.app.W ...
这是android提供的ApiDemo里面的关于保存文本中值的例子 PersistentState 持久化状态? 在onPause时应用了SharedPreferences.Editor来保存值 在onResume时应用了SharedPreferences对象来恢复值 和onSaveInstanceState()方法不太一样 package com.example.android.apis.app; // Need the following import to get access to the app resources, since this // class is ...
Intent-filter 个人理解就是为处理隐式Intent用的,在AndroidManifest.xml声明 Explicit Intents: Intent serviceIntent = new Intent(context, Test.class); serviceIntent.putExtra(“param”, param); context.startService(serviceIntent); Implicit Intents: Intent serviceIntent = new Intent(); serviceIntent .setAction(&q ...
摘自google android document Standard Activity Actions These are the current standard actions that Intent defines for launching activities (usually through startActivity(Intent). The most important, and by far most frequently used, are ACTION_MAIN and ACTION_EDIT. ACTION_MAIN     Activity Action: Star ...
参考:http://www.cnblogs.com/feisky/archive/2010/01/16/1649081.html      http://www.iteye.com/topic/563042 Intent     Android中提供了Intent机制来协助应用间的交互与通讯,Intent负责对应用中一次操作的动作、动作涉及数据、附加数据进行描述,Android ...
可以让其显示一会儿然后消失 也可以隔一段时间不断显示 第一种方式 /* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * ...
基本步骤如下: 1、继承Activity 2、在需要提示地方showDialog(id); 3、重载Activity的onCreateDialog(id)的方法 如: @Override protected Dialog onCreateDialog(int id) { return new AlertDialog.Builder(this) .setMessage("Please update your Settings.") .setPo ...
很久之前看过android的很多东西,由于工作忙以及其它一些事情,就把android扔在一边了,怪可惜的,到现在又得重新开始看。中文资料看的比较少,看的基本上是英文的,因此个人理解方面差异比较大吧。现在记录下来看之后的感受吧。 从整体上来看还是比较简单的,android从建立项目开始已经把结构整理好了,只需按照要求做就行了。 1、配置文件主要是由一些xml文件组成    a.最主要的是AndroidManifest.xml配置文件,这里面负责对activity进行配置,其它还有一些环境相关的配置    b.res/drawable/目录下是存放图片,以及和页面相关的一些显示相关的一些文件    ...
android 中的url操作步骤 1、获取HttpClient对象 2、获取HttpGet对象,通过HttpGet对象可以对请求设置参数 3、通过HttpClient对象的excute方法得到HttpResponse对象 4、把HttpResponse对象获取返回的值 摘自android的document /** * Pull the raw text content of the given URL. This call blocks until the * operation has completed, and is synchronized becaus ...
Global site tag (gtag.js) - Google Analytics