美文网首页android
Android中RecyclerView配合BaseRecycl

Android中RecyclerView配合BaseRecycl

作者: 马木木_1991 | 来源:发表于2019-04-16 16:29 被阅读212次
今天来使用BaseRecyclerViewAdapterHelper的分组布局功能

说明:

一,使用的Androidstudio版本为3.3.2

二,BaseRecyclerViewAdapterHelper地址如下,使用可折叠的分组布局功能时adapter是继承BaseMultiItemQuickAdapter,多说无意义,看如下效果图。

三,这是BaseRecyclerViewAdapterHelper的系列的第七篇文章,如有简单的不懂使用请看前面的文章。

github地址为:https://github.com/CymChad/BaseRecyclerViewAdapterHelper

展示效果:

https://img.haomeiwen.com/i14906070/c54cb7c7f5c5af83.gif?imageMogr2/auto-orient/strip

现在正式开始

1,一般分组布局的后台返回数据格式。

{
    "Result":[
        {
            "title1":"我有一只小狗1",
            "title2":"我有一只小狗2",
            "list":[
                {
                    "message1":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗1",
                    "message2":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗2"
                },
                {
                    "message1":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗1",
                    "message2":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗2"
                }
            ]
        },
        {
            "title1":"我有一只小狗1",
            "title2":"我有一只小狗2",
            "list":[
                {
                    "message1":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗1",
                    "message2":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗2"
                },
                {
                    "message1":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗1",
                    "message2":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗2"
                }
            ]
        }
    ],
    "Success":true,
    "StatusCode":200
}

1,添加依赖

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.mumu.jsrecyclerview6"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

//2,增加jitpack支持
allprojects {
    repositories {
        maven { url "https://jitpack.io" }
        maven { url "https://maven.google.com" }
        flatDir {
            dirs 'libs'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    //butterKnife
    implementation 'com.jakewharton:butterknife:8.8.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

    //2,增加recycle和对应的适配器
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.46'

    //增加下拉刷新SmartRefreshLayout的依赖
    implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-21'
    implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.0-alpha-21'//没有使用特殊Header,可以不加这行
}

3,MainActivity如下,主要是展示列表,其中有几个需要注意的点:一,在initData()方法中我伪造了后台的返回数据,这儿着重注意,被展开和被收缩的二级列表需要调用setSubItems()方法添加数据。正常的后台数据返回是不会主动添加到该列表中,所以如果接口返回的时候,需要自己遍历重新添加数据源。遍历方法如下。如果不使用该方法添加,会导致二级列表无法展开,原因是二级列表中没有数据。具体可以看源码。二,给每一个条目添加点击事件是在对应的适配器中添加,二对应条目中的子view,如我demo中的小狗0,小猫0,小小小狗0,小小小猫0都是子view,该子view需要在适配器中增加对应的点击事件,然后在activity中增加setOnItemChildClickListener方法添加点击事件。三,添加点击事件的时候需要区分是哪个条目,title条目时候为TestAdapter.TYPE_LEVEL_0,message条目的时候为TestAdapter.TYPE_LEVEL_1。在对应的条目中,分别调用我写的TODO中的方法来获取数据。可用于展示。

package com.mumu.jsrecyclerview6;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.View;
import android.widget.Toast;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.chad.library.adapter.base.listener.OnItemChildClickListener;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * @author : zlf
 * date    : 2019/4/16
 * github  : https://github.com/mamumu
 * blog    : https://www.jianshu.com/u/281e9668a5a6
 */
public class MainActivity extends AppCompatActivity {

    @BindView(R.id.rv_test)
    RecyclerView rvTest;
    @BindView(R.id.srl_test)
    SmartRefreshLayout srlTest;

    private TestAdapter mTestAdapter;
    private ArrayList<TestEntity.ResultBean> mResult = new ArrayList<>();
    private ArrayList<MultiItemEntity> mList = new ArrayList<>();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
        initData();
        initView();
    }

    private void initData() {
        for (int i = 0; i < 2; i++) {
            TestEntity.ResultBean resultBean = new TestEntity.ResultBean();
            resultBean.setTitle1("小狗" + i);
            resultBean.setTitle2("小猫" + i);
            List<TestEntity.ResultBean.ListBean> list = new ArrayList<>();
            for (int j = 0; j < 5; j++) {
                TestEntity.ResultBean.ListBean listBean = new TestEntity.ResultBean.ListBean();
                listBean.setMessage1("小小小狗" + j);
                listBean.setMessage2("小小小猫" + j);
                list.add(listBean);
            }
            resultBean.setList(list);
            resultBean.setSubItems(list);
            mResult.add(resultBean);
            mList.add(resultBean);
        }
    }

    private void initView() {
        refreshView();
        smartRefreshView();
    }

    /**
     * 刷新消息列表
     */
    private void refreshView() {
        //1,加载空布局文件,便于第五步适配器在没有数据的时候加载
        View emptyView = View.inflate(this, R.layout.empty_view, null);
        //2,设置LayoutManager,LinearLayoutManager表示竖直向下
        rvTest.setLayoutManager(new LinearLayoutManager(this));
        //3,初始化一个无数据的适配器
        mTestAdapter = new TestAdapter(null);
        //4,绑定recyclerView和适配器
        //5,动画加载,默认关闭
//        mTestAdapter.openLoadAnimation(BaseQuickAdapter.SLIDEIN_RIGHT);
        rvTest.setAdapter(mTestAdapter);
        //6,给recyclerView设置空布局
        mTestAdapter.setEmptyView(emptyView);
        //7,展开所以
//        mTestAdapter.expandAll();
        mTestAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
            @Override
            public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
                Log.d("aaa", position + "");

                switch (adapter.getItemViewType(position)) {
                    case TestAdapter.TYPE_LEVEL_0:
                        // TODO: 2019/4/16 关键代码,获取数据源(头部的)
                        TestEntity.ResultBean resultBean = (TestEntity.ResultBean) mList.get(position);
                        switch (view.getId()) {
                            case R.id.item_title1:
                                Toast.makeText(MainActivity.this, resultBean.getTitle1(),
                                        Toast.LENGTH_SHORT).show();
                                break;
                            case R.id.item_title2:
                                Toast.makeText(MainActivity.this, resultBean.getTitle2(),
                                        Toast.LENGTH_SHORT).show();
                                break;
                        }
                        break;
                    case TestAdapter.TYPE_LEVEL_1:
                        // TODO: 2019/4/16 关键代码,获取数据源(子列表的)
                        TestEntity.ResultBean.ListBean listBean = (TestEntity.ResultBean.ListBean) mList.get(position);
                        switch (view.getId()) {
                            case R.id.item_message1:
                                Toast.makeText(MainActivity.this, listBean.getMessage1(),
                                        Toast.LENGTH_SHORT).show();
                                break;
                            case R.id.item_message2:
                                Toast.makeText(MainActivity.this, listBean.getMessage2(),
                                        Toast.LENGTH_SHORT).show();
                                break;
                        }

                        break;
                }
            }
        });
    }

    /**
     * MainActivity中增加下拉刷新和上拉加载的监听方法
     */
    private void smartRefreshView() {
        srlTest.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
            @Override
            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
                //下拉刷新,一般添加调用接口获取数据的方法
                getData(2);
                //结束下拉刷新
                refreshLayout.finishRefresh();
            }

            @Override
            public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
                //上拉加载,一般添加调用接口获取更多数据的方法
                getData(3);
                //结束上拉加载,展示没有更多数据
