电商Demo商品分类

布局XMLxml version="1.0" encoding="utf-8"?>xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:or
摘要由CSDN通过智能技术生成

布局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_parent"
    android:orientation="horizontal">

    <ListView
        android:id="@+id/lv"
        android:layout_width="105dp"
        android:layout_height="match_parent"
        android:choiceMode="singleChoice"
        android:listSelector="@null"
        ></ListView>


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

//主界面

package com.example.snmsung.jddemo.fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ListView;
import com.example.snmsung.jddemo.Adapter.MyAdapter_fen;
import com.example.snmsung.jddemo.Adapter.MyAdapter_fen2;
import com.example.snmsung.jddemo.Bean.Fen_Bean;
import com.example.snmsung.jddemo.Bean.MyBean2;
import com.example.snmsung.jddemo.Presenter.Presenter_fen_you;
import com.example.snmsung.jddemo.R;
import com.example.snmsung.jddemo.View.Ibean_fen_you;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;

/**
 * Created by SNMSUNG on 2017/11/28.
 */

public class Fragment2 extends BaseFragment<Presenter_fen_you> implements Ibean_fen_you {


    Unbinder unbinder;
    Presenter_fen_you presenter;
    List<MyBean2.DataBean> fen_list;
    List<Fen_Bean.DataBean.ListBean> fen_list1;

    @BindView(R.id.lv)
    ListView lv;
    @BindView(R.id.rec_re2)
    RecyclerView recRe2;
    private int cid;


    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {


        View view = View.inflate(getActivity(), R.layout.fragment2, null);

        unbinder = ButterKnife.bind(this, view);

        presenter.showData2();

        recRe2.setLayoutManager(new LinearLayoutManager(getActivity()));

        return view;
    }




    @Override
    public void showMovie2(final List<MyBean2.DataBean> l
  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值