Skip to content

Commit

Permalink
Merge pull request #40 from emreesen27/v1.0.0-beta4
Browse files Browse the repository at this point in the history
V1.0.0 beta4
emreesen27 authored Feb 29, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents b6b97c6 + 4d65c9c commit a3454f0
Showing 24 changed files with 342 additions and 58 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v1.0.0-beta4 (29.02.2024)

* Home screen menu arrangement
* Create folder feature added
* Minor UI fix

## v1.0.0-beta3 (16.02.2024)

* UI improvement
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -39,8 +39,8 @@ android {
applicationId "com.sn.snfilemanager"
minSdk 26
targetSdk 34
versionCode 3
versionName "1.0.0-beta3"
versionCode 4
versionName "1.0.0-beta4"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Original file line number Diff line number Diff line change
@@ -115,3 +115,10 @@ fun Context.startActivitySafely(intent: Intent) {
// Todo
}
}

fun Context.openUrl(url: String) {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
startActivitySafely(intent)
}

fun Context.getPackage(): String = "package:${this.packageName}"
Original file line number Diff line number Diff line change
@@ -7,4 +7,5 @@ object Constant {
"https://github.com/emreesen27/Android-Sn-File-Manager/blob/develop/PRIVACY.md"
const val OPEN_SOURCE_LICENSE =
"https://github.com/emreesen27/Android-Sn-File-Manager/blob/develop/LICENSE"
const val STORE_URL = "https://play.google.com/store/apps/details?id=com.sn.snfilemanager"
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.sn.snfilemanager.feature.about

import android.content.Intent
import android.net.Uri
import androidx.navigation.fragment.findNavController
import com.sn.snfilemanager.core.base.BaseFragment
import com.sn.snfilemanager.core.extensions.click
import com.sn.snfilemanager.core.extensions.startActivitySafely
import com.sn.snfilemanager.core.extensions.openUrl
import com.sn.snfilemanager.core.util.Constant.GITHUB_URL
import com.sn.snfilemanager.core.util.Constant.PRIVACY_URL
import com.sn.snfilemanager.databinding.FragmentAboutBinding
@@ -24,17 +22,12 @@ class AboutFragment : BaseFragment<FragmentAboutBinding, AboutViewModel>() {

private fun initClicks() {
binding.toolbar.setNavigationOnClickListener { findNavController().popBackStack() }
binding.btnGithub.click { openUrl(GITHUB_URL) }
binding.btnGithub.click { context?.openUrl(GITHUB_URL) }
binding.btnLicense.click { showLicensesDialog() }
binding.btnPrivacy.click { openUrl(PRIVACY_URL) }
binding.btnPrivacy.click { context?.openUrl(PRIVACY_URL) }
}

private fun showLicensesDialog() {
LicenseDialog().show(childFragmentManager, LicenseDialog.TAG)
}

private fun openUrl(url: String) {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
context?.startActivitySafely(intent)
}
}
Original file line number Diff line number Diff line change
@@ -24,14 +24,19 @@ class FileItemAdapter(
) : RecyclerView.Adapter<FileItemAdapter.FileViewHolder>() {
private val selectedItems: MutableList<FileModel> = mutableListOf()
private var isSelectionModeActive = false
private var fileItems: List<FileModel> = emptyList()
private var fileItems: MutableList<FileModel> = mutableListOf()

fun setItems(newItems: List<FileModel>) {
fun setItems(newItems: MutableList<FileModel>) {
val diffResult = DiffUtil.calculateDiff(FileDiffCallback(fileItems, newItems))
fileItems = newItems
diffResult.dispatchUpdatesTo(this)
}

fun addItem(newItems: FileModel) {
fileItems.add(newItems)
notifyItemInserted(fileItems.size)
}

fun removeItems(filesToRemove: List<FileModel>) {
for (fileToRemove in filesToRemove) {
val position = fileItems.indexOf(fileToRemove)
@@ -55,6 +60,8 @@ class FileItemAdapter(
selectionCallback?.onEndSelection()
}

fun getItems(): MutableList<FileModel> = fileItems

fun getSelectedItems(): MutableList<FileModel> = selectedItems

fun selectionIsActive(): Boolean = isSelectionModeActive
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@ import com.sn.snfilemanager.core.util.RootPath
import com.sn.snfilemanager.databinding.FragmentFilesListBinding
import com.sn.snfilemanager.feature.files.adapter.FileItemAdapter
import com.sn.snfilemanager.feature.files.data.FileModel
import com.sn.snfilemanager.feature.files.data.toFileModel
import com.sn.snfilemanager.feature.pathpicker.presentation.PathPickerFragment
import com.sn.snfilemanager.job.JobCompletedCallback
import com.sn.snfilemanager.job.JobService
@@ -33,6 +34,7 @@ import com.sn.snfilemanager.view.component.breadcrumb.BreadCrumbItemClickListene
import com.sn.snfilemanager.view.component.breadcrumb.BreadItem
import com.sn.snfilemanager.view.dialog.ConfirmationDialog
import com.sn.snfilemanager.view.dialog.ConflictDialog
import com.sn.snfilemanager.view.dialog.CreateDirectoryDialog
import com.sn.snfilemanager.view.dialog.detail.DetailDialog
import dagger.hilt.android.AndroidEntryPoint
import java.io.File
@@ -54,7 +56,7 @@ class FilesListFragment :

override fun getViewBinding() = FragmentFilesListBinding.inflate(layoutInflater)

override fun getMenuResId(): Int = R.menu.menu_base
override fun getMenuResId(): Int = R.menu.menu_files

override fun getToolbar(): Toolbar = binding.toolbar

@@ -65,6 +67,13 @@ class FilesListFragment :
true
}

R.id.create_folder -> {
viewModel.currentPath?.let { path ->
showCreateDirectoryDialog(path)
}
true
}

else -> super.onMenuItemSelected(menuItemId)
}

@@ -164,6 +173,16 @@ class FilesListFragment :
JobType.DELETE -> {
activity?.runOnUiThread {
data?.filterIsInstance<FileModel>()?.let { adapter?.removeItems(it) }
adapter?.getItems()?.let { viewModel.setUpdateList(it) }
}
}

JobType.CREATE -> {
activity?.runOnUiThread {
data?.filterIsInstance<Path>()?.firstOrNull()?.toFileModel()?.let { file ->
adapter?.addItem(file)
adapter?.getItems()?.let { viewModel.setUpdateList(it) }
}
}
}
}
@@ -195,6 +214,11 @@ class FilesListFragment :
startDeleteService(data)
}
}
observe(viewModel.startCreateFolderJob) { event ->
event.getContentIfNotHandled()?.let { path ->
startCreateDirectory(path)
}
}
observe(viewModel.updateListLiveData) { event ->
event.getContentIfNotHandled()?.let { list ->
adapter?.setItems(list)
@@ -330,6 +354,12 @@ class FilesListFragment :
)
}

