update
This commit is contained in:
parent
6ab368132a
commit
3fa8ea357c
@ -7,7 +7,8 @@
|
||||
<uses-feature
|
||||
android:name="android.hardware.camera"
|
||||
android:required="false" />
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
|
||||
@ -38,6 +39,17 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.PDFReaderPro"
|
||||
tools:targetApi="36">
|
||||
<meta-data
|
||||
android:name="android.max_aspect"
|
||||
android:value="2.4" />
|
||||
<!--适配华为(huawei)刘海屏-->
|
||||
<meta-data
|
||||
android:name="android.notch_support"
|
||||
android:value="true" />
|
||||
<!--适配小米(xiaomi)刘海屏-->
|
||||
<meta-data
|
||||
android:name="notch.config"
|
||||
android:value="portrait|landscape" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.act.SplashActivity"
|
||||
@ -55,7 +67,8 @@
|
||||
android:name=".ui.act.MainActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Theme.PDFReaderPro" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.act.PdfViewActivity"
|
||||
|
||||
@ -1,17 +1,13 @@
|
||||
package com.all.pdfreader.pro.app.ui.act
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.widget.Toast
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.all.pdfreader.pro.app.R
|
||||
import com.all.pdfreader.pro.app.room.repository.PdfRepository
|
||||
import com.all.pdfreader.pro.app.sp.AppStore
|
||||
import com.all.pdfreader.pro.app.util.StoragePermissionHelper
|
||||
import com.all.pdfreader.pro.app.util.ToastUtils
|
||||
import com.tom_roush.pdfbox.contentstream.operator.text.ShowText
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
|
||||
abstract class BaseActivity : AppCompatActivity() {
|
||||
|
||||
|
||||
@ -33,6 +33,8 @@ import com.all.pdfreader.pro.app.util.StoragePermissionHelper
|
||||
import com.all.pdfreader.pro.app.viewmodel.PdfViewModel
|
||||
import com.all.pdfreader.pro.app.viewmodel.observeEvent
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
import com.gyf.immersionbar.NavigationBarType
|
||||
import com.gyf.immersionbar.OnNavigationBarListener
|
||||
import kotlinx.coroutines.launch
|
||||
import java.io.File
|
||||
|
||||
@ -57,12 +59,17 @@ class MainActivity : BaseActivity(), PermissionDialogFragment.PermissionCallback
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setTheme(R.style.Theme_PDFReaderPro)
|
||||
binding = ActivityMainBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
setupDoubleBackExit()
|
||||
initObserve()
|
||||
ImmersionBar.with(this).statusBarView(binding.view).statusBarDarkFont(false)
|
||||
.navigationBarColor(R.color.white).init()
|
||||
ImmersionBar
|
||||
.with(this)
|
||||
.statusBarView(binding.view)
|
||||
.statusBarDarkFont(false)
|
||||
.navigationBarColor(R.color.red)
|
||||
.init()
|
||||
|
||||
setupFragments()
|
||||
setupNavigation()
|
||||
@ -304,13 +311,13 @@ class MainActivity : BaseActivity(), PermissionDialogFragment.PermissionCallback
|
||||
binding.drawerLayout.closeDrawer(binding.drawerView)
|
||||
}
|
||||
binding.privacyPolicyBtn.setOnClickListener {
|
||||
val intent = Intent(this,PrivacyPolicyActivity::class.java)
|
||||
val intent = Intent(this, PrivacyPolicyActivity::class.java)
|
||||
startActivity(intent)
|
||||
binding.drawerLayout.closeDrawer(binding.drawerView)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setKeepScreenOn(b: Boolean){
|
||||
private fun setKeepScreenOn(b: Boolean) {
|
||||
if (b) {
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||
} else {
|
||||
|
||||
@ -2,11 +2,14 @@ package com.all.pdfreader.pro.app.ui.act
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.media.MediaScannerConnection
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.os.Environment
|
||||
import android.os.Parcelable
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import androidx.activity.OnBackPressedCallback
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
@ -21,11 +24,16 @@ import com.all.pdfreader.pro.app.room.entity.PdfDocumentEntity
|
||||
import com.all.pdfreader.pro.app.ui.adapter.PdfResultAdapter
|
||||
import com.all.pdfreader.pro.app.ui.dialog.PromptDialogFragment
|
||||
import com.all.pdfreader.pro.app.util.AppUtils
|
||||
import com.all.pdfreader.pro.app.util.AppUtils.dpToPx
|
||||
import com.all.pdfreader.pro.app.util.AppUtils.generateFastThumbnail
|
||||
import com.all.pdfreader.pro.app.util.FileUtils.toUnderscoreDateTime
|
||||
import com.all.pdfreader.pro.app.util.PdfScanner
|
||||
import com.all.pdfreader.pro.app.util.PdfSecurityUtils
|
||||
import com.all.pdfreader.pro.app.util.PdfUtils
|
||||
import com.all.pdfreader.pro.app.util.ToastUtils
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.load.resource.bitmap.CenterCrop
|
||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
@ -112,7 +120,7 @@ class PdfResultActivity : BaseActivity() {
|
||||
private var exitDialog: PromptDialogFragment? = null
|
||||
private val pdfRepository = getRepository()
|
||||
private lateinit var pdfScanner: PdfScanner
|
||||
private var openedExternal = false
|
||||
private var isSaving = false
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
@ -151,6 +159,7 @@ class PdfResultActivity : BaseActivity() {
|
||||
binding.progressBar.isIndeterminate = false
|
||||
binding.progressBar.progress = 0
|
||||
binding.progressBar.max = 100
|
||||
binding.okBtnTv.text = getString(R.string.open)
|
||||
}
|
||||
val selectedList: ArrayList<PdfSelectedPagesItem> =
|
||||
requireParcelableArrayList(EXTRA_SELECTED_LIST)
|
||||
@ -197,6 +206,7 @@ class PdfResultActivity : BaseActivity() {
|
||||
binding.progressBar.isIndeterminate = false
|
||||
binding.progressBar.progress = 0
|
||||
binding.progressBar.max = 100
|
||||
binding.okBtnTv.text = getString(R.string.open)
|
||||
}
|
||||
val mergeInputFile: ArrayList<PdfDocumentEntity> =
|
||||
requireParcelableArrayList(EXTRA_MERGE_LIST)
|
||||
@ -242,6 +252,7 @@ class PdfResultActivity : BaseActivity() {
|
||||
val lockPassword = intent.getStringExtra(EXTRA_LOCK_UNLOCK_PASSWORD) ?: ""
|
||||
runOnUiThread {
|
||||
binding.congratulationsDesc.text = getString(R.string.set_password_successfully)
|
||||
binding.okBtnTv.text = getString(R.string.open)
|
||||
}
|
||||
PdfSecurityUtils.setPasswordToPdfWithProgress(
|
||||
filepath, lockPassword, lockPassword
|
||||
@ -265,6 +276,7 @@ class PdfResultActivity : BaseActivity() {
|
||||
runOnUiThread {
|
||||
binding.congratulationsDesc.text =
|
||||
getString(R.string.remove_password_successfully)
|
||||
binding.okBtnTv.text = getString(R.string.open)
|
||||
}
|
||||
PdfSecurityUtils.removePasswordFromPdfWithProgress(
|
||||
filepath, unlockPassword
|
||||
@ -283,6 +295,9 @@ class PdfResultActivity : BaseActivity() {
|
||||
finish()
|
||||
return@launch
|
||||
}
|
||||
runOnUiThread {
|
||||
binding.okBtnTv.text = getString(R.string.open)
|
||||
}
|
||||
val inputFiles: List<File> = files.map { path -> File(path) }
|
||||
val outputDir = File(
|
||||
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS),
|
||||
@ -316,6 +331,7 @@ class PdfResultActivity : BaseActivity() {
|
||||
}
|
||||
runOnUiThread {
|
||||
binding.congratulationsDesc.text = getString(R.string.converted_successfully)
|
||||
binding.okBtnTv.text = getString(R.string.save_to_album)
|
||||
}
|
||||
val selectedPages: ArrayList<PdfPageItem> =
|
||||
requireParcelableArrayList(EXTRA_PDF_TO_IMAGE_LIST)
|
||||
@ -353,6 +369,7 @@ class PdfResultActivity : BaseActivity() {
|
||||
}
|
||||
runOnUiThread {
|
||||
binding.congratulationsDesc.text = getString(R.string.converted_successfully)
|
||||
binding.okBtnTv.text = getString(R.string.save_to_album)
|
||||
}
|
||||
val selectedPages: ArrayList<PdfPageItem> =
|
||||
requireParcelableArrayList(EXTRA_PDF_TO_IMAGE_LIST)
|
||||
@ -374,14 +391,59 @@ class PdfResultActivity : BaseActivity() {
|
||||
binding.progressTv.text = "$progressPercent"
|
||||
}
|
||||
}
|
||||
)?.let { file->
|
||||
)?.let { file ->
|
||||
val result = PdfSplitResultItem(file.absolutePath, file.absolutePath, false)
|
||||
resultList.add(result)
|
||||
}
|
||||
}
|
||||
withContext(Dispatchers.Main) {
|
||||
binding.processingLayout.visibility = View.GONE
|
||||
// 默认选中第一个
|
||||
if (resultList.isNotEmpty()) {
|
||||
if (resultList.size == 1) {
|
||||
binding.multipleImageLayout.visibility = View.GONE
|
||||
binding.oneResultView.visibility = View.VISIBLE
|
||||
binding.recyclerView.visibility = View.GONE
|
||||
val item = resultList[0]
|
||||
if (item.thumbnailPath != null) {
|
||||
Glide.with(binding.root).load(File(item.thumbnailPath))
|
||||
.transform(
|
||||
CenterCrop(),
|
||||
RoundedCorners(4.dpToPx(binding.root.context))
|
||||
)
|
||||
.into(binding.image)
|
||||
}
|
||||
if (item.isPassword) {
|
||||
binding.lockLayout.visibility = View.VISIBLE
|
||||
} else {
|
||||
binding.lockLayout.visibility = View.GONE
|
||||
}
|
||||
binding.fileNameTv.text = File(item.filePath).name
|
||||
binding.pathTv.text =
|
||||
binding.root.context.getString(R.string.path_details, item.filePath)
|
||||
} else {
|
||||
if (source == PdfPickerSource.PDF_TO_IMAGES) {
|
||||
binding.multipleImageLayout.visibility = View.VISIBLE
|
||||
binding.oneResultView.visibility = View.GONE
|
||||
binding.recyclerView.visibility = View.GONE
|
||||
val item = resultList[0]
|
||||
if (item.thumbnailPath != null) {
|
||||
Glide.with(binding.root).load(File(item.thumbnailPath))
|
||||
.transform(
|
||||
CenterCrop(),
|
||||
RoundedCorners(4.dpToPx(binding.root.context))
|
||||
)
|
||||
.into(binding.multipleImage)
|
||||
}
|
||||
binding.multipleNumberTv.text = "${resultList.size}"
|
||||
binding.multipleImageTv.text = getString(R.string.number_image_converted,resultList.size)
|
||||
} else {
|
||||
binding.multipleImageLayout.visibility = View.GONE
|
||||
binding.oneResultView.visibility = View.GONE
|
||||
binding.recyclerView.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
// 默认选中第一个,只有一个也是第一个,所以点击的地方就不做修改了。就展示这里做修改
|
||||
if (resultList.isNotEmpty() && resultList.none { it.isSelected }) {
|
||||
resultList[0].isSelected = true
|
||||
}
|
||||
@ -398,20 +460,26 @@ class PdfResultActivity : BaseActivity() {
|
||||
onBackPressedDispatcher.onBackPressed()
|
||||
}
|
||||
binding.shareBtn.setOnClickListener {
|
||||
if (source == PdfPickerSource.PDF_TO_IMAGES || source == PdfPickerSource.TO_LONG_IMAGE) {
|
||||
AppUtils.shareMultipleFiles(this, adapter.getAllFiles())
|
||||
} else {
|
||||
val selectedItem = adapter.getSelectedItem()
|
||||
selectedItem?.let {
|
||||
AppUtils.shareFile(this, File(selectedItem.filePath))
|
||||
}
|
||||
}
|
||||
}
|
||||
binding.okBtn.setOnClickListener {
|
||||
if (source == PdfPickerSource.PDF_TO_IMAGES || source == PdfPickerSource.TO_LONG_IMAGE) {
|
||||
val selectedItem = adapter.getSelectedItem()
|
||||
selectedItem?.let {
|
||||
val string = AppUtils.openImageFile(this, File(selectedItem.filePath))
|
||||
if (string.isNotEmpty()) {
|
||||
showToast(string)
|
||||
}
|
||||
openedExternal = true
|
||||
if (isSaving) return@setOnClickListener
|
||||
|
||||
val imageFiles = adapter.getAllFiles()
|
||||
val triggered = addImagesToGallery(this, imageFiles)
|
||||
|
||||
if (triggered) {
|
||||
isSaving = true // 触发过就不允许重复点击
|
||||
//2秒后恢复按钮
|
||||
binding.okBtn.postDelayed({ isSaving = false }, 2000)
|
||||
}
|
||||
} else {
|
||||
val selectedItem = adapter.getSelectedItem()
|
||||
@ -426,9 +494,6 @@ class PdfResultActivity : BaseActivity() {
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
if (openedExternal) {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
@ -490,4 +555,47 @@ class PdfResultActivity : BaseActivity() {
|
||||
return result ?: default
|
||||
}
|
||||
|
||||
/**
|
||||
* 将指定图片文件列表同步到系统相册,并返回是否成功触发操作
|
||||
*
|
||||
* @param context 上下文
|
||||
* @param imageFiles 要导入的图片文件列表
|
||||
* @return true 表示触发扫描成功,false 表示无有效图片
|
||||
*/
|
||||
fun addImagesToGallery(context: Context, imageFiles: List<File>): Boolean {
|
||||
if (imageFiles.isEmpty()) {
|
||||
ToastUtils.show(context, context.getString(R.string.gallery_no_images_found))
|
||||
return false
|
||||
}
|
||||
|
||||
// 过滤有效图片
|
||||
val validFiles = imageFiles.filter { file ->
|
||||
file.exists() && file.isFile && (
|
||||
file.extension.equals("jpg", true) ||
|
||||
file.extension.equals("jpeg", true) ||
|
||||
file.extension.equals("png", true) ||
|
||||
file.extension.equals("webp", true)
|
||||
)
|
||||
}
|
||||
|
||||
if (validFiles.isEmpty()) {
|
||||
ToastUtils.show(context, context.getString(R.string.gallery_no_images_found))
|
||||
return false
|
||||
}
|
||||
|
||||
val paths = validFiles.map { it.absolutePath }.toTypedArray()
|
||||
|
||||
// 扫描文件(异步触发系统媒体库)
|
||||
MediaScannerConnection.scanFile(context, paths, null) { path, uri ->
|
||||
Log.d("GallerySync", "Scanned: $path -> $uri")
|
||||
}
|
||||
|
||||
ToastUtils.show(
|
||||
context,
|
||||
context.getString(R.string.gallery_saved_to_album, validFiles.size)
|
||||
)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
}
|
||||
@ -74,4 +74,12 @@ class PdfResultAdapter(
|
||||
fun getSelectedItem(): PdfSplitResultItem? {
|
||||
return list.firstOrNull { it.isSelected }
|
||||
}
|
||||
|
||||
fun getAllFiles(): List<File> {
|
||||
return list.mapNotNull {
|
||||
val f = File(it.filePath)
|
||||
if (f.exists()) f else null
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ class SplitSelectedPdfAdapter(
|
||||
val thumbPath = item.getFirstThumbPath()
|
||||
if (thumbPath.isNotEmpty()) {
|
||||
Glide.with(holder.binding.root).load(File(thumbPath))
|
||||
.transform(CenterCrop(), RoundedCorners(8.dpToPx(holder.binding.root.context)))
|
||||
.transform(CenterCrop(), RoundedCorners(4.dpToPx(holder.binding.root.context)))
|
||||
.into(holder.binding.tvFileImg)
|
||||
}
|
||||
holder.binding.tvFileName.text = item.fileName
|
||||
|
||||
@ -117,7 +117,7 @@ object AppUtils {
|
||||
fun shareFile(context: Context, file: File) {
|
||||
try {
|
||||
if (!file.exists()) {
|
||||
ToastUtils.show(context,context.getString(R.string.error_file_not_exist))
|
||||
ToastUtils.show(context, context.getString(R.string.error_file_not_exist))
|
||||
return
|
||||
}
|
||||
|
||||
@ -144,6 +144,60 @@ object AppUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分享多个文件(自动识别 MIME 类型)
|
||||
* @param context 上下文
|
||||
* @param files 要分享的文件列表
|
||||
*/
|
||||
fun shareMultipleFiles(context: Context, files: List<File>) {
|
||||
try {
|
||||
if (files.isEmpty()) {
|
||||
ToastUtils.show(context, context.getString(R.string.error_file_not_exist))
|
||||
return
|
||||
}
|
||||
if (files.size == 1) {
|
||||
shareFile(context, files[0])
|
||||
return
|
||||
}
|
||||
|
||||
// 过滤掉不存在的文件
|
||||
val validFiles = files.filter { it.exists() }
|
||||
if (validFiles.isEmpty()) {
|
||||
ToastUtils.show(context, context.getString(R.string.error_file_not_exist))
|
||||
return
|
||||
}
|
||||
|
||||
val uris = ArrayList<Uri>()
|
||||
for (file in validFiles) {
|
||||
val uri = FileProvider.getUriForFile(
|
||||
context,
|
||||
"${context.packageName}.fileprovider",
|
||||
file
|
||||
)
|
||||
uris.add(uri)
|
||||
}
|
||||
|
||||
// 统一判断 MIME 类型(若不同类型,则用 "*/*")
|
||||
val firstMime = getMimeType(validFiles.first())
|
||||
val allSameMime = validFiles.all { getMimeType(it) == firstMime }
|
||||
val mimeType = if (allSameMime) firstMime ?: "*/*" else "*/*"
|
||||
|
||||
val shareIntent = Intent(Intent.ACTION_SEND_MULTIPLE).apply {
|
||||
type = mimeType
|
||||
putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris)
|
||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||
}
|
||||
|
||||
context.startActivity(
|
||||
Intent.createChooser(shareIntent, "share")
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据文件扩展名自动获取 MIME 类型
|
||||
*/
|
||||
@ -354,5 +408,4 @@ object AppUtils {
|
||||
Toast.makeText(context, "Unable to share app info.", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
8
app/src/main/res/drawable/dr_collect_state_black_bg.xml
Normal file
8
app/src/main/res/drawable/dr_collect_state_black_bg.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners
|
||||
android:topLeftRadius="4dp"
|
||||
android:bottomRightRadius="4dp" />
|
||||
<solid android:color="#67000000" />
|
||||
</shape>
|
||||
@ -133,6 +133,7 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/splitSelectLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/bg_color"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
@ -140,7 +141,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/splitBtn"
|
||||
android:layout_margin="8dp"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
tools:itemCount="3"
|
||||
|
||||
@ -86,6 +86,10 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -95,7 +99,7 @@
|
||||
<ImageView
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginTop="58dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:background="@drawable/drw_result_congratulations_bg"
|
||||
android:padding="10dp"
|
||||
android:src="@drawable/gou_white" />
|
||||
@ -129,6 +133,172 @@
|
||||
android:layout_margin="16dp"
|
||||
android:background="@drawable/dashed_line" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/oneResultView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="82dp"
|
||||
android:layout_height="100dp"
|
||||
android:background="@drawable/dr_item_img_frame"
|
||||
android:padding="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/dr_placeholder_bg"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:src="@drawable/file_document" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="82dp"
|
||||
android:layout_height="100dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lock_layout"
|
||||
android:layout_width="82dp"
|
||||
android:layout_height="100dp"
|
||||
android:background="@drawable/dr_item_lock_bg"
|
||||
android:gravity="center"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_lock_item" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fileNameTv"
|
||||
style="@style/TextViewFont_PopMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="middle"
|
||||
android:maxLines="1"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/text_color_lv1"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pathTv"
|
||||
style="@style/TextViewFont_PopRegular"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:text="@string/path_details"
|
||||
android:textColor="@color/text_color_lv2"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/multipleImageLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<RelativeLayout
|
||||
android:layout_width="92dp"
|
||||
android:layout_height="110dp">
|
||||
<View
|
||||
android:layout_width="82dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:rotation="5"
|
||||
android:background="@drawable/dr_placeholder_bg"/>
|
||||
<RelativeLayout
|
||||
android:layout_width="82dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/dr_item_img_frame"
|
||||
android:padding="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/dr_placeholder_bg"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:src="@drawable/file_document" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/multipleImage"
|
||||
android:layout_width="82dp"
|
||||
android:layout_height="100dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/multipleNumberTv"
|
||||
style="@style/TextViewFont_PopMedium"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:background="@drawable/dr_collect_state_black_bg"
|
||||
android:gravity="center"
|
||||
android:text="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/multipleImageTv"
|
||||
style="@style/TextViewFont_PopMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="middle"
|
||||
android:maxLines="1"
|
||||
android:text="@string/number_image_converted"
|
||||
android:textColor="@color/text_color_lv1"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
@ -138,6 +308,8 @@
|
||||
tools:itemCount="3"
|
||||
tools:listitem="@layout/adapter_selected_result_item" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -145,7 +317,7 @@
|
||||
android:padding="24dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/okBtn"
|
||||
android:id="@+id/shareBtn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
@ -153,17 +325,16 @@
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/okBtnTv"
|
||||
style="@style/TextViewFont_PopSemiBold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/open"
|
||||
android:text="@string/share_file"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/shareBtn"
|
||||
android:id="@+id/okBtn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="20dp"
|
||||
@ -172,10 +343,11 @@
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/okBtnTv"
|
||||
style="@style/TextViewFont_PopSemiBold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/share_file"
|
||||
android:text="@string/open"
|
||||
android:textColor="@color/icon_on"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
@ -183,4 +355,6 @@
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
@ -15,8 +15,9 @@
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_width="50dp"
|
||||
android:padding="1dp"
|
||||
android:layout_height="60dp"
|
||||
android:background="@drawable/dr_item_img_frame">
|
||||
|
||||
<LinearLayout
|
||||
@ -34,13 +35,13 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp" />
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="60dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lock_layout"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="60dp"
|
||||
android:background="@drawable/dr_item_lock_bg"
|
||||
android:gravity="center"
|
||||
android:visibility="gone">
|
||||
|
||||
@ -3,9 +3,13 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/dr_rounded_corner_12_bg_white"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:paddingBottom="16dp"
|
||||
tools:ignore="RtlSymmetry">
|
||||
|
||||
<LinearLayout
|
||||
@ -15,9 +19,10 @@
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:background="@drawable/dr_item_img_frame">
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="@drawable/dr_item_img_frame"
|
||||
android:padding="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -34,8 +39,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tvFileImg"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp" />
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="80dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@ -87,6 +92,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
@ -128,13 +134,4 @@
|
||||
android:src="@drawable/delete_cha_icon" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@color/line_color" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#008577</color>
|
||||
<color name="colorPrimaryDark">#008577</color>
|
||||
<color name="colorAccent">#D81B60</color>
|
||||
<color name="colorBarText">#F0F5E5</color>
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#FF6200EE</color>
|
||||
<color name="purple_700">#FF3700B3</color>
|
||||
|
||||
@ -185,4 +185,10 @@
|
||||
<string name="file_viewing">File Viewing</string>
|
||||
<string name="faq_file_viewing1">How to enable "Reflow" mode?</string>
|
||||
<string name="faq_file_viewing1_des"><![CDATA[Open the file and tap <font color="#000000">"View mode"</font> in the bottom bar. From there, you can toggle <font color="#000000">"Reflow"</font> mode on or off.<br><br>Currently,this feature is only available on Android7 and above device.We will continue to optimize it and support more systems in the future.Please stay tuned.]]></string>
|
||||
<string name="gallery_folder_not_exist">Target folder does not exist</string>
|
||||
<string name="gallery_no_images_found">No images found to import</string>
|
||||
<string name="gallery_saved_to_album">Saved to gallery, total %1$d image(s)</string>
|
||||
<string name="save_to_album">Save to Album</string>
|
||||
<string name="one_image_converted">1 image converted</string>
|
||||
<string name="number_image_converted">%1$d imagesF converted</string>
|
||||
</resources>
|
||||
@ -1,8 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.PDFReaderPro" parent="Theme.AppCompat.DayNight.NoActionBar" />
|
||||
|
||||
<style name="Theme.PDFReaderPro" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:windowBackground">@android:color/white</item>
|
||||
</style>
|
||||
<!-- SplashActivity theme -->
|
||||
<style name="Theme.PDFReaderPro.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user