pull/32/head
GKF 6 years ago
parent 2ba5ccc67d
commit 1f1eff0d19
  1. 4
      app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt
  2. 5
      app/src/main/res/layout/activity_qrcode_capture.xml
  3. 2
      app/src/main/res/menu/book_source.xml

@ -17,6 +17,7 @@ import io.legado.app.R
import io.legado.app.base.BaseFragment import io.legado.app.base.BaseFragment
import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.BookSource
import io.legado.app.help.ItemTouchCallback import io.legado.app.help.ItemTouchCallback
import io.legado.app.ui.qrcode.QrCodeActivity
import io.legado.app.ui.sourceedit.SourceEditActivity import io.legado.app.ui.sourceedit.SourceEditActivity
import kotlinx.android.synthetic.main.fragment_book_source.* import kotlinx.android.synthetic.main.fragment_book_source.*
import kotlinx.android.synthetic.main.view_title_bar.* import kotlinx.android.synthetic.main.view_title_bar.*
@ -46,6 +47,9 @@ class BookSourceFragment : BaseFragment(R.layout.fragment_book_source), BookSour
R.id.action_add_book_source -> { R.id.action_add_book_source -> {
context?.startActivity<SourceEditActivity>() context?.startActivity<SourceEditActivity>()
} }
R.id.action_import_book_source_qr -> {
context?.startActivity<QrCodeActivity>()
}
} }
} }

@ -2,8 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:fitsSystemWindows="true">
<cn.bingoogolapple.qrcode.zxing.ZXingView <cn.bingoogolapple.qrcode.zxing.ZXingView
android:id="@+id/zxingview" android:id="@+id/zxingview"
@ -37,7 +36,7 @@
app:qrcv_tipTextColor="@android:color/white" app:qrcv_tipTextColor="@android:color/white"
app:qrcv_tipTextSize="12sp" app:qrcv_tipTextSize="12sp"
app:qrcv_toolbarHeight="?attr/actionBarSize" app:qrcv_toolbarHeight="?attr/actionBarSize"
app:qrcv_topOffset="65dp" app:qrcv_topOffset="100dp"
app:qrcv_verticalBias="-1" /> app:qrcv_verticalBias="-1" />

@ -72,7 +72,7 @@
app:showAsAction="never" /> app:showAsAction="never" />
<item <item
android:id="@+id/action_import_book_source_rwm" android:id="@+id/action_import_book_source_qr"
android:icon="@drawable/ic_import" android:icon="@drawable/ic_import"
android:title="@string/import_by_qr_code" android:title="@string/import_by_qr_code"
app:showAsAction="never" /> app:showAsAction="never" />

Loading…
Cancel
Save