pull/433/head
gedoor 4 years ago
parent fdedaee337
commit 70ce0535b6
  1. 6
      app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt
  2. 1
      app/src/main/java/io/legado/app/ui/main/explore/ExploreFragment.kt
  3. 1
      app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt
  4. 1
      app/src/main/res/layout/fragment_books.xml
  5. 1
      app/src/main/res/layout/fragment_find_book.xml
  6. 1
      app/src/main/res/layout/fragment_rss.xml

@ -29,7 +29,6 @@ import io.legado.app.utils.getViewModelOfActivity
import io.legado.app.utils.observeEvent import io.legado.app.utils.observeEvent
import io.legado.app.utils.startActivity import io.legado.app.utils.startActivity
import kotlinx.android.synthetic.main.fragment_books.* import kotlinx.android.synthetic.main.fragment_books.*
import org.jetbrains.anko.startActivity
import kotlin.math.max import kotlin.math.max
/** /**
@ -61,7 +60,6 @@ class BooksFragment : BaseFragment(R.layout.fragment_books),
position = it.getInt("position", 0) position = it.getInt("position", 0)
groupId = it.getLong("groupId", -1) groupId = it.getLong("groupId", -1)
} }
tv_empty_msg.setText(R.string.bookshelf_empty)
initRecyclerView() initRecyclerView()
upRecyclerData() upRecyclerData()
} }
@ -139,8 +137,8 @@ class BooksFragment : BaseFragment(R.layout.fragment_books),
override fun open(book: Book) { override fun open(book: Book) {
when (book.type) { when (book.type) {
BookType.audio -> BookType.audio ->
context?.startActivity<AudioPlayActivity>(Pair("bookUrl", book.bookUrl)) startActivity<AudioPlayActivity>(Pair("bookUrl", book.bookUrl))
else -> context?.startActivity<ReadBookActivity>( else -> startActivity<ReadBookActivity>(
Pair("bookUrl", book.bookUrl), Pair("bookUrl", book.bookUrl),
Pair("key", IntentDataHelp.putData(book)) Pair("key", IntentDataHelp.putData(book))
) )

@ -46,7 +46,6 @@ class ExploreFragment : VMBaseFragment<ExploreViewModel>(R.layout.fragment_find_
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) { override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
setSupportToolbar(toolbar) setSupportToolbar(toolbar)
tv_empty_msg.setText(R.string.explore_empty)
initSearchView() initSearchView()
initRecyclerView() initRecyclerView()
initGroupData() initGroupData()

@ -34,7 +34,6 @@ class RssFragment : VMBaseFragment<RssSourceViewModel>(R.layout.fragment_rss),
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) { override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
setSupportToolbar(toolbar) setSupportToolbar(toolbar)
tv_empty_msg.setText(R.string.rss_source_empty)
initRecyclerView() initRecyclerView()
initData() initData()
} }

@ -25,6 +25,7 @@
android:gravity="center" android:gravity="center"
android:layout_gravity="center" android:layout_gravity="center"
android:visibility="gone" android:visibility="gone"
android:text="@string/bookshelf_empty"
tools:text="TextView" /> tools:text="TextView" />
</FrameLayout> </FrameLayout>

@ -30,6 +30,7 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:gravity="center" android:gravity="center"
android:visibility="gone" android:visibility="gone"
android:text="@string/explore_empty"
app:layout_constraintTop_toBottomOf="@+id/title_bar" app:layout_constraintTop_toBottomOf="@+id/title_bar"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"

@ -31,6 +31,7 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:gravity="center" android:gravity="center"
android:visibility="gone" android:visibility="gone"
android:text="@string/rss_source_empty"
app:layout_constraintTop_toBottomOf="@+id/title_bar" app:layout_constraintTop_toBottomOf="@+id/title_bar"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"

Loading…
Cancel
Save