- 博客(10)
- 收藏
- 关注
原创 RecycleView的二级列表
allprojects { repositories { google() jcenter() maven { url "https://jitpack.io" } maven { url "http://lib.gcssloop.com/repository/gcssloop-central/" } }...
2018-10-27 16:45:02 753
原创 炫酷的欢迎页
效果图:接下来就是代码进行实现public class MoguViewPager extends RelativeLayout { private MyApp app; private MoguViewPagerAdapter mAdapter; private ViewPager mViewPager; private TransforVi...
2018-10-27 13:58:13 354
原创 Retrofit的简单使用(GET)
依赖compile 'com.squareup.retrofit2:retrofit:2.0.0-beta4'compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta4' 创建Constant类public class Constant { public static final String URL_BASE=...
2018-10-22 10:21:49 181
原创 fragment之间传值
//eventbuscompile 'org.greenrobot:eventbus:3.0.0' public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.on...
2018-10-16 17:17:00 192
原创 Toast工具类
public class ToastUtil { private static Toast toast; public static void showToast(Context context, String msg) { if (toast == null) { toast = Toast.makeText(context.getApp...
2018-10-12 16:58:00 90
原创 横向滑动HorizontalScrollView
<!--横向菜单 只能有一个子孩子 --> <HorizontalScrollView android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/hsv"> <Linear...
2018-10-12 16:48:43 673
原创 开发当中需要的一些依赖的总结
//gsonimplementation 'com.google.code.gson:gson:2.8.1'//frescocompile 'com.facebook.fresco:fresco:0.14.1'//图片加载框架glidecompile 'com.github.bumptech.glide:glide:3.7.0'// gif的依赖compile 'com.face...
2018-10-12 16:35:59 230
原创 fresco在适配器中的简单使用
public class ClassRoom_Adapter_R extends RecyclerView.Adapter<ClassRoom_Adapter_R.ViewHolder> { List<Classroom_Bean.ContentBean.BooksBean> list; Context context; public Class...
2018-10-10 10:16:13 175
原创 RecyclerView添加分割线的简便方法
添加默认的分割线 //添加Android自带的分割线recyclerView.addItemDecoration(new DividerItemDecoration(MainActivity.this,DividerItemDecoration.VERTICAL)); 自定义分割线 创建shape.xml文件custom_divider<shape x...
2018-10-10 09:59:25 1092
原创 Android如何设置圆角按钮
1. 在res目录下的drawable目录下新建shape.xml文件<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <!-- 填充的颜色 --> <solid android:color="#FF06...
2018-10-09 11:10:27 878
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人