| 2014/10/10 | 移动开发 | 被围观 806 views+
For JPush, when get the app test package, you neet to confirm that the app is using appKey of test version. Otherwise, the push service will not receive notification, cause the server is using a test appKey and the app is using a online appKey. Secondly, ensure that the app use the test environment interface of subscription. you can use the HTTP monitor software such as charles to validate it. In addition, we use a push system written by ourselves called "mofang". Make sure the tokens to push is using the test certificate(online environment is corr...
| 2011/7/15 | Android | 被围观 14,839 views+
在使用Eclipse开发Android程序过程中,发现鼠标停放在想要查看帮助的类名上面,提示如下信息: Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found. 出现这个原因,一般是因为android.jar包的Javadoc文件的关联属性没有设置好。 可以进行如下操作: 右击项目,选择 properties --> Java Build Path --> Libraries,展开Android相关类库的具体属性,下面有一个android.jar,展开其具体属性,发现有一个Javadoc location(None),点击这项,选择右边的Edit按钮,添加Javadoc的路径:Android SDK的安装文件夹/docs/,选择里面的re...
| 2011/7/14 | Android | 被围观 37,774 views+
在Android中可以使用Gson解析JSON数据 首先,从 code.google.com/p/google-gson/downloads/list下载GsonAPI: google-gson-1.7.1-release.zip 把gson-1.7.jar copy到libs(项目根目录新建一个libs文件夹)中。 可以使用以下两种方法解析JSON数据: 通过获取JsonReader对象解析JSON数据: String jsonData = "[{\"username\":\"arthinking\",\"userId\":001},{\"username\":\"Jason\",\"userId\":002}]"; try{ JsonReader reader = new JsonReader(new StringReader(jsonData)); reader.beginArray(); while(reader.hasNext()){ reader.beginObject(); while(reader.hasNe...
| 2011/7/14 | Android | 被围观 47,690 views+
Animation的4个基本动画效果 What is Animation? public abstract class Animation extends Object implements Cloneable Abstraction for an Animation that can be applied to Views, Surfaces, or other objects. 1、AlphaAnimation:淡入淡出效果 public class AlphaAnimation extends Animation An animation that controls the alpha level of an object. Useful for fading things in and out. This animation ends up changing the alpha property of aTransformation Public Constructors AlphaAnimation(Context context, AttributeSet attrs) Constructor used when an A...
| 2011/7/13 | Android | 被围观 13,567 views+
What is App Widget? 在手机桌面上放置的控件,即Android的桌面组件 AppWidgetProviderInfo public class AppWidgetProviderInfo extends Object implements Parcelable Describes the meta data for an installed AppWidget provider. The fields in this class correspond to the fields in the <appwidget-provider> xml tag. AppWidgetProvider public class AppWidgetProvider extends BroadcastReceiver A convenience class to aid in implementing an AppWidget provider. Everything you can do with AppWidgetProvider, you can do with a regularBroadcastRe...
| 2011/7/13 | Android | 被围观 5,208 views+
ExpandableListActivity和SimpleExpandableListAdapter public class SimpleExpandableListAdapter extends BaseExpandableListAdapter An easy adapter to map static data to group and child views defined in an XML file. You can separately specify the data backing the group as a List of Maps. Each entry in the ArrayList corresponds to one group in the expandable list. The Maps contain the data for each row. You also specify an XML file that defines the views used to display a group, and a mapping from keys in the Map to specific views. This process is simil...
| 2011/7/13 | Android | 被围观 6,507 views+
Spinner 什么是Spinner? public class Spinner extends AbsSpinner implements DialogInterface.OnClickListener A view that displays one child at a time and lets the user pick among them. The items in the Spinner come from the Adapter associated with this view. 创建一个Spinner的方法: ① 在布局文件中添加Spinner: <Spinner android:id="@+id/spinnerId" android:layout_width="fill_parent" android:layout_height="wrap_content" /> ② 在strings.xml文件中添加一个string-array: <string-array name="planets_array"> <ite...
| 2011/7/12 | Android | 被围观 5,563 views+
Service是什么 Service是一个android 系统中的应用程序组件,它跟Activity的级别差不多,但是他没有图形化界面,不能自己运行,只能后台运行,并且可以和其他组件进行交互如更新ContentProvider,Intent以及系统的通知等等。其启动方式有两种:context.startService() 和 context.bindService()。Service通常用来处理一些耗时比较长的操作。 Service的编写: 创建一个类(这里为FirstService)继承android.app.Service,并覆盖以下方法: onBind(Intent intent) Return the communication channel to the service. onCreate() Called by the system when the service is first created....
| 2011/7/12 | Android | 被围观 8,312 views+
什么是WIFI Wi-Fi是一种可以将个人电脑、手持设备(如PDA、手机)等终端以无线方式互相连接的技术。Wi-Fi是一个无线网路通信技术的品牌,由Wi-Fi联盟(Wi-Fi Alliance)所持有。目的是改善基于IEEE 802.11标准的无线网路产品之间的互通性。现时一般人会把Wi-Fi及IEEE 802.11混为一谈。甚至把Wi-Fi等同于无线网际网路。 获取WIFI网卡的状态 WIFI网卡的状态是由一些列的整型常量来表示的: ① WIFI_STATE_DISABLED:Wi-Fi is disabled. ② WIFI_STATE_DISABLING:Wi-Fi is currently being disabled. ③ WIFI_STATE_ENABLED:Wi-Fi is enabled. ④ WIFI_STATE_ENABLING:Wi-Fi is currently being e...
| 2011/7/12 | Android | 被围观 12,054 views+
Android的广播机制 使用Android的广播机制进行广播事件,是通过定义一个继承Broadcast Receiver的类实现的,覆盖BroadcastReceiver类的onReceive()方法,在该方法中响应事件。Android系统中定义了很多标准的Broadcast Action来响应系统广播事件。 public abstract class BroadcastReceiver extends Object 在AndroidManifest.xml配置响应的广播类型 <receiver android:name=".TestReceiver"> <intent-filter> <action android:name="android.intent.action.EDIT"></action> </intent-filter> </receiver> 在Activity中的按钮事件编写如下...
随机文章 本月热门 热评
1 扩展自jsoup的HTML XSS过滤程序 2015/3/9
2 Spring与Struts2整合的两种解决方案 2011/5/23
3 C++语法笔记汇总 | IT宅文章归档 AD 2011/11/14 2011/11/14
4 Java基础笔记 – Annotation注解的介绍和使用 自定义注解 2011/11/2
5 Java聊天软件 | Project 2011/11/14
6 HTTP请求中的User-Agent 判断浏览器类型的各种方法 网络爬虫的请求标示 2013/8/12
友情推荐 更多
破博客 文官洗碗安天下,武将打怪定乾坤。多么美好的年代,思之令人泪落。
Mr.5's Life 白天是一名程序员,晚上就是个有抱负的探索者
行知-追寻技术之美 关注大数据,分布式系统
我爱编程 编程成长轨迹
Cynthia's Blog 学习笔记 知识总结 思考感悟
关于IT宅 文章归档

IT宅中的文章除了标题注明转载或有特别说明的文章,均为IT宅的技术知识总结,学习笔记或随笔。如果喜欢,请使用文章下面提供的分享组件。转载请注明出处并加入文章的原链接。 感谢大家的支持。


Theme by arthinking. Copyright © 2011-2015 IT宅.com 保留所有权利.