PostVortex
1.0.0
Post -Vortex 프로젝트는 Fragment 내에서 RecyclerView 의 사용을 보여주는 Android 응용 프로그램입니다. 이 프로젝트는 League of Legends, Batman : Arkham Series 및 Marvel 's Spider-Man과 같은 인기있는 게임과 관련된 컨텐츠를 포함하여 게임 테마 게시물의 역동적 인 목록을 만드는 데 중점을 둡니다. 이 앱은 단순하고 모듈 식으로 설계되어 업데이트하고 확장 할 수 있습니다.
LinearLayoutManager 와 함께 RecyclerView 사용하여 항목 목록을 표시합니다.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 에 게임 관련 게시물 목록을 표시합니다. 각 항목에는 제목, 설명 및 이미지가 포함됩니다. 컨텐츠는 코드에 제공된 데이터 모델을 기반으로 동적으로 생성됩니다.