Last active
May 13, 2018 12:36
-
-
Save ashishkudale/333f7628dbf44ae8724e8b962b32fa53 to your computer and use it in GitHub Desktop.
implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HomeActivity extends AppCompatActivity { | |
private RecyclerView rvSubject; | |
private SubjectAdapter subjectAdapter; | |
private ArrayList<Subject> subjects; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
initComponents(); | |
subjects = prepareData(); | |
subjectAdapter = new SubjectAdapter(subjects, HomeActivity.this); | |
LinearLayoutManager manager = new LinearLayoutManager(HomeActivity.this); | |
rvSubject.setLayoutManager(manager); | |
rvSubject.setAdapter(subjectAdapter); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment