- 博客(33)
- 资源 (7)
- 收藏
- 关注
转载 UIWebView禁止下拉弹跳功能
http://blog.youkuaiyun.com/cocoa_geforce/article/details/6731944for (id subview in tWebView.subviews){ if ([[subview class] isSubclassOfClass:[UIScrollView class]]) { ((UIScrollView *)subview
2012-06-29 13:07:07
3293
2
原创 view转换为image
// 设置Drawingcache为true,获得选中项的影像bmitemView.setDrawingCacheEnabled(true);Bitmap bm = Bitmap.createBitmap(itemView.getDrawingCache());
2012-06-19 16:33:29
885
原创 jquery mobile 定制外观文章收集
jQueryMobileで作ったテンプレートサイトはクライアントの欲求を満たすことができるのかhttp://sakotsu.jp/blog/?p=490jQuery Mobileでサイトを作ってみた。 Vol.2http://coder.blog.uhuru.co.jp/js/jquery-mobile-vol2jQuery Mobileのオリジナルテーマカラー
2012-03-13 09:43:46
943
转载 Androidプログラマへの道 ~ Moonlight 明日香 ~
http://wiki.livedoor.jp/moonlight_aska/l/
2012-03-07 13:13:31
2075
转载 在代码中实现按下Home键的效果
转载自http://blog.youkuaiyun.com/centralperk/article/details/7273564Android设备在按下Home键会自动切换回桌面,其实实现的方法很简单,由于Launcher捕获了Home键的按下action,我们直接发送个Intent给Launcher即可,代码如Intent intent= new Intent(Intent.ACTION_
2012-02-20 09:39:04
1028
原创 MapView监听地图平移和缩放
使用MapView开发地图应用时,经常遇到的问题是如何感知用户平移了地图或者缩放了地图。在百度上找不到答案,无意中,发现一个国外网站有一个解决案,和大家分享一下。参考文章http://d.hatena.ne.jp/sei10sa10/20110801/1312191680http://stackoverflow.com/questions/3567420/how-to-catch-
2012-02-20 09:24:05
11521
转载 Android平台实现https信任所有证书的方法
Android平台上经常有使用https的需求,对于https服务器使用的根证书是受信任的证书的话,实现https是非常简单的,直接用httpclient库就行了,与使用http几乎没有区别。但是在大多数情况下,服务器所使用的根证书是自签名的,或者签名机构不在设备的信任证书列表中,这样使用httpclient进行https连接就会失败。解决这个问题的办法有两种,一是在发起https连接之前将服务器
2012-02-16 14:11:09
32118
1
原创 代码实现安装卸载apk
安装final Intent intent = new Intent(Intent.ACTION_VIEW);intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory(), APK_FILE_NAME)), "application/vnd.android.pack
2012-01-20 09:07:44
1876
原创 activity生命周期总结
将activity切入后台back方式onPause -> onStop -> onDestroyHome方式onPause -> onStop将activity切入前台back方式onCreate -> onStart -> onResumehome方式onRestart -> onStart -> onResume
2012-01-19 12:36:26
944
原创 Android-X86上网研究
安装android-x86的方法请参考下面的文章,是基于vitrualBox的,如果使用VMvare,安装过程差不多。http://www.cnblogs.com/MaxWoods/archive/2011/09/16/2179310.html首先说明下我的网络状况,无dhcp,需要proxy认证才能连接到外网自己的pc安装了proxcap,可以自动将网络访问重定向到pro
2011-11-23 10:59:08
14249
原创 安卓ApiDemos学习 app/Dialog
类AlertDialogSamples展示各种形态的dilalog在各个按钮的click函数中,调用showDialog。然后重写activity的onCreateDialog方法来弹出dialog传入参数为dialog id下面分别分析1、OK Cancel dialog with a messageyes/no类型的dialog。setPositiveButton方
2011-11-15 17:24:41
2142
原创 安卓ApiDemos学习 app/Device Admin/DeviceAdminSample
首先是启动和关闭ActiveAdmin启动ActiveAdminIntent intent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN);intent.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN,mDeviceAdminSample);intent.putE
2011-11-07 10:30:21
2660
转载 Android 使用httpclient对self-signed certificate网站进行SSL连线
Android SDK 在进行 https 连线时,对于自签署的凭证是会拒绝连线的,会得到 Not trusted server certificate 的例外。如果使用 HttpsURLConnection 来连线,网络上可以找到一些破解方法,在此不多谈。使用 apache httpclient 其实执行效率比较差一点,但是他最大的好处就是有内建的机制储存cookie,并且也可以跟随 serve
2011-11-04 16:45:46
3628
1
原创 安卓ApiDemos学习 app/Alarm/AlarmService
使用alarm机制定时启动service,并让service显示Notification的例子首先创建待定意图mAlarmSender = PendingIntent.getService(AlarmService.this,0, new Intent(AlarmService.this, AlarmService_Service.class), 0);注册alarm,30秒启动一次A
2011-11-04 10:15:15
5868
原创 安卓ApiDemos学习 app/Alarm/AlarmController
本例子演示如何使用警报首先建立一个待处理意图Intent intent = new Intent(AlarmController.this, OneShotAlarm.class);PendingIntent sender = PendingIntent.getBroadcast(AlarmController.this, 0, intent, 0);其中,OneSho
2011-11-03 09:23:00
1204
原创 安卓ApiDemos学习 app/Activity/Wallpaper
本例启动一个activity,但是背景是系统的桌面activity显示本身没有特别的地方,关键在AndroidManifest.xml文件中 <activity android:name=".app.WallpaperActivity" android:label="@string/activity_wallpaper"
2011-11-02 16:30:18
962
原创 安卓ApiDemos学习 app/Activity/Translucent Blur
此例子其实有2个画面,作为相互比较画面Translucent,系统默认效果,新启动的activity覆盖住了背景。因为画面没有设置背景色,所以形成了半透明效果如下画面TranslucentBlur,设置windows behind了FLAG_BLUR_BEHIND效果getWindow().setFlags(WindowManager.LayoutParams.FLAG_B
2011-11-01 11:23:40
1567
原创 安卓ApiDemos学习 app/Activity/SetWallpaper
墙纸设置的例子,还涉及一些图片变换的内容取得当前墙纸final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);final Drawable wallpaperDrawable = wallpaperManager.getDrawable();将墙纸设置到imageview上imageV
2011-10-31 15:53:34
954
原创 安卓ApiDemos学习 app/Activity/ReorderActivities
展示FLAG_ACTIVITY_REORDER_TO_FRONT的应用这个demo的画面启动顺序如下ReorderOnLaunch ---> ReorderTwo ---> ReorderThree ---> ReorderFour在画面ReorderFour中,再次启动ReorderTwo ,加了参数Intent intent = new Intent(Re
2011-10-28 10:29:19
977
转载 修改android默认浏览器
PackageManager packageManager = context.getPackageManager();String str1 = "android.intent.category.DEFAULT";String str2 = "android.intent.category.BROWSABLE";String str3 = "android.intent.action
2011-10-27 16:40:10
7766
原创 安卓ApiDemos学习 app/Activity/Redirection
展示Activity间的迁移方法共有3个画面:RedirectEnter ,RedirectMain ,RedirectGetterRedirectEnter -----> RedirectMainIntent intent = new Intent(RedirectEnter.this, RedirectMain.class);startActivity(inten
2011-10-27 15:41:11
900
原创 安卓ApiDemos学习 app/Activity/ReceiveResult
此示例演示了activity间,利用ActivityResult机制进行数据交互画面ReceiveResult中,按下按钮后,调用如下代码启动画面SendResult Intent intent = new Intent(ReceiveResult.this, SendResult.class); startActivityForR
2011-10-26 17:20:07
1821
原创 安卓ApiDemos学习 app/Activity/QuickContactsDemo
这是一个ContentResolver应用的例子首先构筑Cursor String select = "((" + Contacts.DISPLAY_NAME + " NOTNULL) AND (" + Contacts.HAS_PHONE_NUMBER + "=1) AND (" + Contacts.DI
2011-10-25 21:43:46
1128
原创 安卓ApiDemos学习 app/Activity/PersistentState
这个例子展示SharedPreferences的使用首先取得SharedPreferences对象SharedPreferences prefs = getPreferences(Activity.MODE_PRIVATE);一般有如下3种取值MODE_PRIVATE私有int值为0 MODE_WORLD_READABLE可读int值为1 MODE_WORL
2011-10-23 19:57:52
813
原创 安卓ApiDemos学习 app/Activity/HelloWorld
这个程序很简单,只是在xml中布局并显示一个TextView<TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/text" android:layout_width="match_parent" android:layout_height="match_parent"
2011-10-23 19:36:56
783
原创 安卓ApiDemos学习 app/Activity/Forwarding
核心就是发送一个Intent,来启动其他的Activity Intent intent = new Intent(); intent.setClass(Forwarding.this, ForwardTarget.class); startActivity(intent);这种属于显示启动Activity还有
2011-10-22 21:22:37
1470
转载 Android startService 启动自动解锁点亮屏幕
写一个Activity启动该服务即可,用一个线程开启服务,要是黑屏的状态下启动才有效果。import android.app.KeyguardManager;import android.app.KeyguardManager.KeyguardLock;import android.app.Service;import android.content.Context;import
2011-10-22 20:49:11
6122
原创 安卓ApiDemos学习 app/Activity/Animation
实现画面迁移时的动画效果核心函数overridePendingTransition第一个参数:新画面的进入动画第二个参数:当前画面的退出动画预定义的动画位于R.anim包下Fade效果实现overridePendingTransition(R.anim.fade, R.anim.hold);Zoom效果实现overridePendingTransitio
2011-10-22 20:09:15
1084
原创 安卓Api Demo学习 app/Activity/CustomDialog
首先是AndroidManifest.xml中,关于Activity的配置 <activity android:name=".app.CustomDialogActivity" android:label="@string/activity_custom_dialog" //Label相当于Dialog的Title
2011-10-22 20:07:52
1110
原创 安卓Api Demo学习 App/Activity/Dialog
AndroidManifest.xml文件中的配置 <activity android:name=".app.CustomDialogActivity" android:label="@string/activity_custom
2011-10-19 15:57:19
1197
原创 安卓Api Demo学习 App/Activity/Custom Title
首先要告诉系统自定义的类型核心函数requestWindowFeature。一般用来自定义标题,以及标题栏进度图形,或者让程序没有title requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setCont
2011-10-19 15:05:41
954
原创 S2DAO特性以及中文资料
S2Dao具有以下特征:不使用XML进行O/R Mapping最近的框架式(Framework)的O/R Mapping, 必须使用XML记述大量的信息。 使用S2Dao,则不需要XML文件, 只要在Java源程序中记述元数据(metadata)就可以实现O/R Mapping。 不需要JDBC的知识Java应用程序中,使用JDBC的API
2009-10-30 22:04:00
1508
原创 Teeda开发环境的搭建
Eclipse开发环境中,使用「Dolteng」「DbLauncher」「 Sysdeo/SQLI Tomcat Launcher 」插件,可以大大提高开发效率使用以下的顺序来安装插件选择Eclipse的「Help」-「Software Updates」菜单按下「Add Site」按钮在「Location」中输入如下的地址http://eclipse.seasar.org/
2009-10-05 18:47:00
1778
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人