//                refreshLayout.finishLoadMoreWithNoMoreData();
                //结束上拉加载
                refreshLayout.finishLoadMore();
            }
        });
    }

    /**
     * 获取数据的方法
     * 该方法纯属展示各种效果,实际应用时候请自己根据需求做判断即可
     *
     * @param mode 模式:1为刚开始进来加载数据 空数据 2为下拉刷新 3为上拉加载
     */
    private void getData(int mode) {
        //添加临时数据,一般直接从接口获取
        switch (mode) {
            case 1:
                break;
            case 2:
                mList.clear();
                initData();
                //更新数据
                mTestAdapter.setNewData(mList);
                break;
            case 3:
                initData();
                //更新数据
                mTestAdapter.setNewData(mList);
                break;
        }
    }
}
  • 如果后台返回的数据,则对应的遍历方法如下,
public ArrayList<MultiItemEntity> getData(List<TestEntity.ResultBean> resultBeanList) {
        ArrayList<MultiItemEntity> res = new ArrayList<>();
        for (int i = 0; i < resultBeanList.size(); i++) {
            TestEntity.ResultBean resultBean = resultBeanList.get(i);
            for (int j = 0; j < resultBean.getList().size(); j++) {
                resultBean.addSubItem(resultBean.getList().get(j));
            }
            res.add(resultBean);
        }
        return res;
    }
  • 调用方法如下,取代initDate()方法。
mList.addAll(getData(testEntity.getResult()));

4,对应的适配器的代码如下。注意点:一,extends BaseMultiItemQuickAdapter<MultiItemEntity, BaseViewHolder>为固定写法,实现方法即可。二,构造器中增加布局对应关系。三,给子view增加点击事件需要增加TODO中代码。

package com.mumu.jsrecyclerview6;

import android.support.annotation.NonNull;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Toast;

import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.chad.library.adapter.base.entity.MultiItemEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * @author : zlf
 * date    : 2019/4/16
 * github  : https://github.com/mamumu
 * blog    : https://www.jianshu.com/u/281e9668a5a6
 */