private fun showCreateDirectoryDialog(path: String) {
CreateDirectoryDialog(path = path, onCreate = { folderName ->
viewModel.createFolder(folderName)
}).show(childFragmentManager, CreateDirectoryDialog.TAG)
}

private fun actionDetail() {
DetailDialog(requireContext(), viewModel.getSelectedItem()).show(
childFragmentManager,
@@ -389,6 +419,14 @@ class FilesListFragment :
)
}

private fun startCreateDirectory(destinationPath: Path) {
JobService.createDirectory(
destinationPath,
this@FilesListFragment,
requireContext(),
)
}

private fun initSearch() {
binding.toolbar.menu?.findItem(R.id.action_search)?.let { item ->
val searchView = item.actionView as? SearchView
Original file line number Diff line number Diff line change
@@ -62,13 +62,17 @@ class FilesListViewModel
MutableLiveData()
val startDeleteJobLiveData: LiveData<Event<List<FileModel>>> = _startDeleteJobLiveData

private val _updateListLiveData: MutableLiveData<Event<List<FileModel>>> = MutableLiveData()
val updateListLiveData: LiveData<Event<List<FileModel>>> = _updateListLiveData
private val _updateListLiveData: MutableLiveData<Event<MutableList<FileModel>>> =
MutableLiveData()
val updateListLiveData: LiveData<Event<MutableList<FileModel>>> = _updateListLiveData

private val _searchStateLiveData: MutableLiveData<Event<Pair<Boolean, Boolean>>> =
MutableLiveData()
val searchStateLiveData: LiveData<Event<Pair<Boolean, Boolean>>> = _searchStateLiveData

private val _startCreateFolderJob: MutableLiveData<Event<Path>> = MutableLiveData()
val startCreateFolderJob: LiveData<Event<Path>> = _startCreateFolderJob

var conflictDialogDeferred = CompletableDeferred<Pair<ConflictStrategy, Boolean>>()

companion object {
@@ -133,7 +137,7 @@ class FilesListViewModel
val fileList: MutableList<FileModel> = mutableListOf()

if (totalFiles == 0L) {
_updateListLiveData.postValue(Event(emptyList()))
_updateListLiveData.postValue(Event(mutableListOf()))
return@launch
}

@@ -145,25 +149,36 @@ class FilesListViewModel
.skip(processedFiles)
.limit(currentBatchSize)
.forEach { file ->
if (Files.isReadable(file) && (Config.hiddenFile || !Files.isHidden(file))) {
if (Files.isReadable(file) && (
Config.hiddenFile ||
!Files.isHidden(
file,
)
)
) {
fileList.add(file.toFileModel())
}
}
}
withContext(Dispatchers.Main) {
_updateListLiveData.postValue(Event(fileList.toList()))
_updateListLiveData.postValue(Event(fileList))
}
processedFiles += currentBatchSize
}
}
}

