Created
February 19, 2022 12:51
-
-
Save SiddyDevelops/5cc042673e484438963e85214b39629b to your computer and use it in GitHub Desktop.
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
package com.siddydevelops.instastory; | |
import androidx.appcompat.app.AppCompatActivity; | |
import androidx.recyclerview.widget.LinearLayoutManager; | |
import androidx.recyclerview.widget.RecyclerView; | |
import android.os.Bundle; | |
import com.siddydevelops.instastory.RVAdapters.StoryViewAdapter; | |
public class MainActivity extends AppCompatActivity { | |
RecyclerView storyViewRV; | |
String[] usernameList = {"Siddharth","Siddy","Mia","Nikki","Emma"}; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
storyViewRV = findViewById(R.id.storyViewRV); | |
storyViewRV.setLayoutManager(new LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL,false)); | |
storyViewRV.setAdapter(new StoryViewAdapter(usernameList)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment