- 博客(38)
- 资源 (59)
- 问答 (1)
- 收藏
- 关注
原创 Android--电池相关信息的获取
1.定义广播接收,显示电池信息--BatteryInfoBroadcastReceiverpackage org.lxh.demo;import android.app.AlertDialog;import android.app.Dialog;import android.content.BroadcastReceiver;import android.content.Contex
2015-01-30 12:08:33 1339
原创 Android--MediaPlayer实现MP3播放小程序
Main.xml程序如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertica
2015-01-26 18:08:52 1507
原创 Android--Bitmap
main.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >
2015-01-26 15:39:39 1129
原创 Android--闹钟小程序(Broadcast实现)
1.定义闹钟的提示Activity程序类-AlarmManagerpackage org.lxh.demo;import java.sql.Date;import java.text.SimpleDateFormat;import android.app.Activity;import android.app.AlertDialog;import android.content.
2015-01-26 12:33:50 5167 5
原创 Android--启动广播(Broadcast)
1.定义广播组件,组件类型继承BroadcastReceiver类:package org.lxh.demo;import android.content.BroadcastReceiver;import android.content.Context;import android.content.Intent;import android.widget.Toast;public
2015-01-26 10:22:14 1503
原创 Android--PendingIntent 实现发送通知notification
.java代码如下:package org.lxh.demo;import android.app.Activity;import android.app.AlertDialog;import android.app.Dialog;import android.app.Notification;import android.app.NotificationManager;impo
2015-01-26 09:52:33 1511
原创 Android--取得系统服务
(1)取得剪贴板程序.xml程序如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation=
2015-01-25 19:51:11 994
原创 Android--Service
MyServiceUtil.java代码如下:package org.lxh.demo;import android.app.Service;import android.content.Intent;import android.os.IBinder;public class MyServiceUtil extends Service {//继承Service类 @Overr
2015-01-25 18:02:34 1104
原创 安卓--异步处理工具类(AsyncTask)
.xml代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >
2015-01-25 16:49:44 1495 2
原创 安卓--子线程和主线程之间的交互实例(时钟)
.xml代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >
2015-01-25 16:06:23 1667
原创 Android--消息机制
1. Message消息,理解为线程间通讯的数据单元。例如后台线程在处理数据完毕后需要更新UI,则可发送一条包含更新信息的Message给UI线程。2. HandlerHandler是Message的主要处理者,负责将Message添加到消息队列以及对消息队列中的Message进行处理。3. Looper循环器,扮演Message Que
2015-01-25 11:33:07 928
原创 安卓--操作资源文件
main.xml代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertica
2015-01-21 17:52:54 1027
原创 Android--SharedPreferences 存储
.java代码如下:package org.lxh.demo;import android.app.Activity;import android.app.AlertDialog;import android.app.Dialog;import android.content.DialogInterface;import android.content.SharedPreferen
2015-01-21 16:30:16 1056
原创 Android--标签组件(TabHost)小实例
tab.xml代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical
2015-01-21 10:46:12 1099
原创 Chronometer组件实现计时器小程序
main.xml代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertica
2015-01-20 20:57:23 1095 1
原创 安卓--网格视图(GridView)实例
main.xml代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertica
2015-01-20 20:05:05 1659
原创 安卓--画廊(Gallery)组件
.xml代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >
2015-01-20 18:12:14 1399
原创 安卓--图片切换(ImageSwitcher)实例
main.xml代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertica
2015-01-20 17:38:42 1351
原创 安卓--信息提示框(Toast)实例
main.xml代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertica
2015-01-20 15:09:50 3376
原创 安卓--拖动条(SeekBar)实例
main.xml代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertica
2015-01-20 14:34:27 1262 1
原创 安卓-进度处理对话框(ProgressDialog)
main.xml:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <Butt
2015-01-20 14:13:18 1186
原创 安卓登陆界面设计(LayoutInflater)
main.xml代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <
2015-01-20 12:04:29 1774
原创 Dialog确定和删除按钮
main.xml代码下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical
2015-01-19 10:42:46 2954
原创 Android 实现下拉列表级联
.xml代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"> <Sp
2015-01-15 11:36:32 1913
原创 Android--OnCheckedChangeListener实例
.xml代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >
2015-01-15 10:44:32 1413
原创 Android-checkbox实现明文显示密码
.xml代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >
2015-01-15 10:07:51 1950 2
原创 Android-Activity程序动态的生成表格布局管理器
.java代码如下:package org.lxh.demo;import android.app.Activity;import android.os.Bundle;import android.view.ViewGroup;import android.widget.TableLayout;import android.widget.TableRow;import andro
2015-01-14 23:09:42 1273
原创 Android中DatePicker时间选择器
.xml代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <Time
2015-01-14 22:12:18 1115
原创 对于初学者死也找不出来的SQL错误
以下面代码查询为例<?phpheader("Content-type: text/html; charset=utf-8"); $host="localhost";$user="root";$password="root";$dbase_name="liuyan";$table_name="contents";$conn=mysql_connect($host,$user,$pa
2015-01-13 17:54:22 1263
原创 ThinkPHP--ActiveReocrd 模式(增删改查)
ActiveReocrd 模式这种模式最大的特别就是简化了CURD 的操作,并且采用对象化的操作方式,便于使用和理解。//添加一条数据$user = M('User');$user->user = '火影忍者';$user->email = 'huoyin@qq.com';$user->date = date('Y-m-d H:i:s');$user
2015-01-12 16:50:03 1254
原创 ThinkPHP--SQL 查询语句
一.查询方式ThinkPHP 提供了三种基本的查询方式:字符串条件查询、索引数组条件查询和对象条件查询。在大多数情况下,推荐使用索引数组和对象方式作为查询条件,因为会更加安全1.使用字符串作为条件查询//字符串作为条件查询$user = M('User');var_dump($user->where('id=1 AND user="蜡笔小新"')->select()
2015-01-12 14:31:47 4043 2
原创 ThinkPHP模型定义
模型类一般位于项目的Lib/Model 目录下面,当我们创建一个UserModel类的时候,其实已经遵循了系统的约定。模型类的命名规则是除去表前缀的数据表名称,采用驼峰法命名,并且首字母大写,然后加上模型类的后缀定义Model,例如:模型名(类名)约定对应数据表(假设数据库的前缀定义是 think_)UserModelthink_userUserTy
2015-01-12 10:29:14 1097
原创 ThinkPHP框架下自定义控制器方法
每个模块是一个Action文件,因此应用开发中的一个重要过程就是给不同的模块定义具体的操作。一个应用如果不需要和数据库交互的时候可以不需要定义模型类,但是必须定义Action控制器,一般位于项目的Lib/Action目录下面。Action控制器的定义非常简单,只要继承Action基础类就可以了,例如:Class UserAction extends Action{}控制器文件的
2015-01-12 10:21:44 1935
原创 ThinkPHP目录结构和命名规则
目录结构:命名规则:使用ThinkPHP开发的过程中应该尽量遵循下列命名规范:类文件都是以.class.php为后缀(这里是指的ThinkPHP内部使用的类库文件,不代表外部加载的类库文件),使用驼峰法命名,并且首字母大写,例如DbMysql.class.php;确保文件的命名和调用大小写一致,是由于在类Unix系统上面,对大小写是敏感的(而ThinkPHP在调试模
2015-01-12 10:02:26 1289
原创 PHP连接数据库(mysqli)
mysqli 我们在PHP中可以使用mysqli扩展与MySQL数据库信息交流,i表示改进,增强,它 执行速度更快。mysqli扩展被封装到一个类中,它是一种面向对象的技术,不过 喜欢过程化编程的用户也不用担心,mysqli也提供了一个面向过程的接口,我们 可以像调用函数那样去使用mysqli扩展,所以我们现在学习mysqli扩展相当于就
2015-01-11 10:13:35 1532
原创 PHP构造验证码
代码如下:<?phpheader('Content-type:image/jpeg');$width=120;$height=40;$element=array('1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','m','n','o','p','q','r','s','
2015-01-10 22:16:04 927
原创 如何在LabVIEW中使用Modbus通信
主要软件: 主要软件版本: 2010主要软件修正版本: N/A次要软件: LabVIEW Development Systems>>LabVIEW Professional Development System问题:(1) 什么是Modbus通信协议?(2) 在LabVIEW中需要安装什么软件可以进
2015-01-08 14:30:01 25658 5
转载 详细剖析二进制文件的读写
一).一般问题 二进制文件与我们通常使用的文本文件储存方式有根本的不同。这样的不同很难用言语表达,自己亲自看一看,理解起来会容易得多。因此,我推荐学习二进制文件读写的朋友安装一款十六进制编辑器。这样的编辑器有很多,在我们的 CVF 附带的集成开发环境下就可以(将二进制文件拖动到 IDE 窗口后松开)。Visual Studio 2005 也是可以的。(不过需要在 File 菜单下 Open,
2015-01-08 09:30:15 1612
android上拉加载,下拉刷新listview
2015-09-05
ripple-effect android eclipse 为控件增加涟漪效果
2015-08-23
android-短信验证码截取自动填入源码
2015-08-16
android 截取短信验证码自动输入Demo
2015-08-16
Android二维码扫描识别-二维码生成实例demo
2015-08-14
Android源码--基于Baas上拉加载、下拉刷新
2015-07-23
Android 百战经典-Android补间动画(Tween)大观园
2016-03-20
android 仿iOS弹出框效果demo
2015-10-29
android 邮箱验证EditText DEMO源码
2015-10-29
Android引导页Demo(第一次进入应用时加载)
2015-10-10
Android 圆形ImageView 源码Demo
2015-09-21
ListView 子控件单击事件混乱
2015-06-13
TA创建的收藏夹 TA关注的收藏夹
TA关注的人