
android
文章平均质量分 63
syaka007
菩提本无树,明镜亦非台。本来无一物,何处惹尘埃.
展开
-
AndroidManifest.xml中android:configChanges的简介
程序在运行时,一些设备的配置可能会改变,如:横竖屏的切换、键盘的可用性等,这样的事情一发生,Activity会重新启动,其中的过程是:在销毁之前会先 called onSaveInstanceState()去保存你应用中的一些数据,然后called onDestroy(),最后才去called onCreate()或onRestoreInstanceState()方法去重新启动Activity。转载 2012-04-26 15:53:27 · 671 阅读 · 0 评论 -
Fragment设置对象不销毁!
Fragment设置对象不销毁!public void setRetainInstance (boolean retain)Since: API Level 11Control whether a fragment instance is retained across Activity re-creation (such as from a configuratio转载 2012-04-26 17:48:38 · 2296 阅读 · 2 评论 -
Android横竖屏切换相关总结
[转]Android横竖屏切换相关总结2010年10月20日 星期三 下午 2:27Android横竖屏要解决的问题应该就两个:一。布局问题;二。重新载入问题。1.布局问题:如果不想让软件在横竖屏之间切换,最简单的办法就是在项目的 AndroidManifest.xml中找到你所指定的activity中加上android:screenOrientation属转载 2012-04-27 15:42:26 · 680 阅读 · 0 评论 -
关于转屏,与activity状态的保存onRetainNonConfigurationInstance()
关于转屏,与activity状态的保存onRetainNonConfigurationInstance() 2011-03-23 17:24:17| 分类: 默认分类|字号 订阅关于转屏,与activity状态的保存比较onSaveInstanceState() 与 onRetainNonConfigurationInstance()在不同需转载 2012-04-27 11:04:06 · 813 阅读 · 0 评论 -
The limitations of AsyncTask
The limitations of AsyncTaskAsyncTask is a fine API, it's been said that it "holds your hand", and makes performing background operations painless. It pulls this off so well in fact, that I转载 2012-05-28 10:44:45 · 589 阅读 · 0 评论 -
Android ListView图片异步加载显示
Android ListView图片异步加载显示您的评价: 收藏该经验模拟android中的消息机制实现图片的异步加载和动态显示001package cn.jd3g.utils;002转载 2012-05-28 11:35:44 · 1245 阅读 · 0 评论 -
The Hidden Pitfalls of AsyncTask
The Hidden Pitfalls of AsyncTaskNovember 8, 2011 by daniel | 7 CommentsWhen AsyncTask was introduced to Android, it was labeled as “Painless Threading.” Its goal was to make backgr转载 2012-05-28 11:13:27 · 741 阅读 · 0 评论 -
AsyncTask, RejectedExecutionException and Task Limit
I am fetching lots of thumbnails from a remote server and displaying them in a grid view, using AsyncTask. The problem is, my grid view displays 20 thumbnails at a time, so that creates 20 AsyncTasks转载 2012-05-28 10:48:24 · 1401 阅读 · 2 评论 -
About how to use Async Task interesting
Why Android’s Async Task isn’t Always the Best ChoiceAnyone that has done any sort of Android Development knows about the AsyncTask. Many developers live and breath by it. However, it can’原创 2012-05-28 11:03:35 · 915 阅读 · 0 评论 -
Android ListView 的动态加载数据
Android ListView 的动态加载数据您的评价: 收藏该经验001package com.src.hero;002 003import andr转载 2012-05-28 11:34:46 · 759 阅读 · 0 评论 -
应用实例:解析后台返回的数据,把每条都显示在ListView中,包括活动图片、店名、活动详情、地址、电话和距离等。
应用实例:解析后台返回的数据,把每条都显示在ListView中,包括活动图片、店名、活动详情、地址、电话和距离等。 在布局文件中ListView的定义: android:divider="@drawable/separator" android:dividerHeight="2.0px" android:layout_below="@id/mapseparator"/>转载 2012-05-28 13:05:32 · 1266 阅读 · 0 评论 -
Dealing with the “Bitmap Size Exceeds VM Budget” error
Dealing with the “Bitmap Size Exceeds VM Budget” errorBY RUI, ON FEBRUARY 14TH, 2011One of the most common errors that I found developing Android Apps is the “java.lang.OutOfMemoryError: B转载 2012-05-29 13:11:55 · 551 阅读 · 0 评论 -
Android的Task和Activity相关
Android的Task和Activity相关android:allowTaskReparenting 用来标记Activity能否从启动的Task移动到有着affinity的Task(当这个Task进入到前台时)——“true”,表示能移动,“false”,表示它必须呆在启动时呆在的那个Task里。 如果这个特性没有被设定,设定到元素上的allowTaskRe转载 2012-05-15 13:27:24 · 529 阅读 · 0 评论 -
Adapter报错:The content of the adapter has changed
Adapter报错:The content of the adapter has changed 在Android编程中使用Adapter时,偶尔会出现如下错误:The content of the adapter has changed but ListView did not receive a notification. Make sure the转载 2012-05-17 10:16:29 · 1071 阅读 · 0 评论 -
make sure the content of your adapter is not modified from a background thread . but only from the
很多新手在Android开发时可能对Thread和Message以及Handler、Looper概念不是很清楚,可能产生类似 The content of the adapter has changed but ListView did not receive a notification make sure the content of your adapter is not modified转载 2012-05-17 10:38:45 · 2543 阅读 · 0 评论 -
深入研究java.lang.Class类
深入研究java.lang.Class类 Java程序在运行时,Java运行时系统一直对所有的对象进行所谓的运行时类型标识。这项信息纪录了每个对象所属的类。虚拟机通常使用运行时类型信息选准正确方法去执行,用来保存这些类型信息的类是Class类。Class类封装一个对象和接口运行时的状态,当装载类时,Class类型的对象自动创建。转载 2012-06-07 13:44:03 · 402 阅读 · 0 评论 -
how to change the background of actionbar.tab
how to change the background of actionbar.tab博客分类: Android AppStep1 : create three background image (a)when tab is selected(b)when tab is in default state(c)when tab is focused.转载 2012-05-21 17:15:50 · 842 阅读 · 0 评论 -
find answer from it.
http://stackoverflow.com/原创 2012-05-21 13:48:20 · 529 阅读 · 0 评论 -
how to change the background color of actionbar
1 in styles.xml add below styles. 48dp @style/MainActionBarStyle @style/MainActionBarTabStyle @style/MainActionBarTitleStyle @style/MainActionBarTabBarSt原创 2012-06-11 14:22:08 · 911 阅读 · 0 评论 -
Difference between a View's Padding and Margin
92down voteacceptedPadding is the space inside the border, between the border and the actual view's content. Note that padding goes completely around the content: there is padding on the转载 2012-05-21 16:37:00 · 605 阅读 · 0 评论 -
Android中的android:layout_width和android:width
android:width 其实是定义控件上面的文本(TextView) 的宽度,当然这个宽度也是和 android:layout_width 配合起来作用的,如果 android:layout_width="fill_parent" 的话,那么设置 android:width 是没有意义的android:layout_width 其实是可以实现 android:width 的效果的,转载 2012-05-21 17:45:00 · 1290 阅读 · 0 评论 -
Holo Dark TabWidget style for Holo Light Theme
I've got a custom theme that inherits from Theme.Holo.Light.DarkActionBar and I'm trying to change the theme's tabWidget style so it to look like if the theme was Theme.Holo Dark.I've tried this i转载 2012-05-21 16:40:40 · 1760 阅读 · 0 评论 -
Traceview的使用
Traceview的使用 |字号 订阅Traceview是android平台配备的一个很好的性能分析工具。它可以通过图形化的方式让我们了解我们要跟踪的程序的性能,并且能具体到method。使用Traceview的版本限制对于Android 1.5及以下的版本:不支持。对于Android 1.5以上2.1下(含2.1)的版本:受限支持。tr转载 2012-05-24 12:35:54 · 654 阅读 · 0 评论 -
Android上常见度量单位【xdpi、hdpi、mdpi、ldpi】解读
Android上常见度量单位【xdpi、hdpi、mdpi、ldpi】解读2012-3-10 09:20| 发布者: benben| 查看: 827| 评论: 0摘要: 术语和概念 屏幕尺寸 屏幕的物理尺寸,以屏幕的对角线长度作为依据(比如 2.8寸, 3.5寸)。 简而言之, Android把所有的屏幕尺寸简化为三大类:大,正常,和小。 程序可以针对这三种转载 2012-06-12 17:18:58 · 528 阅读 · 0 评论 -
Customizing the Options Menu Background
/* The Options Menu (the one that pops up on pressing the menu button on the emulator) * can be customized to change the background of the menu */ package com.tut.menu;import android.app.Activit转载 2012-06-15 10:06:18 · 537 阅读 · 0 评论 -
[GUIDE] Theme editing and related things.
Let me start by saying that this will be by means not a definitive guide and my way of doing things may not exactly be the best or quickest way to do things but this is how i learnt to do the things i转载 2012-06-15 13:36:17 · 847 阅读 · 0 评论 -
Customizing Background and Text color in Options Menu Android
by Meghana under UncategorizedTweet6Options menu in android can be customized to set the background or change the text appearance. The background and text color in the menu c转载 2012-06-15 10:11:51 · 944 阅读 · 0 评论 -
How to change the Text color of Menu item in Android?
How to change the Text color of Menu item in Android?up vote2down votefavorite6share [g+]share [fb]share [tw]Can I change the background color of a Menu转载 2012-06-15 10:35:46 · 2282 阅读 · 0 评论 -
Android Developers › AppWidgets: Reusing RemoteViews instance leaks memory?
Android Developers › AppWidgets: Reusing RemoteViews instance leaks memory? 2 posts by 2 authors in Android Developers转载 2012-06-20 14:10:29 · 934 阅读 · 0 评论 -
八款开源 Android 游戏引擎 (巨好的资源)
八款开源 Android 游戏引擎 (巨好的资源)作者: iamsheldon (1 篇文章) 日期: 一月 13, 2012 在 4:30 下午初学Android游戏开发的朋友,往往会显得有些无所适从,他们常常不知道该从何处入手,每当遇到自己无法解决的难题时,又往往会一边羡慕于 iPhone下有诸如Cocos2d-iphone之类的免费游戏引擎可供使用,一边自暴自弃的抱怨转载 2012-06-26 10:52:34 · 689 阅读 · 0 评论 -
android CursorAdapter的监听事件
//contentObserver只是通知数据库中内容变化了cursor.registerContentObserver(mChangeObserver);//datasetObserver是调用requery之后通知上层cursor数据内容已经更新cursor.registerDataSetObserver(mDataSetObserver);我们的调用流程如下:转载 2012-07-19 17:02:10 · 815 阅读 · 0 评论 -
Adt离线安装
一、 将ADT-xx.zip解压到ADT,进入ADT目录,删除web目录、site.xml和index.html, 然后将ADT文件夹copy到Myeclipse 8.6/dropins目录下,重启Myeclipse 8.6即可二、 你下的ADT应该有两个文件夹,plugins和features,在你的Eclipse中找到这两个文件夹, 把ADT0中的plugins和features分别复原创 2012-11-01 15:33:41 · 919 阅读 · 0 评论 -
Android中使用Tcpdump抓取网络数据包
Android中使用Tcpdump抓取网络数据包博客分类: Android 工具:tcpdump 抓取网络数据包,下载地址 http://www.strazzere.com/android/tcpdump 源码和文档 http://www.tcpdump.org/wireshark 无须多说了,PC上大名鼎鼎的网络数据抓取分析转载 2012-11-07 11:13:13 · 1762 阅读 · 0 评论 -
经典sql 语句大全
经典SQL语句大全一、基础1、说明:创建数据库CREATE DATABASE database-name2、说明:删除数据库drop database dbname3、说明:备份sql server---创建 备份数据的 deviceUSE masterEXEC sp_addumpdevice 'disk', 'testBack', 'c:\转载 2012-11-08 16:05:28 · 474 阅读 · 0 评论 -
sed 格式化文件
sed -e"/^$/d" -e 's/[ \t]\+$//g' -e 's/\t/ /g' A.java > B.java删除A.java中所有的空行和每行结尾的空格,并把tab替换为四个空格原创 2012-11-27 18:53:48 · 749 阅读 · 0 评论 -
使用TextView/EditText应该注意的地方
原文地址:http://gundumw100.iteye.com/blog/974557使用TextView/EditText应该注意的地方关于android软键盘enter键的替换与事件监听 软件盘的界面替换只有一个属性android:imeOptions,这个属性的可以取的值有normal,actionUnspecified,actionNone,a转载 2012-11-13 16:57:59 · 802 阅读 · 0 评论 -
vi 显示空格 tab
1、显示 TAB 键文件中有 TAB 键的时候,你是看不见的。要把它显示出来::set list现在 TAB 键显示为 ^I,而 $显示在每行的结尾,以便你能找到可能会被你忽略的空白字符在哪里。 这样做的一个缺点是在有很多 TAB 的时候看起来很丑。如果你使用一个有颜色的终端,或者使用 GUI 模式,Vim 可以用高亮显示空格和TAB。 使用 ‘listchars’ 选项:转载 2012-11-13 17:09:47 · 3099 阅读 · 0 评论 -
main 和launcher
android:icon="@drawable/icon"android:label="@string/app_name">android:name=".Activity01"android:label="@string/app_name">android:name="android.intent.action.MAIN"/>android:name="android.inte转载 2012-11-14 10:49:27 · 777 阅读 · 0 评论 -
修复Android项目(Fix Project Properties)
修复Android项目(Fix Project Properties)分类: Android 2011-11-01 09:22 579人阅读 评论(0)收藏 举报导入新的一个android项目抱错,详情见下面:Android requires compiler compliance level 5.0 or 6.0. Found'1.4' instead.转载 2012-11-29 15:34:25 · 542 阅读 · 0 评论 -
logcat with time
adb logcat -v threadtime > 1.txt原创 2012-11-29 15:42:07 · 500 阅读 · 0 评论