# android **Repository Path**: gdhu/android ## Basic Information - **Project Name**: android - **Description**: android第二行代码 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2017-12-26 - **Last Updated**: 2024-08-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Android第一行代码 ### 2017-12-26 第7章 容器 ### 2017-12-30 第9章 解析网络数据 网络数据这里面讲了:xml, json。 但是没有讲到DOM解析 ### 2017-12-31 第10章 服务Service ### 2018-01-02 第10章 服务Service OkHttp框架 implementation 'com.squareup.okhttp3:okhttp:3.9.1' gson 谷歌的json框架 implementation 'com.google.code.gson:gson:2.8.2' ### 2018-01-02 第10章 服务Service 代码量有点多 ### 2018-01-03 第10章 服务Service 实现了下载 ### 2018-01-04 第11章 基于位置的服务 使用百度地图API http://developer.baidu.com/user/qualify?qualifyid=105 http://lbsyun.baidu.com/apiconsole/key http://lbsyun.baidu.com/index.php?title=androidsdk/sdkandev-download http://lbsyun.baidu.com/ 生成SHA1指纹。 Android studio gradle->aap->tasks->android->singingReport双击 然后查看gradle console ### 2018-01-05 第12章 UI ToolBar、滑动菜单、悬浮按钮 app:showAction: always表示一直显示,ifRoom有空间就显示,never表示从不显示 floatingActionButton 与普通的button没有什么区别 sanckbar: 不是Toast的替代品。扩展了一个可交互式的按钮。当用户点击按钮的时候可以执行一些额外的操作。例如取消删除。undo Snackbar可以设置 setAction()方法来设置一个动作。来和用户进行交互。 CoordinatorLayout 监听其所有子控件的各种事件,自动帮我们做出最为合理的响应。 ### 2018-01-07 今天终于出现了包冲突的情况。 解决的方式是更新sdk build tools 还有可能别的包引入了没有声明的包 ``` // 使用glide, 它好像继承读了recyclerview allprojects { repositories { mavenCentral() google() } } implementation 'com.github.bumptech.glide:glide:4.5.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.5.0' ``` 在魅蓝3手机上安装了我测试应用,可以正常运行。 魅蓝手机打开开发者模式需要点击系统版本几下就OK了。直接找开发者模式是找不到的。 ### 2018-01-10 第12章 UI 下拉刷新 第12章 UI 可折叠式标题栏 ### 2018-01-11 第13章 - 获取全局context: extends Application. override onCreate -> context = getApplicationContext(); - 使用intent传递对象 使用serializable方式序列化 实现Parcelablej接口 定制自己的日志工具:使用自定义logutil类,定义日志级别。 ### 2018-01-15 罗列出中国所有的省份 http://www.guolin.tech/api/china 某省份下面的市 http://www.guolin.tech/api/china/24 天气ID http://www.guolin.tech/api/china/16/116 查看苏州的天气 http://www.guolin.tech/api/weather?cityid=CN101190401&key=ef356e853047463180feb1cab6548435 https://free-api.heweather.com/s6/weather?key=ef356e853047463180feb1cab6548435&location=北京 说明文档 https://www.heweather.com/documents 获取bing图片的API http://guolin.tech/api/bing_pic 使用glide冲突的时候 将app/build.gradle 中的sdkversion改成27 dependency: 改成implementation 'com.android.support:appcompat-v7:27.0.2' 涉及到UI操作,必须要在主线程中调用。runOnUiThread() signingReport在Gradle Console 不写映射名字,GSON会自动映射到该名字 public String max; public String min; - 完成遍历省市县三级列表功能 - 显示天气信息 - 切换城市和手动更新天气功能 - 发布 ----------------------------------------------------------------------- check in: git add --all git commit -m "第14章 实战天气应用" git push -f origin master