自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

原创 Fragment遇到的坑

1.多层fragment嵌套 拿到事务的管理者把FragmentManager fragmentManager = getFragmentManager();改为FragmentManager fragmentManager = getChildFragmentManager();2.fragment getHandler()在FragmentStatePagerAdapt

2017-11-09 11:08:45 570

转载 Kotlin简单实用方法既使用Kotlin优雅的开发Android应用

2017谷歌I/O全球开发者大会,于2017年5月17日至19日在美国加州山景城海岸线圆形剧场(Shoreline Amphitheatre)举行。谷歌在本次大会上充分介绍了人工智能在各个领域的应用,还推出iOS版语音助手、Android O最新版本和VR眼镜系列,最主要的一项就是在这次Google  I/O大会上,提出将Kotlin编程语言作为Android开发一级语言,这门语言在2010年

2017-06-28 11:53:45 248

原创 Volley网络请求

Volley简介我们平时在开发Android应用的时候不可避免地都需要用到网络技术,而多数情况下应用程序都会使用HTTP协议来发送和接收网络数据。Android系统中主要提供了两种方式来进行HTTP通信,HttpURLConnection和HttpClient,几乎在任何项目的代码中我们都能看到这两个类的身影,使用率非常高。不过HttpURLConnection和H

2017-05-03 19:03:33 178

原创 RecyclerView的简单使用

RecyclerView是谷歌V7包下新增的控件,用来替代ListView的使用,在RecyclerView标准化了ViewHolder类似于ListView中convertView用来做视图缓.1.添加依赖compile 'com.android.support:recyclerview-v7:23.4.0'2.RecyclerView的适配器 自己设置Adapter,Vie

2017-05-03 15:56:37 222

原创 Zxing二维码的生成与扫描,调起相册

集成二维码1.添加依赖或libs中添加jar包compile 'cn.yipianfengye.android:zxing-library:2.1'2.在Application中初始化@Override public void onCreate() { super.onCreate(); ZXingLibrary.initDis

2017-05-03 14:08:07 2600

原创 XUtils3.0的简单使用

xutils3.0:目前比较完善的开源框架,3.0增加新功能的同时又提高了框架的性能 简单来说:支持超大文件(超过2G)上传,更全面的http请求协议的支持,拥有更灵活的ORM(对象关系映射) 主要包含:注解模块,网络模块,图片模块,数据库模块用法:1.导入依赖 compile 'org.xutils:xutils:3.3.36'2.清单文件配置权限3.在

2017-03-31 14:22:58 271

原创 设置条目字体大小

1.Application中配置public class MyApp extends Application {public static intinfo=1;//默认的字体的状态public static Contextcontext;@Overridepublic void onCreate() { super.onCreate(); co

2017-03-31 14:01:57 334

原创 日夜间模式的切换

1.values文件夹下属性的配置android:background="?attr/mainBackground"--colors.xml #3F51B5 #303F9F #FF4081 #3b3b3b #383838 #a72b55--mainBackground.xml --style

2017-03-31 13:33:35 304

原创 系统Back键再按一次退出程序

private long exitTime = 0;@Overridepublic boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN){

2017-03-31 13:25:09 213

转载 调用系统相机相册上传头像

import java.io.File;import android.app.Activity;import android.app.AlertDialog;import android.content.DialogInterface;import android.content.Intent;import android.graphics.Bitmap;impor

2017-03-22 19:03:32 1447

原创 ListView嵌套GridView

//ListView的适配器getView();ImageLoader.getInstance().displayImage(list.get(position).getUser().getAvatar_url(), holder.image_title);holder.text_name.setText(list.get(position).getUser().getNickname

2017-03-05 19:39:29 265

原创 网络连接状态,wifi,流量

//网络是否连接//权限public boolean isNetWorkAvailable(Context context){    //网络连接管理器    ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVIT

2017-03-05 19:24:56 180

原创 ListView 多条目加载

private class MyAdapter extends BaseAdapter {    final int type0 = 0;    final int type1 = 1;    @Override    public int getCount() {        return list_data.size();    }

2017-03-05 19:14:25 210

原创 判断网络连接

boolean bo = ConnStream.ConnStream(NextActivity.this);if(!bo){    final AlertDialog.Builder builder = new AlertDialog.Builder(NextActivity.this);    builder.setTitle("是否通过移动数据访问?");    builder

2017-03-04 11:55:12 137

原创 ImageLoader三级缓存和清除缓存

public class ImageLoaderPicture {    private DisplayImageOptions options;    public ImageLoaderPicture(Context context) {        ImageLoaderConfiguration config = new ImageLoaderConfigur

2017-03-04 11:54:03 348

空空如也

空空如也

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

TA关注的人

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