• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






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 阅读(138) 评论(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 阅读(440) 评论(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 阅读(88) 评论(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 阅读(335) 评论(0) 推荐(0)
 

2017年3月19日

IntentService
摘要: 需要把构造方法改为 阅读全文
posted @ 2017-03-19 18:04 share_nc 阅读(78) 评论(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 阅读(152) 评论(0) 推荐(0)
 
Service
摘要: 1.无论是启动状态还是绑定状态都必须重写onBind()方法 2.调用onCreate()一次性设置程序,只执行一次 3.待续。。。 阅读全文
posted @ 2017-03-19 15:46 share_nc 阅读(81) 评论(0) 推荐(0)
 

2017年3月18日

小注意点
摘要: 布局配置文件命名必须为小写字母,数字,下划线 阅读全文
posted @ 2017-03-18 15:29 share_nc 阅读(86) 评论(0) 推荐(0)
 
Activity
摘要: 只有finish()可以主动调用:用于关闭某个activity 阅读全文
posted @ 2017-03-18 15:28 share_nc 阅读(104) 评论(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 阅读(231) 评论(0) 推荐(0)
 
下一页