自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Android权限

常用权限常用依赖butterknifecompile ‘com.jakewharton:butterknife:8.8.1’ annotationProcessor ‘com.jakewharton:butterknife-compiler:8.8.1’imageloadercompile ‘com.nostra13.universalimageloader

2017-09-05 15:58:46 202

原创 EventBus使用

//导入依赖compile 'org.greenrobot:eventbus:3.1.1' 在接受的方法里注册和反注册 //注册EventBus EventBus.getDefault().register(this); onDestory方法里反注册 EventBus.getDefault().unr

2017-12-21 10:07:51 240

原创 getSharedPreferences简单实用

SharedPreferences user = getSharedPreferences("User", MODE_PRIVATE); int anInt = user.getInt("selectcolor", 0); if (anInt != 0) { rlBackground.setBackgroundColor(anInt);

2017-12-21 09:58:15 323

原创 动画设置

//位移动画public void trans(View view){ //使用代码创建位移的动画....Translate位移 TranslateAnimation translateAnimation = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIV

2017-12-19 20:51:13 250

原创 简单的Fragment与Fragment传值

//主布局文件<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="

2017-12-19 20:47:02 1336

原创 播放视频的3种方式

//布局文件 <VideoView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/videoView"/>//MainActivity本地视频public class MainActivity

2017-12-19 20:37:46 964

原创 shape简单绘制圆形背景

//在drawable下创建文件.xml<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" android:useLevel="false"> <size android:width="200dp" an

2017-12-19 20:32:30 1737

原创 TabLayout+ViewPager实现tab和页面联动效果

//导入依赖(要与compile 'com.android.support:appcompat-v7:26.+'对应)compile 'com.android.support:design:26.+'//布局依赖xmlns:app="http://schemas.android.com/apk/res-auto"//布局文件<LinearLayout xmlns:andr

2017-12-19 20:24:34 539

原创 CarView简单实用

//依赖 compile 'com.android.support:cardview-v7:26.+'//布局依赖 xmlns:card_view="http://schemas.android.com/apk/res-auto"//布局<android.support.v7.widget.CardView android:id="@+id/cv_list"

2017-12-19 20:10:18 1109

原创 fresco图片加载

//依赖compile 'com.facebook.fresco:fresco:0.12.0'//布局文件 <com.facebook.drawee.view.SimpleDraweeView android:id="@+id/image" android:layout_width="match_parent"

2017-12-19 20:04:42 125

原创 BottomTabBar

//依赖 compile 'com.hjm:BottomTabBar:1.1.1'//布局文件 <com.hjm.bottomtabbar.BottomTabBar android:id="@+id/bottom_tab_bar" android:layout_width="match_parent" andro

2017-12-19 19:59:44 182

原创 MVp封装RxJava+Retrofit

封装RxJava+Retrofit导入依赖compile 'io.reactivex.rxjava2:rxjava:2.1.1'compile 'io.reactivex.rxjava2:rxandroid:2.0.1'compile 'com.squareup.retrofit2:retrofit:2.3.0'compile 'com.squareup.retrofit2:conv

2017-12-19 19:45:30 138

原创 点击按钮删除购物车数据(弹框AlertDialog)

btnRome.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { boolean flag = false; for (int i = 0; i < lists.

2017-12-16 09:27:21 1170

原创 Rxjava实现eventbus效果

//导入依赖compile 'io.reactivex:rxandroid:1.1.0'compile 'io.reactivex:rxjava:1.1.2'compile'com.trello:rxlifecycle:0.3.0'compile'com.trello:rxlifecycle-components:0.3.0'//RXBus工具类public class

2017-12-06 15:59:51 293

原创 RxJava+Retrofit结合使用(小案例)

//导入我们所使用的依赖//rxjavacompile 'io.reactivex::x.y.z'compile 'io.reactivex:rxandroid:1.0.1//retrofit2compile 'com.squareup.retrofit2:retrofit:2.0.2'compile 'com.squareup.retrofit2:converter-gso

2017-12-06 14:32:12 178

原创 根据网络判断进行数据请求展示

导入Fresco,EventBus,GreenDao,Butterknife,Retrofit等的依赖bean类public class Bean { private boolean error; private T results; public Bean(boolean error, T results) { this.error = er

2017-12-02 15:01:08 180

原创 实现数据库功能(GreenDao+butterknife)

第一步:在根目录的project里加入标记红色的依赖buildscript { repositories { jcenter() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' classpat

2017-11-30 20:17:16 180

原创 购物车(map,一级列表,view绘制加减号)

//权限  //依赖 compile 'com.squareup.okhttp3:okhttp:3.9.0'    compile 'com.google.code.gson:gson:2.8.2'    compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'    compile 'com.github.

2017-11-23 09:36:29 294

原创 模仿京东购物车(二级列表,mvp请求数据)

//加入依赖compile 'com.squareup.okhttp3:okhttp:3.9.0'compile 'com.google.code.gson:gson:2.8.2'compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'compile 'com.github.bumptech.glide:glide:3.7

2017-11-22 09:24:31 625

原创 简单的网络请求拦截器

public class Logger implements Interceptor{      @Override      public Response intercept(Chain chain) throws IOException {          Request original = chain.request();          HttpUrl url=original.u

2017-11-21 13:42:35 805

原创 RecyclerView的上拉加载下拉刷新-xRecyclerView

//依赖compile 'com.jcodecraeer:xrecyclerview:1.2.0' //布局"1.0" encoding="utf-8"?>      xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android

2017-11-12 19:17:29 246

原创 oKhttp第三方登录

//MainActivity public class MainActivity extends AppCompatActivity implements View.OnClickListener, IView { private static final String TAG = "MainActivity"; private EditText etName; private

2017-11-08 14:36:09 445

原创 OKhttp的get请求和post请求

public class MainActivity extends AppCompatActivity implements View.OnClickListener {    private static final String TAG = "MainActivity";    private static final int RESPONSE_FLAG = 0x123;

2017-11-08 08:57:48 179

原创 自定义view之ViewGroup绘制阶梯型布局

//主布局什么都不用做//继承类 public class ViewGroupView extends ViewGroup{ public ViewGroupView(Context context) { this(context,null); } public ViewGroupView(Context context, AttributeS

2017-11-05 19:51:55 391

原创 自定义view之环形进度条加数字

//主页面public class MainActivity extends AppCompatActivity {    private Button btnAdd;    private ProgressView pv;    private static final int FLAG = 0x123;    private Handler handler = ne

2017-11-05 19:36:30 125

原创 扫描二维码

//主页面public class MainActivity extends AppCompatActivity { int REQUEST_CODE; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

2017-11-05 19:30:42 127

原创 组合view之接口传递

//主页面public class MainActivity extends AppCompatActivity { private AddDeleteView adv; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanc

2017-11-05 19:27:06 141

原创 angular用户列表信息

html>html ng-app="OrderApp">head> meta charset="UTF-8"> title>订单管理title> script type="text/javascript" src="jquery.1.12.4.js">script> script type="text/javascript" src="angular-1.3.0

2017-10-25 15:18:11 189

原创 angularjs-多种查询方法-月份查询

html代码:select class="choose_time_begin_month" ng-model="filter_begin_month"> option value="">开始月份option>option value="1">01option> option value="2">02option>option value="3">03option>opt

2017-10-25 13:10:36 605

原创 angularjs(排序)+css样式

用户管理            * {            font-size: 14px;            margin: 0;            padding: 0;        }        body {            padding: 16px 32px;        }        .search {  

2017-10-25 08:32:50 128

原创 angular-全部删除

$scope.delete1=function ($index) { if($scope.data.length>=0){ $scope.data.splice($index); }};//html代码button ng-click="delete1($index)" onclck="myfuntion()">全部删除button>

2017-10-23 08:20:55 997

原创 angular-年龄查询

$scope.ageTest = function (age, ageSize) { if (ageSize != "--请选择--") { var agess = ageSize.split("-"); var ageMin = agess[0]; var ageMax = agess[1]; if (age ageMin

2017-10-23 08:18:13 323

原创 angularjs-查询.删除,添加数据,修改密码

用户管理            var example_data = [            {                id: 1,                name: "曹操",                password: "123456",                age: 45,                sex: "男" 

2017-10-23 08:01:02 230

原创 路由侧边栏

侧边栏                    var app = angular.module("myApp", ["ionic"]);        app.controller("myCtrl", function ($scope, $ionicSideMenuDelegate) {            $scope.toggleLeft = function (

2017-10-20 15:15:46 188

原创 路由案例

http://localhost:63342/WebstormProjects/BShop/index.html?_ijt=e87emc5u7frg60oq1u8rv303ol#/home

2017-10-20 14:11:58 276

原创 路由-标签切换格式2

(主文件)                        书店            var BShop = angular.module("BShop", ["ionic"]);        BShop.config(function ($stateProvider, $urlRouterProvider) {            $s

2017-10-20 10:56:56 139

原创 路由-标签切换格式1

路由-标签切换            var app = angular.module("myApp", ["ionic"]);        app.config(function ($stateProvider, $urlRouterProvider) {            $stateProvider.state("home", {

2017-10-20 10:49:58 149

原创 angular删除数据+数量计算+价钱计算

Title                var myapp=angular.module("myapp",[]);        var data=[            {                done:false,                name:"小米",                price:666,              

2017-10-19 19:34:24 269

原创 angular删除数据+模糊查询,排序

var app=angular.module("myApp",[]);        app.controller("myCtrl",function ($scope) {             $scope.col="bh";             $scope.desc=0;             $scope.shuzu=[                 {

2017-10-19 19:30:27 279

原创 ajax通过网络获取数据

$.ajax({            type: "GET",            url: "https://free-api.heweather.com/v5/weather?city=beijing&key=545d63e185fc48169a43cbabba6e74d2",            dataType: "json",            success:

2017-10-18 08:37:53 536

空空如也

空空如也

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

TA关注的人

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