- 博客(47)
- 收藏
- 关注
原创 梯形+动画+ok请求数据+数据库缓存+
okhttp依赖:implementation 'com.squareup.okhttp3:okhttp:3.10.0'RecyclerView依赖:compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'activity_main:<?xml version="1.0" encoding="utf-8"?><Rel...
2018-05-31 20:44:16
256
转载 recycle(布局方式)
package com.example.com.rikao522;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;import android.support.v7.widget.DefaultItemAnimator;import android.support.v7.widget.Gri...
2018-05-28 08:08:46
516
原创 动画
package com.example.com.mydonghua;import android.animation.Animator;import android.animation.AnimatorInflater;import android.animation.AnimatorSet;import android.animation.ObjectAnimator;import ...
2018-05-28 08:04:03
243
转载 OKHttp二次封装请求数据加RecycycleView展示
依赖:Okhttp依赖:implementation 'com.squareup.okhttp3:okhttp:3.10.0'RecyclerView依赖:compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'activity_main中:<?xml version="1.0" encoding="utf-8"?><...
2018-05-27 20:59:11
222
转载 RecycleView简单的展示(线性,网格,瀑布,添加,删除)
activity_main<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:...
2018-05-24 09:23:16
247
转载 自定义控件(上方加减按钮,下方梯形布局,点加梯形累加,点键相反)
acticity>main中<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
2018-05-15 19:17:15
393
转载 Android按钮控制加减,,(购物车中的加减器)
<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="htt
2018-05-15 09:35:04
650
转载 流失布局
布局:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="ht
2018-05-14 08:04:21
161
转载 Android实现跟随手指移动的小球
自定义view;public class DrawView extends View { public float currentX = 50; public float currentY = 50; public DrawView(Context context) { super(context); } public void onDraw(Canvas canvas){ ...
2018-05-11 08:45:09
427
转载 自定义List View
@Overrideprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int i = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); super.onMeasure(widthM...
2018-05-03 20:46:10
266
转载 引导页面,图片轮播小圆点,抽屉布局中数据请求后点击跳转的抽屉的布局
引导页:activity_main中布局:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" ...
2018-05-03 20:40:59
306
原创 倒计时跳转加PullToRefreshScrollView上下拉刷新加载,上方图片轮播
布局activity_main中:<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" ...
2018-04-26 17:17:12
226
原创 自动轮播
package com.example.com.lianxi226;import android.graphics.Bitmap;import android.os.Handler;import android.os.Message;import android.support.v4.view.PagerAdapter;import android.support.v4.view.ViewPage...
2018-04-24 10:36:53
187
转载 根据条目的奇偶来判断显示的条目类型
package zhanghaijiao.bawei.com.async_getpic;import android.content.Context;import android.graphics.Bitmap;import android.graphics.BitmapFactory;import android.os.AsyncTask;import android.view.View;imp...
2018-04-19 09:18:07
226
转载 MVP
MVP编辑词条mvp的全称为Model-View-Presenter,Model提供数据,View负责显示,Controller/Presenter负责逻辑的处理。MVP与MVC有着一个重大的区别:在MVP中View并不直接使用Model,它们之间的通信是通过Presenter (MVC中的Controller)来进行的,所有的交互都发生在Presenter内部,而在MVC中View会直接从Mod...
2018-04-16 20:21:13
282
原创 遇到最外层带有数组的特殊json串,如何解析。
下面,是特殊的json串:[ { "img3": "http://img01.taobaocdn.com/imgextra/i1/TB1Bq9kGXXXXXaJXpXXXXXXXXXX_!!0-item_pic.jpg_230x230.jpg", "name": "软毛清洁牙刷12支", "price": 38, "tg_price&qu
2018-04-14 11:49:09
397
原创 获取用户信息之后跳转,第二个页面请求数据
Activity_main<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns...
2018-04-13 20:04:32
1219
原创 请求数据《上方图片轮播,,下方PullToRefreshGridView》
activity_main布局控件为:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" ...
2018-04-13 14:59:48
173
原创 面试真题
1) 简述一下Handler机制原理?Handler先进先出原则。Looper类用来管理特定线程内对象之间的消息交1)Looper: 一个线程可以产生一个Looper对象,由它来管理此线程里的MessageQueue(消息队列)。 2)Handler: 你可以构造Handler对象来与Looper沟通,以便push新消息到MessageQueue里;或者接收Looper从Message Queue...
2018-04-10 15:49:32
161
转载 Activity生命周期
onCreate:与onDestroy配对,表示Activity正在被创建,这是生命周期的第一个方法。在这个方法中可以做一些初始化的工作(加载布局资源、初始化Activity所需要的数据等),耗时的工作在异步线程上完成。onRestart:表示Activity正在重新启动。一般情况下,在当前Activity从不可见重新变为可见的状态时onRestart就会被调用。这种情形一般是由于用户的行为所导致...
2018-04-09 14:26:00
243
原创 表格增删改差,批量,排序,模糊,修,清空,添加,总价,全选,二级
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script src="js/jquery-3.2.1.min.js" type="text/javascript" char
2018-04-04 16:18:29
167
转载 表格《添加数据,增删改查,批量删除,计算总价,清空购物车,全选,模糊查询》
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script src="js/jquery-3.2.1.min.js" type="text/javascript" char
2018-04-03 11:59:32
488
原创 解析,网络判断,上下拉加载及数据库缓存
布局文件需要导依赖:pulltorefresh布局为:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-au...
2018-04-02 10:51:10
306
原创 隔行换色
<style> body{padding:0;margin:0;font:normal 12px/24px "\5FAE\8F6F\96C5\9ED1";color:#444;}table{width:500px;border:0;margin:100px auto 0;text-align:center;border-collapse:collapse;border-spacing:...
2018-03-23 09:50:04
198
原创 登录,增删改查
<script src="js/angular.min.js" type="text/javascript" charset="utf-8"></script> </head> <body> <!--ng-controller="myctrl 定义一个控制器--> <div ng-a
2018-03-18 19:03:51
318
原创 非空验证
<script src="js/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script> <style type="text/css"> </style> </head> <bod
2018-03-17 11:21:40
1672
原创 html的网页和图片的动画
<style type="text/css"> body{ background-image: url(../img/timg86UVE11D.jpg); background-repeat: no-repeat; background-size: 100%; } .main{ width: 800px; height: 500px; ba...
2018-03-11 21:06:25
1819
转载 上方点评头条,每过3秒钟切换一条及下方列表解析
布局:::xml version="1.0" encoding="utf-8"?>LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://sc
2018-01-29 18:21:37
267
原创 异步请求数据加跳转传图片
xml version="1.0" encoding="utf-8"?>LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.and
2018-01-24 12:17:29
189
转载 网络请求图片
package com.example.com.wangluoqingquitupian123;import android.graphics.Bitmap;import android.graphics.BitmapFactory;import android.os.Handler;import android.os.Message;import android.support.v7
2018-01-23 13:53:39
252
转载 解析接口中的图片,并且轮播
控件中:xml version="1.0" encoding="utf-8"?>RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://s
2018-01-16 11:16:19
1114
1
原创 pulltorefresh_demo上下拉刷新
布局文件:xml version="1.0" encoding="utf-8"?>android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layo
2018-01-13 15:24:25
355
原创 抽屉布局
xml version="1.0" encoding="utf-8"?> android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
2018-01-13 12:13:00
221
转载 接口回调
Mytask:package com.example.com.aa.Util;import android.os.AsyncTask;import java.io.IOException;import java.io.InputStream;import java.net.HttpURLConnection;import java.net.MalformedURLExcept
2018-01-13 10:51:58
156
转载 横向滑动
注:要有两个类,,一个是main主类,,然后一个是Fragment布局也是两个主布局控件代码是:RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:to
2018-01-09 19:49:39
285
转载 ImageLoader多条目加载
import android.media.Image;import android.os.AsyncTask;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;import android.widget.ImageView;import android.widget.ListView;im
2018-01-07 18:02:15
197
原创 Fragment实现RadioButton切换
Fragment实现RadioButton切换 main布局文件中的布局:FrameLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="9.5" android:id="@
2018-01-06 10:16:13
792
原创 上拉加载下拉刷新,ListView刷新加载
package com.example.com.shangxialashuaxin;import android.os.AsyncTask;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;import com.bawei.jane.mxlistview.view.XListView;im
2018-01-05 14:41:28
313
转载 HttpURLConnection请求网络数据的Post请求
HttpURLConnection请求网络数据的Post请求 //--------全局变量-----------//注册Url private String urlPath="http://101.200.142.201:8080/VideoPlay/regist";//----------------onCreate中---------------------------------实现
2018-01-02 13:58:54
386
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人