android京东商品分类代码,仿京东商城系列7------商品分类页面

前言

本文我们将一起实现一个仿京东商品分类页面。废话不说,上图:

5b371c0aa87b?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

商品分类.gif

内容

商品分类展示页面涉及到的技术有Okhttp , Fresco加载机制,MaterialRefreshLayout + recyclerview下拉加载控件。关于上述控件的说明在之前就已经有所说明。在此不做介绍。

关于页面的布局如下:

xmlns:app="http://schemas.android.com/apk/res-auto"

android:orientation="vertical"

android:layout_width="match_parent"

android:layout_height="match_parent">

android:id="@+id/toolBar"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:minHeight="?attr/actionBarSize"

android:minWidth="?attr/actionBarSize"

android:background="?attr/colorPrimary"

app:title="@string/tab_assort"

android:titleTextColor="@color/white"

app:isShowSearchView="false"

>

android:orientation="horizontal"

android:layout_width="match_parent"

android:layout_height="match_parent"

>

android:layout_width="@dimen/classify_layout_width"

android:layout_height="match_parent"

android:id="@+id/ass_first_recyclerview"

android:background="@color/white">

android:orientation="vertical"

android:layout_width="match_parent"

android:layout_height="match_parent"

>

android:layout_width="match_parent"

android:layout_height="@dimen/classify_Slider_height"

android:id="@+id/slidLayout">

android:layout_width="match_parent"

android:layout_height="match_parent"

android:id="@+id/materialRefreshLayout">

android:layout_width="match_parent"

android:layout_height="match_parent"

android:id="@+id/ass_show_recyclerview">

布局使用了一个slider轮播,控件,两个ReciclerView控件,其中一个被MaterialRefreshLayout包裹,具有上拉加载功能。

功能的具体实现在此不做说明,有兴趣者请看文章开头源码。