优化
This commit is contained in:
@@ -147,9 +147,28 @@ class BookSourceEditActivity :
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun initView() {
|
private fun initView() {
|
||||||
if (!BuildConfig.DEBUG) {
|
binding.tabLayout.addTab(binding.tabLayout.newTab().apply {
|
||||||
binding.cbIsEnableReview.gone()
|
setText(R.string.source_tab_base)
|
||||||
binding.tabLayout.removeTabAt(6)
|
})
|
||||||
|
binding.tabLayout.addTab(binding.tabLayout.newTab().apply {
|
||||||
|
setText(R.string.source_tab_search)
|
||||||
|
})
|
||||||
|
binding.tabLayout.addTab(binding.tabLayout.newTab().apply {
|
||||||
|
setText(R.string.source_tab_find)
|
||||||
|
})
|
||||||
|
binding.tabLayout.addTab(binding.tabLayout.newTab().apply {
|
||||||
|
setText(R.string.source_tab_info)
|
||||||
|
})
|
||||||
|
binding.tabLayout.addTab(binding.tabLayout.newTab().apply {
|
||||||
|
setText(R.string.source_tab_toc)
|
||||||
|
})
|
||||||
|
binding.tabLayout.addTab(binding.tabLayout.newTab().apply {
|
||||||
|
setText(R.string.source_tab_content)
|
||||||
|
})
|
||||||
|
if (BuildConfig.DEBUG) {
|
||||||
|
binding.tabLayout.addTab(binding.tabLayout.newTab().apply {
|
||||||
|
setText(R.string.review)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
binding.recyclerView.setEdgeEffectColor(primaryColor)
|
binding.recyclerView.setEdgeEffectColor(primaryColor)
|
||||||
binding.recyclerView.layoutManager = LinearLayoutManager(this)
|
binding.recyclerView.layoutManager = LinearLayoutManager(this)
|
||||||
|
|||||||
@@ -22,9 +22,9 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:paddingHorizontal="8dp"
|
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal"
|
||||||
|
android:paddingHorizontal="8dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -38,7 +38,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:entries="@array/book_type"
|
android:entries="@array/book_type"
|
||||||
app:theme="@style/Spinner" />
|
app:theme="@style/Spinner"
|
||||||
|
tools:ignore="TouchTargetSizeCheck" />
|
||||||
|
|
||||||
<io.legado.app.lib.theme.view.ThemeCheckBox
|
<io.legado.app.lib.theme.view.ThemeCheckBox
|
||||||
android:id="@+id/cb_is_enable"
|
android:id="@+id/cb_is_enable"
|
||||||
@@ -77,44 +78,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
android:background="@color/background"
|
android:background="@color/background"
|
||||||
android:elevation="3dp">
|
android:elevation="3dp"
|
||||||
|
tools:ignore="SpeakableTextPresentCheck" />
|
||||||
<com.google.android.material.tabs.TabItem
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/source_tab_base" />
|
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabItem
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/source_tab_search" />
|
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabItem
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/source_tab_find" />
|
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabItem
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/source_tab_info" />
|
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabItem
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/source_tab_toc" />
|
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabItem
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/source_tab_content" />
|
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabItem
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/review" />
|
|
||||||
|
|
||||||
</com.google.android.material.tabs.TabLayout>
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recycler_view"
|
android:id="@+id/recycler_view"
|
||||||
|
|||||||
@@ -50,7 +50,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:checked="true"
|
android:checked="true"
|
||||||
android:text="@string/auto_save_cookie" />
|
android:text="@string/auto_save_cookie"
|
||||||
|
tools:ignore="TouchTargetSizeCheck" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user