自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

翻译 各种utils类

https://github.com/Blankj/AndroidUtilCodehttps://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/README-CN.md

2017-12-07 17:16:37 1691 1

转载 Collections.sort对List排序的两种方法

原文 http://blog.csdn.net/wxx614817/article/details/50628197一、Collections.sort的简单使用说到List的排序,第一反应当然是使用Collections.sort,方便简单。下面实现一下~~ [html] view plain copy private void sortStrings() { List list

2017-12-06 14:58:07 527

原创 studio 模板

http://color-themes.com/?view=index

2017-12-06 13:56:31 193

转载 自定义View

本文摘自 http://blog.csdn.net/lfdfhl/article/details/51671038[探索Android软键盘的疑难杂症]自定义View系列教程00–推翻自己和过往,重学自定义View 自定义View系列教程01–常用工具介绍 自定义View系列教程02–onMeasure源码详尽分析 自定义View系列教程03–onLayout源码详尽分析 自定义Vi

2017-12-05 16:09:27 187

转载 启动Application喝入口Activity的生命周期方法顺序

启动Application喝入口Activity的生命周期方法顺序

2017-03-15 18:03:50 848

原创 获取系统当前时间,24小时制

Date data = new Date(); SimpleDateFormat sdformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:00");//24小时制 date = sdformat.format(data);

2016-11-08 16:03:40 4192

原创 android 版本更新的应用

在AndroidManifest.xml里定义了每个Android apk的版本标识:<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.month01" android:versionCode="1" android:versionName="1.

2016-08-31 17:56:15 380

原创 判断软键盘显示还是隐藏

InputMethodManager imm = (InputMethodManager) mActivity.getSystemService(Activity.INPUT_METHOD_SERVICE); if (imm.hideSoftInputFromWindow(holder.itemView.getWindowToken(), 0)) {

2016-08-24 15:53:54 319

原创 Android 获取assets的绝对路径

String path = “file:///android_asset/文件名”;

2016-08-22 16:30:05 944

原创 Zxing二维码

在project下 build.gradle 中dependencies { classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' }在app下 build.gradle中dependencies { compile project(':libraryzxing')}android {

2016-08-17 16:50:45 251

原创 集成百度地图找不到so库

在app build.gradle 添加sourceSets { main { jniLibs.srcDirs = ['libs'] }}

2016-08-12 15:19:09 351

原创 viewpager轮播图片设置OntounchListener

@Override public Object instantiateItem(ViewGroup container, int position) { View view = View.inflate(context, R.layout.pic_item, null); ImageView imageview=(ImageView) view.findVie

2016-07-27 15:05:32 230

原创 ViewPager无限自动轮播

Handler handler = new Handler() { @Override public void handleMessage(Message msg) { super.handleMessage(msg); int currentItem = viewpager.getCurrentItem();

2016-06-30 11:09:33 328

原创 图片转化为Base64格式

public static String bitmapToString(Bitmap bitmap) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.JPEG, 60, baos); byte[] b = b

2016-06-12 15:02:53 326

原创 数组传递

ArrayList<Like> list = fromJson.data .get(arg2).like_user_list; /*String[] st = new String[list.size()];

2016-06-02 08:25:09 289

原创 xml解析网络请求

实体类News.javapackage com.baway.test.bean;public class News { public String item; public String title; public String catalog; public String tags; public String sub1; public String

2016-06-02 08:07:07 250

原创 判断联网状态(是否有网)

获取网络信息需要在AndroidManifest.xml文件中加入相应的权限。 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 判断网络连接状态方法public boolean isNetworkConnected(Context context) { if (context !=

2016-06-01 11:59:00 648

原创 SharedPreferences导航

// 得到SharedPreferences SharedPreferences sharedPreferences = getSharedPreferences("xin", MODE_PRIVATE); // 给SharedPreferences存个值 boolean boolean1 = sharedPrefere

2016-05-31 20:35:58 254

原创 百度地图定位

需要的权限在application标签中声明service组件,每个app拥有自己单独的定位service<service android:name="com.baidu.location.f" android:enabled="true" android:process=":remote"></service>定位SDKv3.1版本之后,此权限已不需要,请取消声明,否则将由于Android 5.

2016-05-31 20:27:09 293

原创 全选、反选

XML布局activity_main.xml布局<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:l

2016-05-31 17:49:44 241

原创 自定义View(多点触控)

XML布局<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="mat

2016-05-31 17:12:42 312

原创 自定义View(单点触控)

XML布局中<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="ma

2016-05-31 17:10:18 412

原创 SlidingMenu侧滑

XML布局 activity_main.xml<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android

2016-05-30 21:54:50 252

原创 Fragment工厂模式

XML布局文件中 <android.support.v4.view.ViewPager android:id="@+id/viewPager" android:layout_width="match_parent" android:layout_height="match_parent" > </android.support.v4.view.

2016-05-27 09:41:19 665

原创 ExpandableListview二级菜单

XMLzhong <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height=

2016-05-27 09:35:12 313

原创 Fragment之间的相互替换(内有httpclient请求)

MainActivitypackage com.example.textwork2;import android.os.Bundle;import android.app.Activity;import android.support.v4.app.FragmentActivity;import android.support.v4.app.FragmentManager;import an

2016-05-27 09:27:08 584

原创 (HttpURLConnection )AsyncTask解析xml

package com.baway.test;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.io.InputStream;import java.net.HttpURLConnection;import java.net.URL;import java.util.ArrayList;i

2016-05-23 08:25:49 464

原创 xml解析

public class MainActivity extends Activity implements IXListViewListener { protected static final String tag = "MainActivity"; int pageIndex = 1; private String path; private List<News>

2016-05-16 08:06:13 204

原创 微信下拉加载

下拉刷新,post网络请求,请求成功前progress,viewholder优化,设置数据标记tag

2016-04-05 20:11:43 375

原创 打开二级列表,关闭其他二级列表

点击二级列表 并关闭其他二级列表expandableListView.setOnGroupExpandListener(new OnGroupExpandListener() { @Override public void onGroupExpand(int groupPosition) { //

2016-03-31 21:33:46 288

原创 ViewHolder优化

优化

2016-03-31 19:17:29 196

原创 健康知识_图标滑动动态添加

动态添加

2016-03-29 21:09:32 384

原创 HttpClient网络请求

httpclient

2016-03-29 17:27:50 552

原创 分页加载Demo

分页加载

2016-03-27 20:04:36 231

原创 shape圆点轮播(viewpager适配器)

ViewPager轮播shape圆点设置

2016-03-27 19:40:17 363

空空如也

空空如也

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

TA关注的人

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