自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 分类

主xml          activity_sort<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" andr...

2018-07-29 20:46:33 136

原创 购物车

cart主页面      activity_cart<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" andr...

2018-07-29 20:11:50 283

原创 京东首页

Fragment+viewpage actvity_main<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com...

2018-07-29 19:46:05 468

原创 Rxjava+mvp+retrofit 样本

m层public class HomeModel { //轮播图 public Observable<AdBean> carousel() { return RetrofitManager.getDefaule().create(JingDongApi.class).adByGet(); }}p层public class Hom...

2018-07-19 14:55:51 181

原创 TabLayout+ViewPager

添加依赖主布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:orientation="v

2018-07-19 14:33:17 166

原创 Fragment+ViewPage+fresco+GreenDao+RecyclerView 展示数据

先添加依赖//fresco 依赖 implementation 'com.facebook.fresco:fresco:1.9.0' //recyclerView的依赖 compile 'com.android.support:recyclerview-v7:26+' //xRecyclerView的依赖 compile 'com.jcodecraeer:xrecyclerview...

2018-07-08 21:46:38 292

原创 仿京东购物车

添加依赖//加载 图片用的包 implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'//Gson implementation 'com.google.code.gson:gson:2.6.2' // OkHttp implementation 'com.sq...

2018-07-01 17:19:44 138

原创 输入框+流失布局

布局<?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:/

2018-06-30 15:46:27 167

原创 仿京东分类

加依赖//加载 图片用的包 implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'//Gson implementation 'com.google.code.gson:gson:2.6.2' // OkHttp implementation 'com.sq...

2018-06-30 10:48:44 121

原创 RecyclerView多条目加载 下拉刷新 上拉加载

先 添加依赖//加载 图片用的包implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'//Gsonimplementation 'com.google.code.gson:gson:2.6.2'//xRecyclerView的依赖implementation 'com.jcodec...

2018-06-27 20:42:50 171

原创 RecyclerView+OkHttp+多条目加载

倒依赖 //加载 图片用的包 implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'//Gson implementation 'com.google.code.gson:gson:2.6.2' //recyclerView的依赖 compile 'com...

2018-06-23 10:33:30 194

原创 RecyclerView +Mvp +OkHttp

1.   在MVp包下的  Model包下  创建 MainModel 类     Model主要用于联网请求数据2.  在MVp包下的 View包下 创建MainView 类3.   在MVP包下的Presenter包下 创建 MainPresenter 类4.   在在MVp包下的 View包下创建activity包,然后在包下创建 MainActivity5.  创建包名为Base,下面一共...

2018-06-21 19:17:57 120

原创 Mvp实现注册功能

实现步骤:1. 实现分包功能 2.实现Bean类3.在MVP包下的 model包下,创建RegModel类(用于联网请求数据)4.在MVP包下的 View包下,创建LoginView类5.在MVP包下的 View包下 创建activity包,里面书写RegActivity6.在MVP包下创建presenter包,创建RegPresenter类7.创建包base,里面分为三个类,分别是BaseAct...

2018-06-16 09:16:55 208

原创 Mvp实现登录

实现步骤:1.   在MVp包下的  Model包下  创建 LoginModel 类     Model主要用于联网请求数据2.  在MVp包下的 View包下 创建MyLoginView 类3.   在MVP包下的Presenter包下 创建 LoginPresenter 类4.   在在MVp包下的 View包下创建activity包,然后在包下创建 LoginActivity(里面包含友盟...

2018-06-16 09:12:53 246

原创 扫二维码

<?xml version="1.0" encoding="utf-8"?><ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent&

2018-06-12 07:57:30 135

原创 球球

public class MyView extends View {    private int weight;    private int height;    private Paint mPaint;    private int speedX = 50,speedY = 20;    private int x = 200, y = 200;    public MyView(Cont...

2018-06-10 20:41:38 255

原创 FlowLayuot加上按钮

主xml<?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="h

2018-06-09 15:46:24 187

原创 轮播图的适配器

/** * 轮播图的适配器 * */public class MyAdapter extends PagerAdapter {    private List<ImageView> list;    public MyAdapter(List<ImageView> list) {        this.list = list;    }    @Override    p...

2018-05-27 19:31:41 142

原创 Goods

主xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="match_parent"    android:layout_height="match_pare

2018-05-27 19:21:24 311

原创 PullToRefreshGridView

主界面<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="match_parent"    android:layout_height="match_paren

2018-05-27 19:10:32 152

原创 首页里面的AndroidFragment

主布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="match_parent"    android:layout_height="match_paren

2018-05-27 18:08:54 180

原创 首页TabLayout加Viewpager布局

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="match_parent"    android:layout_height="match_parent&a

2018-05-27 17:56:56 107

原创 侧拉和主界面布局

<?xml version="1.0" encoding="utf-8"?><android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:app="http://schemas.android.com/apk/res-auto"...

2018-05-27 17:52:41 173

原创 ViewPager 加 Gridlist 展示 界面 加xml

主xml<?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="h

2018-05-23 13:57:09 135

原创 无限自动轮播 加布局

public class MainActivity extends AppCompatActivity { private static final String TAG = "MainActivity----"; private String image1 = "http://pic.sogou.com/pics/recompic/detail.jsp?category=%E7...

2018-05-21 20:22:19 112

原创 Fragment 加Viewpage 布局加activity

public class MainActivity extends FragmentActivity { private ViewPager viewpager; private RadioGroup radio; private List<Fragment> list; private Fragment01 f1; private Fr...

2018-05-19 10:46:40 333

原创 Myapp

public class MyApp extends Application { @Override public void onCreate() { super.onCreate(); initImageLoader(); } private void initImageLoader() { //创建默认的Im...

2018-05-18 15:05:51 125

原创 Fragment MainActivity

public class MainActivity extends AppCompatActivity implements RadioGroup.OnCheckedChangeListener{ private FrameLayout main_content; private RadioGroup main_rg; private FragmentManager fm...

2018-05-18 14:44:41 120

原创 Studio utils

/** * 分类: * 1.饿汉式 * <p> * 2.懒汉式 * <p> * 1.子线程请求数据 * 2.将数据发送到主线程 * <p> * handler -- android中的一种通信机制 * 线程间的通信 * 原理: */public class HttpUtils { private static final St...

2018-05-18 14:43:26 108

原创 Studio MyAdapter 多条目加载

package com.example.day_0517;import android.content.Context;import android.support.v4.app.FragmentActivity;import android.view.View;import android.view.ViewGroup;import android.widget.BaseAdapte...

2018-05-18 14:42:22 112

原创 Fragment 代码

public class SheHuiFragment extends Fragment implements XListView.IXListViewListener{ private XListView shehui_listView; private int page=10; private MyAdapter myAdapter; private stat...

2018-05-18 14:39:01 153

原创 FrameLayout 主界面布局

<?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:

2018-05-18 14:37:16 387

空空如也

空空如也

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

TA关注的人

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