自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

forlong401的专栏--有问题上:http://www.androidren.com

Android and iOS Now! 多交流技术,多分享,技术只有分享,才会经久不衰。 欢迎关注新浪微博:@forlong401 。http://weibo.com/forlong401

  • 博客(38)
  • 资源 (2)
  • 收藏
  • 关注

原创 ddms之单步调试

<br />第一步,启动emulator<br />Run the emulator as background process at first.<br />$./emulator &<br />第二步,把eclipse切换到DDMS状态。右上角(和java debug在一起那个)<br />第三步,选择菜单,配置环境<br />Run->Debug Configurations->Remote Java Application->new<br />Set Name,like phone<br />

2010-08-27 20:50:00 2073

原创 android获取屏幕高度和宽度 的方法

继承Activity<br />this.getWindowManager().getDefaultDisplay().getWidth();

2010-08-27 20:47:00 1047

原创 如何解决eclipse中“不能跳转” 和 “找不到定义”的问题

<br />这是因为.classpath等配置不对。<br />解决步骤如下:<br />A.进入工程中的eclipse目录<br />[xx@xx eclipse]$ pwd /home/xx/project/android22/development/ide/eclipse<br />B.拷贝eclipse下的所有文件到工程的根目录<br /> [xx@xx eclipse]$cp android-formatting.xml android.importorder .classpath

2010-08-27 20:47:00 14783 1

原创 问题解决:The project cannot be built until build path errors are resolved

<br />1,看看你的lib里面有没有不用的jar包,看你的.classpath文件中有没有错误的路径. <br />2,这是最重要的一点,有 problems视图中查看有没有关于本项目的错误信息,一般都会有这样的话:      The project cannot be built until build path errors are resolved 然后下面提示unbound classpath, 一般在.classpath中删除这些path就可以了

2010-08-27 20:46:00 977

转载 Android Animation Framework

<br />This tutorial is an introduction to the built in animation frameworks that are part of the Android UI library. Without writing any animation/drawing code, you can do 2 types of animations – layout transitions that affect ViewGroups, and sequenc

2010-08-27 20:43:00 2184

转载 Android marketplace - public key

<br />Question:<br />Hi,<br />I'm just about to submit an application to the Android Marketplace.<br />There is this message when I try to upload the app:<br />Remember to change the public key in updates for this application to match your new publ

2010-08-27 20:41:00 1006

转载 How to alignment the center position of the button in Android?

How to alignment the center position of the button in Android?In the XML layout, can able to set the center postion by using the "android:layout_gravity", the sample XML code as below,<br /><br /><button android:text="ClickMe" <br />    android:i

2010-08-27 20:40:00 1041

转载 Application as part of Android Built

<br /> <br />Hi, <br />I had built a application using the Android SDK. Now I would like to package this application as part of the Android build. So that when I port Android into my device, it will appear in the Application menu.<br />I tried, copying

2010-08-27 20:24:00 592

转载 Android开发指南-二维图形

