- 博客(30)
- 资源 (5)
- 收藏
- 关注
原创 把py编译到pyc
import py_compile py_compile.compile('hello.py') 建立如上脚本,把hello.py脚本放到同级目录下,
2015-12-23 15:15:07
604
原创 TypedArray的初略探索
TypedArray a = obtainStyledAttributes(R.styleable.Gallery);Log.i(TAG,"a " + a + " -> \n" + a.getIndexCount() + " \n" + a.length() + " \n" + R.styleable.Gallery.length);mGalleryItemBackground = a.get
2013-09-29 18:00:40
3912
原创 Cursor里的方法实现
对于InstrumentedCursorWrapper.java下函数 @Override public boolean moveToPosition(int position) { boolean result = super.moveToPosition(position); logQueryTime(); return
2013-09-29 09:38:28
923
原创 对NotificationManager和方法notify的理解
NotificationManager myNotiManager=(NotificationManager)getSystemService(NOTIFICATION_SERVICE);myNotiManager.notify(myNoti.flags,myNoti);1,NOTIFICATION_SERVICE怎么得到的?2,NotificationManager怎么产生的?3
2013-09-27 18:22:50
2080
原创 模拟Context调用
Contextpackage com.jk.test.context;import com.jk.test.sharedpreferences.SharedPreferences;public abstract class Context { public abstract SharedPreferences getSharedPreferences(String name,
2013-09-26 13:49:26
781
原创 button OnClick调用过程
package com.example.testonclick;import android.os.Bundle;import android.app.Activity;import android.util.Log;import android.view.KeyEvent;import android.view.Menu;import android.view.MotionEven
2013-09-16 20:21:07
1223
原创 模拟时钟Message和Handler的简易应用
1,模拟时钟和数字时钟的直接调用2,用一个TextView显示获取的当前时间3,修改系统默认的时间格式为24小时制package irdc.EX04_14_B;/* * @author Modfiy by jake20001@126.com * */import android.app.Activity;import android.content.Conte
2013-09-14 16:37:28
792
原创 搜索一个目录下名字中有key的目录和文件
1,注释部分为搜索当前的文件夹package irdc.ex04_11; /* import相关class */import java.io.File;import android.app.Activity;import android.os.Bundle;import android.util.Log;import android.view.View;import
2013-09-13 17:19:45
700
原创 pull解析xml
以备今后查询:pull解析xmlmodel部分package com.example.xmlpullparsertest.model;public class Student { private int id; private String name; private int age; public int getId() { return id; } publ
2013-09-10 14:37:11
580
原创 SQLiteManager中SQL语句
SQLiteManager可以手动操作创建tableCREATE TABLE student ("St_id" integer NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,"St_name" text NOT NULL)CREATE TABLE student2 (sid integer PRIMARY KEY AUTOINCREMENT,sname
2013-09-09 18:19:42
989
原创 保持第一个activity的数据
1,在一个activity里传入数据(通过intent.putExtras(bundle))2,返回时,主activity里通过再次调用this.getIntent().getExtras()获取bundle值,来显示原先的值package irdc.ex03_10;/* import相关class */ import java.lang.reflect.Array;import j
2013-09-08 16:39:36
785
原创 对2组list从大到小排序
package jk;import java.util.*;public class LinkMerger { /** * @param args * @author jake20001@126.com */ public static void main(String[] args) { // TODO Auto-generated method stub Li
2013-09-05 17:32:15
1154
原创 求2个整数的公倍数和公约数
以下用2种方法求最大公约数和最小公倍数package jk;public class DataTest { /** * @param args * @author jake20001@126.com */ public static void main(String[] args) { // TODO Auto-generated method stub /
2013-09-05 16:35:13
747
原创 多线程-生产者消费者
生存者生产面包,消费者消费面包,当生产者生产到MAX个时,等待消费者消费,消费者没面包消费时,等待生存者生产,只有有面包,消费者就希望消费,但消费者食量有限,等到消费者消费到25个面包时,就不消费了,生产者生产到MAX个面包后,也停止了劳动!package jk2;import java.util.LinkedList;import java.util.Queue;publi
2013-09-05 16:09:07
807
原创 后台播放music示例
也是从别人那里搬来学习的。MusicDemo.javapackage com.example.and_musicdemo0826;import android.os.Bundle;import android.app.Activity;import android.content.ComponentName;import android.content.Intent;
2013-08-26 13:35:58
674
原创 activity生命周期中的onSaveInstanceState
在Activity没有完全被杀死之前(按键HOME,有其他Activity覆盖原来的activity)时,会调用onSaveInstanceState方法以下模拟代码中,无法调到其中想模拟的段落,代码中有注释,请有接触的朋友给于解答,可以的话,给出模式的条件代码,在此感谢!package com.example.and_test0822;import android.os.Bu
2013-08-22 17:51:05
935
原创 倒计时时钟
Clock analyze@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mContext = this; mActionBar = getActionBar();
2013-08-20 18:21:27
975
原创 适配器模式
直接上代码:对象适配器和类适配器package com.jk.st.adapter;import com.jk.st.base.Bird;public class BirdAdapter_ob extends Bird implements ISay { String name; public BirdAdapter_ob(String name) { sup
2013-08-18 17:39:06
610
原创 ViewPager 和 Adapter
从api上搞下来的,以防忘记package com.example.test0816;import android.os.Bundle;import android.app.Activity;import android.support.v4.app.Fragment;import android.support.v4.app.FragmentActivity;
2013-08-16 18:32:53
861
原创 broadcastreceiver温习
package com.example.broadcasttest0809;import android.os.Bundle;import android.app.Activity;import android.content.BroadcastReceiver;import android.content.Context;import android.content.
2013-08-09 15:09:21
723
原创 FM函数从上层到底层调用过程(回顾)
FM AIDL JNI 调用过程回顾FMPlay.javapublic class FMPlay extends Activity implements ServiceConnection; private RadioServiceStub mService;public void onCrea
2013-08-08 15:26:36
1462
原创 FM滚动是出现竖线的地方
package com.example.testdrawview;import com.example.testdrawview.TuneWheel.OnTuneWheelValueChangedListener;import android.os.Bundle;import android.os.Handler;import android.os.Mess
2013-08-07 18:33:06
770
原创 FM学习记录续
FMPlay.javapublic void onCreate(Bundle savedInstanceState) { Log.d(LOGTAG,"onCreate"); super.onCreate(savedInstanceState);//设置全屏模式 setVolumeControlStream(AudioManager.ST
2013-08-07 17:29:16
932
原创 FM上层学习记录
FMPlay.javapublic void onCreate(Bundle savedInstanceState) { Log.d(LOGTAG,"onCreate"); super.onCreate(savedInstanceState);//设置全屏模式 setVolumeControlStream(AudioManager.ST
2013-08-07 14:07:49
1280
原创 BroadcastReceiver随笔(动态注册和静态注册)
package com.jk.broadcastreceivertest;import java.util.HashMap;import java.util.Iterator;import java.util.List;import java.util.Map;import java.util.Map.Entry;import java.util.Set;
2013-08-06 16:20:51
845
原创 FM上层
FMPlay.javapublic void onCreate(Bundle savedInstanceState) { Log.d(LOGTAG,"onCreate"); super.onCreate(savedInstanceState);//设置全屏模式 setVolumeControlStream(AudioManager.ST
2013-08-05 20:33:41
781
原创 FM打开fmOn()过程
FM打开fmOn()过程FMPlay.javaprivate RadioServiceStub mService;private Thread createOpenThread() { return new Thread(new Runnable() { public void run() { Log
2013-08-05 16:59:02
2119
原创 eclipse下测试JNI
Step 1: Write the Java CodeCreate a Java class named HelloWorld that declares a native method. This class also includes a main method that creates a HelloWorld object and calls the native method.S
2013-08-05 13:15:39
605
原创 AIDL测试 service
package com.example.serviceaidlsimpletest;import android.app.Service;import android.content.Intent;import android.os.IBinder;import android.util.Log;public class RemoteService extend
2013-08-05 11:55:21
708
原创 Android记录:layout
http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > android:layout_width="
2012-09-25 12:05:56
368
uCOS-II-EN
2009-11-13
xml 圣经 编程 John.Wiley
2009-09-26
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人