摘要: 命令列内容说明如前所述,所谓的命令列或命令模式,就是在最下面一行没有显示『–INSERT–』或者『–REPLACE–』字样的时候。通常在命令列中的指令有下面几种:(注意,当按下『:』 时,光标会自动移动到屏幕的最下面一行!)一般模式:移动光标h 或 向左方向键光标向左移动一个字符j 或 向下方向键光标向下移动一个字符k 或 向上方向键光标向上移动一个字符l 或 向右方向键光标向右移动一个字符[Ctrl] + [f]屏幕『向前』移动一页(常用)[Ctrl] + [b]屏幕『向后』移动一页(常用)[Ctrl] + [d]屏幕『向前』移动半页[Ctrl] + [u]屏幕『向后』移动半页+光标移动到非 阅读全文
posted @ 2011-09-13 09:49 小0 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 当图片过大,或图片数量较多时使用BitmapFactory解码图片会出java.lang.OutOfMemoryError: bitmap size exceeds VM budget,要想正常使用则需分配更少的内存,具体的解决办法是修改采样值BitmapFactory.Options.inSampleSize,例如:BitmapFactory.Options opts = new BitmapFactory.Options();opts.inSampleSize = 4;Bitmap bitmap = BitmapFactory.decodeFile(imageFile, opts);如何设 阅读全文
posted @ 2011-09-13 09:47 小0 阅读(384) 评论(0) 推荐(0) 编辑
摘要: android.permission.ACCESS_CHECKIN_PROPERTIES Allows read/write access to the "properties" table in the checkin database, to change values that get uploaded 允许读写访问 "properties"表在checkin数据库中,改值可以修改上传 android.permission.ACCESS_COARSE_LOCATION Allows an application to access coarse ( 阅读全文
posted @ 2011-09-13 09:44 小0 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 显示网页:Uri uri = Uri.parse("http://www.google.com");Intent it = new Intent(Intent.ACTION_VIEW,uri);startActivity(it);显示地图:Uri uri = Uri.parse("geo:38.899533,-77.036476");Intent it = new Intent(Intent.Action_VIEW,uri);startActivity(it);路径规划:Uri uri = Uri.parse("http://maps.goog 阅读全文
posted @ 2011-09-13 09:43 小0 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 以下的代码可以调用系统的拍照程序,Intent it = newIntent("android.media.action.IMAGE_CAPTURE");startActivityForResult(it, Activity.DEFAULT_KEYS_DIALER);按下拍照键后,会返回到你的activity,所以你的activity要在onActivityResult方法里加一个处理, protectedvoidonActivityResult(intrequestCode, intresultCode, Intent data) { super.onActivityRe 阅读全文
posted @ 2011-09-13 09:42 小0 阅读(432) 评论(0) 推荐(0) 编辑
摘要: 对于一个ImageView,如果我们要加上边框,比如宽为3dp的灰色框,我们怎么做呢?有种方法,是自己定义一个MyImageView类,继承自ImageView,在其onDraw方法中画canvas。还有设置一个带有边框的背景图片的方法。这里给出一种简单方法,既不需要创建衍生的类,也不需要准备图片。采用xml定义的方式实现。背景定义xml: bg_border1.xmlview plain<?xmlversion="1.0"encoding="UTF-8"?><shapexmlns:android="http://schema 阅读全文
posted @ 2011-09-13 09:40 小0 阅读(946) 评论(0) 推荐(0) 编辑
摘要: import android.app.Activity;import android.content.Context;import android.os.Bundle;import android.view.View;import android.view.View.OnClickListener;import android.view.ViewGroup;import android.view.animation.AnimationUtils;import android.widget.AdapterView.OnItemClickListener;import android.widget 阅读全文
posted @ 2011-09-13 09:04 小0 阅读(646) 评论(0) 推荐(0) 编辑
摘要: 编辑器加载中..import java.io.File; import java.text.SimpleDateFormat; import java.util.Date; import android.app.Activity; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.os.Environment; import android.provider.MediaSt... 阅读全文
posted @ 2011-09-13 08:57 小0 阅读(787) 评论(0) 推荐(0) 编辑
摘要: 其实原理很简单,只需要设置监听listview的滚动事件即可,01 package cn.stay.activity;02 import java.util.ArrayList;03 import java.util.List;04 import com.aoran.R;05 import android.app.Activity;06 import android.os.Bundle;07 import android.view.View;08 import android.widget.AbsListView;09 import and... 阅读全文
posted @ 2011-09-09 12:24 小0 阅读(477) 评论(0) 推荐(0) 编辑
摘要: gridview是一项显示二维的viewgroup,可滚动的网格。网格项时自动插入的布局使用listadapter。1.创建一个新的项目:gridview.2,打开 res/layout/main.xml文件,插入一下代码:<?xmlversion="1.0"encoding="utf-8"?><LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:orientation="vertical"an 阅读全文
posted @ 2011-09-09 12:13 小0 阅读(294) 评论(0) 推荐(0) 编辑