上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 45 下一页
  2012年8月1日
摘要: WebView 设置实现两个手指缩放网页: mWebView.getSettings().setSupportZoom(true); mWebView.getSettings().setBuiltInZoomControls(true); WebView cookies清理: CookieSyncManager.createInstance(this); CookieSyncManager.getInstance().startSync(); CookieManager.getInstance().removeSessionCookie(); 另外,清理cache 和历史记录的方法: Web. 阅读全文
posted @ 2012-08-01 11:00 lee0oo0 阅读(6874) 评论(0) 推荐(0) 编辑
摘要: 如何删除项目的缓存: getCacheDir()能够得到当前项目的缓存地址 在项目中经常会使用到WebView 控件,当加载html 页面时,会在/data/data/应用package 目录下生成database与cache 两个文件夹。请求的url 记录是保存在WebViewCache.db,而url 的内容是保存在WebViewCache 文件夹下 打开关闭使用缓存,一共有五个种类 //优先使用缓存: WebView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); //不使用缓存: WebView.g... 阅读全文
posted @ 2012-08-01 10:53 lee0oo0 阅读(7961) 评论(1) 推荐(0) 编辑
摘要: 本例子并不是本人攒写,例子是出自eoeAndroid特刊的第12期。代码如下:/Files/lee0oo0/MulThreadDownloader.rar 阅读全文
posted @ 2012-08-01 10:42 lee0oo0 阅读(351) 评论(0) 推荐(0) 编辑
  2012年7月29日
摘要: 1. 重写的ListView的布局文件<?xmlversion="1.0"encoding="utf-8"?><!--ListView的头部--><LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="fill_parent"android:layout_height="wrap_content"><!--内容-->&l 阅读全文
posted @ 2012-07-29 15:13 lee0oo0 阅读(670) 评论(0) 推荐(0) 编辑
  2012年7月27日
摘要: 首先看一下效果图: 项目结构图: Android 3.0以下版本的做法:importjava.util.Locale;importandroid.app.Activity;importandroid.app.AlertDialog;importandroid.content.Context;importandroid.content.DialogInterface;importandroid.content.Intent;importandroid.content.SharedPreferences;importandroid.content.SharedPreferences.Edit... 阅读全文
posted @ 2012-07-27 15:42 lee0oo0 阅读(2162) 评论(0) 推荐(1) 编辑
摘要: 这里我定义两个html页面,分别是1.html与2.html(以下简称1和2),1是需要传递数据的,2是接收数据的。1中"?"前面的需要跳转的url地址,后面的就是需要携带的数据。 1.html location.href = "2.html?id=1"; 2.html window.location.search ——设置或返回从问号 (?) 开始的 URL(查询部分)。 阅读全文
posted @ 2012-07-27 10:08 lee0oo0 阅读(2254) 评论(0) 推荐(0) 编辑
  2012年7月17日
摘要: 直接上代码,代码内容上有相应的注释。效果作简短介绍,有一个圆形一个方形,当一只手指触控的时候只有圆形随着移动;当两只手指触控的时候圆形与方形各自随着手指移动。不要忘记使用View.invalidate()对绘图进行更新。/*import相关class*/importandroid.app.Activity;importandroid.content.Context;importandroid.graphics.Canvas;importandroid.graphics.Color;importandroid.graphics.LinearGradient;importandroid.grap. 阅读全文
posted @ 2012-07-17 15:42 lee0oo0 阅读(1707) 评论(0) 推荐(0) 编辑
  2012年7月16日
摘要: javascript如何读取Json数据结构节点的值?下面json官方的js,结合ajax来读取解释json结构的数据。<script>//直接声明json数据结构var myJSONObject = {"bindings": [ {"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"}, {"ircEvent": "PRIVMSG&quo 阅读全文
posted @ 2012-07-16 16:43 lee0oo0 阅读(2250) 评论(0) 推荐(0) 编辑
  2012年7月10日
摘要: XMLHttpRequest 用于在后台与服务器交换数据。这意味着可以在不重新加载整个网页的情况下,对网页的某部分进行更新。 创建 XMLHttpRequest对象:varxmlhttp;if(window.XMLHttpRequest){//codeforIE7+,Firefox,Chrome,Opera,Safarixmlhttp=newXMLHttpRequest();}else{//codeforIE6,IE5xmlhttp=newActiveXObject("Microsoft.XMLHTTP");} AJAX - 向服务器发送请求: 如需将请求发送到服务器,我们 阅读全文
posted @ 2012-07-10 10:22 lee0oo0 阅读(331) 评论(0) 推荐(0) 编辑
  2012年7月9日
摘要: jQuery 拥有三种用于 CSS 操作的重要函数: $(selector).css(name,value) $(selector).css({properties}) $(selector).css(name)$(selector).css(name,value)用法示例:为所有匹配元素的给定 CSS 属性设置值<html><head><scripttype="text/javascript"src="/jquery/jquery.js"></script><scripttype="tex 阅读全文
posted @ 2012-07-09 21:41 lee0oo0 阅读(208) 评论(0) 推荐(0) 编辑
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 45 下一页