public class TestAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity, BaseViewHolder> {

    public static final int TYPE_LEVEL_0 = 0;
    public static final int TYPE_LEVEL_1 = 1;

    /**
     * Same as QuickAdapter#QuickAdapter(Context,int) but with
     * some initialization data.
     *
     * @param data A new list is created out of this one to avoid mutable list
     */
    public TestAdapter(List<MultiItemEntity> data) {
        super(data);
        addItemType(TYPE_LEVEL_0, R.layout.item_title);
        addItemType(TYPE_LEVEL_1, R.layout.item_message);
    }

    @NonNull
    @Override
    public List<MultiItemEntity> getData() {
        return super.getData();
    }

    @Override
    protected void convert(final BaseViewHolder holder, final MultiItemEntity item) {
        switch (holder.getItemViewType()) {
            case TYPE_LEVEL_0:
                final TestEntity.ResultBean resultBean = (TestEntity.ResultBean) item;
                holder.setText(R.id.item_title1, resultBean.getTitle1());
                holder.setText(R.id.item_title2, resultBean.getTitle2());
                // TODO: 2019/4/16 关键代码,添加子view的点击事件
                holder.addOnClickListener(R.id.item_title1);
                holder.addOnClickListener(R.id.item_title2);
                //添加该条目的点击事件
                holder.itemView.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        int pos = holder.getAdapterPosition();
                        if (resultBean.isExpanded()) {
                            collapse(pos, false);
                            Toast.makeText(mContext, "收起:" + resultBean.getTitle1(),
                                    Toast.LENGTH_SHORT).show();
                        } else {
                            expand(pos, false);
                            Toast.makeText(mContext, "展开:" + resultBean.getTitle1(),
                                    Toast.LENGTH_SHORT).show();
                        }
                    }
                });
                break;
            case TYPE_LEVEL_1:
                final TestEntity.ResultBean.ListBean listBean = (TestEntity.ResultBean.ListBean) item;
                holder.setText(R.id.item_message1, listBean.getMessage1());
                holder.setText(R.id.item_message2, listBean.getMessage2());
                // TODO: 2019/4/16 关键代码,添加子view的点击事件
                holder.addOnClickListener(R.id.item_message1);
                holder.addOnClickListener(R.id.item_message2);
                //添加该条目的点击事件
                holder.itemView.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        Toast.makeText(mContext, "点击了:" + listBean.getMessage1() + listBean.getMessage2(),
                                Toast.LENGTH_SHORT).show();
                    }
                });

                break;
        }
    }
}

5,对应的后台返回数据对应的实体类。注意点:一,该实体类其实返回的是两个嵌套的列表集合,外层列表集合为ResultBean,ResultBean 继承为固定写法(extends AbstractExpandableItem<ResultBean.ListBean> implements MultiItemEntity),泛型中为内层的列表集合。二,内层列表集合为ListBean,只需要实现implements MultiItemEntity即可。然后分别实现对应的方法。三,该实体类只需要GsonFormot生成,然后更改以上1,二点即可。

package com.mumu.jsrecyclerview6;

import com.chad.library.adapter.base.entity.AbstractExpandableItem;
import com.chad.library.adapter.base.entity.MultiItemEntity;

import java.io.Serializable;
import java.util.List;

/**
 * @author : zlf
 * date    : 2019/4/16
 * github  : https://github.com/mamumu
 * blog    : https://www.jianshu.com/u/281e9668a5a6
 */
public class TestEntity implements Serializable {

    /**
     * Result : [{"title1":"我有一只小狗1","title2":"我有一只小狗2","list":[{"message1":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗1","message2":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗2"},{"message1":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗1","message2":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗2"}]},{"title1":"我有一只小狗1","title2":"我有一只小狗2","list":[{"message1":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗1","message2":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗2"},{"message1":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗1","message2":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗2"}]}]
     * Success : true
     * StatusCode : 200
     */

    private boolean Success;
    private int StatusCode;
    private List<ResultBean> Result;

    public boolean isSuccess() {
        return Success;
    }

    public void setSuccess(boolean Success) {
        this.Success = Success;
    }

    public int getStatusCode() {
        return StatusCode;
    }

    public void setStatusCode(int StatusCode) {
        this.StatusCode = StatusCode;
    }

    public List<ResultBean> getResult() {
        return Result;
    }

    public void setResult(List<ResultBean> Result) {
        this.Result = Result;
    }

    public static class ResultBean extends AbstractExpandableItem<ResultBean.ListBean> implements MultiItemEntity {
        /**
         * title1 : 我有一只小狗1
         * title2 : 我有一只小狗2
         * list : [{"message1":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗1","message2":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗2"},{"message1":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗1","message2":"我有一只小狗我有一只小狗我有一只小狗我有一只小狗2"}]
         */

