|
@@ -100,8 +100,7 @@ class NewsFragment : Fragment() {
|
|
val cardList = createCardList() // Create your card data list here
|
|
val cardList = createCardList() // Create your card data list here
|
|
val cardAdapter = TopNewsHeaderAdapter(cardList)
|
|
val cardAdapter = TopNewsHeaderAdapter(cardList)
|
|
|
|
|
|
- recyclerView.layoutManager =
|
|
|
|
- LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false)
|
|
|
|
|
|
+ recyclerView.layoutManager = LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false)
|
|
recyclerView.adapter = cardAdapter
|
|
recyclerView.adapter = cardAdapter
|
|
}
|
|
}
|
|
|
|
|
|
@@ -116,8 +115,7 @@ class NewsFragment : Fragment() {
|
|
val cardList = createCardList() // Create your card data list here
|
|
val cardList = createCardList() // Create your card data list here
|
|
val cardAdapter = TopNewsAdapter(cardList)
|
|
val cardAdapter = TopNewsAdapter(cardList)
|
|
|
|
|
|
- recyclerView.layoutManager =
|
|
|
|
- LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
|
|
|
|
|
|
+ recyclerView.layoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
|
|
recyclerView.adapter = cardAdapter
|
|
recyclerView.adapter = cardAdapter
|
|
}
|
|
}
|
|
|
|
|
|
@@ -126,19 +124,25 @@ class NewsFragment : Fragment() {
|
|
val cardList = createCardList() // Create your card data list here
|
|
val cardList = createCardList() // Create your card data list here
|
|
val cardAdapter = HighlightNewsAdapter(cardList)
|
|
val cardAdapter = HighlightNewsAdapter(cardList)
|
|
|
|
|
|
- recyclerView.layoutManager =
|
|
|
|
- LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
|
|
|
|
|
|
+ recyclerView.layoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
|
|
recyclerView.adapter = cardAdapter
|
|
recyclerView.adapter = cardAdapter
|
|
}
|
|
}
|
|
|
|
|
|
private fun createCardList(): List<TopNewsCardItem> {
|
|
private fun createCardList(): List<TopNewsCardItem> {
|
|
// Create and return your list of CardItems
|
|
// Create and return your list of CardItems
|
|
return listOf(
|
|
return listOf(
|
|
- TopNewsCardItem(R.drawable.ic_bg_dashboard, "Date 1", "Title 1"),
|
|
|
|
- TopNewsCardItem(R.drawable.ic_bg_dashboard, "Date 2", "Title 2"),
|
|
|
|
- TopNewsCardItem(R.drawable.ic_bg_dashboard, "Date 3", "Title 3"),
|
|
|
|
- TopNewsCardItem(R.drawable.ic_bg_dashboard, "Date 4", "Title 4"),
|
|
|
|
- TopNewsCardItem(R.drawable.ic_bg_dashboard, "Date 5", "Title 5"),
|
|
|
|
|
|
+ TopNewsCardItem(
|
|
|
|
+ "https://i.ytimg.com/vi/Lh5O00zo_pc/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLCEQ100buCWUuyBKWe_96UbevbIEA",
|
|
|
|
+ "ច្បាស់ការ គូពិសេសដែលបងប្អូនរង់ចាំ",
|
|
|
|
+ "ជំនួបរវាង ដាវ លីឌុក និងព្រំសំណាងនឹងធ្វើឡើងនៅថ្ងៃអាទិត្យ ទី០៥ ខែសីហាខាងមុខនេះ...!! ជាលក្ខណៈ MAS FIGHT ១ទឹក ៩នាទីនឹងដោយវាយការរំអំបោះឆៅលក្ខណៈគុនខ្មែរ",
|
|
|
|
+ "10mn ago"
|
|
|
|
+ ),
|
|
|
|
+ TopNewsCardItem(
|
|
|
|
+ "https://i.ytimg.com/vi/Lh5O00zo_pc/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLCEQ100buCWUuyBKWe_96UbevbIEA", "ច្បាស់ការ គូពិសេសដែលបងប្អូនរង់ចាំ", "ជំនួបរវាង ដាវ លីឌុក និងព្រំសំណាងនឹងធ្វើឡើងនៅថ្ងៃអាទិត្យ ទី០៥ ខែសីហាខាងមុខនេះ...!!", "10mn ago"
|
|
|
|
+ ),
|
|
|
|
+ TopNewsCardItem(
|
|
|
|
+ "https://i.ytimg.com/vi/Lh5O00zo_pc/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLCEQ100buCWUuyBKWe_96UbevbIEA", "ច្បាស់ការ គូពិសេសដែលបងប្អូនរង់ចាំ", "ជំនួបរវាង ដាវ លីឌុក និងព្រំសំណាងនឹងធ្វើឡើងនៅថ្ងៃអាទិត្យ ទី០៥ ខែសីហាខាងមុខនេះ...!!", "10mn ago"
|
|
|
|
+ ),
|
|
// Add more card items as needed
|
|
// Add more card items as needed
|
|
)
|
|
)
|
|
}
|
|
}
|