First you can create new project in Android Studio. In this you can create one more xml file and java file. Because RecyclerView Accept only RecyclerView adapter that why we create another file for REcyclerView Apter class. After that open the build,gradle(Module:app) and add the following Dependency:- compile ' com.android.support:recyclerview-v7:24.2.1' After that add the RecyclerView Tag into avtivity_main.xml file between the Layout Tag likew that :- <android.support.v7.widget.RecyclerView android :id= "@+id/recyclerView" android :layout_width= "match_parent" android :layout_height= "match_parent" /> Open the MainActivity file and declare the RecuclerView and assign the Id to the variable. Now i show you the code in MainActivity.class file following :- public class MainActivity extends AppCompatActivity { //Decl...
Comments
Post a Comment