-
Notifications
You must be signed in to change notification settings - Fork 0
/
MMMFragment.java
39 lines (31 loc) · 1.47 KB
/
MMMFragment.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package test.ojassoft.com.ys;
import android.content.Context;
import android.net.Uri;
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;
import java.util.ArrayList;
import java.util.Arrays;
public class MMMFragment extends Fragment {
ArrayList itemBBB=new ArrayList<>(Arrays.asList("Shoes-1","Shoes-2","Shoes-3","Shoes-4","shoes-5","Shoes-6"));
ArrayList<Integer> itemCCC=new ArrayList<>(Arrays.asList(R.drawable.shoe1,R.drawable.shoe2,R.drawable.shoe3,R.drawable.shoe4,R.drawable.shoe5,R.drawable.shoe6));
public MMMFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view=LayoutInflater.from(getContext()).inflate(R.layout.fragment_mmm,container,false);
RecyclerView recyclerView=(RecyclerView) view.findViewById(R.id.recyclerView);
LinearLayoutManager linearLayoutManager=new LinearLayoutManager(getContext());
recyclerView.setLayoutManager(linearLayoutManager);
CustomAdapter10 customAdapter10=new CustomAdapter10(getContext(),itemBBB,itemCCC);
recyclerView.setAdapter(customAdapter10);
return view;
}
}