- 博客(54)
- 收藏
- 关注
转载 Android常用“民间控件”
为大介绍几款所谓的“民间”控件,这些控件是我们要在实际项目中可以直接用的,并能为我们提供一个精美的界面效果,android UI组件1. iosched这是一个官方的Google I/O的应用(同样可用在GDD,Google Developer Day)(注:Google I/O是Google每年都会举办的历时两天的开发者大会,该大会谈及各种技术问题。开发人员会提供非常多的示例
2013-03-26 16:09:14 868
转载 Android 如何把民间的控件工具集合:android-misc-widgets 下载到本地 并运行
最近在csdn上看到一篇文章介绍一些widget的不同实现效果,这里说的不是官方的控件SlidingDrawer,而是民间的控件工具集合:android-misc-widgets.如Panel实现的Launch的抽屉效果: 还有其它的widget实现: android-misc-
2013-03-26 15:59:09 1192
转载 Android使用WebView播放Flash
使用Android3.0,并在AndroidManifest.xml中,把作为主界面的属性,添加android:hardwareAccelerated="true"如下 --> 1. -- > 新建项目Android3.02. -- > AndroidManifest.xml package="com.geolo.android" android:ver
2013-03-25 01:28:58 1923
转载 Android的OCR实现
1.功能:光学字符识别(OCR,Optical Character Recognition)是指对文本资料进行扫描,然后对图像文件进行分析处理,获取文字及版面信息的过程2.典型应用:名片扫描3.android源码实现:external/tesseract/*4.编译:$ cd external/tesseract/$ mm生成libocr.so,
2013-03-20 23:02:57 3215
转载 OCR学习
OCR(Optical Character Recognition):光学字符识别,是指对图片文件中的文字进行分析识别,获取的过程。Tesseract:开源的OCR识别引擎,初期Tesseract引擎由HP实验室研发,后来贡献给了开源软件业,后经由Google进行改进,消除bug,优化,重新发布。当前版本为3.01.项目地址为:http://code.google.com/p/tess
2013-03-20 23:01:01 1034
原创 巧妙重启Activity
public void reload() { Intent intent = getIntent(); overridePendingTransition(0, 0); intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); finish(); overridePendingTransition(0, 0); st
2013-03-15 14:19:03 1528
转载 Android旋转屏幕导致Activity重建怎么办?
Android开发文档上专门有一小节解释这个问题。简单来说,Activity是负责与用户交互的最主要机制,任何“设置”(Configuration)的改变都可能对Activity的界面造成影响,这时系统会销毁并重建Activity以便反映新的Configuration。“屏幕方向”(orientation)是一个Configuration,通过查看Configuration类的javadoc可
2013-03-14 18:12:32 915
转载 Android Intent调用大全、系统自带Intent调用大全
1.从google搜索内容 Intent intent = new Intent(); intent.setAction(Intent.ACTION_WEB_SEARCH); intent.putExtra(SearchManager.QUERY,"searchString") startActivity(intent); 2.浏览网页 Uri uri = Uri.pa
2013-03-13 17:13:17 785
原创 生成一个元素各不相同的随机数据
public class Speed { public static int[] getSpeed(int MAX_SNOW_COUNT,int MAX_SPEED) { Random r = new Random(); int n = 0; Integer[] integer = new Integer[MAX_SNOW_COUNT]; int[] speed = n
2013-03-12 11:23:06 809
原创 生成n以内的m个随机数
import java.util.Random;public class Rand { public static void main(String[] args) { final int[] nums = new int[m]; Random rand = new Random(); for(int i = 0; i < nums.lengt
2013-03-12 01:29:45 988
原创 双色球随机算法
package javatest;import java.util.HashSet;import java.util.Random;import java.util.Set;public class ball {Random r = new Random();public Set getRed() {Set redSet = new HashSet();
2013-03-11 16:46:05 2712 1
转载 三种东西永远不要放到数据库里
我已经在很多演讲里说过,改进你的系统的最好的方法是先避免做“蠢事”。我并不是说你或你开发的东西“蠢”,只是有些决定很容易被人们忽略掉其暗含的牵连,认识不到这样做对系统维护尤其是系统升级带来多大的麻烦。作为一个顾问,像这样的事情我到处都能见到,我还从来没有见过做出这样的决定的人有过好的结果的。图片,文件,二进制数据既然数据库支持BLOB类型的数据,把文件塞进BLOB字段里一定没有错了!?错,
2013-03-11 14:02:21 855
转载 Android 实用工具Hierarchy Viewer实战
在Android的SDK工具包中,有很多十分有用的工具,可以帮助程序员开发和测试Android应用程序,大大提高其工作效率。其中的一款叫Hierachy Viewer的可视化调试工具,可以很方便地在开发者设计,调试和调整界面时,提高用户的开发效率。本文将以一个实际例子讲解如何使用该款工具运用在Android的开发过程中。本文的读者对象为具备初步Android知识的用户。 步骤1 设计
2013-03-11 11:23:58 670
转载 Android应用中嵌入广告
1. 注册开发者帐号,然后进入开发者操作2.左面面板有个应用管理面板,点击添加应用3.在这里填入你应用的信息,现在如果不知道应用的名称,就随便填一个,之后可以修改,填完后,然后点击下一步我们要的就是这两个一个是发布Id,一个是应用密码。4.下载该手机广告平台sdk地址http://www.miidi.net/developers/sdk.htm5.
2013-03-11 11:11:38 1180
转载 StackView Widget示例程序(AndroidManifest.xml)
AndroidManifest.xml文件原文地址:http://developer.android.com/resources/samples/StackWidget/AndroidManifest.htmlThe file containing the source code shown below is located in the corresponding directory i
2013-03-07 18:05:03 848
转载 StackView Widget示例程序(WidgetItem.java)
WidgetItem.java文件原文地址:http://developer.android.com/resources/samples/StackWidget/src/com/example/android/stackwidget/WidgetItem.htmlThe file containing the source code shown below is located in th
2013-03-07 18:04:23 811
转载 StackView Widget示例程序(StackWidgetService.java)
StackWidgetService.java文件原文地址:http://developer.android.com/resources/samples/StackWidget/src/com/example/android/stackwidget/StackWidgetService.htmlThe file containing the source code shown below
2013-03-07 18:03:30 835
转载 StackView Widget示例程序(StackWidgetProvider.java)
StackWidgetProvider.java文件原文地址:http://developer.android.com/resources/samples/StackWidget/src/com/example/android/stackwidget/StackWidgetProvider.htmlhe file containing the source code shown below
2013-03-07 18:02:00 816
转载 StackView Widget示例程序(stackwidgetinfo.xml)
stackwidgetinfo.xml文件原文地址:http://developer.android.com/resources/samples/StackWidget/res/xml/stackwidgetinfo.htmlThe file containing the source code shown below is located in the corresponding dir
2013-03-07 18:00:37 806
转载 StackView Widget示例程序(strings.xml)
strings.xml文件原文地址:http://developer.android.com/resources/samples/StackWidget/res/values/strings.htmlThe file containing the source code shown below is located in the corresponding directory in /
2013-03-07 17:59:49 865
转载 StackView Widget示例程序(widget_item_background.xml)
widget_item_background.xml文件原文地址:http://developer.android.com/resources/samples/StackWidget/res/drawable-nodpi/widget_item_background.htmlThe file containing the source code shown below is loc
2013-03-07 17:59:01 837
转载 StackView Widget示例程序
原文地址:http://developer.android.com/resources/samples/StackWidget/index.html StackView Widget示例程序演示了如何构建一个最简单的collection widget。虽然该示例程序是使用StackView来演示如何构建widget ; 但是如果你想使用 ListView, GridView or Adap
2013-03-06 18:13:18 1029
转载 Widgets高级篇(四)
本文翻译整理自:http://developer.android.com/guide/topics/appwidgets/index.html#implementing_collections3.7、数据更新图2说明了App Widget with Collections如何进行数据更新。它也给我们展示了App Widget代码如何和RemoteViewsFactory进行交互, 和我们A
2013-03-06 18:12:43 811
转载 Widgets高级篇(三)
本文翻译整理自:http://developer.android.com/guide/topics/appwidgets/index.html#implementing_collections3.6、设置数据项View的行为前文已经告诉你如何绑定您的数据到你的app widget collection。但是如何为数据项View添加动态的行为呢?本部分将讲述关于次的详细内容。在普通的Ap
2013-03-06 18:12:13 1122
转载 Widgets高级篇(二)
本文翻译整理自:http://developer.android.com/guide/topics/appwidgets/index.html#implementing_collections3.3、AppWidgetProvider class for app widgets with collections app widgets with collections像一般的app wid
2013-03-06 18:11:14 824
转载 Widgets高级篇(一)
本文翻译整理自:http://developer.android.com/guide/topics/appwidgets/index.html#preview前言在Android3.0中,增加了大量的APP Widgets功能,在本文中将详细介绍它们。一,设置预览图片在Android 3.0版本中,增加了previewImage属性,它用于指明 App Widget的预览图片,它
2013-03-06 18:10:33 854
转载 Widgets基础篇附件4(ExampleBroadcastReceiver.java)
ExampleBroadcastReceiver.java文件原文地址:http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetConfigure.htmlThe file containing the source code
2013-03-06 18:09:48 748
转载 Widgets基础篇附件3(ExampleAppWidgetConfigure.java)
ExampleAppWidgetConfigure.java文件原文地址:http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetConfigure.htmlThe file containing the source c
2013-03-06 18:09:11 710
转载 Widgets基础篇附件2(ExampleAppWidgetProvider.java)
原文地址:http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetProvider.htmlExampleAppWidgetProvider.java文件The file containing the source cod
2013-03-06 18:06:55 713
转载 Widgets基础篇附件1(WordWidget.java)
原文地址:http://code.google.com/p/wiktionary-android/source/browse/trunk/Wiktionary/src/com/example/android/wiktionary/WordWidget.java因为AppWidgetProvider扩展自BroadcastReceiver, 所以,你不能保证回调函数完成调用后,AppWi
2013-03-06 18:04:58 681
转载 Widgets基础篇(下)
文章翻译整理自:http://developer.android.com/guide/topics/appwidgets/index.html八,如何编写App Widget Configuration Activity如果你想让用户在添加一个新的App Widget时,能对该App Widget进行一些个性化的配置的话,你可以通过编写一个App Widget Configuration
2013-03-06 17:16:44 787
转载 Widgets基础篇(中)
文章参照自:http://developer.android.com/guide/topics/appwidgets/index.html六、如何使用AppWidgetProviderAppWidgetProvider继承于BroadcastReceiver,它对App Widget的广播进行了简单分类,并封装了处理的统一接口,以方便使用。AppWidgetProvider只接受和
2013-03-06 16:57:01 605
转载 Widgets基础篇(上)
文章参照自:http://developer.android.com/guide/topics/appwidgets/index.html一、前言所谓App Widgets就是微型应用程序的意思,它可以嵌入在其他应用程序(如主屏幕),并能定期更新其View。这些View被当成用户界面的小部件,您可以使用App Widget provider来发布App Widgets。一个能容
2013-03-06 16:56:04 700
转载 Activity的Launch mode 以及Intent的setFlags
Activity有四种加载模式:standard(默认), singleTop, singleTask和 singleInstance。以下逐一举例说明他们的区别:standard:Activity的默认加载方法,即使某个Activity在Task栈中已经存在,另一个activity通过Intent跳转到该activity,同样会新创建一个实例压入栈中。例如:现在栈的情况为:A B C D,在
2013-03-06 14:14:35 685
转载 Android之Activity后台隐藏
1 public class MainActivity extends Activity { 2 /** Called when the activity is first created. */ 3 NotificationManager nm; 4 Notification notifi; 5 PendingIntent pi; 6
2013-03-06 14:08:04 1848
转载 Android反编译资料
Android 反编译资料整理一、反编译流程图 二、工具使用方法(命令)准备工作假设我的工作目录为 $AndroidDecompile,首先要将system.img中(或者说从源码中编译好的)几个重要的odex文件拷贝到工作目录中,他们是:core.odex, ext.odex, framework.odex, android.policy.od
2013-03-06 14:03:29 886
转载 Android程序反编译
Apk文件的格式 Android application package文件。每个要安装到android平台的应用都要被编译打包为一个单独的文件,后缀名为.apk,其中包含了应用的二进制代码、资源、配置文件等。 apk文件实际是一个zip压缩包,可以通过解压缩工具解开。可以用zip解开*.apk文件,下面是一个helloword的apk示例文件 |– Android
2013-03-06 14:01:38 596
转载 开源组件actionbarsherlock的使用
从android 3.0开始,android加入了一个新的api,actoinbar,不得不说3.0之前android的标题栏确实比较丑,并且还没有任何功能,大部分情况下我都是直接将其隐藏的。之前很多应用的顶部栏很多都是仿苹果的,比如微信。随着android 4.0的发布和慢慢的推广开来,很多应用也开始使用google推广的ui设计,而actionbar是其中相当重要的一部分。无奈goog
2013-03-06 10:32:23 972
转载 Actionbar
在Android3.0以上你可以利用Action Bar部件提供的全部功能,将你的选项菜单项放在Action Bar的右上角,对用户来说使用更方便,控制该行为的主菜单项属性是android:showAsAction。这个属性可接受的值有:1、always:这个值会使菜单项一直显示在Action Bar上。2、ifRoom:如果有足够的空间,这个值会使菜单项显示在Action Bar上。
2013-03-06 10:12:39 638
转载 Android之ActionBar学习
关于那个问题:是关于如何生成如下图所示之ActionBar效果: 其实就在官网上就有答案,自己疏忽再加上资料繁多。寻了许久,经过指点。终于找到:To enable split action bar, simply add uiOptions="splitActionBarWhenNarrow" to your or manifest el
2013-03-06 09:57:45 643
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人