Commit adf80db0 authored by wanglei's avatar wanglei Committed by wanglei

Initial commit

parent 8d64e36f
Pipeline #987 failed with stages
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
# Default ignored files
/shelf/
/workspace.xml
Solar Master Ace
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="17" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<value>
<entry key="app">
<State />
</entry>
</value>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#JAVA_HOME" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveExternalAnnotations" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinJpsPluginSettings">
<option name="version" value="1.9.0" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectMigrations">
<option name="MigrateToGradleLocalJavaHome">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
/build
\ No newline at end of file
plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.jetbrainsKotlinAndroid)
}
android {
namespace = "com.zxhy.solarmasterace"
compileSdk = 34
defaultConfig {
applicationId = "com.zxhy.solarmasterace"
minSdk = 24
targetSdk = 34
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
viewBinding = true
}
}
dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.material)
implementation(libs.androidx.activity)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.navigation.fragment.ktx)
implementation(libs.androidx.navigation.ui.ktx)
implementation(libs.coil)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
}
\ No newline at end of file
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
\ No newline at end of file
package com.zxhy.solarmasterace
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.zxhy.solarmasterace", appContext.packageName)
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission
android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
tools:ignore="ScopedStorage" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.SolarMasterAce"
tools:targetApi="31">
<activity
android:name=".filebrowser.FileBrowserActivity"
android:exported="false" />
<activity
android:name=".dupfile.DupImageActivity"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="true"
android:screenOrientation="portrait"
tools:ignore="DiscouragedApi,LockedOrientationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
\ No newline at end of file
package com.zxhy.solarmasterace
import android.os.Bundle
import android.view.MenuItem
import android.view.View
import android.widget.AdapterView
import android.widget.AdapterView.OnItemSelectedListener
import androidx.activity.enableEdgeToEdge
import androidx.activity.result.ActivityResultLauncher
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.navigation.findNavController
import com.google.android.material.navigation.NavigationBarView
import com.zxhy.solarmasterace.databinding.ActivityMainBinding
import com.zxhy.solarmasterace.permission.requestStoreFollow
import com.zxhy.solarmasterace.quicktools.ActivityLauncher
class MainActivity : AppCompatActivity() {
private lateinit var binding: ActivityMainBinding
private lateinit var launcher: ActivityLauncher
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
launcher = ActivityLauncher(this)
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
insets
}
window.statusBarColor = ContextCompat.getColor(this, R.color.color_FF5C67E5)
//关键去除itemIconTint影响
binding.bNav.itemIconTintList = null
binding.bNav.setItemIconSizeRes(R.dimen.dp_24)
binding.bNav.setOnItemSelectedListener(object : OnItemSelectedListener,
NavigationBarView.OnItemSelectedListener {
override fun onItemSelected(
parent: AdapterView<*>?,
view: View?,
position: Int,
id: Long
) {
}
override fun onNothingSelected(parent: AdapterView<*>?) {
}
override fun onNavigationItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
R.id.nav_manager -> {
window.statusBarColor =
ContextCompat.getColor(this@MainActivity, R.color.color_FF5C67E5)
runCatching {
findNavController(R.id.fragment_container_view).navigate(R.id.action_toolsFragment_to_managerFragment)
}
}
R.id.nav_tools -> {
window.statusBarColor =
ContextCompat.getColor(this@MainActivity, R.color.white)
runCatching {
findNavController(R.id.fragment_container_view).navigate(R.id.action_managerFragment_to_toolsFragment)
}
}
}
return true
}
})
requestStoreFollow(launcher, disAgreeAction = {}, agreeAction = {})
}
}
\ No newline at end of file
package com.zxhy.solarmasterace.adapter
import com.zxhy.solarmasterace.data.FileBean
interface AdapterCommonDataFunction {
abstract fun setData(data: List<FileBean>)
}
\ No newline at end of file
package com.zxhy.solarmasterace.adapter
import android.view.View
import androidx.recyclerview.widget.RecyclerView
import com.zxhy.solarmasterace.databinding.ItemCardImage85Binding
class ItemImage85ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val binding = ItemCardImage85Binding.bind(view)
}
\ No newline at end of file
package com.zxhy.solarmasterace.data
import android.net.Uri
import com.zxhy.solarmasterace.R
import java.io.File
data class FileBean(
val name: String = "",
val path: String = "",
val uri: Uri = Uri.EMPTY,
val size: Long = 0L,
val time: String = "",
var isSelect: Boolean = false
) {
fun file(): File {
return File(path)
}
fun isDir(): Boolean {
val file = File(path)
return file.exists() && file.isDirectory
}
fun isEmpty(): Boolean {
return size == 0L
}
fun isImage(): Boolean {
return name.contains(".jpg") or name.contains(".png") or name.contains(".gif")
}
fun imageRes(): Int {
return R.mipmap.as_230
}
fun isVideo(): Boolean {
return name.contains(".mp4") or name.contains(".avi")
}
fun isAudio(): Boolean {
return name.contains(".mp3") or name.contains(".avi")
}
fun isApk(): Boolean {
return name.contains(".apk")
}
fun isZip(): Boolean {
return name.contains(".zip") or name.contains(".rar")
}
fun isLogFile(): Boolean {
return name.contains("log") or name.contains("Log")
}
fun isWord(): Boolean {
return name.contains(".doc") or name.contains(".docx")
}
fun isExcel(): Boolean {
return name.contains(".xls") or name.contains(".xlsx")
}
fun isPPt(): Boolean {
return name.contains(".ppt") or name.contains(".pptx")
}
fun isPdf(): Boolean {
return name.contains(".pdf")
}
fun isTxt(): Boolean {
return name.contains(".txt")
}
fun isDocument(): Boolean {
return isWord() or isExcel() or isPPt() or isPdf() or isTxt()
}
}
@file:Suppress("unused")
package com.zxhy.solarmasterace.dialog
import android.app.Dialog
import android.content.Context
import android.content.DialogInterface
import android.view.KeyEvent
import androidx.annotation.StringRes
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.Fragment
import com.google.android.material.dialog.MaterialAlertDialogBuilder
//typealias用于给类取别名 将AlertBuilderFactory<D>重新定义为一个匿名函数,返回它的父类
typealias AlertBuilderFactory<D> = (Context) -> AlertBuilder<D>
val Material: AlertBuilderFactory<DialogInterface> = { context ->
object : AlertDialogBuilder() {
override val builder: AlertDialog.Builder = MaterialAlertDialogBuilder(context)
}
}
//默认的构造工厂
private var defaultAlertBuilderFactory: AlertBuilderFactory<*> = Material
//region 简易的消息弹窗
//基于上下文扩展的 简易的消息弹窗
fun Context.alert(
message: CharSequence,
title: CharSequence? = null,
block: (AlertBuilder<*>.() -> Unit)? = null
) {
alert(defaultAlertBuilderFactory, message, title, block)
}
//基于Fragment扩展的建议弹窗
fun Fragment.alert(
message: CharSequence,
title: CharSequence? = null,
block: (AlertBuilder<*>.() -> Unit)? = null
) {
requireContext().alert(message, title, block)
}
private inline fun <D : DialogInterface> Context.alert(
factory: AlertBuilderFactory<D>,
message: CharSequence,
title: CharSequence?,
noinline block: (AlertBuilder<D>.() -> Unit)? = null
) {
alertDialog(factory) {
title?.let { this.title = it }
this.message = message
block?.invoke(this)
}.show()
}
//endregion
//region 单项选择弹窗
fun Context.selector(
items: List<CharSequence>,
title: CharSequence?,
onItemSelected: (dialog: DialogInterface, index: Int) -> Unit
) {
alertDialog(defaultAlertBuilderFactory) {
title?.let { this.title = it }
items(items, onItemSelected)
}.show()
}
fun Fragment.selector(
items: List<CharSequence>,
title: CharSequence?,
onItemSelected: (dialog: DialogInterface, index: Int) -> Unit
) {
requireContext().selector(items, title, onItemSelected)
}
private inline fun <D : DialogInterface> Context.selector(
factory: AlertBuilderFactory<D>,
items: List<CharSequence>,
title: CharSequence?,
noinline onItemSelected: (dialog: DialogInterface, index: Int) -> Unit
) {
alertDialog(factory) {
title?.let { this.title = it }
items(items, onItemSelected)
}.show()
}
//endregion
//region 单项选择
fun Context.singleChoice(
items: List<CharSequence>,
title: CharSequence? = null,
defaultItem: Int = -1, //默认没有选中项目
onItemSelected: (DialogInterface, Int) -> Unit
) {
singleChoice(defaultAlertBuilderFactory, items, title, defaultItem, onItemSelected)
}
fun Fragment.singleChoice(
items: List<CharSequence>,
title: CharSequence? = null,
defaultItem: Int = -1,//默认没有选中项目
onItemSelected: (DialogInterface, Int) -> Unit
) {
requireContext().singleChoice(items, title, defaultItem, onItemSelected)
}
private fun Context.singleChoice(
factory: AlertBuilderFactory<DialogInterface>,
items: List<CharSequence>,
title: CharSequence?,
defaultItem: Int = -1,//默认没有选中项目
onItemSelected: (DialogInterface, Int) -> Unit
) {
alertDialog(factory) {
title?.let { this.title = title }
choiceItems(items, defaultItem, onItemSelected)
}.show()
}
//endregion
//region 多项选择
fun Context.multiChoice(
items: List<CharSequence>,
defaultItems: BooleanArray, //必须设备每一个项目的选中情况
title: CharSequence? = null,
block: (AlertBuilder<DialogInterface>.() -> Unit)? = null, //用于添加按钮
onItemSelected: (dialog: DialogInterface, index: Int, isChecked: Boolean) -> Unit
) {
multiChoice(defaultAlertBuilderFactory, items, defaultItems, title, block, onItemSelected)
}
fun Fragment.multiChoice(
items: List<CharSequence>,
defaultItems: BooleanArray, //必须设备每一个项目的选中情况
title: CharSequence? = null,
block: (AlertBuilder<DialogInterface>.() -> Unit)? = null, //用于添加按钮
onItemSelected: (dialog: DialogInterface, index: Int, isChecked: Boolean) -> Unit
) {
requireContext().multiChoice(items, defaultItems, title, block, onItemSelected)
}
private inline fun <D : DialogInterface> Context.multiChoice(
factory: AlertBuilderFactory<D>,
items: List<CharSequence>, //必须设备每一个项目的选中情况
defaultItems: BooleanArray,
title: CharSequence?,
noinline block: (AlertBuilder<D>.() -> Unit)? = null, //用于添加按钮
noinline onItemSelected: (dialog: DialogInterface, index: Int, isChecked: Boolean) -> Unit
) {
alertDialog(factory) {
title?.let { this.title = it }
multiChoiceItems(items, defaultItems) { dialog, index, isChecked ->
onItemSelected(dialog, index, isChecked)
}
//提供外部处理
block?.invoke(this)
}.show()
}
//endregion
//region 事件响应
//监听取消
fun DialogInterface.doOnCancel(block: (DialogInterface) -> Unit) {
check(this is Dialog)
setOnCancelListener(block)
}
fun Dialog.doOnCancel(block: (DialogInterface) -> Unit) {
setOnCancelListener(block)
}
//监听展示
fun DialogInterface.doOnShow(block: (DialogInterface) -> Unit) {
check(this is Dialog)
setOnShowListener(block)
}
fun Dialog.doOnShow(block: (DialogInterface) -> Unit) {
setOnShowListener(block)
}
//监听驳回dismiss
fun DialogInterface.doOnDismiss(block: (DialogInterface) -> Unit) {
check(this is Dialog)
setOnDismissListener(block)
}
fun Dialog.doOnDismiss(block: (DialogInterface) -> Unit) {
setOnDismissListener(block)
}
//监听返回按钮 一般用于返回键的拦截KeyEvent.KEYCODE_BACK
fun DialogInterface.doOnKeyPressed(handler: (DialogInterface, keyCode: Int, e: KeyEvent) -> Boolean) {
check(this is Dialog)
setOnKeyListener(handler)
}
fun Dialog.keyListener(handler: (DialogInterface, keyCode: Int, e: KeyEvent) -> Boolean) {
setOnKeyListener(handler)
}
//endregion
//region 添加按钮
//确认按钮
fun AlertBuilder<*>.okButton(onClicked: (dialog: DialogInterface) -> Unit) =
positiveButton(android.R.string.ok, onClicked)
//取消按钮
fun AlertBuilder<*>.cancelButton(onClicked: (dialog: DialogInterface) -> Unit = { it.dismiss() }) =
negativeButton(android.R.string.cancel, onClicked)
//中性按钮
fun AlertBuilder<*>.neutralButton(
buttonText: String,
onClicked: (dialog: DialogInterface) -> Unit = { it.dismiss() }
) = neutralPressed(buttonText, onClicked)
//endregion
//统一的弹窗处理
inline fun <D : DialogInterface> Context.alertDialog(
factory: AlertBuilderFactory<D>,
block: AlertBuilder<D>.() -> Unit
) = factory(this).apply(block)
//统一的接口,用于管理属性
interface AlertBuilder<out D : DialogInterface> {
//上下文
val context: Context
//标题
var title: CharSequence
//标题
var message: CharSequence
//确认按钮
fun positiveButton(buttonText: String, onClicked: (dialog: DialogInterface) -> Unit)
fun positiveButton(
@StringRes buttonTextResource: Int,
onClicked: (dialog: DialogInterface) -> Unit
)
//取消按钮
fun negativeButton(buttonText: String, onClicked: (dialog: DialogInterface) -> Unit)
fun negativeButton(
@StringRes buttonTextResource: Int,
onClicked: (dialog: DialogInterface) -> Unit
)
//中性按压事件
fun neutralPressed(buttonText: String, onClicked: (dialog: DialogInterface) -> Unit)
fun neutralPressed(
@StringRes buttonTextResource: Int,
onClicked: (dialog: DialogInterface) -> Unit
)
//选择列表
fun items(
items: List<CharSequence>,
onItemSelected: (dialog: DialogInterface, index: Int) -> Unit
)
//单项确认
fun choiceItems(
items: List<CharSequence>,
checkedIndex: Int,
onItemSelected: (DialogInterface, Int) -> Unit
)
//多项确认
fun multiChoiceItems(
items: List<CharSequence>,
checkedItems: BooleanArray,
onItemSelected: (DialogInterface, Int, Boolean) -> Unit
)
//驳回
fun onDismissed(handler: (DialogInterface) -> Unit)
//取消
fun onCancelled(handler: (DialogInterface) -> Unit)
//按键处理 常用于返回键的拦截
fun onKeyPressed(handler: (DialogInterface, keyCode: Int, e: KeyEvent) -> Boolean)
//是否可以取消
fun isCancel(cancel: Boolean)
//创建
fun build(): D
//展示
fun show(): D
}
//Alert的构造器
abstract class AlertDialogBuilder : AlertBuilder<AlertDialog> {
//提供用于创建实例
abstract val builder: AlertDialog.Builder
//上下文
override val context: Context get() = builder.context
//标题
override var title: CharSequence
get() = throw NotImplementedError("Property does not have a getter")
set(value) {
builder.setTitle(value)
}
//消息
override var message: CharSequence
get() = throw NotImplementedError("Property does not have a getter")
set(value) {
builder.setMessage(value)
}
//消极的按钮
override fun negativeButton(buttonText: String, onClicked: (DialogInterface) -> Unit) {
builder.setNegativeButton(buttonText) { dialog, _ ->
onClicked(dialog)
}
}
//消极按钮
override fun negativeButton(buttonTextResource: Int, onClicked: (DialogInterface) -> Unit) {
builder.setNegativeButton(buttonTextResource) { dialog, _ ->
onClicked(dialog)
}
}
//中性按钮
override fun neutralPressed(buttonText: String, onClicked: (DialogInterface) -> Unit) {
builder.setNeutralButton(buttonText) { dialog, _ ->
onClicked(dialog)
}
}
//中性按钮
override fun neutralPressed(buttonTextResource: Int, onClicked: (DialogInterface) -> Unit) {
builder.setNeutralButton(buttonTextResource) { dialog, _ ->
onClicked(dialog)
}
}
//积极按钮
override fun positiveButton(buttonText: String, onClicked: (DialogInterface) -> Unit) {
builder.setPositiveButton(buttonText) { dialog, _ ->
onClicked(dialog)
}
}
override fun positiveButton(buttonTextResource: Int, onClicked: (DialogInterface) -> Unit) {
builder.setPositiveButton(buttonTextResource) { dialog, _ ->
onClicked(dialog)
}
}
override fun items(
items: List<CharSequence>,
onItemSelected: (dialog: DialogInterface, index: Int) -> Unit
) {
builder.setItems(items.toTypedArray(), onItemSelected)
}
override fun choiceItems(
items: List<CharSequence>,
checkedIndex: Int,
onItemSelected: (DialogInterface, Int) -> Unit
) {
builder.setSingleChoiceItems(items.toTypedArray(), checkedIndex, onItemSelected)
}
override fun multiChoiceItems(
items: List<CharSequence>,
checkedItems: BooleanArray,
onItemSelected: (DialogInterface, Int, Boolean) -> Unit
) {
builder.setMultiChoiceItems(items.toTypedArray(), checkedItems, onItemSelected)
}
override fun onDismissed(handler: (DialogInterface) -> Unit) {
builder.setOnDismissListener(handler)
}
override fun onCancelled(handler: (DialogInterface) -> Unit) {
builder.setOnCancelListener(handler)
}
override fun onKeyPressed(handler: (DialogInterface, keyCode: Int, e: KeyEvent) -> Boolean) {
builder.setOnKeyListener(handler)
}
override fun isCancel(cancel: Boolean) {
builder.setCancelable(false)
}
//构建
override fun build(): AlertDialog {
return builder.create()
}
//展示
override fun show(): AlertDialog {
return builder.show()
}
}
\ No newline at end of file
package com.zxhy.solarmasterace.filebrowser
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.zxhy.solarmasterace.R
import com.zxhy.solarmasterace.databinding.ActivityFileBrowserBinding
class FileBrowserActivity : AppCompatActivity() {
private lateinit var binding: ActivityFileBrowserBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
binding = ActivityFileBrowserBinding.inflate(layoutInflater)
setContentView(binding.root)
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
insets
}
}
}
\ No newline at end of file
package com.zxhy.solarmasterace.manager
import android.annotation.SuppressLint
import android.content.Context
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.core.content.ContextCompat
import com.zxhy.solarmasterace.R
import com.zxhy.solarmasterace.databinding.FragmentManagerBinding
import com.zxhy.solarmasterace.quicktools.getMountInfoList
import java.math.BigDecimal
class ManagerFragment : Fragment() {
private lateinit var binding: FragmentManagerBinding
private lateinit var context: Context
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
arguments?.let {}
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
val root = inflater.inflate(R.layout.fragment_manager, container, false)
binding = FragmentManagerBinding.bind(root)
return root
}
@SuppressLint("SetTextI18n")
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
context = requireContext()
val disk = requireContext().getMountInfoList().first()
binding.tvUse.text = "Use:" + disk.getUsedContent(requireContext())
binding.tvFree.text = "Free:" + disk.getFreeContent(requireContext())
val percentF = BigDecimal(disk.used)
.divide(BigDecimal(disk.total), 2, BigDecimal.ROUND_HALF_UP)
val percent = percentF.multiply(BigDecimal(100)).toInt()
binding.tvPercent.text = "$percent%"
binding.cardCategory.setOnClickListener {
categoryMode()
}
binding.cardDocuments.setOnClickListener {
documentsMode()
}
categoryMode()
}
fun categoryMode() {
binding.apply {
val txtColo1 = ContextCompat.getColor(context, R.color.white)
val txtColo2 = ContextCompat.getColor(context, R.color.color_FF5C67E5)
val bgColor2 = ContextCompat.getColor(context, R.color.color_FF4CE0AB)
val bgColor1 = ContextCompat.getColor(context, R.color.white)
cardCategory.setCardBackgroundColor(bgColor2)
ivCategory.setImageResource(R.mipmap.dsa_897)
tvCategory.setTextColor(txtColo1)
cardDocuments.setCardBackgroundColor(bgColor1)
ivDocuments.setImageResource(R.mipmap.wr_5877)
tvDocuments.setTextColor(txtColo2)
clFile.visibility = View.VISIBLE
clDocuments.visibility = View.GONE
}
}
fun documentsMode() {
binding.apply {
val txtColo1 = ContextCompat.getColor(context, R.color.white)
val txtColo2 = ContextCompat.getColor(context, R.color.color_FF5C67E5)
val bgColor2 = ContextCompat.getColor(context, R.color.color_FF4CE0AB)
val bgColor1 = ContextCompat.getColor(context, R.color.white)
cardCategory.setCardBackgroundColor(bgColor1)
ivCategory.setImageResource(R.mipmap.dsa_8972)
tvCategory.setTextColor(txtColo2)
cardDocuments.setCardBackgroundColor(bgColor2)
ivDocuments.setImageResource(R.mipmap.wr_587712)
tvDocuments.setTextColor(txtColo1)
clFile.visibility = View.GONE
clDocuments.visibility = View.VISIBLE
}
}
companion object {
@JvmStatic
fun newInstance() =
ManagerFragment().apply {
arguments = Bundle().apply {}
}
}
}
\ No newline at end of file
package com.zxhy.solarmasterace.permission
import android.content.Context
import android.content.pm.PackageManager
import androidx.core.content.ContextCompat
import com.zxhy.solarmasterace.dialog.alert
import com.zxhy.solarmasterace.quicktools.ActivityLauncher
import com.zxhy.solarmasterace.quicktools.goToPermissionSettings
fun requestPermission(
context: Context,
activityLauncher: ActivityLauncher,
permission: Array<String>,
tip: String,
agreeAction: (() -> Unit)? = null,
disAgreeAction: (() -> Unit)? = null
) {
val permissionFlag =
permission.all {
ContextCompat.checkSelfPermission(context, it) == PackageManager.PERMISSION_GRANTED
}
if (permissionFlag) {
agreeAction?.invoke()
} else {
activityLauncher.launch(permission) { callback ->
val isGrantAll = callback.values.all { it }
if (!isGrantAll) {
context.alert(tip) {
positiveButton("Jump") { dialog ->
goToPermissionSettings(context, activityLauncher)
dialog.dismiss()
}
negativeButton("Cancel") { dialog ->
dialog.dismiss()
disAgreeAction?.invoke()
}
//禁止取消
isCancel(false)
}
} else {
agreeAction?.invoke()
}
}
}
}
\ No newline at end of file
package com.zxhy.solarmasterace.permission
import android.Manifest
import android.annotation.SuppressLint
import android.content.Context
import android.net.Uri
import android.os.Build
import android.os.Environment
import com.zxhy.solarmasterace.quicktools.ActivityLauncher
import com.zxhy.solarmasterace.quicktools.settingManageExternalStorage
//Android 13以后,读写权限无法弹出系统弹窗,分化为Manifest.permission.READ_MEDIA_*权限
//Android 11以后,Manifest.permission.READ_EXTERNAL_STORAGE 授予后还需授予 额外储存管理权限 ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION
//Android 11以下使用Manifest.permission.READ_EXTERNAL_STORAGE
@SuppressLint("LocalSuppress")
fun Context.requestStoreFollow(
activityLauncher: ActivityLauncher,
disAgreeAction: (() -> Unit)? = null,
agreeAction: (() -> Unit)? = null,
) {
//请求读写管理权限
@SuppressLint("NewApi")
val requestExternalStorageManager: () -> Unit = {
if (!Environment.isExternalStorageManager()) {
val uri = Uri.parse("package:$packageName")
val intent = settingManageExternalStorage(uri)
activityLauncher.launch(intent) {
val flag = Environment.isExternalStorageManager()
if (flag) agreeAction?.invoke() else disAgreeAction?.invoke()
}
} else {
agreeAction?.invoke()
}
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {//Android 13以后
requestExternalStorageManager()
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {//Android 11以后
requestPermission(
this, activityLauncher,
arrayOf(
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE
), "Set permission to access external storage",
agreeAction = { //读写权限通过,设置储存管理权限
requestExternalStorageManager()
},
disAgreeAction = { disAgreeAction?.invoke() }
)
} else { //Android 11以下,Android 6以上
requestPermission(
this, activityLauncher,
arrayOf(
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE
), "Set permission to access external storage",
agreeAction = {
//读写权限通过
agreeAction?.invoke()
}, disAgreeAction = { disAgreeAction?.invoke() }
)
}
}
package com.zxhy.solarmasterace.quicktools
import android.content.Intent
import androidx.activity.result.ActivityResult
import androidx.activity.result.ActivityResultCallback
import androidx.activity.result.ActivityResultCaller
import androidx.activity.result.contract.ActivityResultContracts
class ActivityLauncher(activityResultCaller: ActivityResultCaller) {
//region 权限
private var permissionCallback: ActivityResultCallback<Map<String, Boolean>>? = null
private val permissionLauncher =
activityResultCaller.registerForActivityResult(ActivityResultContracts.RequestMultiplePermissions()) { result: Map<String, Boolean> ->
permissionCallback?.onActivityResult(result)
}
fun launch(
permissionArray: Array<String>,
permissionCallback: ActivityResultCallback<Map<String, Boolean>>?
) {
this.permissionCallback = permissionCallback
permissionLauncher.launch(permissionArray)
}
//endregion
//region intent跳转
private var activityResultCallback: ActivityResultCallback<ActivityResult>? = null
private val intentLauncher =
activityResultCaller.registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { activityResult: ActivityResult ->
activityResultCallback?.onActivityResult(activityResult)
}
/**
* it.resultCode == Activity.RESULT_OK
*/
fun launch(
intent: Intent,
activityResultCallback: ActivityResultCallback<ActivityResult>? = null
) {
this.activityResultCallback = activityResultCallback
intentLauncher.launch(intent)
}
//endregion
}
\ No newline at end of file
package com.zxhy.solarmasterace.quicktools
import android.annotation.SuppressLint
import android.app.usage.StorageStatsManager
import android.content.Context
import android.os.Build
import android.os.storage.StorageManager
import android.os.storage.StorageVolume
import android.text.format.Formatter
import androidx.annotation.RequiresApi
import java.io.File
import java.lang.reflect.Field
import java.lang.reflect.Method
import java.util.UUID
/**
* 计算储存介质
*/
const val TYPE_U = 0 //u盘
const val TYPE_DATA = 1 //data区域
const val TYPE_EXTERNAL = 2 //外置存储
data class Disk(
val path: String = "", //路径
val name: String = "", //名称
val type: Int = 0,//类型 0U盘 1 data区域 2内置存储区域
val total: Long = 0, //总计数量
val used: Long = 0, //已用空间
val free: Long = 0, //空闲空间
) {
fun getTotalContent(context: Context): String {
return Formatter.formatFileSize(context, total)
}
fun getUsedContent(context: Context): String {
return Formatter.formatFileSize(context, used)
}
fun getFreeContent(context: Context): String {
return Formatter.formatFileSize(context, free)
}
}
@SuppressLint("SoonBlockedPrivateApi", "UsableSpace", "ObsoleteSdkInt", "DiscouragedPrivateApi")
fun Context.getMountInfoList(): List<Disk> {
val diskList = arrayListOf<Disk>()
val storageManager = getSystemService(Context.STORAGE_SERVICE) as StorageManager
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {//小于6.0
val getVolumeListMethod = StorageManager::class.java.getDeclaredMethod("getVolumeList")
val volumes = getVolumeListMethod.invoke(storageManager) as Array<StorageVolume>
for (volume in volumes) {
try {
val fileMethod = volume.javaClass.getDeclaredMethod("getPathFile")
val file = fileMethod.invoke(volume) as File
val path = file.path
val name = file.name
val total = file.totalSpace //总计
val used = total - file.freeSpace //空闲
val usable = file.usableSpace //可用
diskList.add(Disk(path, name, -1, total, used, usable))
} catch (e: Exception) {
e.printStackTrace()
}
}
} else {
val getVolumeMethod = StorageManager::class.java.getDeclaredMethod("getVolumes")
val volumes = getVolumeMethod.invoke(storageManager) as List<Any>
for (volume in volumes) {
try {
val getTypeField: Field = volume.javaClass.getField("type")
val type: Int = getTypeField.getInt(volume)
val fileMethod = volume.javaClass.getDeclaredMethod("getPath")
val f: File = fileMethod.invoke(volume) as File
val path = f.path
val name = f.name
val total = if (type != TYPE_U && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val getFsUuid: Method = volume.javaClass.getDeclaredMethod("getFsUuid")
val fsUuid = getFsUuid.invoke(volume) as? String
getTotalSize(fsUuid)
} else {
f.totalSpace //总计
}
val used = total - f.usableSpace //空闲
val usable = f.usableSpace //空闲
val disk = Disk(path, name, type, total, used, usable)
diskList.add(disk)
} catch (e: Exception) {
e.printStackTrace()
}
}
}
return diskList
}
@RequiresApi(Build.VERSION_CODES.O)
fun Context.getTotalSize(fsUuid: String?): Long {
return try {
val id = if (fsUuid == null) StorageManager.UUID_DEFAULT else UUID.fromString(fsUuid)
val stats = getSystemService(StorageStatsManager::class.java)
stats.getTotalBytes(id)
} catch (e: Exception) {
e.printStackTrace()
-1
}
}
\ No newline at end of file
package com.zxhy.solarmasterace.quicktools
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Build
import android.provider.Settings
import androidx.annotation.RequiresApi
/**
* 访问所有文件权限设置界面
* https://blog.csdn.net/qq_17766199/article/details/115351949
*/
@RequiresApi(Build.VERSION_CODES.R)
fun settingManageExternalStorage(uri: Uri? = null): Intent {
val intent = Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION, uri)
// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
return intent
}
//权限设置界面
fun goToPermissionSettings(context: Context, activityLauncher: ActivityLauncher) {
val intent = appSettingsIntent(context.packageName)
activityLauncher.launch(intent)
}
/**
* 应用设置页面意图
*/
fun appSettingsIntent(packageName: String): Intent {
return Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
.setData(Uri.fromParts("package", packageName, null))
}
\ No newline at end of file
package com.zxhy.solarmasterace.quicktools
import android.content.ContentUris
import android.content.Context
import android.database.Cursor
import android.provider.MediaStore
import com.zxhy.solarmasterace.data.FileBean
fun recentImage(context: Context): ArrayList<FileBean> {
val list = arrayListOf<FileBean>()
var cursor: Cursor? = null
// 查询照片的Uri和字段
val uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI
val projection = arrayOf(MediaStore.Images.Media._ID, MediaStore.Images.Media.DISPLAY_NAME)
//DESC 降列
//ASC 升序
val sortOrder = MediaStore.Images.ImageColumns._ID + " DESC"
try {
// 执行查询
cursor = context.contentResolver.query(uri, projection, null, null, sortOrder)
// 遍历结果
if (cursor != null && cursor.moveToFirst()) {
do {
val id = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Images.Media._ID))
val photoUri = ContentUris.withAppendedId(uri, id)
list.add(FileBean(uri = photoUri))
if (list.size == 10) {
break
}
} while (cursor.moveToNext())
}
} catch (e: Exception) {
e.printStackTrace()
} finally {
cursor?.close()
}
return list
}
\ No newline at end of file
package com.zxhy.solarmasterace.quicktools
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
/**
* 解析xml布局
*
* @param parent 父布局
* @param attachToRoot 是否依附到父布局
*/
fun Int.inflate(parent: ViewGroup, attachToRoot: Boolean = false): View {
return LayoutInflater.from(parent.context).inflate(this, parent, attachToRoot)
}
package com.zxhy.solarmasterace.tools
import android.annotation.SuppressLint
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView.Adapter
import coil.load
import coil.transform.CircleCropTransformation
import coil.transform.RoundedCornersTransformation
import coil.transform.Transformation
import com.zxhy.solarmasterace.R
import com.zxhy.solarmasterace.adapter.AdapterCommonDataFunction
import com.zxhy.solarmasterace.adapter.ItemImage85ViewHolder
import com.zxhy.solarmasterace.data.FileBean
import com.zxhy.solarmasterace.quicktools.inflate
class RecentImageAdapter() : Adapter<ItemImage85ViewHolder>(), AdapterCommonDataFunction {
private val fileList = arrayListOf<FileBean>()
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemImage85ViewHolder {
return ItemImage85ViewHolder(R.layout.item_card_image_85.inflate(parent))
}
override fun getItemCount(): Int {
return fileList.size
}
override fun onBindViewHolder(holder: ItemImage85ViewHolder, position: Int) {
val data = fileList[position]
holder.binding.apply {
iv.load(data.uri) {
transformations(RoundedCornersTransformation())
}
}
}
@SuppressLint("NotifyDataSetChanged")
override fun setData(data: List<FileBean>) {
fileList.clear()
fileList.addAll(data)
notifyDataSetChanged()
}
}
\ No newline at end of file
package com.zxhy.solarmasterace.tools
import android.content.Context
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.lifecycle.lifecycleScope
import com.zxhy.solarmasterace.R
import com.zxhy.solarmasterace.databinding.FragmentToolsBinding
import com.zxhy.solarmasterace.quicktools.recentImage
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.launch
class ToolsFragment : Fragment() {
private lateinit var binding: FragmentToolsBinding
private lateinit var imageAdapter: RecentImageAdapter
private lateinit var context: Context
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
arguments?.let {
}
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
val root = inflater.inflate(R.layout.fragment_tools, container, false)
binding = FragmentToolsBinding.bind(root)
return root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
context = requireContext()
imageAdapter = RecentImageAdapter()
binding.rv.adapter = imageAdapter
loadRecentImage()
}
private fun loadRecentImage() {
lifecycleScope.launch(Dispatchers.IO) {
val list = recentImage(context)
launch(Dispatchers.Main) {
imageAdapter.setData(list)
}
}
}
companion object {
@JvmStatic
fun newInstance() =
ToolsFragment().apply {
arguments = Bundle().apply {
}
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@mipmap/wuio_8975" android:state_selected="true" />
<item android:drawable="@mipmap/dssd_9895" android:state_selected="false" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FF5C67E5" />
<corners
android:bottomLeftRadius="25dp"
android:bottomRightRadius="25dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@mipmap/da_878511" android:state_selected="true" />
<item android:drawable="@mipmap/da_8785" android:state_selected="false" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@mipmap/sdzs_6897" android:state_selected="true" />
<item android:drawable="@mipmap/fdfas_987" android:state_selected="false" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="-90"
android:endColor="#FF3E48B2"
android:startColor="#FF99A1FF"
android:type="linear" />
</shape>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".filebrowser.FileBrowserActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_top"
android:layout_width="match_parent"
android:layout_height="50dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<FrameLayout
android:id="@+id/cl_arrow"
android:layout_width="60dp"
android:layout_height="36dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="8dp"
android:src="@mipmap/df_0011"
tools:ignore="ContentDescription" />
</FrameLayout>
<TextView
android:id="@+id/tv_tittle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Duplicate picture"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="HardcodedText" />
<LinearLayout
android:id="@+id/ll_all"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="20dp"
android:text="All"
android:textColor="#FF999999"
android:textSize="14sp"
tools:ignore="HardcodedText" />
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:src="@drawable/bg_circle_selector"
tools:ignore="ContentDescription" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/tv_tip1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:text="3 items"
android:textColor="#FF666666"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@id/rv"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/cl_top"
tools:ignore="HardcodedText,RtlHardcoded" />
<TextView
android:id="@+id/tv_tip2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="16dp"
android:text="Files larger than 10MB"
android:textColor="#FF666666"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@id/rv"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/cl_top"
tools:ignore="HardcodedText,RtlHardcoded" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginTop="30dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toTopOf="@id/tv_delete"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/cl_top" />
<TextView
android:id="@+id/tv_delete"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_marginHorizontal="56dp"
android:layout_marginBottom="54dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fragment_container_view"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
app:defaultNavHost="true"
app:layout_constraintBottom_toTopOf="@id/b_nav"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/nav" />
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/b_nav"
android:layout_marginTop="20dp"
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:itemBackground="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:menu="@menu/menu_main" />
</androidx.constraintlayout.widget.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_top"
android:layout_width="0dp"
android:layout_height="350dp"
android:background="@drawable/bg_ff5c67e5_corners"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="24dp"
android:text="Solar Master Ace"
android:textColor="#FFFFFFFF"
android:textSize="18sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="HardcodedText" />
<FrameLayout
android:id="@+id/iv_circle"
android:layout_width="220dp"
android:layout_height="220dp"
android:background="@mipmap/dadd_7884"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintLeft_toRightOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription">
<TextView
android:id="@+id/tv_percent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="28%"
android:textColor="#FFFFFFFF"
android:textSize="50sp"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="@id/iv_circle"
tools:ignore="HardcodedText" />
</FrameLayout>
<TextView
android:id="@+id/tv_free"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginBottom="38dp"
android:text="Free:20GB"
android:textColor="#FFFFFFFF"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tv_use"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginBottom="38dp"
android:text="Use:100GB"
android:textColor="#FFFFFFFF"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
tools:ignore="HardcodedText" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.cardview.widget.CardView
android:id="@+id/card_category"
android:layout_width="171dp"
android:layout_height="50dp"
android:layout_marginStart="16dp"
android:layout_marginBottom="-25dp"
app:cardCornerRadius="8dp"
app:layout_constraintBottom_toBottomOf="@id/cl_top"
app:layout_constraintLeft_toLeftOf="parent">
<ImageView
android:id="@+id/iv_category"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="20dp"
android:src="@mipmap/dsa_897"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/tv_category"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="56dp"
android:text="Category"
android:textSize="15sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/card_documents"
android:layout_width="171dp"
android:layout_height="50dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="-25dp"
app:cardBackgroundColor="#FFFFFFFF"
app:cardCornerRadius="8dp"
app:cardElevation="5dp"
app:layout_constraintBottom_toBottomOf="@id/cl_top"
app:layout_constraintRight_toRightOf="parent">
<ImageView
android:id="@+id/iv_documents"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="20dp"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/tv_documents"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="56dp"
android:text="Documents"
android:textSize="15sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/card_media"
android:layout_width="0dp"
android:layout_height="164dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="48dp"
app:cardCornerRadius="12dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/cl_top">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_file"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible">
<LinearLayout
android:id="@+id/ll_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="16dp"
android:orientation="vertical"
app:layout_constraintBottom_toTopOf="@id/ll_apk"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/ll_video"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/as_230"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="Image"
android:textColor="#FF333333"
android:textSize="12sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_video"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintLeft_toRightOf="@id/ll_image"
app:layout_constraintRight_toLeftOf="@id/ll_Audio"
app:layout_constraintTop_toTopOf="@id/ll_image"
tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/fasf_097"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="Video"
android:textColor="#FF333333"
android:textSize="12sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_Audio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
android:orientation="vertical"
app:layout_constraintLeft_toRightOf="@id/ll_video"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/ll_image"
tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/fasd_87985"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="Audio"
android:textColor="#FF333333"
android:textSize="12sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_apk"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="12dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/ll_zip"
app:layout_constraintTop_toBottomOf="@id/ll_image"
tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/faad_8795"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="Apk"
android:textColor="#FF333333"
android:textSize="12sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_zip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintLeft_toRightOf="@id/ll_apk"
app:layout_constraintRight_toLeftOf="@id/ll_log_file"
app:layout_constraintTop_toTopOf="@id/ll_apk"
tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/fas_87895"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="Zip"
android:textColor="#FF333333"
android:textSize="12sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_log_file"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
android:orientation="vertical"
app:layout_constraintLeft_toRightOf="@id/ll_zip"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/ll_apk"
tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/fzzx_65987"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="Log file"
android:textColor="#FF333333"
android:textSize="12sp"
tools:ignore="HardcodedText" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_documents"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible">
<LinearLayout
android:id="@+id/ll_Word"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="16dp"
android:orientation="vertical"
app:layout_constraintBottom_toTopOf="@id/ll_pdf"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/ll_excel"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/wrf_58997"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="Word"
android:textColor="#FF333333"
android:textSize="12sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_excel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintLeft_toRightOf="@id/ll_Word"
app:layout_constraintRight_toLeftOf="@id/ll_ppt"
app:layout_constraintTop_toTopOf="@id/ll_Word"
tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/ex_289897"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="Excel"
android:textColor="#FF333333"
android:textSize="12sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_ppt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
android:orientation="vertical"
app:layout_constraintLeft_toRightOf="@id/ll_excel"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/ll_Word"
tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/fss_87895"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="PPT"
android:textColor="#FF333333"
android:textSize="12sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_pdf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="12dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/ll_txt"
app:layout_constraintTop_toBottomOf="@id/ll_Word"
tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/zc_8979855556"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="PDF"
android:textColor="#FF333333"
android:textSize="12sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintLeft_toRightOf="@id/ll_pdf"
app:layout_constraintRight_toLeftOf="@id/ll_all_doc"
app:layout_constraintTop_toTopOf="@id/ll_pdf"
tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/fdg_87985"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="TXT"
android:textColor="#FF333333"
android:textSize="12sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_all_doc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
android:orientation="vertical"
app:layout_constraintLeft_toRightOf="@id/ll_txt"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/ll_pdf"
tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/ff_0985"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="Log file"
android:textColor="#FF333333"
android:textSize="12sp"
tools:ignore="HardcodedText" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_ad"
android:layout_width="0dp"
android:layout_height="140dp"
android:layout_marginHorizontal="20dp"
android:layout_marginTop="24dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/card_media">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@mipmap/a_8001"
tools:ignore="ContentDescription" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".tools.ToolsFragment">
<TextView
android:id="@+id/tv_tittle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="20dp"
android:text="Tools"
android:textColor="#FF333333"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="HardcodedText,RtlHardcoded" />
<androidx.cardview.widget.CardView
android:id="@+id/card_dup_image"
android:layout_width="0dp"
android:layout_height="65dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="8dp"
app:cardCornerRadius="8dp"
app:cardElevation="5dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_tittle">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_1"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
android:src="@mipmap/lop_789846"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="60dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="@id/iv_1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="@id/iv_1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Scan duplicate picture"
android:textColor="#FF333333"
android:textSize="15sp"
tools:ignore="HardcodedText" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="Abc"
android:textColor="#FF999999"
android:textSize="14sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@mipmap/fff_000"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/card_large_image"
android:layout_width="0dp"
android:layout_height="65dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="16dp"
app:cardCornerRadius="8dp"
app:cardElevation="5dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/card_dup_image">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_2"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
android:src="@mipmap/lo_789798"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="60dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="@id/iv_2"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="@id/iv_2">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Scan large files"
android:textColor="#FF333333"
android:textSize="15sp"
tools:ignore="HardcodedText" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="Abc"
android:textColor="#FF999999"
android:textSize="14sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@mipmap/fff_000"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/card_empty_file"
android:layout_width="0dp"
android:layout_height="65dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="16dp"
app:cardCornerRadius="8dp"
app:cardElevation="5dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/card_large_image">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_3"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
android:src="@mipmap/ffs_897956"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="60dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="@id/iv_3"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="@id/iv_3">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Scan empty file"
android:textColor="#FF333333"
android:textSize="15sp"
tools:ignore="HardcodedText" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="Abc"
android:textColor="#FF999999"
android:textSize="14sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@mipmap/fff_000"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/tv_recent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="24dp"
android:text="Recent"
android:textColor="#FF333333"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/card_empty_file"
tools:ignore="HardcodedText,RtlHardcoded" />
<androidx.cardview.widget.CardView
android:id="@+id/card_rv"
android:layout_width="0dp"
android:layout_height="117dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="8dp"
app:cardCornerRadius="8dp"
app:cardElevation="5dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_recent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:orientation="horizontal"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</androidx.cardview.widget.CardView>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_ad"
android:layout_width="0dp"
android:layout_height="140dp"
android:layout_marginHorizontal="20dp"
android:layout_marginTop="24dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/card_rv">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@mipmap/a_8001"
tools:ignore="ContentDescription" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_margin="8dp"
app:cardCornerRadius="8dp"
tools:ignore="ContentDescription">
<ImageView
android:id="@+id/iv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop" />
</androidx.cardview.widget.CardView>
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<item
android:id="@+id/nav_manager"
android:enabled="true"
android:icon="@drawable/bg_manager_selector"
android:title="Manager"
android:visible="true"
app:showAsAction="ifRoom"
tools:ignore="HardcodedText" />
<item
android:id="@+id/nav_tools"
android:enabled="true"
android:icon="@drawable/bg_tools_selector"
android:title="Tools"
android:visible="true"
app:showAsAction="ifRoom"
tools:ignore="HardcodedText" />
</menu>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nav.xml"
app:startDestination="@id/managerFragment">
<fragment
tools:layout="@layout/fragment_manager"
android:id="@+id/managerFragment"
android:name="com.zxhy.solarmasterace.manager.ManagerFragment"
android:label="ManagerFragment" >
<action
android:id="@+id/action_managerFragment_to_toolsFragment"
app:destination="@id/toolsFragment" />
</fragment>
<fragment
android:id="@+id/toolsFragment"
android:name="com.zxhy.solarmasterace.tools.ToolsFragment"
android:label="fragment_tools"
tools:layout="@layout/fragment_tools" >
<action
android:id="@+id/action_toolsFragment_to_managerFragment"
app:destination="@id/managerFragment" />
</fragment>
</navigation>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Base.Theme.SolarMasterAce" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Customize your dark theme here. -->
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="color_FF5C67E5">#FF5C67E5</color>
<color name="color_FF4CE0AB">#FF4CE0AB</color>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="dp_24">24dp</dimen>
<dimen name="dp_48">48dp</dimen>
</resources>
\ No newline at end of file
<resources>
<string name="app_name">Solar Master Ace</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Base.Theme.SolarMasterAce" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Customize your light theme here. -->
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
</style>
<style name="Theme.SolarMasterAce" parent="Base.Theme.SolarMasterAce" />
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!--
Sample backup rules file; uncomment and customize as necessary.
See https://developer.android.com/guide/topics/data/autobackup
for details.
Note: This file is ignored for devices older that API 31
See https://developer.android.com/about/versions/12/backup-restore
-->
<full-backup-content>
<!--
<include domain="sharedpref" path="."/>
<exclude domain="sharedpref" path="device.xml"/>
-->
</full-backup-content>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!--
Sample data extraction rules file; uncomment and customize as necessary.
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
for details.
-->
<data-extraction-rules>
<cloud-backup>
<!-- TODO: Use <include> and <exclude> to control what is backed up.
<include .../>
<exclude .../>
-->
</cloud-backup>
<!--
<device-transfer>
<include .../>
<exclude .../>
</device-transfer>
-->
</data-extraction-rules>
\ No newline at end of file
package com.zxhy.solarmasterace
import org.junit.Test
import org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.jetbrainsKotlinAndroid) apply false
}
\ No newline at end of file
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. For more details, visit
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
\ No newline at end of file
[versions]
agp = "8.3.0"
kotlin = "1.9.0"
coreKtx = "1.10.1"
junit = "4.13.2"
junitVersion = "1.1.5"
espressoCore = "3.5.1"
appcompat = "1.6.1"
material = "1.10.0"
activity = "1.8.0"
constraintlayout = "2.1.4"
navigationFragmentKtx = "2.7.7"
navigationUiKtx = "2.7.7"
coil = "2.6.0"
[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
androidx-navigation-fragment-ktx = { group = "androidx.navigation", name = "navigation-fragment-ktx", version.ref = "navigationFragmentKtx" }
androidx-navigation-ui-ktx = { group = "androidx.navigation", name = "navigation-ui-ktx", version.ref = "navigationUiKtx" }
coil = { group = "io.coil-kt", name = "coil", version.ref = "coil" }
[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
#Tue Mar 19 09:48:11 CST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
pluginManagement {
repositories {
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "Solar Master Ace"
include(":app")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment