- 博客(21)
- 资源 (8)
- 收藏
- 关注
原创 android画了一个笑脸
1.效果图,代码很简单,有说明2.自定义布局CircleViewpackage com.example.mama.circleview;import android.content.Context;import android.graphics.Canvas;import android.graphics.Color;import android.graphics.Pai
2017-12-13 18:57:50
936
原创 Android仿支付宝订单确认和支付
1.效果图2.实现方式dialog_confirm_order.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent"
2017-12-06 19:39:41
4083
原创 android仿美团评论
1.仿美团评论布局,效果图2.listview_pingjia_item.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientatio
2017-12-01 20:13:12
1804
原创 android仿朋友圈
1.仿朋友圈布局,效果图,内容很简单,直接上代码2.activity_main.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_pa
2017-12-01 19:33:01
984
原创 使用okhttp遇到的问题,简单记录
1.okhttp联网获取数据compile 'com.squareup.okhttp3:okhttp:3.3.1'Github地址:https://github.com/square/okhttp compile 'com.zhy:okhttputils:2.6.2'Github地址:https://github.com/hongyangAndroid/okhttp
2017-11-09 19:45:33
462
原创 android闪屏界面
在此简单记录一下,工作中用的的一些东西1.思路很简单xml布局,很简单就一张默认的全局图片<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools
2017-11-02 19:01:43
529
原创 RecycleView 添加item点击事件
1.RecycleView点击事件的实现以常用的瀑布流控件pullloadmorerecyclerview 为例1.实现OnClickListener事件public class StaggeredRecycleViewAdapter extends RecyclerView.Adapter implements View.OnClickListener2.添加监听privat
2017-06-11 01:21:51
430
原创 SharedPreferences的简单使用
1.创建一个SharedPreferences使用的工具类,代码很简单/** * Created by dingkangkang on 2017/6/11. */public class SharedPreferenceUtil { private static SharedPreferences sharedPreferences; String PREFS_NAME
2017-06-11 01:03:57
255
原创 android fastjson的简单使用
1.项目添加fastjson选中项目---->右键--->open module setting 选择app依赖--->dependencies---->左下角+号 --->Library dependency 输入关键词 fastjson ----->选择自己需要的fastjson ,我选择com.aliba:fastjson2.fastjson的使
2017-05-22 23:37:17
663
原创 h5移动开发,ionic实现滑动切换
1.node.j、ionic、cordova、ant、安装见官网http://www.ionic.wang/start-index.html2.效果图3.建一个空白模板:$ ionic start myApp blank ,添加平台(以安卓为例):$ cd myApp$ionic platform add android4.代码1.配置app
2016-12-22 15:15:51
5461
1
原创 Android Studio Configuration 版本更新及代理设置
1.Android Studio 更新渠道 (Update channels)android studio有四种更新渠道Canary(金丝雀版) 带有bugs 每周更新一次 (不推荐开发)dev(开发版) 每两周或一月更新一次 bata(测试版) 可用于正式开发stable(稳定版)android studio 默认是 stable(稳定版),更改默认设置
2016-12-13 11:28:40
4266
原创 h5 消息推送 jpush-phonegap-plugin 插件的使用
1.安装jpush-phonegap-plugin插件安装命令 记得把your_jpush_appkey更换成自己的appkey,获取appkey的方法这里就不说了(官网地址:https://www.jiguang.cn/ )通过 Cordova Plugins 安装,要求 Cordova CLI 5.0+:cordova plugin add jpush-phoneg
2016-10-18 15:47:55
7532
转载 http 错误码
http 错误代码表所有 HTTP 状态代码及其定义。 代码 指示 2xx 成功 200 正常;请求已完成。 201 正常;紧接 POST 命令。 202 正常;已接受用于处理,但处理尚未完成。 203 正常;部分信息 — 返回的信息只是一部分。 204 正常;无响应 — 已接收请求,但不存在要回送的信息。 3xx 重定向
2016-09-30 15:10:09
222
原创 svn自动更导致新客户端版本不一致,资源不能同步
1.网上有许多修改版本的方法,自己感觉太麻烦没耐心搞介绍一个测试可用的方法,很简单,看截图:选中项目——>右键-------->Team------->Upgrade 搞定2.官网的解决方法https://subversion.apache.org/faq.zh.html 疑难解答------->倒数第三个
2016-06-29 16:13:48
4267
原创 图片裁剪自定义裁剪类(源码)
1.自定义裁剪类package com.example.dingkangkang.imagebg;import java.io.File;import android.app.Activity;import android.content.Context;import android.content.Intent;import android.graphics.Bitmap;i
2016-04-15 16:32:09
666
原创 自定义弹窗
效果图:1.布局文件circle_bg的设置<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_paren
2016-04-10 16:09:35
560
原创 背景图的设置
<shape xmlns:android="http://schemas.android.com/apk/res/android" > <solid android:color="@color/main_color" /> <size android:width="10dp" android:height="10dp" /
2016-04-10 13:18:23
572
原创 Toast防止多次弹出
/** * 防止Toast重复出现多次,保正全局只有一个 * Created by dingkangkang on 16/4/2. */public class ToastFactory { private static Context context=null; private static Toast toast=null; public static Toas
2016-04-02 15:47:10
534
原创 DownloadManager的简单使用
1.DownloadManager基本设置 String uri=null; String savePath=null; String appName = null; DownloadManager manager = (DownloadManager)getSystemService(Context.DOWNLOAD_SERVICE);
2016-04-01 18:14:03
333
原创 Android启动安装程序
Intent intent = new Intent(Intent.ACTION_VIEW);intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);//将Activity放入一个新的栈中intent.setDataAndType(Uri.parse("file://" + uri,"application/vnd.android.package
2016-04-01 15:44:03
485
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人