上一页 1 2 3 4 5 6 7 8 ··· 12 下一页
摘要: //define this at the top of the first Activitypublic final static String EXTRA_MESSAGE="com.binni.AndroidUI.MESSAGE";//first ActivityIntent intent =new Intent(this,DisplayMessageActivity.class);EditText edittext=(EditText)findViewById(R.id.edit_message);String str=edittext.getText().toStri 阅读全文
posted @ 2012-09-13 21:34 niky 阅读(585) 评论(0) 推荐(0) 编辑
摘要: // Build the intent //Uri number = Uri.parse("tel:5551234"); //Intent callIntent = new Intent(Intent.ACTION_DIAL, number); Intent intent = new Intent(Intent.ACTION_SEND); // Always use string resources for UI text. This says something like "Share this photo with"... 阅读全文
posted @ 2012-09-13 21:30 niky 阅读(282) 评论(0) 推荐(0) 编辑
摘要: (声明:此文转自 http://www.cnblogs.com/fujinliang/archive/2012/08/28/2660883.html)timestamp 这种数据类型表现自动生成的二进制数,确保这些数在数据库中是唯一的。timestamp 一般用作给表行加版本戳的机制。存储大小为 8 字节。 一个表只能有一个 timestamp 列。每次插入或更新包含 timestamp 列的行时,timestamp 列中的值均会更新。这一属性使 timestamp 列不适合作为键使用,尤其是不能作为主键使用。对行的任何更新都会更改 timestamp 值,从而更改键值。如果该列属于主键,那. 阅读全文
posted @ 2012-08-29 08:06 niky 阅读(3559) 评论(0) 推荐(0) 编辑
摘要: (声明:本文转自http://www.cnblogs.com/huangzelin/archive/2012/08/25/2656814.html)反射+特性打造简洁的AJAX调用这里我要实现类似AjaxPro组件调用效果的功能,先看看AjaxPro在CS文件中的代码是怎么写的。//在后台写的有参方法[AjaxPro.AjaxMethod]public string getString(string str){return str + "Say: hello my friends";}前台页面的调用方式function Button4_onclick() {var str= 阅读全文
posted @ 2012-08-26 10:12 niky 阅读(223) 评论(0) 推荐(1) 编辑
摘要: SharpZipLib 是一个免费的Zip操作类库,可以利用它对 ZIP 等多种格式进行压缩与解压。下载网址:http://www.icsharpcode.net/OpenSource/SharpZipLib/Download.aspx。目前的版本为0.86。1、创建zip文件,并添加文件:using(ZipFilezip=ZipFile.Create(@"E:\test.zip")){zip.BeginUpdate();zip.Add(@"E:\文件1.txt");zip.Add(@"E:\文件2.txt");zip.CommitU 阅读全文
posted @ 2012-08-02 19:27 niky 阅读(454) 评论(0) 推荐(0) 编辑
摘要: // GameView.drawImage(canvas, mBitDestTop, miDTX, mBitQQ.getHeight(), mBitDestTop.getWidth(), mBitDestTop.getHeight()/2, 0, 0); public static void drawImage(Canvas canvas, Bitmap blt, int x, int y, int w, int h, int bx, int by) { //x,y表... 阅读全文
posted @ 2012-06-28 21:06 niky 阅读(28824) 评论(0) 推荐(1) 编辑
摘要: 静态截图View Code import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import android.app.Activity;import android.graphics.Bitmap;import android.graphics.Rect;import android.media.MediaMetadataRetriever;import android.util.Log;import android.view.View;public cl 阅读全文
posted @ 2012-06-20 13:47 niky 阅读(1185) 评论(0) 推荐(0) 编辑
摘要: 三个属性都用来适应视图的水平或垂直大小,一个以视图的内容或尺寸为基础的布局比精确地指定视图范围更加方便。1)fill_parent设置一个构件的布局为fill_parent将强制性地使构件扩展,以填充布局单元内尽可能多的空间。这跟Windows控件的dockstyle属性大体一致。设置一个顶部布局或控件为fill_parent将强制性让它布满整个屏幕。2) wrap_content设置一个视图的尺寸为wrap_content将强制性地使视图扩展以显示全部内容。以TextView和ImageView控件为例,设置为wrap_content将完整显示其内部的文本和图像。布局元素将根据内容更改大小。 阅读全文
posted @ 2012-06-15 20:19 niky 阅读(124954) 评论(4) 推荐(12) 编辑
摘要: 直接上代码了import android.content.BroadcastReceiver;import android.content.Context;import android.content.Intent;import android.os.Bundle;import android.telephony.SmsMessage;import android.widget.Toast;public class SMSReceiver extends BroadcastReceiver{ /*当收到短信时,就会触发此方法*/ public void onReceive(Cont... 阅读全文
posted @ 2012-06-14 15:19 niky 阅读(587) 评论(2) 推荐(0) 编辑
摘要: Toast用于向用户显示一些帮助/提示。下面我做了5中效果,来说明Toast的强大,定义一个属于你自己的Toast。1.默认效果代码Toast.makeText(getApplicationContext(), "默认Toast样式", Toast.LENGTH_SHORT).show();2.自定义显示位置效果代码toast = Toast.makeText(getApplicationContext(), "自定义位置Toast", Toast.LENGTH_LONG); toast.setGravity(Gravity.CENTER, 0, 0); 阅读全文
posted @ 2012-06-14 14:01 niky 阅读(308) 评论(0) 推荐(1) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 12 下一页