package etong.bottomnavigation.demo;

import android.support.v4.app.Fragment;

/**
 * Created by hwt on 2016/3/19.
 */
public class NewsstandFragment extends Fragment {
}

package etong.bottomnavigation.demo;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;


public class NewsstandFragment extends Fragment {

    private RecyclerView recycleView;


    public NewsstandFragment() {
        // Required empty public constructor
    }

    public static NewsstandFragment newInstance() {
        NewsstandFragment fragment = new NewsstandFragment();
        return fragment;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View contentView = inflater.inflate(R.layout.fragment_books, container, false);
        recycleView = (RecyclerView) contentView.findViewById(R.id.recycleView);
        recycleView.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
        recycleView.setAdapter(new BookAdapter());
        return contentView;
    }

    private class BookAdapter extends RecyclerView.Adapter<ViewHolder>{

        @Override
        public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
            return null;
        }

        @Override
        public void onBindViewHolder(ViewHolder holder, int position) {

        }

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

    private class ViewHolder extends RecyclerView.ViewHolder{

        public ViewHolder(View itemView) {
            super(itemView);
        }
    }
}

change fragment when click bottomtab