Android开发指南-二维图形二维图形2D<br />GraphicsAndroid 提供一个定制的2D图形库,用来绘制图形图像和制作动画。你将从Android.graphics.drawable和 android.view.animation包中找到这些通用类。<br />本文简单介绍如何在Android应用程序中进行画图。我们将讨论使用 Drawable对象画图的基础知识,如何使用几个Drawable子类,以及如何创建动画,一个图形的补间动画或者一系列图形的连续动画(就像电影胶卷一

2010-08-27 20:23:00 893

转载 Debug Android Source Builds

<br />you need to run the emulator you just built. if you've followed the build instructions, it should be on your path, so just run it.<br />running "source build/envsetup.sh" from the root of your source tree is a good way to ensure you've got pretty

2010-08-27 20:22:00 582

转载 Android - what’s the difference between the various methods to get a Context?

<br />Q:                <br />In various bits of Android code I've seen: publicclassMyActivityextendsActivity{<br />    publicvoid method(){<br />       mContext =this;    // since Activity extends Context<br />       mContext = getApplicationConte

2010-08-27 20:21:00 806

转载 How to use the date format that has been setup as default in Settings?

<br />Question:<br /> <br />As you probably know, you can setup date format in the Settings of an Android device. <br />In code how do we make sure that we use that format for date display?<br /> <br />Answer:<br />Try android.text.format.DateFormat, n

2010-08-27 20:20:00 664

原创 Is it possible to set font for entire Application?

<br />From:http://stackoverflow.com/questions/2711858/is-it-possible-to-set-font-for-entire-application<br /> <br />Question:                <br />Hi,<br />I need to use certain font for my entire application. I have .ttf file for the same. Is it possi

2010-08-27 20:19:00 819

转载 Make your Android Listview Fast and Efficient

<br />Android programming --- Make your Android Listview Fast and EfficientGoogle Staff有一篇Turbo-charge your UI关于加速和提高Android UI效率的文章。<br />把其中关于ListView的部分整理了一下,如下。<br />1.Globle view<br />ListView上面关联上需要现实的布局,控件等等。<br />Adapter建立数据和ListView上

2010-08-27 20:18:00 775

转载 android manifest.xml中元素含义

<br />android:allowTaskReparenting<br />是否允许activity更换从属的任务,比如从短信息任务 切换到浏览器任务。 <br />-------------------------------------------------------------------------------------- <br />android:alwaysRetainTaskState<br />是否保留状态不变, 比如切换回home, 再从新打开, activit

2010-08-27 20:17:00 659

转载 让Android程序单例运行

<br />1, Set application launch mode (More details about launchMode, please refer to http://code.google.com/intl/en-CN/android/reference/android/R.styleable.html#AndroidManifestActivity_launchMode) to single instance in AndroidManifest.xml:

2010-08-27 20:12:00 1264

转载 关于Activity和Task的设计思路和方法

<br /><br />Activity和Task是Android Application Framework架构中最基础的应用,开发者必须清楚它们的用法和一些开发技巧。本文用大量的篇幅并通过引用实例的方式一步步深入全面讲解它们的基础原理(underlying principles)和架构(mechanisms),例如:Navigation、Multitasking、activity re-use、intents和activity stack等…大部分与其相关的应用模块。重点讲解开发过程

2010-08-27 20:09:00 616

转载 android一些很有用的代码片段

<br />1:查看是否有存储卡插入<br />String status=Environment.getExternalStorageState();<br />if(status.equals(Enviroment.MEDIA_MOUNTED))<br />{<br />   说明有SD卡插入<br />}<br /><br />2:让某个Activity透明<br /><br />OnCreate中不设Layout<br /><br />this.setTheme(

2010-08-27 20:08:00 607

转载 修改ListView 分割线Seperator line

Java代码<LinearLayout      xmlns:android="http://schemas.android.com/apk/res/android"      android:layout_width="wrap_content"      android:layout_height="wrap_content">           <ListView              android:id="@+id/android:list"       

2010-08-27 20:06:00 822 1

转载 Android Layout 之 RelativeLayout

<br />使用 AbsoluteLayout 可以直接指定其子 View 的绝对位置, 这种布局方式虽然简单,但是不够灵活。比如在一个程序中,按钮2 位于 按钮1 的下方且和 按钮1 左对齐,我们可以使用指定两个按钮的绝对位置的方式布局,但是当布局完成后,由于某些原因,这两个按钮需要相左平移一些距离以便在父 View 右边留出一些空白区域,那么我们就需要同时修改 按钮1 和 按钮2 的 layout params。如果布局更复杂一些呢?这样“牵一发而动全身”的布局模式恐怕不是那么友好吧?<

2010-08-27 20:01:00 638

原创 Building Custom Components/建立自定义组件

<br /><br />一、android除了内建的众多组件(widget/layout)外,还提供基于View和ViewGroup的成熟组件扩展模型,让你构建自已的组件。<br />二、常用的内建widget有:Button、TextView、EditText、ListView、CheckBox、RadioButton、Gallery、Spinner、AutoCompleteTextView、ImageSwitcher、TextSwitcher。常用的内建layout有:LinearLayout、Fram

2010-08-27 20:00:00 558

转载 Android多媒体框架初步分析[转]

Android 系统整体架构:<br />我们先看一下多媒体框架在整个 Android 系统所处的位置<br /><br />从框架图可以看出 Media Framework 处于 Libraries 这一层,这层的 Library 不是用 Java 实现,一般是 C/C++ 实现,它们通过 Java 的 JNI 方式调用。<br /><br />多媒体架构:<br />基于第三方 PacketVideo 公司的 OpenCORE platform 来实现<br />支持所有通用的音频,视频,静态图

2010-08-27 19:58:00 1251

转载 Android View预估大小

<br />http://hi.baidu.com/pengwenfu/blog/item/7fc4f80f56a3a8c17acbe120.html<br />android的布局分两个阶段,先measure()后requestLayout(), <br /><br />测量的三种模式: <br />UNSPECIFIED: 不限定EXACTLY: 固定AT_MOST:最多<br /><br />LinearLayout 调用measure(EXACTLY 240,UNSPEC

2010-08-27 19:56:00 1116

转载 MultiChoice Preference Widget for Android

<br /> <br />Thanks:http://blog.350nice.com/wp/archives/240MultiChoice Preference Widget for Android<br /><br />Strangely, the Android framework does not include a widget which allows multiple selections in Preference Screens. I needed to add one of

2010-08-27 19:55:00 881

转载 PhoneFactory.getDefaultPhone from apps other than PhoneApp - msg#01738

<br />http://osdir.com/ml/AndroidDevelopers/2009-07/msg01738.html<br /> <br />PhoneFactory methods are only for PhoneApp. For any other apps to<br />access services provided by Phone App or RIL, they need to post<br />intents to TelephonyManager. A

2010-08-27 19:51:00 1636

原创 Hidden Android Debug Menu

<br />http://geekosaur.com/2010/01/hidden-android-debug-menu/<br /> <br /> Hidden Android Debug Menu          <br /> <br />Nokia started the trend of having service menus accessible by tapping in codes to the dialer.  Entering *#92702689# (*#WAR0ANTY

2010-08-24 21:03:00 1323

原创 Android2.1中的 drawable(hdpi,ldpi,mdpi) 的区别

<br />在之前的版本中,只有一个drawable,而2.1版本中有drawable-mdpi、drawable-ldpi、drawable- hdpi三个,这三个主要是为了支持多分辨率。<br />  drawable- hdpi、drawable- mdpi、drawable-ldpi的区别:<br />  (1)drawable-hdpi里面存放高分辨率的图片,如WVGA (480x800),FWVGA (480x854)<br />  (2)drawable-mdpi里面存放中等分辨率的图片,

2010-08-24 21:02:00 468

转载 android Listview详解

<br /> android Listview详解                                                                                                                    <br />http://kb.cnblogs.com/a/1732200/<br />在android开发中ListView是比较常用的组件,它以列表的形式展示具体内容,并且能够根据数据的长度自适应显示。

2010-08-24 21:01:00 643

转载 android binder机制

<br /> android binder机制                                                                                                                    <br />http://wallage.blog.163.com/blog/static/17389624201031411019444/<br />第一部分Binder的组成<br />1.1 驱动程序部分

2010-08-24 21:00:00 1021

原创 ScrollView

<br />ScrollView can host only one direct child.<br />如果想要多个view放到里面,需要用一个layout来包着。

2010-08-24 20:59:00 517

原创 Android - An Open Handset Alliance Project

<br />http://code.google.com/p/android/

2010-08-24 20:58:00 574

原创 how to view contents of trace.txt in adb?

<br /> trace.txt file......... in adb shell/data/anrhttp://stackoverflow.com/questions/704311/android-how-do-i-investigate-an-anr<br /><br />app threw an ANR (Application Not Responding)<br /> <br />DALVIK THREADS:<br />"main" prio=5 tid=3 TIMED_WAIT

2010-08-24 20:57:00 1886

转载 Virtualbox and Shared Folders

Virtualbox and Shared Folders<br />A note on Virtualbox and Shared Folders. I installed Windows XP as a guest on my Virtualbox OSE on Ubuntu (8.10) and noticed that my Shared Folders to the host, in this case a Fat32 partition that I share with my Wind

2010-08-24 20:56:00 1095

转载 Virtualbox and Shared Folders

Virtualbox and Shared Folders<br />A note on Virtualbox and Shared Folders. I installed Windows XP as a guest on my Virtualbox OSE on Ubuntu (8.10) and noticed that my Shared Folders to the host, in this case a Fat32 partition that I share with my Wind

2010-08-24 20:55:00 789

转载 出现错误-未找到要在其中创建新文件系统的有效设备。请检查您的硬件以找到问题的起因。

<br />问题:<br /><br />VM里安装Fedora时出现:出现错误-未找到要在其中创建新文件系统的有效设备。请检查您的硬件以找到问题的起因。<br /><br />原因:<br /><br />VM默认硬盘是scsi硬盘,从网上看到的说法是:scsi硬盘需要专门的驱动,windows系统带有,而read hat 没有,所以不好装<br /><br />解决方法:<br /><br />把原来的scsi硬盘删除,新建一个IDE硬盘,就可以了

2010-08-24 20:54:00 1360

转载 转》Fedora 中的 Yum 命令详解

<br />http://pengjiayou.com/blog/yum-fedora-in-order-detailed-explanation<br /> <br />Redhat和Fedora的软件安装命令是rpm,但是用rpm安装软件最大的麻烦就是需要手动寻找安装该软件所需要的一系列依赖关系,超级 麻烦不说,要是软件不用了需要卸载的话由于卸载掉了某个依赖关系而导致其他的软件不能用是非常恼人的。令人高兴的是,Fedora终于推出了类似于 ubuntu中的apt的命令yum,令Fedora的软件

2010-08-24 20:53:00 581

转载 转 MOTODEV下载 (Android版

MOTODEV下载 (Android版发布时间:2009-07-28 作者:Android开发网原创<br /><br />  和我们猜到的一样MOTODEV Studio for Android仍然是基于无修改的Eclipse开源工程设计,比较遗憾。不过今天MOTODEV下载地址已经获取到,目前摩托罗拉开发工具仍然处于Beta测试阶段,分为Windows和Mac两个版本,没有Linux平台上使用的比较遗憾。MOTO的开发环境相关特性如下: Complete Development Pack

2010-08-24 20:52:00 1528

原创 Android Development Tools Installing

<br />1. 启动Eclipse, 选择Help > Software Updates > Find and Install....<br />2. 弹出对话框后,选择Search for new features to install 点击Next.<br />3. 点击New Remote Site.<br />4. 在编辑框中输入更新插件的网址: https://dl-ssl.google.com/android/eclipse/. 点击OK.<br />5. 看到

2010-08-24 20:46:00 1292

移动开发者解决方案研究报告第二期.pdf

移动开发者解决方案研究报告第二期.pdf

2012-11-28

移动开发者解决方案研究报告第一期.pdf

移动开发者解决方案研究报告第一期.pdf

2012-11-28

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除