- 博客(26)
- 收藏
- 关注
转载 单元测试-----加减乘除,时间戳,随机数
1,创建一个以.Java为后缀的文件名 public class Utils { //随机数 public boolean getRandom(boolean flag){ flag=true; String str=""; Random random=new Random(); for (int i = 0; i ...
2018-06-15 08:07:19 1025
转载 Android实现视频播放
1,先加依赖implementation 'com.dou361.ijkplayer:jjdxm-ijkplayer:1.0.5'代码在主线程中实现PlayerView play;String url = "https://vip.94kuyun.com/share/PcnG4qsmeZKV1ikR";play = new PlayerView(this) .setTitle("...
2018-05-31 18:48:15 1612
转载 商品详情,购物车,订单
所有的布局文件main2activity xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_heigh
2017-12-21 10:39:48 932
转载 搜索加商品列表加排序
搜索的布局 xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layo
2017-12-20 11:35:43 1295
转载 android购物车的操作
首先布局文件 mainactivity的布局 android:layout_width="match_parent" android:layout_height="match_parent"> android:layout_above="@+id/linear_layout" android:layout_widt
2017-12-20 10:44:38 221
转载 一些帮助类:CommonUtils,,,,OkHttp3Util
CommonUtilspublic class CommonUtils { public static final String TAG = "Dash";//sp文件的xml名称 private static SharedPreferences sharedPreferences; /** * DashApplication.getAppCont
2017-12-20 10:34:14 285
转载 显示界面切换样式
使用mvp在view层中,Activitypackage com.example.week2.View;import android.os.Bundle;import android.support.v7.app.AppCompatActivity;import android.support.v7.widget.GridLayoutManager;import androi
2017-12-10 21:14:14 274
转载 登陆注册
//使用mvpview层中的activitypackage com.example.week2.View;import android.content.Intent;import android.content.SharedPreferences;import android.os.Bundle;import android.support.v7.app.AppCompatA
2017-12-10 20:55:47 802
转载 商品管理系统_增删改查过滤
商品管理系统 table tr{ border: 1px solid; } body{ width: 800px; margin: 0 auto;
2017-11-22 20:28:39 2180
转载 使用angularjs 添加,查询,删除操作
select{ width: 100px; } tr{ background-color: white; text-align: center; }
2017-11-19 20:13:08 252
转载 省市二级联动
$(function() { var shengfen = [["邯郸", "仓州"], ["安阳", "洛阳"]]; //给省份选项改变的事件 $("#pro").change(function() { //清空上次
2017-11-12 18:59:50 267
转载 jQuery的验证格式,(用户名,密码,邮箱)
$("#name").blur(function(){ var name = $(this).val(); if(name == null || name == ""){ $("#span1").text("用户名不能为空");
2017-11-12 18:43:59 2660
转载 使用hander让图片发生改变
布局文件: xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> android:id="@+id/image_view"
2017-10-25 10:32:59 195
转载 倒计时,n秒后跳转
activity中的代码package yaozhipu.bwei.com.month2;import android.content.Intent;import android.os.Handler;import android.os.Message;import android.support.v7.app.AppCompatActivity;import android.
2017-10-24 20:24:01 223
转载 login界面,判断是否是最后一个图片,如果不是则隐藏,是则显示
布局文件: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=
2017-10-24 20:18:42 361
转载 xlistview的使用(上拉下拉)
需要导入XListView-Android-master.zip压缩包中的需要用到类,布局文件以及drawable中的图片,还有values中的strings文件中的四个带汉字的四行代码XListView-Android-master.zip:这个放在项目实战——》代码——》09——》ziliao中布局文件: xmlns:tools="http://schemas.and
2017-10-24 20:04:07 229
转载 基本的布局文件
侧滑与主界面的布局:xml version="1.0" encoding="utf-8"?>android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
2017-10-24 19:53:10 198
转载 怎么解析json数据(数组类型的)
Gson gson = new Gson();Type type = new TypeTokenList>() {}.getType();List listData = gson.fromJson(json, type);
2017-10-24 19:31:11 1575
转载 PullToRefreshGridView的使用
1》布局文件 android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> 比如ptrDrawable第一个是指定刷新时显示的图片,ptrAnimationStyle第二个是指定刷新的图片
2017-10-22 17:03:51 522
转载 轮播图,并且在轮播图下用listview显示,填充listView让他全屏显示,可以使用PullToRefreshScrollView上下刷新,加载
获取网络图片然后进行无线轮播1》设置布局文件;2》在activity中写Java代码3》在轮播图下是是listView显示,4》新建一个listview然后继承listView------------------------------------------布局文件------------------------- android:layout_width=
2017-10-22 16:25:18 306
转载 封装工具类,判断是否连接网络,请求数据
写好一个工具类,可以节省很大的时间,也避免了相同代码太多的情况、、、、、、、、、、、工具类代码;1》先创建一个工具类,里面装请求网络的代码2》在创建一个工具类,里面装是否连接网络,请求数据;如果不同意,去设置中设置3》解析json数据,封装成一个工具类;4》使用接口回调的方式;-------------------------------------------
2017-10-22 15:42:34 270
转载 PullToRefreshListView的使用
PullToRefresh是很多项目都使用的刷新加载框架,大多数情况下我们不需要对源码做任何调整,它提供的强大配置功能就足以满足我们的需求,而且框架已经相当稳定,正因如此受到大家的欢迎!PullToRefresh需要和module进行绑定,步骤如下:pullToRefresh的导入首先,点击new按钮 -> import Module然后在 New Modu
2017-10-19 18:33:40 3026
转载 Image-Loader详解 ,使用
布局:1:先创建一个listView的控件xml version="1.0" encoding="utf-8"?>xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_pare
2017-10-19 14:29:28 380
转载 如何使用侧滑DrawerLayout
使用侧滑布局文件如下:xml version="1.0" encoding="utf-8"?>xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer_layout"
2017-10-19 14:11:15 164
转载 TabLayout(结合viewpager进行联动,平移)的使用
//TabLayout的使用,外加三个fragment的联动、、布局如下 xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="vertical" and
2017-10-19 09:24:59 252
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人