pull/83/head
kunfei 5 years ago
parent 1a3883823b
commit bc1a9f6f71
  1. 6
      app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt
  2. 42
      app/src/main/res/layout/activity_import_book.xml

@ -21,6 +21,7 @@ import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.accentColor
import io.legado.app.ui.book.search.SearchActivity
import io.legado.app.ui.download.DownloadActivity
import io.legado.app.ui.importbook.ImportBookActivity
import io.legado.app.utils.*
import kotlinx.android.synthetic.main.fragment_bookshelf.*
import kotlinx.android.synthetic.main.view_tab_layout.*
@ -37,7 +38,7 @@ class BookshelfFragment : VMBaseFragment<BookshelfViewModel>(R.layout.fragment_b
override val viewModel: BookshelfViewModel
get() = getViewModel(BookshelfViewModel::class.java)
lateinit var bookshelfAdapter: BookshelfAdapter
private lateinit var bookshelfAdapter: BookshelfAdapter
private var bookGroupLiveData: LiveData<List<BookGroup>>? = null
private val bookGroups = mutableListOf<BookGroup>()
@ -58,8 +59,7 @@ class BookshelfFragment : VMBaseFragment<BookshelfViewModel>(R.layout.fragment_b
R.id.menu_bookshelf_layout -> selectBookshelfLayout()
R.id.menu_group_manage -> GroupManageDialog()
.show(childFragmentManager, "groupManageDialog")
R.id.menu_add_local -> {
}
R.id.menu_add_local -> startActivity<ImportBookActivity>()
R.id.menu_add_url -> {
}
R.id.menu_arrange_bookshelf -> {

@ -48,5 +48,47 @@
tools:ignore="UnusedAttribute" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/file_category_rv_content"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<!--文件点击按钮-->
<RelativeLayout
android:id="@+id/rl_bottom"
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center_vertical"
android:padding="10dp"
tools:ignore="RtlHardcoded,RtlSymmetry">
<io.legado.app.lib.theme.view.ATECheckBox
android:id="@+id/file_system_cb_selected_all"
android:layout_width="120dp"
android:layout_height="40dp"
android:layout_centerVertical="true"
android:text="@string/select_all"
android:textColor="@color/tv_text_default" />
<io.legado.app.lib.theme.view.ATEAccentStrokeTextView
android:id="@+id/file_system_btn_add_book"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:gravity="center"
android:minWidth="110dp"
android:text="@string/add_to_shelf" />
<io.legado.app.lib.theme.view.ATEAccentStrokeTextView
android:id="@+id/file_system_btn_delete"
android:layout_width="70dp"
android:layout_height="35dp"
android:layout_centerVertical="true"
android:gravity="center"
android:layout_toLeftOf="@id/file_system_btn_add_book"
android:text="@string/delete" />
</RelativeLayout>
</LinearLayout>
Loading…
Cancel
Save