fun setUpdateList(files: MutableList<FileModel>) {
_updateListLiveData.postValue(Event(files))
}

fun cancelFileListJob() {
if (fileListJob != null && fileListJob?.isActive == true) {
fileListJob?.cancel()
}
}

// Todo check free space
fun moveFilesAndDirectories(destinationPath: Path) {
val operationItemList: MutableList<FileModel> = mutableListOf()
viewModelScope.launch {
@@ -208,6 +223,11 @@ class FilesListViewModel
}
}

// Todo check free space
fun createFolder(targetPath: Path) {
_startCreateFolderJob.value = Event(targetPath)
}

fun deleteFiles() {
val operationItemList: List<FileModel> = selectedItemList.toList()
_startDeleteJobLiveData.postValue(Event(operationItemList))
@@ -252,7 +272,7 @@ class FilesListViewModel
is BaseResult.Success -> {
val list = result.data.map { Paths.get(it).toFileModel() }
_searchStateLiveData.postValue(Event(Pair(false, false)))
_updateListLiveData.postValue(Event(list))
_updateListLiveData.postValue(Event(list.toMutableList()))
}

is BaseResult.Failure -> {
Original file line number Diff line number Diff line change
@@ -18,8 +18,11 @@ import com.sn.mediastorepv.data.MediaType
import com.sn.snfilemanager.R
import com.sn.snfilemanager.core.base.BaseFragment
import com.sn.snfilemanager.core.extensions.click
import com.sn.snfilemanager.core.extensions.getPackage
import com.sn.snfilemanager.core.extensions.infoToast
import com.sn.snfilemanager.core.extensions.observe
import com.sn.snfilemanager.core.extensions.openUrl
import com.sn.snfilemanager.core.util.Constant
import com.sn.snfilemanager.core.util.DocumentType
import com.sn.snfilemanager.core.util.RootPath
import com.sn.snfilemanager.databinding.FragmentHomeBinding
@@ -53,12 +56,8 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>() {

override fun onMenuItemSelected(menuItemId: Int) =
when (menuItemId) {
R.id.settings -> {
navigate(HomeFragmentDirections.actionSettings())
true
}

R.id.about -> {
R.id.store -> {
context?.openUrl(Constant.STORE_URL)
true
}

@@ -135,7 +134,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>() {
val intent =
Intent(
Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION,
Uri.parse("package:${requireActivity().packageName}"),
Uri.parse(context?.getPackage()),
)
startActivity(intent)
}
@@ -144,7 +143,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>() {
val intent =
Intent(
Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
Uri.parse("package:${requireActivity().packageName}"),
Uri.parse(context?.getPackage()),
)
startActivity(intent)
}
Original file line number Diff line number Diff line change
@@ -93,6 +93,7 @@ class MediaFragment :
mode: ActionMode?,
item: MenuItem?,
): Boolean {
checkActionMenuStatus()
when (item?.itemId) {
R.id.action_copy -> {
viewModel.isCopy = true
@@ -170,6 +171,7 @@ class MediaFragment :
data?.filterIsInstance<Media>()?.let { adapter?.removeItems(it) }
}
}
JobType.CREATE -> {}
}
activity?.runOnUiThread { context?.infoToast(getString(R.string.completed)) }
}
@@ -372,8 +374,8 @@ class MediaFragment :
MediaItemAdapter(
onClick = { model -> openFile(model) },
onSelected = { model, selected ->
checkActionMenuStatus()
viewModel.addSelectedItem(model, selected)
checkActionMenuStatus()
},
selectionCallback = this@MediaFragment,
)
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.sn.snfilemanager.feature.start

import android.content.Intent
import android.net.Uri
import com.sn.snfilemanager.BuildConfig
import com.sn.snfilemanager.core.base.BaseFragment
import com.sn.snfilemanager.core.extensions.click
import com.sn.snfilemanager.core.extensions.startActivitySafely
import com.sn.snfilemanager.core.extensions.openUrl
import com.sn.snfilemanager.core.util.Constant.OPEN_SOURCE_LICENSE
import com.sn.snfilemanager.core.util.Constant.PRIVACY_URL
import com.sn.snfilemanager.databinding.FragmentStartBinding
@@ -35,12 +33,7 @@ class StartFragment : BaseFragment<FragmentStartBinding, StartViewModel>() {
}

private fun clicksPolicy() {
binding.mtvPrivacyPolicy.click { openUrl(PRIVACY_URL) }
binding.mtvOpenSourcePolicy.click { openUrl(OPEN_SOURCE_LICENSE) }
}

private fun openUrl(url: String) {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
context?.startActivitySafely(intent)
binding.mtvPrivacyPolicy.click { context?.openUrl(PRIVACY_URL) }
binding.mtvOpenSourcePolicy.click { context?.openUrl(OPEN_SOURCE_LICENSE) }
}
}
9 changes: 9 additions & 0 deletions app/src/main/java/com/sn/snfilemanager/job/JobService.kt
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ import com.sn.snfilemanager.core.util.FrNotificationManager
import com.sn.snfilemanager.core.util.WakeWifiLock
import com.sn.snfilemanager.feature.files.data.FileModel
import com.sn.snfilemanager.job.file.CopyFileJob
import com.sn.snfilemanager.job.file.CreateDirectory
import com.sn.snfilemanager.job.file.DeleteFileJob
import com.sn.snfilemanager.job.media.DeleteMediaJob
import com.sn.snfilemanager.job.media.MoveMediaJob
@@ -151,6 +152,14 @@ class JobService : Service() {
startJob(MoveMediaJob(sources, targetPath, isCopy, completed), context)
}

fun createDirectory(
targetPath: Path,
completed: JobCompletedCallback,
context: Context,
) {
startJob(CreateDirectory(targetPath, completed), context)
}

@MainThread
fun cancelJob(id: Int) {
pendingJobs.removeFirst { it.id == id }
1 change: 1 addition & 0 deletions app/src/main/java/com/sn/snfilemanager/job/JobType.kt
Original file line number Diff line number Diff line change
@@ -3,4 +3,5 @@ package com.sn.snfilemanager.job
enum class JobType {
COPY,
DELETE,
CREATE,
}
23 changes: 23 additions & 0 deletions app/src/main/java/com/sn/snfilemanager/job/file/CreateDirectory.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.sn.snfilemanager.job.file

import com.sn.snfilemanager.core.base.BaseJob
import com.sn.snfilemanager.job.JobCompletedCallback
import com.sn.snfilemanager.job.JobType
import java.nio.file.Files
import java.nio.file.Path

class CreateDirectory(
private val targetPath: Path,
private val completed: JobCompletedCallback,
) : BaseJob() {
private val directory: MutableList<Path> = mutableListOf()

override fun run() {
val dir = Files.createDirectories(targetPath)
directory.add(dir)
}

override fun onCompleted() {
completed.jobOnCompleted(JobType.CREATE, directory)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
package com.sn.snfilemanager.view.dialog

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.widget.addTextChangedListener
import androidx.fragment.app.DialogFragment
import com.sn.snfilemanager.R
import com.sn.snfilemanager.core.extensions.click
import com.sn.snfilemanager.databinding.DialogCreateDirectoryBinding
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.Paths

class CreateDirectoryDialog(
private val path: String,
private val onCreate: ((Path) -> Unit)? = null,
) :
DialogFragment() {
private val binding: DialogCreateDirectoryBinding by lazy {
DialogCreateDirectoryBinding.inflate(layoutInflater)
}

companion object {
const val TAG = "CREATE_DIRECTORY_DIALOG"
}

override fun onStart() {
super.onStart()
dialog?.window?.setLayout(
ConstraintLayout.LayoutParams.MATCH_PARENT,
ConstraintLayout.LayoutParams.WRAP_CONTENT,
)
}

override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?,
): View {
return binding.root
}

override fun onViewCreated(
view: View,
savedInstanceState: Bundle?,
) {
super.onViewCreated(view, savedInstanceState)
binding.etFolderName.requestFocus()
binding.btnCancel.click { dismiss() }
binding.btnCreate.click {
val name = binding.etFolderName.text.toString()
if (checkNameExists(name)) {
binding.inputLayout.error = getString(R.string.folder_exists_warning)
} else {
onCreate?.invoke(Paths.get(path).resolve(name))
dismiss()
}
}
binding.etFolderName.addTextChangedListener { text ->
binding.btnCreate.isEnabled = !text.isNullOrEmpty()
binding.inputLayout.error = null
}
}

private fun checkNameExists(name: String): Boolean {
val targetPath = Paths.get(path).resolve(name)
return Files.exists(targetPath)
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package com.sn.snfilemanager.view.dialog.license

import android.content.Context
import android.content.Intent
import android.net.Uri
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.sn.snfilemanager.core.extensions.click
import com.sn.snfilemanager.core.extensions.startActivitySafely
import com.sn.snfilemanager.core.extensions.openUrl
import com.sn.snfilemanager.databinding.ItemLicenseBinding

class LicenseAdapter(private val context: Context) :
@@ -72,13 +70,13 @@ class LicenseAdapter(private val context: Context) :
binding.mtvGithub.click {
if (adapterPosition != RecyclerView.NO_POSITION) {
val clickedLicense = licenses[adapterPosition]
openUrl(clickedLicense.url)
context.openUrl(clickedLicense.url)
}
}
binding.mtvLicense.click {
if (adapterPosition != RecyclerView.NO_POSITION) {
val clickedLicense = licenses[adapterPosition]
openUrl(clickedLicense.license)
context.openUrl(clickedLicense.url)
}
}
}
@@ -87,9 +85,4 @@ class LicenseAdapter(private val context: Context) :
binding.mtvName.text = model.name
}
}

private fun openUrl(url: String) {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
context.startActivitySafely(intent)
}
}
6 changes: 6 additions & 0 deletions app/src/main/res/color/text_input_layout_stroke_color.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:alpha="1" android:color="@color/main_color" android:state_focused="true" />
<item android:alpha="1" android:color="@color/main_color" android:state_hovered="true" />
<item android:alpha="1" android:color="@color/main_color" android:state_enabled="false" />
<item android:alpha="1" android:color="@color/main_color" />
</selector>
85 changes: 85 additions & 0 deletions app/src/main/res/layout/dialog_create_directory.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?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"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.google.android.material.textview.MaterialTextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/adamina"
android:padding="@dimen/_10sdp"
android:text="@string/create_folder"
android:textColor="@color/first_text_color"
android:textSize="@dimen/_13ssp"
app:layout_constraintEnd_toEndOf="@+id/container"
app:layout_constraintStart_toStartOf="@+id/container"
app:layout_constraintTop_toTopOf="@id/container" />

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/input_layout"
style="@style/TextInputLayoutStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:padding="@dimen/_10sdp"
app:layout_constraintEnd_toEndOf="@+id/container"
app:layout_constraintStart_toStartOf="@+id/container"
app:layout_constraintTop_toBottomOf="@+id/tv_title">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_folder_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/adamina"
android:hint="@string/folder_name"
android:padding="@dimen/_8sdp"
android:textColorHint="@color/first_text_color" />

</com.google.android.material.textfield.TextInputLayout>


<LinearLayout
android:id="@+id/center_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_10sdp"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="@+id/container"
app:layout_constraintStart_toStartOf="@+id/container"
app:layout_constraintTop_toBottomOf="@+id/input_layout">

<com.google.android.material.textview.MaterialTextView
android:id="@+id/btn_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/_10sdp"
android:fontFamily="@font/adamina"
android:padding="@dimen/_5sdp"
android:text="@string/cancel"
android:textColor="@color/app_buton_state_list"
android:textSize="@dimen/_13ssp" />

<View
android:layout_width="1dp"
android:layout_height="@dimen/_40sdp"
android:background="@color/divider_color" />

<com.google.android.material.textview.MaterialTextView
android:id="@+id/btn_create"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/_10sdp"
android:enabled="false"
android:fontFamily="@font/adamina"
android:padding="@dimen/_5sdp"
android:text="@string/create"
android:textColor="@color/app_buton_state_list"
android:textSize="@dimen/_13ssp" />

</LinearLayout>


</androidx.constraintlayout.widget.ConstraintLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/layout_chip.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<com.google.android.material.chip.Chip xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
style="@style/CustomChipChoice"
android:layout_width="@dimen/_45sdp"
android:layout_width="@dimen/_55sdp"
android:layout_height="wrap_content"
android:checkable="true"
android:clickable="true"
19 changes: 19 additions & 0 deletions app/src/main/res/menu/menu_files.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?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/action_search"
android:icon="@drawable/ic_search"
android:title="@string/search"
app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="always|collapseActionView"
tools:ignore="AlwaysShowAction" />

<item
android:id="@+id/create_folder"
android:title="@string/create_folder"
app:showAsAction="never" />

</menu>
9 changes: 2 additions & 7 deletions app/src/main/res/menu/menu_home.xml
Original file line number Diff line number Diff line change
@@ -3,13 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto">

<item
android:id="@+id/settings"
android:title="@string/settings"
app:showAsAction="never" />

<item
android:id="@+id/about"
android:title="@string/about"
android:id="@+id/store"
android:title="@string/show_store"
app:showAsAction="never" />

</menu>
5 changes: 5 additions & 0 deletions app/src/main/res/values-tr/strings.xml
Original file line number Diff line number Diff line change
@@ -98,4 +98,9 @@
<string name="system">Sistem</string>
<string name="dark">Koyu</string>
<string name="light">Açık</string>
<string name="show_store">Mağazada göster</string>
<string name="create_folder">Klasör oluştur</string>
<string name="create">Oluştur</string>
<string name="folder_name">Klasör adı</string>
<string name="folder_exists_warning">Bu ada sahip klasör zaten mevcut</string>
</resources>
5 changes: 5 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -102,4 +102,9 @@
<string name="system">System</string>
<string name="dark">Dark</string>
<string name="light">Light</string>
<string name="show_store">Show in store</string>
<string name="create_folder">Create folder</string>
<string name="create">Create</string>
<string name="folder_name">Folder name</string>
<string name="folder_exists_warning">The folder with this name already exists</string>
</resources>
5 changes: 5 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -47,4 +47,9 @@
<item name="android:windowBackground">@android:color/transparent</item>
</style>

<style name="TextInputLayoutStyle" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<item name="boxStrokeColor">@color/text_input_layout_stroke_color</item>
<item name="boxStrokeWidth">1dp</item>
</style>

</resources>

0 comments on commit a3454f0

Please sign in to comment.