CopyPastor

Detecting plagiarism made easy.

Score: 0.8116475939750671; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2017-11-12
by Jay Patel

Original Post

Original - Posted on 2015-02-08
by Phantômaxx



            
Present in both answers; Present only in the new answer; Present only in the old answer;



1. You can use an interface to provide a click listener. I use this technique with ListViews, too. 2. No divider: Simply add in your row a View with a width of match_parent and a height of 1dp and give it a background color. 3. Simply use a StateList selector for the row background. 4. addHeaderView can be avoided in ListViews, too: simply put the Header outside the View.
So, if efficiency is your concern, then yes, it's a good idea to replace a ListView with a RecyclerView.
**1** You can use an interface to provide a click listener. I use this technique with ListViews, too. **2** No divider: Simply add in your row a View with a width of **match_parent** and a height of **1dp** and give it a **background color**. **3** Simply use a StateList selector for the row background. **4** addHeaderView can be avoided in ListViews, too: simply put the Header **outside** the View.
So, if efficiency is your concern, then **yes**, it's a good idea to replace a ListView with a RecyclerView.

        
Present in both answers; Present only in the new answer; Present only in the old answer;