摘要: 顶部标题TabLayout点击切换Fragment 加依赖: 在开始之前先调用工具插件:右键工程》Open Module Settings》Dependencies》+》Library Dependency》导人(com.android.support:design:27.0.2)》ok imple 阅读全文
posted @ 2018-01-11 11:35 juntong 阅读(434) 评论(0) 推荐(0) 编辑
摘要: 图片轮播:跳出隐藏按钮:点击跳转 布局: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android 阅读全文
posted @ 2018-01-08 19:15 juntong 阅读(601) 评论(0) 推荐(0) 编辑
摘要: 点击跳转按钮: 添加权限: <application>在这个控件中加入参数(需要跳转的页面) <activity android:name=".Main2Activity"></activity> </application> 布局: <Button android:id="@+id/btn" an 阅读全文
posted @ 2018-01-08 19:14 juntong 阅读(679) 评论(0) 推荐(0) 编辑
摘要: 布局: 主要方法: 阅读全文
posted @ 2018-01-08 19:13 juntong 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 布局: <android.support.v4.view.ViewPager android:layout_height="match_parent" android:layout_width="match_parent" android:id="@+id/viewpager"/> 主要代码: im 阅读全文
posted @ 2018-01-08 19:12 juntong 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 添加权限: 网络请求+网络判断+读取外部储存的权限 加依赖(在最上面)buildToolsVersion "26.0.2" (最下面)图片和网络请求的依赖 布局: 主要方法: fragment方法: 阅读全文
posted @ 2018-01-08 19:12 juntong 阅读(1890) 评论(0) 推荐(0) 编辑
摘要: 刚接触android的时候,命名都是按照拼音来,所以有的时候想看懂命名的那个控件什么是什么用的,就要读一遍甚至好几遍才知道,这样的话,在代码的审查和修改过程中就会浪费不少不必要的时间。如果就是我一个人开发,一个人维护的话还好,可是如果一个项目是团队分工合作,这样让你的同事去看你的代码就更加吃力了,因 阅读全文
posted @ 2018-01-08 19:11 juntong 阅读(13680) 评论(0) 推荐(1) 编辑
摘要: 添加权限: <application/>在这个控件里加入属性:android:name=".MyApp" import android.app.Application; import android.os.Environment; import com.nostra13.universalimage 阅读全文
posted @ 2018-01-08 19:10 juntong 阅读(380) 评论(0) 推荐(1) 编辑
摘要: import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.util.Log; import java.io.BufferedReader; import java.io.IOExcept 阅读全文
posted @ 2018-01-08 19:08 juntong 阅读(1046) 评论(0) 推荐(0) 编辑
摘要: build.gradle中加入: 添加之后需要点击右上角的 Sync Now 编译一下 添加权限: 阅读全文
posted @ 2018-01-03 19:09 juntong 阅读(1185) 评论(0) 推荐(0) 编辑