PostVortex
1.0.0
Proyek Postvortex adalah aplikasi Android yang menunjukkan penggunaan RecyclerView dalam sebuah Fragment . Proyek ini berfokus pada membuat daftar dinamis posting bertema game, termasuk konten yang terkait dengan game populer seperti League of Legends, Batman: Arkham Series, dan Marvel's Spider-Man. Aplikasi ini dirancang untuk menjadi sederhana dan modular, membuatnya mudah untuk memperbarui dan memperluas.
RecyclerView dengan LinearLayoutManager untuk menampilkan daftar item.RecyclerView menggunakan adaptor khusus.Contoh:
data class Post ( val title : String , val description : String , val imageUrl : String )Fragment untuk menangani komponen UI dan acara siklus hidup.Contoh:
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 untuk menampilkan daftar posting bertema game.Contoh:
list_recycler_view. apply {
layoutManager = LinearLayoutManager (activity)
adapter = ListAdapter (postList)
}Contoh:
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...
)Contoh:
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.git Aplikasi ini menampilkan daftar posting terkait game di RecyclerView . Setiap item menyertakan judul, deskripsi, dan gambar. Konten dihasilkan secara dinamis berdasarkan model data yang disediakan dalam kode.