- 博客(10)
- 收藏
- 关注
原创 RecycleView多条目
//在Activity中//设置适配器ShowAdapter showAdapter = new ShowAdapter(Main2Activity.this, list); recycle1.setAdapter(showAdapter);//在适配器中public class ShowAdapter extends RecyclerView.Adapter<RecyclerV...
2019-01-19 19:02:17 328
原创 购物车逻辑
//我们需要在已经写好的二级列表基础上写如多选框和计算器//主页面中public class MainActivity extends AppCompatActivity implements ShopConstant.ShopView { private ShopConstant.ShopPresenter presenterImpi; private RecyclerV...
2019-01-16 20:39:29 181
原创 禁止横竖屏切换
//加入到清单文件中想要禁止的页面对应的activity下android:screenOrientation="portrait"
2019-01-11 16:50:26 304
原创 沉浸式
//透明状态栏getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);//透明导航栏getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
2019-01-11 15:24:43 130
原创 防止多次点击 防误触
在处理点击事件的时候,在外层加入以下代码 long currentTime = Calendar.getInstance().getTimeInMillis(); if (currentTime - lastClickTime > MIN_CLICK_DELAY_TIME) { lastClickTime = curr...
2019-01-11 15:08:49 943
原创 简单实现二维码扫描以及生成二维码
//首先导入依赖implementation 'cn.yipianfengye.android:zxing-library:2.2'//在布局文件中 &lt;Button android:id="@+id/button_1" android:layout_width="match_parent" android:layout_heig...
2019-01-09 09:49:40 482
原创 Indictor指示器
//布局文件<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:...
2019-01-04 15:18:38 165
原创 MVP的搭建以及登录
//首先导入okhttp的依赖以及Gson解析的依赖//在布局文件中写入<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android...
2019-01-01 20:23:06 177
原创 网络解析引导页
//导入Gson解析 Glide解析 okgo的依赖//布局文件<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.androi...
2019-01-01 19:55:48 127
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人