自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 ViewPager轮播适配器

public class SyFragmentAdapter extends PagerAdapter {    FragmentActivity context;    List syBean;    public SyFragmentAdapter(FragmentActivity context, List syBean) {    this.context = co

2017-11-23 13:18:41 278

原创 关于Recyview的条目点击事件

事件是从Adapter中执行的,这用到接口回调然后条目设置点击事件把当前View传出去最后MainActivity通过适配器调用set方法实现接口

2017-11-23 11:01:23 429

原创 自定义拦截器GET请求POST请求

public class LoggingInterceptor implements Interceptor {  @Override public Response intercept(Chain chain) throws IOException {    //首先取到Request    Request request = chain.request();    Re

2017-11-22 19:12:38 3030

原创 购物车的逻辑代码与适配器

Bean里添加的状态            private int isFrist;   //是否选中商家            public boolean shopSelected;  //商家多选是否选中            public boolean itemSelected;   //条目多选是否选中public class MyAdapter extends

2017-11-22 14:31:16 362

原创 MVP二级购物车布局和简单逻辑

布局用到组合控件,适配器展示RecyclerViewhttp://schemas.android.com/apk/res/android"    xmlns:tools="http://schemas.android.com/tools"    android:id="@+id/activity_main"    android:layout_width="match_parent

2017-11-22 14:07:53 370

原创 Activity向Fragment中传值

activity向fragment中传值   1。要传的值  放到Bundle对象里2。通过创建传递封Fragment 将bundle对象 通过 setArguments()传递到fragment3.Fragment中 通过getArguments() 得到 bundle对象  就能得到里面的值代码:MainActivity:

2017-11-14 19:07:18 538

原创 Android利用ListView实现多种Item的复杂布局

在Android开发中,可能会遇到一个可滚动且布局比较复杂的界面,但它并不是一个纯粹的List,类似如下图:demo.png通常实现方法可以直接用一个ScrollView将所有内容包起来,里面是列表的部分在代码中用动态添加布局的方式实现;或者外层ScrollView,里面列表部分用ListView(或RecyclerView)实现,但这样需要解决滑动冲突问题(有时并不能很好解

2017-11-14 09:45:34 4273

原创 修改ActivityStudio项目名

项目名称修改了,想修改Android Studio 中 project的名字 右键project 的名字,refactor - rename ,填写好新名字后修改,被提示 “can’t rename root module” 因为Android Studio只能修改根目录内的所有文件,要改project根目录名字,只能关闭Android Studio 先在操作系

2017-11-06 19:52:17 1926

原创 自定义圆形,可根据鼠标移动,按下移动抬起事件

activity_main.xmlxml version="1.0" encoding="utf-8"?>LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layou

2017-11-06 13:16:54 378

原创 自定义弧形进度条,百分比的值在变化

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:

2017-11-06 13:15:58 431

原创 MVP入门,接口回调两种实现,new接口和implement实现,okhttpclient

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" and

2017-11-06 13:14:47 802

原创 二维码的应用,扫描二维码和生成二维码,使用回传值,导入依赖

在module的build.gradle中执行compile操作compile 'cn.yipianfengye.android:zxing-library:2.2'在demo Application中执行初始化操作@Override public void onCreate() { super.onCreate(); ZXing

2017-11-06 13:13:46 706

原创 自定义组合控件,自定义View,接口点击事件

先写自定义组合控件的布局LoginView 继承自LinearLayoutpublic class LoginViewextendsLinearLayoutimplementsView.OnClickListener{ private Context _context; public LoginView(Context context) {

2017-11-05 20:11:52 2374

原创 自定义View,按照百分比画圆

package com.bwie.d.daytext.view;import android.content.Context;import android.graphics.Canvas;import android.graphics.Color;import android.graphics.Paint;import android.graphics.Rect;i

2017-11-03 09:36:24 237

空空如也

空空如也

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

TA关注的人

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