会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
share_nc
Powered by
博客园
博客园
|
首页
|
新随笔
|
联系
|
订阅
|
管理
2017年5月15日
获取时间
摘要: time_t timep; time(&timep); struct tm *localt=localtime(&timep); int year=localt->tm_year+1900; int month=localt->tm_mon+1; int day=localt->tm_mday; i
阅读全文
posted @ 2017-05-15 10:41 share_nc
阅读(130)
评论(0)
推荐(0)
编辑
2017年3月20日
xml--字符串数组
摘要: <resources> <string-array name="balls"> <item >篮球</item> <item>乒乓球</item> <item>台球</item> </string-array> </resources> 在程序中以R.array.balls获取此数组
阅读全文
posted @ 2017-03-20 22:43 share_nc
阅读(426)
评论(0)
推荐(0)
编辑
ListView Spinner Gallery 与 ArrayAdapter SimpleAdapter等
摘要: public class MainActivity extends AppCompatActivity { private String[] names = new String[]{"B神", "基神", "曹神"}; private String[] says = new String[]{"无
阅读全文
posted @ 2017-03-20 22:40 share_nc
阅读(85)
评论(0)
推荐(0)
编辑
BoardcastReceiver的简单使用
摘要: 动态注册:不打开程序无法接受广播 1 public class MyBRReceiver extends BroadcastReceiver{ 2 @Override 3 public void onReceive(Context context, Intent intent) { 4 Toast.
阅读全文
posted @ 2017-03-20 19:09 share_nc
阅读(323)
评论(0)
推荐(0)
编辑
2017年3月19日
IntentService
摘要: 需要把构造方法改为
阅读全文
posted @ 2017-03-19 18:04 share_nc
阅读(73)
评论(0)
推荐(0)
编辑
Intent与intent-filter
摘要: 方法一: Intent intent=new Intent(); intent.setClass(this,next.class) 方法二: Intent intent=new Intent(); intent.setAction(String action) 方法四: Intent intent=
阅读全文
posted @ 2017-03-19 16:43 share_nc
阅读(137)
评论(0)
推荐(0)
编辑
Service
摘要: 1.无论是启动状态还是绑定状态都必须重写onBind()方法 2.调用onCreate()一次性设置程序,只执行一次 3.待续。。。
阅读全文
posted @ 2017-03-19 15:46 share_nc
阅读(76)
评论(0)
推荐(0)
编辑
2017年3月18日
小注意点
摘要: 布局配置文件命名必须为小写字母,数字,下划线
阅读全文
posted @ 2017-03-18 15:29 share_nc
阅读(71)
评论(0)
推荐(0)
编辑
Activity
摘要: 只有finish()可以主动调用:用于关闭某个activity
阅读全文
posted @ 2017-03-18 15:28 share_nc
阅读(99)
评论(0)
推荐(0)
编辑
2017年3月17日
Bundle类用于传递参数
摘要: 1.我们可以创建Bundle对象 Bundle bundle=new Bundle() 然后存储key-value bundle.putxxx(String,xxx) 然后保存在Message对象message中 message.setdata(bundle) 最后通过发送给Handler hand
阅读全文
posted @ 2017-03-17 21:38 share_nc
阅读(215)
评论(0)
推荐(0)
编辑
下一页