上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 27 下一页
摘要: 在MainActivity.onCreate(Bundle savedInstanceState){}设置背景图和标题。1 setTitle("wyl的diary");//标题,即左上角的2 getWindow().setBackgroundDrawableResou... 阅读全文
posted @ 2015-09-15 16:47 Sunor 阅读(474) 评论(0) 推荐(0) 编辑
摘要: Intent intent = getIntent();Intent intent2 = new Intent();通常通过getIntent()方法获取到是非空的,即类似于:intent:Intent { act=android.intent.action.MAIN cat=[android.in... 阅读全文
posted @ 2015-09-10 21:42 Sunor 阅读(636) 评论(0) 推荐(0) 编辑
摘要: EditText可以使用:TextView.setEnabled(true)来设置为可编辑,其实很简单,写在这里以便以后自己查看。 Button设置可用性:setVisibility(View.VISIBLE),这样就设置为可用了。其中参数是一个int型以后有其他的控件的设置,可以再进行补充。... 阅读全文
posted @ 2015-09-10 21:12 Sunor 阅读(797) 评论(0) 推荐(0) 编辑
摘要: 用于创建菜单的常用的方法有如下两种:1.onCreateOptionsMenu(Menu menu) 2.onPrepareOptionsMenu(Menu menu)MyDiaryActivity中的方法: 1 /** 2 * Initialize the contents of ... 阅读全文
posted @ 2015-09-10 20:33 Sunor 阅读(979) 评论(0) 推荐(0) 编辑
摘要: 经过几天的总结,以及结合一些代码的实际测试,终于算是明白了ContentProvider中的数据的生成时机了。目录结构:MainActivity.java 1 package com.wyl.contentprovidermine2; 2 3 4 import android.app.Act... 阅读全文
posted @ 2015-09-09 22:48 Sunor 阅读(2546) 评论(0) 推荐(0) 编辑
摘要: 写在这里,以便于以后忘记格式后可以查询。CREATE OR REPLACE FUNCTION TEMP_FUNC_WYL(PI_AAA100 VARCHAR2, PI_AAA102 VARCHAR2)--字典转换,把代码... 阅读全文
posted @ 2015-09-09 15:22 Sunor 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 目录结构:,先给个结论: 仅仅是实例化mySqliteHelper()这个类的时候是不会创建数据库的,实际上数据库的真正创建是在helper.getWritableDatabase()的方法执行后才会真正创建,或者执行helper.getReadableDatabase()也会创建数据库(如果没有... 阅读全文
posted @ 2015-09-08 23:01 Sunor 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 这段时间在学习ContentProvider,还是不太明白ContentProvider中数据库是什么时候创建的。经过自己测试,实际上是用户真正插入数据的时候生成的数据库。具体代码见下一篇关于ContentProvider中的数据生成时机的随笔。现在就说下静态代码块和构造器的执行顺序。实例化一个类A... 阅读全文
posted @ 2015-09-08 22:53 Sunor 阅读(1977) 评论(0) 推荐(0) 编辑
摘要: Content ProvidersIn this documentContent provider basicsQuerying a content providerModifying data in a providerCreating a content providerContent URI ... 阅读全文
posted @ 2015-09-07 23:23 Sunor 阅读(296) 评论(0) 推荐(0) 编辑
摘要: ContentProvider中的URI,The URI that identifies the provider 一个特定的uri对应着唯一一个内容提供者,谷歌官方文档里的说明,Querying a Content ProviderYou need three pieces of infor... 阅读全文
posted @ 2015-09-06 15:03 Sunor 阅读(319) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 27 下一页