随笔分类 -  Android代码片段

记录了一些平常积累的代码片段
摘要:Intent intent = new Intent();intent.setAction("com.android.phone.EmergencyDialer.DIAL");startActivity(intent); 阅读全文
posted @ 2012-04-04 16:32 LiLiNiuNiu 阅读(2288) 评论(0) 推荐(0)
摘要:http://shaxquan.blog.51cto.com/751410/579948 阅读全文
posted @ 2012-02-27 14:25 LiLiNiuNiu 阅读(236) 评论(0) 推荐(0)
摘要:试了很多插件,最后发现Green UML最靠谱了。可以从已有的代码自动生成UML图。安装方法:1.从http://green.sourceforge.net/builds.html查找对应自己Eclipse的GEF版本和Green UML版本2.从http://www.eclipse.org/gef/downloads.php下载对应版本的GEF,下载后我直接解压了,然后把其中的plugins目录的所有东西拷贝到Eclipse安装目录下的plugins目录下3.从http://sourceforge.net/projects/green/下载对应版本的Green UML,解压后依然是把plug 阅读全文
posted @ 2012-02-26 15:57 LiLiNiuNiu 阅读(21949) 评论(2) 推荐(0)
摘要:实体类:public class MyEntry { public String title; public String location; public String description; public Calendar startCalendar; public Calendar endCalendar; public String entryID; public MyEntry(String entryID, String title, String location, String description, Calendar st... 阅读全文
posted @ 2012-02-24 10:48 LiLiNiuNiu 阅读(389) 评论(0) 推荐(0)
摘要:1 public class MyRenderer implements Renderer 2 { 3 FloatBuffer verticesBuffer; 4 private final int VERTEX_SIZE = (2 + 2) * 4; 5 private AssetManager asset; 6 private int textureID; 7 8 public MyRenderer(Context context) 9 {10 asset = context.getAssets();11 ... 阅读全文
posted @ 2011-12-17 15:59 LiLiNiuNiu 阅读(574) 评论(0) 推荐(0)
摘要:1 public class MyRenderer implements Renderer 2 { 3 FloatBuffer verticesBuffer; 4 5 @Override 6 public void onDrawFrame(GL10 gl) 7 { 8 gl.glViewport(0, 0, 320, 480); 9 gl.glClear(GL10.GL_COLOR_BUFFER_BIT);10 gl.glMatrixMode(GL10.GL_PROJECTION);11 g... 阅读全文
posted @ 2011-12-17 13:30 LiLiNiuNiu 阅读(838) 评论(0) 推荐(0)
摘要:首先添加权限: <uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission> 实现代码: 1: public class test extends Activity 2: { 3: PowerManager powerManager = null; 4: WakeLock wakeLock = n... 阅读全文
posted @ 2011-08-12 10:32 LiLiNiuNiu 阅读(9469) 评论(1) 推荐(0)