pull/219/head
yangyxd 5 years ago
parent 8a5cdd223a
commit 793aeb1c6d
  1. 12
      app/src/main/java/io/legado/app/ui/rss/article/RssArticlesFragment.kt
  2. 4
      app/src/main/res/layout/item_rss_article_2.xml
  3. 1
      app/src/main/res/values/strings.xml

@ -54,12 +54,16 @@ class RssArticlesFragment : VMBaseFragment<RssArticlesViewModel>(R.layout.fragme
private fun initView() { private fun initView() {
ATH.applyEdgeEffectColor(recycler_view) ATH.applyEdgeEffectColor(recycler_view)
recycler_view.layoutManager = if (activityViewModel.isGridLayout) { if (activityViewModel.isGridLayout) {
GridLayoutManager(requireContext(), 2) recycler_view.setPadding(8,0,8,0)
recycler_view.layoutManager = GridLayoutManager(requireContext(), 2)
while (recycler_view.itemDecorationCount > 0)
recycler_view.removeItemDecorationAt(0)
} else { } else {
LinearLayoutManager(requireContext()) recycler_view.setPadding(0,0,0,0)
recycler_view.layoutManager = LinearLayoutManager(requireContext())
recycler_view.addItemDecoration(VerticalDivider(requireContext()))
} }
recycler_view.addItemDecoration(VerticalDivider(requireContext()))
adapter = RssArticlesAdapter(requireContext(), activityViewModel.layoutId, this) adapter = RssArticlesAdapter(requireContext(), activityViewModel.layoutId, this)
recycler_view.adapter = adapter recycler_view.adapter = adapter
loadMoreView = LoadMoreView(requireContext()) loadMoreView = LoadMoreView(requireContext())

@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:paddingLeft="4dp" android:paddingLeft="4dp"
android:paddingTop="8dp" android:paddingTop="6dp"
android:paddingBottom="6dp" android:paddingBottom="6dp"
android:paddingRight="4dp" android:paddingRight="4dp"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -45,7 +45,7 @@
android:textSize="11sp" android:textSize="11sp"
android:maxLines="1" android:maxLines="1"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="2dp" android:paddingBottom="4dp"
app:layout_constraintTop_toBottomOf="@+id/tv_title" app:layout_constraintTop_toBottomOf="@+id/tv_title"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"

@ -243,7 +243,6 @@
<string name="del_all">删除所有</string> <string name="del_all">删除所有</string>
<string name="searchHistory">搜索历史</string> <string name="searchHistory">搜索历史</string>
<string name="clear">清除</string> <string name="clear">清除</string>
<string name="switchLayout">切换布局</string>
<string name="showTitle">正文显示标题</string> <string name="showTitle">正文显示标题</string>
<string name="refresh_default">书源同步</string> <string name="refresh_default">书源同步</string>
<string name="no_last_chapter">无最新章节信息</string> <string name="no_last_chapter">无最新章节信息</string>

Loading…
Cancel
Save