        private String title1;
        private String title2;
        private List<ListBean> list;

        public String getTitle1() {
            return title1;
        }

        public void setTitle1(String title1) {
            this.title1 = title1;
        }

        public String getTitle2() {
            return title2;
        }

        public void setTitle2(String title2) {
            this.title2 = title2;
        }

        public List<ListBean> getList() {
            return list;
        }

        public void setList(List<ListBean> list) {
            this.list = list;
        }

        @Override
        public int getLevel() {
            return 0;
        }

        @Override
        public int getItemType() {
            return TestAdapter.TYPE_LEVEL_0;
        }

        @Override
        public void setSubItems(List<ListBean> list) {
            super.setSubItems(list);
        }

        public static class ListBean implements MultiItemEntity {
            /**
             * message1 : 我有一只小狗我有一只小狗我有一只小狗我有一只小狗1
             * message2 : 我有一只小狗我有一只小狗我有一只小狗我有一只小狗2
             */

            private String message1;
            private String message2;

            public String getMessage1() {
                return message1;
            }

            public void setMessage1(String message1) {
                this.message1 = message1;
            }

            public String getMessage2() {
                return message2;
            }

            public void setMessage2(String message2) {
                this.message2 = message2;
            }

            @Override
            public int getItemType() {
                return TestAdapter.TYPE_LEVEL_1;
            }
        }
    }
}

6,对应的几个布局文件如下。

  • activity_main.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="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".MainActivity">

    <com.scwang.smartrefresh.layout.SmartRefreshLayout
        android:id="@+id/srl_test"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:srlEnablePreviewInEditMode="true"
        app:srlPrimaryColor="#00000000">

        <com.scwang.smartrefresh.layout.header.ClassicsHeader
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:srlAccentColor="@color/colorPrimary" />

        <android.support.v7.widget.RecyclerView
            android:id="@+id/rv_test"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

        </android.support.v7.widget.RecyclerView>

        <com.scwang.smartrefresh.layout.footer.ClassicsFooter
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:srlAccentColor="@color/colorPrimary" />

    </com.scwang.smartrefresh.layout.SmartRefreshLayout>

</LinearLayout>
  • empty_view.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/ll_bg"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#F6F7F9"
    android:gravity="center"
    android:orientation="vertical">

    <ImageView
        android:id="@+id/iv_empty"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@mipmap/ic_launcher" />

    <TextView
        android:id="@+id/tv_empty"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp"
        android:text="暂无数据"
        android:textColor="#999999"
        android:textSize="13sp" />
</LinearLayout>
  • item_title.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="50dp"
    android:background="#FFFFFF">

    <TextView
        android:id="@+id/item_title1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_marginLeft="15dp"
        android:background="#00aaff"
        android:paddingTop="10dp"
        android:paddingBottom="10dp"
        android:text="我有一只小狗1"
        android:textColor="@color/colorAccent"
        android:textSize="16sp" />

    <TextView
        android:id="@+id/item_title2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="15dp"
        android:background="#00aaff"
        android:paddingTop="10dp"
        android:paddingBottom="10dp"
        android:text="我有一只小狗2"
        android:textColor="@color/colorAccent"
        android:textSize="16sp" />

    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:layout_alignParentBottom="true"
        android:background="#000000" />
</RelativeLayout>
  • item_message.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="wrap_content"
    android:background="#6ffff6"
    android:gravity="center"
    android:orientation="vertical">

    <TextView
        android:id="@+id/item_message1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:padding="5dp"
        android:layout_marginTop="5dp"
        android:layout_marginBottom="5dp"
        android:background="#ffffff"
        android:ellipsize="end"
        android:maxLines="2"
        android:text="小小小狗"
        android:textColor="#000000"
        android:textSize="14sp" />

    <TextView
        android:id="@+id/item_message2"
        android:layout_width="wrap_content"
        android:padding="5dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dp"
        android:layout_marginBottom="5dp"
        android:background="#ffffff"
        android:ellipsize="end"
        android:maxLines="2"
        android:text="小小小猫"
        android:textColor="#000000"
        android:textSize="14sp" />

    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="#ffffff" />
</LinearLayout>

7,对应github地址

demo地址:https://github.com/mamumu/jsRecyclerView6

10,本系列第一篇文章地址,如果本文看不懂可以看第一篇,如有其它疑问请留言。

地址:https://www.jianshu.com/p/ce972355c71d

如果有发现错误欢迎指正我及时修改,如果有好的建议欢迎留言。如果觉得对你有帮助欢迎给小星星,谢谢。

相关文章

网友评论

    本文标题:Android中RecyclerView配合BaseRecycl

    本文链接:https://www.haomeiwen.com/subject/xiupwqtx.html