上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页
摘要: 效果: 先贴一个SharedPreferences工具类: package com.example.didida_corder.ToolClass; import android.content.Context; import android.content.SharedPreferences; i 阅读全文
posted @ 2020-02-06 14:42 XiaoGao128 阅读(415) 评论(0) 推荐(0) 编辑
摘要: 内部存储文件即raw和assets项目文件夹下的文件,项目卸载时被删除。 四种文件操作模式 文件存储: public void save(String filename, String filecontent) throws Exception { //这里我们使用私有模式,创建出来的文件只能被本应 阅读全文
posted @ 2020-02-05 15:46 XiaoGao128 阅读(675) 评论(0) 推荐(0) 编辑
摘要: 这一功能要用到动画相关知识 实现点击按钮弹出下方输入框,这里点击可弹出一个输入界面,其中包括一个小型计算器。 点击date可弹出datedialog设置date。 1、编写弹出框的布局文件 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout 阅读全文
posted @ 2020-02-05 12:07 XiaoGao128 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 参考:https://www.cnblogs.com/huanyou/p/5087044.html 阅读全文
posted @ 2020-02-05 11:57 XiaoGao128 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 1、创建侧滑菜单Fragment package com.example.didida_corder; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import and 阅读全文
posted @ 2020-02-04 18:18 XiaoGao128 阅读(681) 评论(0) 推荐(0) 编辑
摘要: 1、Xml中底部导航栏由一个RadioGroup组成,其上是ViewPager。 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/andr 阅读全文
posted @ 2020-02-04 11:45 XiaoGao128 阅读(774) 评论(0) 推荐(0) 编辑
摘要: Android中的菜单有如下几种: OptionMenu:选项菜单,android中最常见的菜单,通过Menu键来调用 SubMenu:子菜单,android中点击子菜单将弹出一个显示子菜单项的悬浮框, 子菜单不支持嵌套,即不能包括其他子菜单 ContextMenu:上下文菜单,通过长按某个视图组件 阅读全文
posted @ 2020-02-03 13:37 XiaoGao128 阅读(687) 评论(0) 推荐(0) 编辑
摘要: 事件监听机制是一种委派式的事件处理机制,事件源(组件)事件处理委托给事件监听器 当事件源发生指定事件时,就通知指定事件监听器,执行相应的操作 五种不同的使用形式: 匿名内部类: 平时最常用的一种:直接setXxxListener后,重写里面的方法即可; 通常是临时使用一次,复用性不高! btnsho 阅读全文
posted @ 2020-02-03 11:08 XiaoGao128 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Fragment是依赖于Activity的,不能独立存在的。 一个Activity里可以有多个Fragment。 一个Fragment可以被多个Activity重用。 Fragment有自己的生命周期,并能接收输入事件。 我们能在Activity运行时动态地添加或删除Fragment。 Fragme 阅读全文
posted @ 2020-02-02 17:10 XiaoGao128 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Activity的生命周期: onCreat ,onStart,onResume,onPause,onRestart,onStop,onDestroy Activity之间的跳转分为显式跳转和隐式跳转。 隐式跳转: Intent intent=new Intent(); intent.setActi 阅读全文
posted @ 2020-02-01 21:24 XiaoGao128 阅读(270) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页