自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(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 186

转载 解决AndroidStudio连不上Android设备真机的问题

https://blog.csdn.net/system_err/article/details/81188234

2019-06-10 11:53:44 420

转载 git commit之后进入vim(vi)界面,如何退出

首先 使用 git commit --amend 命令(修改最近一次提交的注释信息),会进入到vim 编辑器然后 你会发现编辑器里你怎么输入都没反应,这是因为vim处在不可编辑状态,按下字母键 c(此时进入编辑状态),可以开始修改注释信息了修改好后,你会发现怎么都退出不了,然后如下操作:按下Esc (退出编辑状态); 接着连按两次大写字母Z,你会惊喜的发现,终于保存好退出来了!...

2019-05-16 14:16:33 2686 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 135

原创 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 285

原创 XBanner实现3D画廊效果

导依赖在工程的build.gradle中 allprojects { repositories { google() jcenter() maven { url 'https://jitpack.io' } } }在项目的build.gradleimplementation "com.daimajia.swipelayou...

2019-01-20 08:32:09 2474 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 323

原创 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 86

原创 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 198

原创 Retrofit+MVP网络请求框架

导依赖 // 网络请求Retrofit & OkHttp & Rxjava implementation "com.squareup.okhttp3:logging-interceptor:$rootProject.interceptor" implementation "com.squareup.retrofit2:retrofit:$rootProject.r...

2019-01-01 23:44:02 295

原创 自定义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=&quot

2018-12-21 08:53:03 121

原创 二级联动+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 381

原创 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 219

原创 封装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 262

原创 依赖

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 177 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 374

原创 自定义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=&quot

2018-12-02 20:50:23 1587

原创 自定义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 580 1

原创 自定义View设置转盘

XML中的代码<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.

2018-11-28 20:32:06 140

原创 自动登录+倒计时

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 139

原创 频道管理

build.gradle中导入依赖implementation 'com.github.andyoom:draggrid:v1.0.1'工程的build.gradle中导入依赖allprojects { repositories { google() jcenter() //上面是原来就有的 maven {url "h...

2018-11-20 23:40:16 108

原创 使用Banner实现图片轮播

在build.gradle导入依赖implementation 'com.youth.banner:banner:1.4.10'在XML中的布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res

2018-11-20 15:05:59 699

原创 TabLayout+ViewPager+侧拉+数据库

侧拉的布局<?xml version="1.0" encoding="utf-8"?><android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="h

2018-11-18 14:24:30 125

原创 轮播图+网络请求+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 149

原创 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 99

原创 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 219

原创 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 205

原创 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 146

原创 网络请求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 190

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除