PostVortex
1.0.0
مشروع Postvortex هو تطبيق Android يوضح استخدام RecyclerView داخل Fragment . يركز المشروع على إنشاء قائمة ديناميكية من المشاركات التي تحمل عنوان الألعاب ، بما في ذلك المحتوى المتعلق بالألعاب الشهيرة مثل League of Legends و Batman: Arkham Series و Marvel's Spider-Man. تم تصميم التطبيق ليكون بسيطًا ومعيارًا ، مما يجعل من السهل التحديث والتمديد.
RecyclerView مع LinearLayoutManager لعرض قائمة بالعناصر.RecyclerView باستخدام محول مخصص.مثال:
data class Post ( val title : String , val description : String , val imageUrl : String )Fragment للتعامل مع مكونات واجهة المستخدم وأحداث دورة الحياة.مثال:
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 لعرض قائمة من المشاركات التي تحمل عنوان الألعاب.مثال:
list_recycler_view. apply {
layoutManager = LinearLayoutManager (activity)
adapter = ListAdapter (postList)
}مثال:
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...
)مثال:
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 يعرض التطبيق قائمة بالمشاركات المتعلقة بالألعاب في RecyclerView . يتضمن كل عنصر عنوانًا ووصفًا وصورة. يتم إنشاء المحتوى ديناميكيًا بناءً على نموذج البيانات المتوفر في الكود.