- 博客(29)
- 收藏
- 关注
原创 android中遇到问题的解决办法
1.layout布局不展示,或者style资源报错通用https://blog.csdn.net/u012833250/article/details/837852982.Error:SSL peer shut down incorrectly(完美解决)https://blog.csdn.net/qq_15895655/article/details/767140713.android转...
2019-08-29 18:05:52 194
转载 解决AndroidStudio连不上Android设备真机的问题
https://blog.csdn.net/system_err/article/details/81188234
2019-06-10 11:53:44 445
转载 git commit之后进入vim(vi)界面,如何退出
首先 使用 git commit --amend 命令(修改最近一次提交的注释信息),会进入到vim 编辑器然后 你会发现编辑器里你怎么输入都没反应,这是因为vim处在不可编辑状态,按下字母键 c(此时进入编辑状态),可以开始修改注释信息了修改好后,你会发现怎么都退出不了,然后如下操作:按下Esc (退出编辑状态); 接着连按两次大写字母Z,你会惊喜的发现,终于保存好退出来了!...
2019-05-16 14:16:33 2769 1
原创 购物车
自定义计数器public class CustomCounter extends LinearLayout { private Context mContext; private EditText editText_num; private ImageView imageView_jia; private ImageView imageView_jian; ...
2019-01-20 12:07:18 161
原创 IjkPlayer视频播放
导依赖implementation 'com.github.leifzhang:IjkLib:0.4.3'权限<uses-permission android:name="android.permission.INTERNET"/><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORA...
2019-01-20 08:39:57 317
原创 XBanner实现3D画廊效果
导依赖在工程的build.gradle中 allprojects { repositories { google() jcenter() maven { url 'https://jitpack.io' } } }在项目的build.gradleimplementation "com.daimajia.swipelayou...
2019-01-20 08:32:09 2501 1
原创 RecyclerView的吸附
public class MyRecyclerView extends RecyclerView { private BaseDecoration mDecoration; public MyRecyclerView(Context context) { super(context); } public MyRecyclerView(Conte...
2019-01-14 08:12:22 327
原创 GreenDao数据库
使用前首先是在项目的Project的build.gradle的dependencies{ }中加入一句话:dependencies {classpath 'org.greenrobot:greendao-gradle-plugin:3.2.0' }在当前项目app的build.gradle中引入依赖如下:apply plugin: 'org.greenrobot.greendao...
2019-01-13 21:10:26 112
原创 Fresco展示图片
依赖implementation 'com.facebook.fresco:fresco:1.11.0'第一:在你的application类onCreate方法中添加Fresco.initialize(instance); //或者设置磁盘缓存 DiskCacheConfig diskCacheConfig = DiskCacheConfig.newBuilder(th...
2019-01-01 23:56:27 207
原创 Retrofit+MVP网络请求框架
导依赖 // 网络请求Retrofit &amp; OkHttp &amp; Rxjava implementation "com.squareup.okhttp3:logging-interceptor:$rootProject.interceptor" implementation "com.squareup.retrofit2:retrofit:$rootProject.r...
2019-01-01 23:44:02 319
原创 自定义View/ViewGroup实现兴趣树效果,奇数条在左,偶数条在右
xml布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="
2018-12-21 08:53:03 148
原创 二级联动+RecyclerView+MVP
activity_main.xml的布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" ...
2018-12-19 23:26:52 390
原创 xRecyclerView的多条目+属性动画
依赖implementation 'com.jcodecraeer:xrecyclerview:1.5.9'布局<com.jcodecraeer.xrecyclerview.XRecyclerView android:id="@+id/x_recyclerview" android:layout_width="match_parent" android:lay...
2018-12-13 15:27:30 246
原创 封装Okhttp的get和post的方法
导入Okhttp的依赖 implementation 'com.squareup.okhttp3:okhttp:3.11.0' implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'public class OkHttpUtils { private static volatile OkHttpU...
2018-12-13 15:12:06 287
原创 依赖
OkHttp的依赖implementation 'com.squareup.okhttp3:okhttp:3.11.0'implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'Glide的依赖I(请求网络图片)implementation 'com.github.bumptech.glide:glide:4.8.0'...
2018-12-12 13:41:59 219 1
原创 自定义View画圆
自定义属性建attrs.xml<?xml version="1.0" encoding="utf-8"?><resources> <declare-styleable name="ballview"> <attr name="ball_size" format="integer"&
2018-12-02 20:56:18 380
原创 自定义View 流式布局(历史搜索,热门搜索)
xml布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="
2018-12-02 20:50:23 1611
原创 自定义TextView,获取随机数和随机颜色
XML中的代码中<?xml version="1.0" encoding="utf-8"?><android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.c...
2018-11-29 23:33:15 626 1
原创 自定义View设置转盘
XML中的代码&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.
2018-11-28 20:32:06 165
原创 自动登录+倒计时
activity中的代码public class MainActivity extends AppCompatActivity { private TextView textView; private Button button; private int i=5; private SharedPreferences sharedPreferences; ...
2018-11-22 14:57:29 148
原创 频道管理
build.gradle中导入依赖implementation 'com.github.andyoom:draggrid:v1.0.1'工程的build.gradle中导入依赖allprojects { repositories { google() jcenter() //上面是原来就有的 maven {url &amp;quot;h...
2018-11-20 23:40:16 118
原创 使用Banner实现图片轮播
在build.gradle导入依赖implementation 'com.youth.banner:banner:1.4.10'在XML中的布局&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res
2018-11-20 15:05:59 705
原创 TabLayout+ViewPager+侧拉+数据库
侧拉的布局&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="h
2018-11-18 14:24:30 135
原创 轮播图+网络请求+PullToRefreshListView展示数据
XML布局<?xml version="1.0" encoding="utf-8"?><android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/...
2018-11-16 15:11:05 155
原创 HttpUrlConnection+AsyncTask+istView+BaseAdapter
工具栏public class Method { public static String getRequest(String parh){ String result=""; try { URL url=new URL(parh); HttpURLConnection connection= (Htt...
2018-11-05 08:27:40 106
原创 HttpClient网络请求数据获取电话号码信息
build.gradle 注入依赖,声明android { compileSdkVersion 27//声明 使用 useLibrary 'org.apache.http.legacy' defaultConfig { applicationId "bw.com.day3_3" minSdkVersion 19 tar...
2018-11-02 11:02:33 249
原创 AsyncTask网络请求数据Gson解析ListView展示
Activity中的代码 private Button button; private ListView listView; private MyBase myBase; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInsta...
2018-11-02 09:47:40 223
原创 AsyncTask网络请求获取电话号码信息
private EditText editText;private Button button;private TextView textView;@Overrideprotected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R...
2018-11-01 21:01:01 153
原创 网络请求GET方式 ListView展示数据
标题ListView展示数据private Button button;private ListView listView;private MyBase myBase;private final int UPDATE_UI=1;private Handler handler=new Handler(){ @Override public void handleMessag...
2018-11-01 14:58:46 198
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人