自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

代码界的萌新

记录遇到的功能和解决的bug

  • 博客(27)
  • 收藏
  • 关注

原创 android 可以改变四个角半径的背景图片

Github:https://github.com/pungrue26/SelectableRoundedImageView添加依赖dependencies { compile 'com.joooonho:selectableroundedimageview:1.0.1'}直接在布局中使用<com...

2017-03-30 15:49:43 1077

原创 android 侧滑删除listview

Github:https://github.com/baoyongzhang/SwipeMenuListView/添加依赖dependencies { compile 'com.baoyz.swipemenulistview:library:1.3.0'}布局<com.baoyz.swipe...

2017-03-30 15:26:59 566

原创 android Glide加载图片的基本使用

GitHub:https://github.com/bumptech/glide添加依赖repositories { mavenCentral() // jcenter() works as well because it pulls from Maven Central}dependencies { compile 'com.github.bump...

2017-03-30 14:58:22 456

原创 android 时间选择器

GitHub:https://github.com/codbking/PickTime添加依赖dependencies { compile 'com.github.codbking:PickTime:v1.0.1' }allprojects { repositories { ... maven { ...

2017-03-30 13:43:31 2154

原创 android 好用的圆角图片

GitHub :https://github.com/hdodenhof/CircleImageView添加依赖compile 'de.hdodenhof:circleimageview:2.1.0'使用方法,直接在布局中添加<de.hdodenhof.circleimageview.CircleImag...

2017-03-28 11:44:15 266

原创 android okhttp的简单使用(get,post)

添加依赖compile 'com.squareup.okhttp3:okhttp:3.6.0'Get请求private void initGetOkHttp(){ OkHttpClient client = new OkHttpClient(); Request request = new Req...

2017-03-27 16:00:10 368

转载 android ButterKnife8.5.1使用方法

跳转http://blog.csdn.net/niubitianping/article/details/54893571GitHub地址:https://github.com/JakeWharton/butterknife

2017-03-23 17:46:53 324

原创 android 横向可滑动布局

使用的是RecyclerView(其实我感觉跟listview差不多),首先构造适配器:/** * Created by th2 on 2017/3/21. * 横向和滑动适配器 */public class RecyclerViewAdapter extends RecyclerView.Adapter<RecyclerHolder> { p...

2017-03-21 14:50:25 2173

原创 android 新版支付宝遇到的问题 0D0680A8

抛出的异常是01-06 02:52:12.350: W/System.err(1903): Caused by: java.lang.RuntimeException: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag问题代码KeyFactory ke...

2017-03-20 11:27:57 574

原创 android 保留两位小数

BigDecimal bd = new BigDecimal(all + ""); bd = bd.setScale(2,BigDecimal.ROUND_HALF_UP);

2017-03-17 17:57:17 2330

原创 android dp与px之间的转换

/** * dp2px 转px */ public static int dp2px(Context context, float dpValue) { final float scale = context.getResources().getDisplayMetrics().density; return (int) ...

2017-03-16 14:58:35 707

原创 android webview加载String类型html

今天遇到解析json的时候html是String类型的,如下是解决方法: webView = (WebView) findViewById(R.id.bbs_webview); webView.getSettings().setJavaScriptEnabled(true); special_content = special_content...

2017-03-09 13:31:41 4238

原创 android 关于软键盘完成键的监听

searchEt.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { ...

2017-03-06 16:55:24 5362

原创 android 关于xutils的简单使用

首先超时设置: HttpUtils httpUtils = new HttpUtils(10000); httpUtils.configCurrentHttpCacheExpiry(1000);HttpUtils httpUtils = new HttpUtils(10000); httpUtils.configCurrentHttpCach...

2017-03-06 16:45:22 311

原创 android 圆形虚线背景

<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <!-- 填充颜色 --> <solid android...

2017-03-06 16:06:27 2481

原创 android 图片开源库Universal-Image-Loader简单使用

GitHub:https://github.com/nostra13/Android-Universal-Image-Loaderlib下载 源码都在上面,下面介绍一下最简单的使用方法创建默认参数//创建默认的ImageLoader配置参数 ImageLoaderConfiguration configuration = ImageLoader...

2017-03-02 17:07:57 400

原创 android 图片轮播

ConvenientBanner一个强大的图片轮播控件最简单的使用方法GitHub:https://github.com/saiwu-bigkoo/Android-ConvenientBanner参考:http://blog.csdn.net/xroocky/article/details/50837866gradle添加依赖compile 'com.bi...

2017-03-02 16:43:17 900

原创 android 横向可滚动的布局

本文是横向可滚动布局,基本功能已经实现。这是布局文件<HorizontalScrollView android:id="@+id/typeinfo_horscrollview" android:layout_width="fill_parent" an...

2017-03-02 16:19:38 2451

原创 android 横向可滑动的图片

忘记在哪个大神哪里淘来的代码,如有侵权请告知,谢谢。直接将下面代码放入项目/* * Copyright (C) 2014 The Android Open Source Project. * * yinglovezhuzhu@gmail.com * * Licensed under the Apache License, Version 2.0 ...

2017-03-02 16:10:17 4478 2

原创 android 仿京东上拉加载图文详情

仿京东上拉商品详情界面布局<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.a...

2017-03-02 14:23:00 1565

原创 android 圆形头像

本文的源码来自于GitHub:https://github.com/vinc3m1/RoundedImageView。不喜欢看源码的朋友可以直接将下面的代码放到项目中即可。package com.taihua.ckshop.util;/** * Created by th1 on 2016/11/4. */import android.content.Con...

2017-03-02 13:25:32 264

原创 android 无预加载的viewpager

忘记是在哪个大神看到的无预加载的viewpager,如有侵权请联系本人,谢谢。无预加载的viewpager本质上是将源码中的pricate static final int DEFAULI_OFFSCREEN_PAGES = 1的常量改为0直接放在项目中即可使用.package com.taihua.ckshop.util;import android.co...

2017-03-02 13:10:47 517

原创 android 关于滚动嵌套高度计算问题

ScrollView嵌套GridView或者ListView 的时候可能发生高度计算不准确出现界面显示不全的状况买这时候只要重写ListView 或者 GrideView中的onMeasure的方法即可。 @Override public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {

2017-03-02 13:03:40 261

原创 Android 标题栏颜色渐变

标题栏渐变重点是监听Scrollview的滚动距离,所以重写了onScrollChanged方法监听滚动距离:public class ChangeColorScrollview extends ScrollView{ public ChangeColorScrollview(Context context) { super(context); }...

2017-03-02 11:40:54 480

原创 垂直、水平滚动的TextView

源码来自于:https://github.com/Glgo/AutoVerticalScrollTextView public View makeView() { TextView textView = new TextView(mContext); textView.setLayoutParams(new LayoutParams(Layo...

2017-03-02 11:13:17 1476

原创 Android 圆环背景

圆环背景?xml version="1.0" encoding="UTF-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" android:useLevel="false" > <!-- 内部填充颜...

2017-03-02 10:56:36 1216

原创 圆角背景

记录圆角背景<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android"> <!-- 内部填充颜色 --> <solid android:color="#ffffff...

2017-03-02 10:43:36 315

genymotion android 11 支持 arm64

genymotion android 11 支持 arm64

2023-02-13

nginx mine.types配置文件

nginx 配置文件。

2023-02-13

genymotion android 9 支持 arm

genymotion android 9 支持 arm

2023-02-13

空空如也

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

TA关注的人

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