PostVortex
1.0.0
The PostVortex project is an Android application that demonstrates the use of a RecyclerView within a Fragment. The project focuses on creating a dynamic list of gaming-themed posts, including content related to popular games like League of Legends, Batman: Arkham series, and Marvel's Spider-Man. The app is designed to be simple and modular, making it easy to update and extend.
RecyclerView with a LinearLayoutManager to display a list of items.RecyclerView using a custom adapter.Instance:
data class Post(val title: String, val description: String, val imageUrl: String)Fragment to handle UI components and lifecycle events.Instance:
class ListFragment : Fragment() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
retainInstance = true
}
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? = inflater.inflate(R.layout.fragment_main, container, false)
}RecyclerView to display a list of gaming-themed posts.Instance:
list_recycler_view.apply {
layoutManager = LinearLayoutManager(activity)
adapter = ListAdapter(postList)
}Instance:
private val postList = listOf(
Post(
"League of Legends - Unleashing the Power of the Nexus.",
"Join your team and destroy the enemy Nexus in this epic battle of wits and reflexes. Every decision counts in the world of Runeterra.",
"https://www.mobafire.com/images/guide/9.16/lol-nexus-destruction.jpg"
),
// More posts...
)Instance:
Post(
"The Dark Knight Rises Again.",
"Gotham's silent protector is back. Dive into the shadows with Batman as he faces off against his rogues' gallery in yet another thrilling adventure.",
"https://www.rockpapershotgun.com/images/2021/01/batman-arkham-asylum.jpg"
)git clone https://github.com/Pirate-Emperor/PostVortex.gitThe application displays a list of gaming-related posts in a RecyclerView. Each item includes a title, description, and an image. The content is dynamically generated based on the data model provided in the code.