diff --git a/.idea/misc.xml b/.idea/misc.xml index 16390d4e..94226a6e 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -32,8 +32,13 @@ + + + + + diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c70e60b6..b4fc8664 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -43,8 +43,6 @@ android { } } buildFeatures { - viewBinding = true - dataBinding = true compose = true } composeOptions { @@ -91,11 +89,11 @@ dependencies { implementation("com.google.accompanist:accompanist-drawablepainter:0.20.3") implementation("com.google.accompanist:accompanist-systemuicontroller:0.20.3") - implementation("io.coil-kt:coil-compose:1.3.2") + implementation("io.coil-kt:coil-compose:1.4.0") - implementation("io.ktor:ktor-client-core:1.6.5") - implementation("io.ktor:ktor-client-okhttp:1.6.5") - implementation("io.ktor:ktor-client-serialization:1.6.5") + implementation("io.ktor:ktor-client-core:1.6.7") + implementation("io.ktor:ktor-client-okhttp:1.6.7") + implementation("io.ktor:ktor-client-serialization:1.6.7") implementation("androidx.appcompat:appcompat:1.4.0") implementation("androidx.activity:activity-ktx:1.4.0") @@ -115,10 +113,8 @@ dependencies { implementation("org.kodein.di:kodein-di-framework-compose:7.9.0") - implementation("com.daimajia.swipelayout:library:1.2.0@aar") - implementation("com.google.android.material:material:1.4.0") - + 0 implementation(platform("com.google.firebase:firebase-bom:28.3.0")) implementation("com.google.firebase:firebase-analytics-ktx") implementation("com.google.firebase:firebase-crashlytics") @@ -126,26 +122,16 @@ dependencies { implementation("com.google.android.gms:play-services-oss-licenses:17.0.0") - implementation("com.github.clans:fab:1.6.4") - - //implementation("com.quiph.ui:recyclerviewfastscroller:0.2.1") - implementation("org.jsoup:jsoup:1.14.3") - implementation("com.tbuonomo:dotsindicator:4.2") - - //implementation("com.andrognito.patternlockview:patternlockview:1.0.0") - //implementation("com.andrognito.pinlockview:pinlockview:2.1.0") - implementation("ru.noties.markwon:core:3.1.0") implementation("xyz.quaver:libpupil:2.1.11") implementation("xyz.quaver:documentfilex:0.7.1") - implementation("xyz.quaver:floatingsearchview:1.1.7") - implementation("xyz.quaver:subsampledimage:0.0.1-alpha09-SNAPSHOT") + implementation("xyz.quaver:subsampledimage:0.0.1-alpha10-SNAPSHOT") implementation("org.kodein.log:kodein-log:0.11.1") - //debugImplementation("com.squareup.leakcanary:leakcanary-android:2.7") + debugImplementation("com.squareup.leakcanary:leakcanary-android:2.7") testImplementation("junit:junit:4.13.2") testImplementation("org.mockito:mockito-inline:4.1.0") diff --git a/app/libs/patternlockview-release.aar b/app/libs/patternlockview-release.aar deleted file mode 100644 index 2599bd60..00000000 Binary files a/app/libs/patternlockview-release.aar and /dev/null differ diff --git a/app/libs/pinlockview-release.aar b/app/libs/pinlockview-release.aar deleted file mode 100644 index 646f97a4..00000000 Binary files a/app/libs/pinlockview-release.aar and /dev/null differ diff --git a/app/libs/recyclerviewfastscroller-release.aar b/app/libs/recyclerviewfastscroller-release.aar deleted file mode 100644 index 896f7d6d..00000000 Binary files a/app/libs/recyclerviewfastscroller-release.aar and /dev/null differ diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 51fbc85e..c101d84a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -26,10 +26,6 @@ tools:replace="android:theme" tools:ignore="UnusedAttribute"> - - - - - - abstract suspend fun search(query: String, range: IntRange, sortMode: Int): Pair, Int> - abstract suspend fun suggestion(query: String): List abstract suspend fun images(itemID: String): List abstract suspend fun info(itemID: String): ItemInfo @@ -62,10 +54,6 @@ abstract class Source { open fun SearchResult(itemInfo: ItemInfo, onEvent: (SearchResultEvent) -> Unit = { }) { } open fun getHeadersBuilderForImage(itemID: String, url: String): HeadersBuilder.() -> Unit = { } - - open fun onSuggestionBind(binding: SearchSuggestionItemBinding, item: SearchSuggestion) { - binding.leftIcon.setImageResource(R.drawable.tag) - } } typealias SourceEntry = Pair diff --git a/app/src/main/java/xyz/quaver/pupil/sources/Downloads.kt b/app/src/main/java/xyz/quaver/pupil/sources/Downloads.kt index dbbf8c24..9180a3c3 100644 --- a/app/src/main/java/xyz/quaver/pupil/sources/Downloads.kt +++ b/app/src/main/java/xyz/quaver/pupil/sources/Downloads.kt @@ -26,7 +26,6 @@ import kotlinx.serialization.json.Json import org.kodein.di.DI import org.kodein.di.DIAware import org.kodein.di.instance -import xyz.quaver.floatingsearchview.suggestions.model.SearchSuggestion import xyz.quaver.io.FileX import xyz.quaver.io.util.getChild import xyz.quaver.pupil.R diff --git a/app/src/main/java/xyz/quaver/pupil/sources/History.kt b/app/src/main/java/xyz/quaver/pupil/sources/History.kt index 600c052a..c3c52b08 100644 --- a/app/src/main/java/xyz/quaver/pupil/sources/History.kt +++ b/app/src/main/java/xyz/quaver/pupil/sources/History.kt @@ -26,7 +26,6 @@ import kotlinx.coroutines.launch import org.kodein.di.DI import org.kodein.di.DIAware import org.kodein.di.direct -import xyz.quaver.floatingsearchview.suggestions.model.SearchSuggestion import xyz.quaver.pupil.util.database class History(override val di: DI) : Source(), DIAware { @@ -56,10 +55,6 @@ class History(override val di: DI) : Source(), DIAware { //return Pair(channel, histories.map.size) } - override suspend fun suggestion(query: String): List { - throw NotImplementedError("") - } - override suspend fun images(itemID: String): List { throw NotImplementedError("") } diff --git a/app/src/main/java/xyz/quaver/pupil/sources/Hitomi.kt b/app/src/main/java/xyz/quaver/pupil/sources/Hitomi.kt index ef4d75f0..3f8a7441 100644 --- a/app/src/main/java/xyz/quaver/pupil/sources/Hitomi.kt +++ b/app/src/main/java/xyz/quaver/pupil/sources/Hitomi.kt @@ -19,8 +19,6 @@ package xyz.quaver.pupil.sources import android.app.Application -import android.view.LayoutInflater -import android.widget.TextView import androidx.compose.foundation.Image import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.* @@ -59,8 +57,6 @@ import org.kodein.di.android.closestDI import org.kodein.di.instance import org.kodein.log.LoggerFactory import org.kodein.log.newLogger -import xyz.quaver.floatingsearchview.databinding.SearchSuggestionItemBinding -import xyz.quaver.floatingsearchview.suggestions.model.SearchSuggestion import xyz.quaver.hitomi.* import xyz.quaver.pupil.R import xyz.quaver.pupil.db.AppDatabase @@ -124,21 +120,6 @@ class Hitomi(app: Application) : Source(), DIAware { private val bookmarkDao = database.bookmarkDao() - @Parcelize - data class TagSuggestion(val s: String, val t: Int, val u: String, val n: String) : SearchSuggestion { - constructor(s: Suggestion) : this(s.s, s.t, s.u, s.n) - - @IgnoredOnParcel - override val body = s - /* - TODO - if (translations[s] != null) - "${translations[s]} ($s)" - else - s - */ - } - override val name: String = "hitomi.la" override val iconResID: Int = R.drawable.hitomi override val preferenceID: Int = R.xml.hitomi_preferences @@ -178,12 +159,6 @@ class Hitomi(app: Application) : Source(), DIAware { channel to cache.size } - override suspend fun suggestion(query: String) : List { - return getSuggestionsForQuery(query.takeLastWhile { !it.isWhitespace() }).map { - TagSuggestion(it) - } - } - override suspend fun images(itemID: String): List { val galleryID = itemID.toInt() @@ -229,40 +204,6 @@ class Hitomi(app: Application) : Source(), DIAware { append("Referer", getReferer(itemID.toInt())) } - override fun onSuggestionBind(binding: SearchSuggestionItemBinding, item: SearchSuggestion) { - item as TagSuggestion - - binding.leftIcon.setImageResource( - when(item.n) { - "female" -> R.drawable.gender_female - "male" -> R.drawable.gender_male - "language" -> R.drawable.translate - "group" -> R.drawable.account_group - "character" -> R.drawable.account_star - "series" -> R.drawable.book_open - "artist" -> R.drawable.brush - else -> R.drawable.tag - } - ) - - if (item.t > 0) { - with (binding.root) { - val count = findViewById(R.id.count) - if (count == null) - addView( - LayoutInflater.from(context).inflate(R.layout.suggestion_count, binding.root, false) - .apply { - this as TextView - - text = item.t.toString() - }, 2 - ) - else - count.text = item.t.toString() - } - } - } - companion object { val languageMap = mapOf( "indonesian" to "Bahasa Indonesia", diff --git a/app/src/main/java/xyz/quaver/pupil/sources/Hiyobi_io.kt b/app/src/main/java/xyz/quaver/pupil/sources/Hiyobi_io.kt index 83b59797..0c9e616f 100644 --- a/app/src/main/java/xyz/quaver/pupil/sources/Hiyobi_io.kt +++ b/app/src/main/java/xyz/quaver/pupil/sources/Hiyobi_io.kt @@ -60,7 +60,6 @@ import org.kodein.di.android.closestDI import org.kodein.di.instance import org.kodein.log.LoggerFactory import org.kodein.log.newLogger -import xyz.quaver.floatingsearchview.suggestions.model.SearchSuggestion import xyz.quaver.pupil.R import xyz.quaver.pupil.db.AppDatabase import xyz.quaver.pupil.db.Bookmark @@ -207,10 +206,6 @@ class Hiyobi_io(app: Application): Source(), DIAware { channel to totalCount(tags) } - override suspend fun suggestion(query: String): List { - return emptyList() - } - override suspend fun images(itemID: String): List = withContext(Dispatchers.IO) { val query = "{getManga(mangaId:$itemID){urls}}" diff --git a/app/src/main/java/xyz/quaver/pupil/types/Suggestions.kt b/app/src/main/java/xyz/quaver/pupil/types/Suggestions.kt deleted file mode 100644 index 4b902410..00000000 --- a/app/src/main/java/xyz/quaver/pupil/types/Suggestions.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2019 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil.types - -import kotlinx.parcelize.Parcelize -import xyz.quaver.floatingsearchview.suggestions.model.SearchSuggestion - -@Parcelize -class HistorySuggestion(override val body: String) : SearchSuggestion - -@Parcelize -class NoResultSuggestion(override val body: String) : SearchSuggestion - -@Parcelize -class LoadingSuggestion(override val body: String) : SearchSuggestion - -@Parcelize -@Suppress("PARCELABLE_PRIMARY_CONSTRUCTOR_IS_EMPTY") -class FavoriteHistorySwitch(override val body: String) : SearchSuggestion \ No newline at end of file diff --git a/app/src/main/java/xyz/quaver/pupil/ui/MainActivity.kt b/app/src/main/java/xyz/quaver/pupil/ui/MainActivity.kt index b2b09f77..06d42f43 100644 --- a/app/src/main/java/xyz/quaver/pupil/ui/MainActivity.kt +++ b/app/src/main/java/xyz/quaver/pupil/ui/MainActivity.kt @@ -65,7 +65,7 @@ import xyz.quaver.pupil.ui.composable.MultipleFloatingActionButton import xyz.quaver.pupil.ui.composable.SubFabItem import xyz.quaver.pupil.ui.dialog.SourceSelectDialog import xyz.quaver.pupil.ui.theme.PupilTheme -import xyz.quaver.pupil.ui.view.ProgressCardView +import xyz.quaver.pupil.ui.composable.ProgressCard import xyz.quaver.pupil.ui.viewmodel.MainViewModel import xyz.quaver.pupil.util.* import kotlin.math.* @@ -175,7 +175,7 @@ class MainActivity : ComponentActivity(), DIAware { contentPadding = PaddingValues(0.dp, 56.dp, 0.dp, 0.dp) ) { items(model.searchResults, key = { it.itemID }) { itemInfo -> - ProgressCardView( + ProgressCard( progress = 0.5f ) { model.source.SearchResult(itemInfo = itemInfo) { event -> diff --git a/app/src/main/java/xyz/quaver/pupil/ui/ReaderActivity.kt b/app/src/main/java/xyz/quaver/pupil/ui/ReaderActivity.kt index 56ce631d..b49f8c41 100644 --- a/app/src/main/java/xyz/quaver/pupil/ui/ReaderActivity.kt +++ b/app/src/main/java/xyz/quaver/pupil/ui/ReaderActivity.kt @@ -198,12 +198,13 @@ class ReaderActivity : ComponentActivity(), DIAware { Text((i + 1).toString()) } } - else + else { SubSampledImage( modifier = Modifier.fillMaxSize(), imageSource = imageSource, state = states[i] ) + } } } } diff --git a/app/src/main/java/xyz/quaver/pupil/ui/SettingsActivity.kt b/app/src/main/java/xyz/quaver/pupil/ui/SettingsActivity.kt deleted file mode 100644 index 90b0f0e5..00000000 --- a/app/src/main/java/xyz/quaver/pupil/ui/SettingsActivity.kt +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2019 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil.ui - -import android.os.Bundle -import android.view.MenuItem -import androidx.appcompat.app.AppCompatActivity -import xyz.quaver.pupil.R -import xyz.quaver.pupil.ui.fragment.SettingsFragment -import xyz.quaver.pupil.ui.fragment.SourceSettingsFragment - -class SettingsActivity : AppCompatActivity() { - - companion object { - const val SETTINGS_EXTRA = "xyz.quaver.pupil.ui.SettingsActivity.SETTINGS_EXTRA" - } - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.settings_activity) - - val fragment = intent.getStringExtra(SETTINGS_EXTRA)?.run { - SourceSettingsFragment(this) - } ?: SettingsFragment() - - supportFragmentManager - .beginTransaction() - .replace(R.id.settings, fragment) - .commit() - - supportActionBar?.setDisplayHomeAsUpEnabled(true) - } - - override fun onOptionsItemSelected(item: MenuItem): Boolean { - when (item.itemId) { - android.R.id.home -> onBackPressed() - } - - return true - } -} \ No newline at end of file diff --git a/app/src/main/java/xyz/quaver/pupil/ui/view/ProgressCardView.kt b/app/src/main/java/xyz/quaver/pupil/ui/composable/ProgressCard.kt similarity index 61% rename from app/src/main/java/xyz/quaver/pupil/ui/view/ProgressCardView.kt rename to app/src/main/java/xyz/quaver/pupil/ui/composable/ProgressCard.kt index 4c3527a6..474215e8 100644 --- a/app/src/main/java/xyz/quaver/pupil/ui/view/ProgressCardView.kt +++ b/app/src/main/java/xyz/quaver/pupil/ui/composable/ProgressCard.kt @@ -1,16 +1,19 @@ -package xyz.quaver.pupil.ui.view +package xyz.quaver.pupil.ui.composable import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.foundation.layout.* +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.* +import androidx.compose.material.Card +import androidx.compose.material.LinearProgressIndicator import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp @OptIn(ExperimentalFoundationApi::class) @Composable -fun ProgressCardView(progress: Float? = null, content: @Composable () -> Unit) { +fun ProgressCard(progress: Float? = null, content: @Composable () -> Unit) { Card( modifier = Modifier.padding(8.dp), shape = RoundedCornerShape(4.dp), diff --git a/app/src/main/java/xyz/quaver/pupil/ui/dialog/DefaultQueryDialogFragment.kt b/app/src/main/java/xyz/quaver/pupil/ui/dialog/DefaultQueryDialogFragment.kt deleted file mode 100644 index bc389958..00000000 --- a/app/src/main/java/xyz/quaver/pupil/ui/dialog/DefaultQueryDialogFragment.kt +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2020 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil.ui.dialog - -import android.app.Dialog -import android.os.Bundle -import android.text.Editable -import android.text.TextWatcher -import android.widget.ArrayAdapter -import androidx.appcompat.app.AlertDialog -import androidx.fragment.app.DialogFragment -import xyz.quaver.pupil.R -import xyz.quaver.pupil.databinding.DefaultQueryDialogBinding -import xyz.quaver.pupil.sources.Hitomi -import xyz.quaver.pupil.types.Tags -import xyz.quaver.pupil.util.Preferences - -class DefaultQueryDialogFragment : DialogFragment() { - // TODO languageMap - private val languages = Hitomi.languageMap - private val reverseLanguages = languages.entries.associate { (k, v) -> v to k } - - private val excludeBL = "-male:yaoi" - private val excludeGuro = listOf("-female:guro", "-male:guro") - private val excludeLoli = listOf("-female:loli", "-male:shota") - - var onPositiveButtonClickListener : ((Tags) -> (Unit))? = null - - private var _binding: DefaultQueryDialogBinding? = null - private val binding get() = _binding!! - - override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { - _binding = DefaultQueryDialogBinding.inflate(layoutInflater) - - initView() - - return AlertDialog.Builder(requireContext()) - .setTitle(R.string.default_query_dialog_title) - .setView(binding.root) - .setPositiveButton(android.R.string.ok) { _, _ -> - val newTags = Tags.parse(binding.edittext.text.toString()) - - with (binding.languageSelector) { - if (selectedItemPosition != 0) - newTags.add("language:${reverseLanguages[selectedItem]}") - } - - if (binding.BLCheckbox.isChecked) - newTags.add(excludeBL) - - if (binding.guroCheckbox.isChecked) - excludeGuro.forEach { tag -> - newTags.add(tag) - } - - if (binding.loliCheckbox.isChecked) - excludeLoli.forEach { tag -> - newTags.add(tag) - } - - onPositiveButtonClickListener?.invoke(newTags) - }.create() - } - - override fun onDestroy() { - super.onDestroy() - _binding = null - } - - private fun initView() { - val tags = Tags.parse( - Preferences["hitomi.default_query"] - ) - - with (binding.languageSelector) { - adapter = - ArrayAdapter( - context, - android.R.layout.simple_spinner_dropdown_item, - arrayListOf( - context.getString(R.string.default_query_dialog_language_selector_none) - ).apply { - addAll(languages.values) - } - ) - if (tags.any { it.area == "language" && !it.isNegative }) { - val tag = languages[tags.first { it.area == "language" }.tag] - if (tag != null) { - setSelection( - @Suppress("UNCHECKED_CAST") - (adapter as ArrayAdapter).getPosition(tag) - ) - tags.removeByArea("language", false) - } - } - } - - with (binding.BLCheckbox) { - isChecked = tags.contains(excludeBL) - if (tags.contains(excludeBL)) - tags.remove(excludeBL) - } - - with (binding.guroCheckbox) { - isChecked = excludeGuro.all { tags.contains(it) } - if (excludeGuro.all { tags.contains(it) }) - excludeGuro.forEach { - tags.remove(it) - } - } - - with (binding.loliCheckbox) { - isChecked = excludeLoli.all { tags.contains(it) } - if (excludeLoli.all { tags.contains(it) }) - excludeLoli.forEach { - tags.remove(it) - } - } - - with (binding.edittext) { - setText(tags.toString(), android.widget.TextView.BufferType.EDITABLE) - addTextChangedListener(object : TextWatcher { - override fun beforeTextChanged( - s: CharSequence?, - start: Int, - count: Int, - after: Int - ) { - } - - override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {} - - override fun afterTextChanged(s: Editable?) { - s ?: return - - if (s.any { it.isUpperCase() }) - s.replace( - 0, - s.length, - s.toString().lowercase() - ) - } - }) - } - } - -} \ No newline at end of file diff --git a/app/src/main/java/xyz/quaver/pupil/ui/dialog/DownloadFolderNameDialogFragment.kt b/app/src/main/java/xyz/quaver/pupil/ui/dialog/DownloadFolderNameDialogFragment.kt deleted file mode 100644 index 7e60834e..00000000 --- a/app/src/main/java/xyz/quaver/pupil/ui/dialog/DownloadFolderNameDialogFragment.kt +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2020 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil.ui.dialog - -import android.app.Dialog -import android.os.Bundle -import android.view.ViewGroup -import androidx.fragment.app.DialogFragment -import com.google.android.material.snackbar.Snackbar -import xyz.quaver.pupil.R -import xyz.quaver.pupil.databinding.DownloadFolderNameDialogBinding -import xyz.quaver.pupil.util.Preferences - -class DownloadFolderNameDialogFragment : DialogFragment() { - - private var _binding: DownloadFolderNameDialogBinding? = null - private val binding get() = _binding!! - - override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { - _binding = DownloadFolderNameDialogBinding.inflate(layoutInflater) - - initView() - - return Dialog(requireContext()).apply { - setContentView(binding.root) - window?.attributes?.width = ViewGroup.LayoutParams.MATCH_PARENT - } - } - - override fun onDestroy() { - super.onDestroy() - _binding = null - } - - private fun initView() { - binding.okButton.setOnClickListener { - val newValue = binding.edittext.text.toString() - - if ((newValue as? String)?.contains("/") != false) { - Snackbar.make(binding.root, R.string.settings_invalid_download_folder_name, Snackbar.LENGTH_SHORT).show() - return@setOnClickListener - } - - Preferences["download_folder_name"] = binding.edittext.text.toString() - - dismiss() - } - } - -} \ No newline at end of file diff --git a/app/src/main/java/xyz/quaver/pupil/ui/dialog/DownloadLocationDialogFragment.kt b/app/src/main/java/xyz/quaver/pupil/ui/dialog/DownloadLocationDialogFragment.kt deleted file mode 100644 index c666e7d9..00000000 --- a/app/src/main/java/xyz/quaver/pupil/ui/dialog/DownloadLocationDialogFragment.kt +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2020 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil.ui.dialog - -import android.app.Activity -import android.app.Dialog -import android.content.Intent -import android.os.Bundle -import androidx.activity.result.contract.ActivityResultContracts -import androidx.appcompat.app.AlertDialog -import androidx.core.content.ContextCompat -import androidx.core.net.toUri -import androidx.fragment.app.DialogFragment -import com.google.android.material.snackbar.Snackbar -import org.kodein.di.DIAware -import org.kodein.di.android.x.closestDI -import org.kodein.di.instance -import xyz.quaver.io.FileX -import xyz.quaver.io.util.toFile -import xyz.quaver.pupil.R -import xyz.quaver.pupil.databinding.DownloadLocationDialogBinding -import xyz.quaver.pupil.databinding.DownloadLocationItemBinding -import xyz.quaver.pupil.util.DownloadManager -import xyz.quaver.pupil.util.Preferences -import xyz.quaver.pupil.util.byteToString -import java.io.File - -class DownloadLocationDialogFragment : DialogFragment(), DIAware { - - override val di by closestDI() - - private val downloadManager: DownloadManager by instance() - - private var _binding: DownloadLocationDialogBinding? = null - private val binding get() = _binding!! - - private val entries = mutableMapOf() - - private val requestDownloadFolderLauncher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { - if (it.resultCode == Activity.RESULT_OK) { - val context = context ?: return@registerForActivityResult - val dialog = dialog ?: return@registerForActivityResult - - it.data?.data?.let { uri -> - val takeFlags: Int = Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION - - context.contentResolver.takePersistableUriPermission(uri, takeFlags) - - if (kotlin.runCatching { FileX(context, uri).canWrite() }.getOrDefault(false)) { - entries[null]?.locationAvailable?.text = uri.toFile(context)?.canonicalPath - Preferences["download_folder"] = uri.toString() - } else { - Snackbar.make( - dialog.window!!.decorView.rootView, - R.string.settings_download_folder_not_writable, - Snackbar.LENGTH_LONG - ).show() - - val downloadFolder = downloadManager.downloadFolder.canonicalPath - val key = entries.keys.firstOrNull { it?.canonicalPath == downloadFolder } - entries[key]!!.button.isChecked = true - if (key == null) entries[key]!!.locationAvailable.text = downloadFolder - } - } - } else { - val downloadFolder = downloadManager.downloadFolder.canonicalPath - val key = entries.keys.firstOrNull { it?.canonicalPath == downloadFolder } - if (key == null) - entries[key]!!.locationAvailable.text = downloadFolder - else { - entries[null]!!.button.isChecked = false - entries[key]!!.button.isChecked = true - } - } - } - - private fun initView() { - val externalFilesDirs = ContextCompat.getExternalFilesDirs(requireContext(), null) - - externalFilesDirs.forEachIndexed { index, dir -> - dir ?: return@forEachIndexed - - DownloadLocationItemBinding.inflate(layoutInflater, binding.root, true).apply { - locationType.text = requireContext().getString(when (index) { - 0 -> R.string.settings_download_folder_internal - else -> R.string.settings_download_folder_removable - }) - locationAvailable.text = requireContext().getString( - R.string.settings_download_folder_available, - byteToString(dir.freeSpace) - ) - root.setOnClickListener { - entries.values.forEach { entry -> - entry.button.isChecked = false - } - button.performClick() - Preferences["download_folder"] = dir.toUri().toString() - } - entries[dir] = this - } - } - - DownloadLocationItemBinding.inflate(layoutInflater, binding.root, true).apply { - locationType.text = requireContext().getString(R.string.settings_download_folder_custom) - root.setOnClickListener { - entries.values.forEach { entry -> - entry.button.isChecked = false - } - button.performClick() - - val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE).apply { - addFlags( - Intent.FLAG_GRANT_READ_URI_PERMISSION - or Intent.FLAG_GRANT_WRITE_URI_PERMISSION - or Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION - ) - putExtra("android.content.extra.SHOW_ADVANCED", true) - } - - requestDownloadFolderLauncher.launch(intent) - } - entries[null] = this - } - - val downloadFolder = downloadManager.downloadFolder.canonicalPath - val key = entries.keys.firstOrNull { it?.canonicalPath == downloadFolder } - entries[key]!!.button.isChecked = true - if (key == null) entries[key]!!.locationAvailable.text = downloadFolder - } - - override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { - _binding = DownloadLocationDialogBinding.inflate(layoutInflater) - - initView() - - return AlertDialog.Builder(requireContext()).apply { - setTitle(R.string.settings_download_folder) - setView(binding.root) - setPositiveButton(requireContext().getText(android.R.string.ok)) { _, _ -> - if (Preferences["download_folder", ""].isEmpty()) - Preferences["download_folder"] = context.getExternalFilesDir(null)?.toUri()?.toString() ?: "" - } - - isCancelable = false - }.create() - } - - override fun onDestroy() { - super.onDestroy() - _binding = null - } -} \ No newline at end of file diff --git a/app/src/main/java/xyz/quaver/pupil/ui/dialog/GalleryDialogFragment.kt b/app/src/main/java/xyz/quaver/pupil/ui/dialog/GalleryDialogFragment.kt deleted file mode 100644 index c900c1ec..00000000 --- a/app/src/main/java/xyz/quaver/pupil/ui/dialog/GalleryDialogFragment.kt +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2020 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil.ui.dialog - -import androidx.fragment.app.DialogFragment -import org.kodein.di.DIAware -import org.kodein.di.android.x.closestDI - -class GalleryDialogFragment(private val source: String, private val itemID: String) : DialogFragment(), DIAware { - - override val di by closestDI() -/* - private val favoriteTags: SavedSourceSet by instance(tag = "favoriteTags") - - val onChipClickedHandler = ArrayList<((Tag) -> (Unit))>() - - private var _binding: GalleryDialogBinding? = null - private val binding get() = _binding!! - - private val viewModel: GalleryDialogViewModel by viewModels() - - private val controllerListener = object: BaseControllerListener() { - override fun onIntermediateImageSet(id: String?, imageInfo: ImageInfo?) { - imageInfo?.let { - binding.cover.aspectRatio = it.width / it.height.toFloat() - } - } - - override fun onFinalImageSet(id: String?, imageInfo: ImageInfo?, animatable: Animatable?) { - imageInfo?.let { - binding.cover.aspectRatio = it.width / it.height.toFloat() - } - } - } - - override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { - _binding = GalleryDialogBinding.inflate(layoutInflater) - - with (binding.fab) { - setImageDrawable(ContextCompat.getDrawable(requireContext(), R.drawable.arrow_right)) - setOnClickListener { - context?.startActivity(Intent(requireContext(), ReaderActivity::class.java).apply { - putExtra("source", source) - putExtra("id", itemID) - }) - } - } - - val lilMutex = Mutex(true) - viewModel.info.observe(this) { - binding.progressbar.visibility = View.GONE - binding.title.text = it.title - binding.artist.text = it.artists - - binding.cover.controller = Fresco.newDraweeControllerBuilder() - .setUri(it.thumbnail) - .setControllerListener(controllerListener) - .setOldController(binding.cover.controller) - .build() - - MainScope().launch { - binding.type.text = it.extra[ItemInfo.ExtraType.TYPE]?.wordCapitalize() - addDetails(it) - addPreviews(it) - - lilMutex.unlock() - } - } - - viewModel.related.observe(this) { - if (it != null) { - MainScope().launch { - lilMutex.withLock { - addRelated(it) - } - } - } - } - - viewModel.load(source, itemID) - - return AlertDialog.Builder(requireContext()) - .setView(binding.root) - .create() - } - - private suspend fun addDetails(info: ItemInfo) { - GalleryDialogDetailsBinding.inflate(layoutInflater, binding.contents, true).apply { - type.setText(R.string.gallery_details) - - listOf( - R.string.gallery_artists, - R.string.gallery_groups, - R.string.gallery_language, - R.string.gallery_series, - R.string.gallery_characters, - R.string.gallery_tags - ).zip( - listOf( - info.artists.split(", ").map { Tag("artist", it) }, - info.extra[ItemInfo.ExtraType.GROUP]?.split(", ")?.filterNot { it.isEmpty() }?.map { Tag("group", it) }, - info.extra[ItemInfo.ExtraType.LANGUAGE]?.split(", ")?.filterNot { it.isEmpty() }?.map { Tag("language", it) }, - info.extra[ItemInfo.ExtraType.SERIES]?.split(", ")?.filterNot { it.isEmpty() }?.map { Tag("series", it) }, - info.extra[ItemInfo.ExtraType.CHARACTER]?.split(", ")?.filterNot { it.isEmpty() }?.map { Tag("character", it) }, - info.extra[ItemInfo.ExtraType.TAGS]?.split(", ")?.filterNot { it.isEmpty() }?.sortedBy { - val tag = Tag.parse(it) - - if (favoriteTags.map[source]?.contains(tag.toString()) == true) - -1 - else - when(Tag.parse(it).area) { - "female" -> 0 - "male" -> 1 - else -> 2 - } - }?.map { - Tag.parse(it).let { tag -> - when { - tag.area != null -> tag - else -> Tag("tag", it) - } - } - } - ) - ).filterNot { (_, content) -> - content.isNullOrEmpty() - }.forEach { (title, content) -> - GalleryDialogTagsBinding.inflate(layoutInflater, contents, true).apply { - type.setText(title) - - content!!.forEach { tag -> - tags.addView( - TagChip(requireContext(), source, tag).apply { - setOnClickListener { - onChipClickedHandler.forEach { handler -> - handler.invoke(tag) - } - } - } - ) - } - } - } - } - } - - private suspend fun addPreviews(info: ItemInfo) { - val previews = info.extra[ItemInfo.ExtraType.PREVIEW]?.split(", ") ?: return - - GalleryDialogDetailsBinding.inflate(layoutInflater, binding.contents, true).apply { - type.setText(R.string.gallery_thumbnails) - - val pager = ViewPager2(requireContext()).apply { - adapter = ThumbnailPageAdapter(previews) - layoutParams = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT) - } - - contents.addView(pager) - - // TODO: Change to direct allocation - GalleryDialogDotindicatorBinding.inflate(layoutInflater, contents, true).apply { - dotindicator.setViewPager2(pager) - } - } - } - - private fun addRelated(relatedItems: List) { - val adapter = SearchResultsAdapter(MutableLiveData(relatedItems)).apply { - onChipClickedHandler = { tag -> - this@GalleryDialogFragment.onChipClickedHandler.forEach { handler -> - handler.invoke(tag) - } - } - } - - GalleryDialogDetailsBinding.inflate(layoutInflater, binding.contents, true).apply { - type.setText(R.string.gallery_related) - - contents.addView(RecyclerView(requireContext()).apply { - layoutManager = LinearLayoutManager(context) - this.adapter = adapter - - ItemClickSupport.addTo(this).apply { - onItemClickListener = { _, position, _ -> - requireContext().startActivity(Intent(requireContext(), ReaderActivity::class.java).apply { - putExtra("source", source) - putExtra("id", relatedItems[position].id) - }) - } - onItemLongClickListener = { _, position, _ -> - GalleryDialogFragment(source, relatedItems[position].id).apply { - onChipClickedHandler.add { tag -> - this@GalleryDialogFragment.onChipClickedHandler.forEach { it.invoke(tag) } - } - }.show(parentFragmentManager, "") - - true - } - } - }) - } - } - - override fun onDestroyView() { - binding.contents.forEach { if (it is RecyclerView) ItemClickSupport.removeFrom(it) } - super.onDestroyView() - } -*/ -} \ No newline at end of file diff --git a/app/src/main/java/xyz/quaver/pupil/ui/dialog/ProxyDialogFragment.kt b/app/src/main/java/xyz/quaver/pupil/ui/dialog/ProxyDialogFragment.kt deleted file mode 100644 index 1036e9f8..00000000 --- a/app/src/main/java/xyz/quaver/pupil/ui/dialog/ProxyDialogFragment.kt +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2020 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil.ui.dialog - -import android.app.Dialog -import android.os.Bundle -import android.view.View -import android.widget.AdapterView -import android.widget.ArrayAdapter -import androidx.appcompat.app.AlertDialog -import androidx.fragment.app.DialogFragment -import kotlinx.serialization.encodeToString -import kotlinx.serialization.json.Json -import org.kodein.di.DI -import org.kodein.di.DIAware -import org.kodein.di.android.x.closestDI -import org.kodein.di.instance -import xyz.quaver.pupil.R -import xyz.quaver.pupil.databinding.ProxyDialogBinding -import xyz.quaver.pupil.util.Preferences -import xyz.quaver.pupil.util.ProxyInfo -import xyz.quaver.pupil.util.getProxyInfo -import java.net.Proxy - -class ProxyDialogFragment : DialogFragment(), DIAware { - - override val di: DI by closestDI() - - private var _binding: ProxyDialogBinding? = null - private val binding get() = _binding!! - - override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { - _binding = ProxyDialogBinding.inflate(layoutInflater) - - initView() - - return AlertDialog.Builder(requireContext()).apply { - setView(binding.root) - }.create() - } - - private fun initView() { - val proxyInfo = getProxyInfo() - - val enabler = { enable: Boolean -> - binding.addr.isEnabled = enable - binding.port.isEnabled = enable - binding.username.isEnabled = enable - binding.password.isEnabled = enable - - if (!enable) { - binding.addr.text = null - binding.port.text = null - binding.username.text = null - binding.password.text = null - } - } - - with(binding.typeSelector) { - adapter = ArrayAdapter( - context, - android.R.layout.simple_spinner_dropdown_item, - context.resources.getStringArray(R.array.proxy_type) - ) - - setSelection(proxyInfo.type.ordinal) - - onItemSelectedListener = object: AdapterView.OnItemSelectedListener { - override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) { - enabler.invoke(position != 0) - } - - override fun onNothingSelected(parent: AdapterView<*>?) {} - } - } - - binding.addr.setText(proxyInfo.host) - binding.port.setText(proxyInfo.port?.toString()) - binding.username.setText(proxyInfo.username) - binding.password.setText(proxyInfo.password) - - enabler.invoke(proxyInfo.type != Proxy.Type.DIRECT) - - binding.cancelButton.setOnClickListener { - dismiss() - } - - binding.okButton.setOnClickListener { - val type = Proxy.Type.values()[binding.typeSelector.selectedItemPosition] - val addr = binding.addr.text?.toString() - val port = binding.port.text?.toString()?.toIntOrNull() - val username = binding.username.text?.toString() - val password = binding.password.text?.toString() - - if (type != Proxy.Type.DIRECT) { - if (addr == null || addr.isEmpty()) - binding.addr.error = requireContext().getText(R.string.proxy_dialog_error) - if (port == null) - binding.port.error = requireContext().getText(R.string.proxy_dialog_error) - - if (addr == null || addr.isEmpty() || port == null) - return@setOnClickListener - } - - ProxyInfo(type, addr, port, username, password).let { - Preferences["proxy"] = Json.encodeToString(it) - // TODO - } - - dismiss() - } - } - -} \ No newline at end of file diff --git a/app/src/main/java/xyz/quaver/pupil/ui/fragment/ManageFavoritesFragment.kt b/app/src/main/java/xyz/quaver/pupil/ui/fragment/ManageFavoritesFragment.kt deleted file mode 100644 index caec1c14..00000000 --- a/app/src/main/java/xyz/quaver/pupil/ui/fragment/ManageFavoritesFragment.kt +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2020 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil.ui.fragment - -import android.content.Intent -import android.os.Bundle -import android.webkit.URLUtil -import android.widget.EditText -import android.widget.TextView -import androidx.appcompat.app.AlertDialog -import androidx.core.content.ContextCompat -import androidx.preference.Preference -import androidx.preference.PreferenceFragmentCompat -import androidx.swiperefreshlayout.widget.CircularProgressDrawable -import com.google.android.material.snackbar.Snackbar -import io.ktor.client.* -import io.ktor.client.call.* -import io.ktor.client.request.* -import io.ktor.client.request.forms.* -import io.ktor.client.statement.* -import io.ktor.http.* -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.MainScope -import kotlinx.coroutines.launch -import org.kodein.di.DIAware -import org.kodein.di.android.x.closestDI -import org.kodein.di.direct -import org.kodein.di.instance -import xyz.quaver.pupil.Pupil -import xyz.quaver.pupil.R -import java.io.IOException -/* -class ManageFavoritesFragment : PreferenceFragmentCompat(), DIAware { - - private lateinit var progressDrawable: CircularProgressDrawable - - override val di by closestDI() - - private val applicationContext: Pupil by instance() - private val client: HttpClient by instance() - - override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { - setPreferencesFromResource(R.xml.manage_favorites_preferences, rootKey) - - val context = requireContext() - - val iconSize = context.resources.getDimensionPixelSize(R.dimen.settings_progressbar_icon_size) - progressDrawable = object: CircularProgressDrawable(context) { - override fun getIntrinsicHeight() = iconSize - override fun getIntrinsicWidth() = iconSize - }.apply { - setStyle(CircularProgressDrawable.DEFAULT) - setColorSchemeColors(ContextCompat.getColor(context, R.color.colorAccent)) - } - - initPreferences() - } - - private fun initPreferences() { - findPreference("backup")?.setOnPreferenceClickListener { preference -> - - MainScope().launch { - preference.icon = progressDrawable - progressDrawable.start() - } - - CoroutineScope(Dispatchers.IO).launch { - kotlin.runCatching { - requireContext().openFileInput("favorites.json").use { favorites -> - val httpResponse: HttpResponse = client.submitForm( - url = "http://ix.io/", - formParameters = Parameters.build { - append("F:1", favorites.bufferedReader().readText()) - } - ) - - if (httpResponse.status.value != 200) throw IOException("Response code ${httpResponse.status.value}") - - Intent(Intent.ACTION_SEND).apply { - type = "text/plain" - putExtra(Intent.EXTRA_TEXT, httpResponse.receive().replace("\n", "")) - }.let { - applicationContext.startActivity(Intent.createChooser(it, getString(R.string.settings_backup_share))) - } - } - }.onSuccess { - MainScope().launch { - progressDrawable.stop() - preference.icon = null - } - }.onFailure { - view?.let { - Snackbar.make(it, R.string.settings_backup_failed, Snackbar.LENGTH_LONG).show() - } - } - } - - true - } - findPreference("restore")?.setOnPreferenceClickListener { - val editText = EditText(context).apply { - setText(context.getString(R.string.backup_url), TextView.BufferType.EDITABLE) - } - - AlertDialog.Builder(requireContext()) - .setTitle(R.string.settings_restore_title) - .setView(editText) - .setPositiveButton(android.R.string.ok) { _, _ -> - CoroutineScope(Dispatchers.IO).launch { - kotlin.runCatching { - val url = editText.text.toString() - - if (!URLUtil.isValidUrl(url)) throw IllegalArgumentException() - - client.get>(url).also { - direct.instance(tag = "favorites.json").addAll(mapOf("hitomi.la" to it)) - } - }.onSuccess { - MainScope().launch { - view?.run { - Snackbar.make(this, context.getString(R.string.settings_restore_success, it.size), Snackbar.LENGTH_LONG).show() - } - } - }.onFailure { - MainScope().launch { - view?.run { - Snackbar.make(this, R.string.settings_restore_failed, Snackbar.LENGTH_LONG).show() - } - } - } - } - }.setNegativeButton(android.R.string.cancel) { _, _ -> - // Do Nothing - }.show() - - true - } - } - -}*/ \ No newline at end of file diff --git a/app/src/main/java/xyz/quaver/pupil/ui/fragment/ManageStorageFragment.kt b/app/src/main/java/xyz/quaver/pupil/ui/fragment/ManageStorageFragment.kt deleted file mode 100644 index 25445732..00000000 --- a/app/src/main/java/xyz/quaver/pupil/ui/fragment/ManageStorageFragment.kt +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2020 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil.ui.fragment - -import android.os.Bundle -import androidx.appcompat.app.AlertDialog -import androidx.preference.Preference -import androidx.preference.PreferenceFragmentCompat -import kotlinx.coroutines.* -import org.kodein.di.DIAware -import org.kodein.di.android.x.closestDI -import org.kodein.di.instance -import xyz.quaver.io.FileX -import xyz.quaver.pupil.R -import xyz.quaver.pupil.util.* - -class ManageStorageFragment : PreferenceFragmentCompat(), DIAware, Preference.OnPreferenceClickListener { - - override val di by closestDI() - - private var job: Job? = null - - private val downloadManager: DownloadManager by instance() - - override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { - setPreferencesFromResource(R.xml.manage_storage_preferences, rootKey) - - initPreferences() - } - - override fun onPreferenceClick(preference: Preference?): Boolean { - val context = context ?: return false - - with (preference) { - this ?: return false - - when (key) { - "delete_cache" -> {/* - AlertDialog.Builder(context).apply { - setTitle(R.string.warning) - setMessage(R.string.settings_clear_cache_alert_message) - setPositiveButton(android.R.string.ok) { _, _ -> - summary = context.getString(R.string.settings_storage_usage_loading) - - CoroutineScope(Dispatchers.IO).launch { - cache.clear() - - MainScope().launch { - summary = context.getString(R.string.settings_storage_usage, byteToString(cache.cacheFolder.size())) - } - } - } - setNegativeButton(android.R.string.cancel) { _, _ -> } - }.show()*/ - } - "delete_downloads" -> { - val dir = downloadManager.downloadFolder - - AlertDialog.Builder(context).apply { - setTitle(R.string.warning) - setMessage(R.string.settings_clear_downloads_alert_message) - setPositiveButton(android.R.string.ok) { _, _ -> - CoroutineScope(Dispatchers.IO).launch { - job?.cancel() - launch(Dispatchers.Main) { - summary = context.getString(R.string.settings_storage_usage_loading) - } - - if (dir.exists()) - dir.listFiles()?.forEach { - when (it) { - is FileX -> it.deleteRecursively() - else -> it.deleteRecursively() - } - } - - job = launch { - var size = 0L - - launch(Dispatchers.Main) { - summary = context.getString(R.string.settings_storage_usage, byteToString(size)) - } - dir.walk().forEach { - size += it.length() - - launch(Dispatchers.Main) { - summary = context.getString(R.string.settings_storage_usage, byteToString(size)) - } - } - } - } - } - setNegativeButton(android.R.string.cancel) { _, _ -> } - }.show() - } - /* - "clear_history" -> { - AlertDialog.Builder(context).apply { - setTitle(R.string.warning) - setMessage(R.string.settings_clear_history_alert_message) - setPositiveButton(android.R.string.ok) { _, _ -> - histories.clear() - summary = context.getString(R.string.settings_clear_history_summary, histories.map.values.sumOf { it.size }) - } - setNegativeButton(android.R.string.cancel) { _, _ -> } - }.show() - }*/ - else -> return false - } - } - - return true - } - - private fun initPreferences() { - val context = context ?: return - - with (findPreference("delete_cache")) {/* - this ?: return@with - summary = context.getString(R.string.settings_storage_usage, byteToString(cache.cacheFolder.size())) - - onPreferenceClickListener = this@ManageStorageFragment - */} - - with (findPreference("delete_downloads")) { - this ?: return@with - - val dir = downloadManager.downloadFolder - - summary = context.getString(R.string.settings_storage_usage, byteToString(0)) - job?.cancel() - job = CoroutineScope(Dispatchers.IO).launch { - var size = 0L - - dir.walk().forEach { - launch(Dispatchers.Main) { - summary = context.getString(R.string.settings_storage_usage, byteToString(size)) - } - - size += it.length() - } - } - - onPreferenceClickListener = this@ManageStorageFragment - } -/* - with (findPreference("clear_history")) { - this ?: return@with - - summary = context.getString(R.string.settings_clear_history_summary, histories.map.values.sumOf { it.size }) - - onPreferenceClickListener = this@ManageStorageFragment - }*/ - } - - override fun onDestroy() { - job?.cancel() - super.onDestroy() - } - -} \ No newline at end of file diff --git a/app/src/main/java/xyz/quaver/pupil/ui/fragment/PINLockFragment.kt b/app/src/main/java/xyz/quaver/pupil/ui/fragment/PINLockFragment.kt deleted file mode 100644 index 5a8d3a7f..00000000 --- a/app/src/main/java/xyz/quaver/pupil/ui/fragment/PINLockFragment.kt +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2020 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil.ui.fragment - -import android.os.Bundle -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import androidx.fragment.app.Fragment -import com.andrognito.pinlockview.PinLockListener -import xyz.quaver.pupil.databinding.PinLockFragmentBinding - -class PINLockFragment : Fragment() { - - private var _binding: PinLockFragmentBinding? = null - val binding get() = _binding!! - - var onPINEntered: ((String) -> Unit)? = null - - override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { - _binding = PinLockFragmentBinding.inflate(inflater, container, false) - - binding.pinLockView.attachIndicatorDots(binding.indicatorDots) - binding.pinLockView.setPinLockListener(object: PinLockListener { - override fun onComplete(p0: String?) { - onPINEntered?.invoke(p0 ?: "") - } - - override fun onEmpty() {} - override fun onPinChange(p0: Int, p1: String?) {} - }) - - return binding.root - } - - override fun onDestroy() { - super.onDestroy() - _binding = null - } - -} \ No newline at end of file diff --git a/app/src/main/java/xyz/quaver/pupil/ui/fragment/PatternLockFragment.kt b/app/src/main/java/xyz/quaver/pupil/ui/fragment/PatternLockFragment.kt deleted file mode 100644 index 69d48f4a..00000000 --- a/app/src/main/java/xyz/quaver/pupil/ui/fragment/PatternLockFragment.kt +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2019 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil.ui.fragment - -import android.os.Bundle -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import androidx.fragment.app.Fragment -import com.andrognito.patternlockview.PatternLockView -import com.andrognito.patternlockview.listener.PatternLockViewListener -import com.andrognito.patternlockview.utils.PatternLockUtils -import xyz.quaver.pupil.databinding.PatternLockFragmentBinding - -class PatternLockFragment : Fragment() { - - private var _binding: PatternLockFragmentBinding? = null - val binding get() = _binding!! - - var onPatternDrawn: ((String) -> Unit)? = null - - override fun onCreateView( - inflater: LayoutInflater, container: ViewGroup?, - savedInstanceState: Bundle? - ): View { - _binding = PatternLockFragmentBinding.inflate(inflater, container, false) - binding.patternLockView.addPatternLockListener(object: PatternLockViewListener { - override fun onComplete(pattern: MutableList?) { - val password = PatternLockUtils.patternToMD5(binding.patternLockView, pattern) - onPatternDrawn?.invoke(password) - } - - override fun onCleared() {} - override fun onProgress(progressPattern: MutableList?) {} - override fun onStarted() {} - }) - return binding.root - } - - override fun onDestroy() { - super.onDestroy() - _binding = null - } - -} diff --git a/app/src/main/java/xyz/quaver/pupil/ui/fragment/SettingsFragment.kt b/app/src/main/java/xyz/quaver/pupil/ui/fragment/SettingsFragment.kt deleted file mode 100644 index 78c9ed77..00000000 --- a/app/src/main/java/xyz/quaver/pupil/ui/fragment/SettingsFragment.kt +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2020 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil.ui.fragment - -import android.app.Activity -import android.content.* -import android.os.Bundle -import android.widget.Toast -import androidx.activity.result.contract.ActivityResultContracts -import androidx.appcompat.app.AppCompatDelegate -import androidx.preference.* -import com.google.android.gms.oss.licenses.OssLicensesMenuActivity -import org.kodein.di.DIAware -import org.kodein.di.android.x.closestDI -import org.kodein.di.instance -import xyz.quaver.io.FileX -import xyz.quaver.io.util.getChild -import xyz.quaver.pupil.R -import xyz.quaver.pupil.ui.SettingsActivity -import xyz.quaver.pupil.ui.dialog.* -import xyz.quaver.pupil.util.* -import java.util.* - -class SettingsFragment : - PreferenceFragmentCompat(), - Preference.OnPreferenceClickListener, - Preference.OnPreferenceChangeListener, - SharedPreferences.OnSharedPreferenceChangeListener, - DIAware { - - override val di by closestDI() - - private val downloadManager: DownloadManager by instance() - - override fun onResume() { - super.onResume() - - val lockManager = LockManager(requireContext()) - - findPreference("app_lock")?.summary = if (lockManager.locks.isNullOrEmpty()) { - getString(R.string.settings_lock_none) - } else { - lockManager.locks?.joinToString(", ") { - when(it.type) { - Lock.Type.PATTERN -> getString(R.string.settings_lock_pattern) - Lock.Type.PIN -> getString(R.string.settings_lock_pin) - Lock.Type.PASSWORD -> getString(R.string.settings_lock_password) - } - } - } - } - - override fun onPreferenceClick(preference: Preference?): Boolean { - with (preference) { - this ?: return false - - when (key) { - "app_version" -> { - checkUpdate(activity as SettingsActivity, true) - } - "download_folder" -> { - DownloadLocationDialogFragment().show(parentFragmentManager, "Download Location Dialog") - } - "proxy" -> { - ProxyDialogFragment().show(parentFragmentManager, "Proxy Dialog") - } - "user_id" -> { - (context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager).setPrimaryClip( - ClipData.newPlainText("user_id", Preferences.get("user_id")) - ) - Toast.makeText(context, R.string.copied_to_clipboard, Toast.LENGTH_SHORT).show() - } - else -> return false - } - } - - return true - } - - override fun onPreferenceChange(preference: Preference?, newValue: Any?): Boolean { - with (preference) { - this ?: return false - - when (key) { - "nomedia" -> { - val create = (newValue as? Boolean) ?: return false - - return kotlin.runCatching { - val nomedia = downloadManager.downloadFolder.getChild(".nomedia") - - if (create) - nomedia.createNewFile() - else - nomedia.delete() - }.getOrDefault(false) - } - "dark_mode" -> { - AppCompatDelegate.setDefaultNightMode(when (newValue as Boolean) { - true -> AppCompatDelegate.MODE_NIGHT_YES - false -> AppCompatDelegate.MODE_NIGHT_NO - }) - } - else -> return false - } - } - - return true - } - - override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) { - key ?: return - - with (findPreference(key)) { - this ?: return - - when (key) { - "proxy" -> { - summary = context?.let { getProxyInfo().type.name } - } - "download_folder" -> { - summary = FileX(context, Preferences.get("download_folder")).canonicalPath - } - "download_folder_name" -> { - summary = Preferences["download_folder_name", "[-id-] -title-"] - } - } - } - } - - override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { - setPreferencesFromResource(R.xml.root_preferences, rootKey) - - Preferences.registerOnSharedPreferenceChangeListener(this) - - initPreferences() - } - - override fun onDestroy() { - Preferences.unregisterOnSharedPreferenceChangeListener(this) - super.onDestroy() - } - - private fun initPreferences() { - for (i in 0 until preferenceScreen.preferenceCount) { - - preferenceScreen.getPreference(i).run { - if (this is PreferenceCategory) - (0 until preferenceCount).map { getPreference(it) } - else - listOf(this) - }.forEach { preference -> - with (preference) with@{ - - when (key) { - "app_version" -> { - val manager = requireContext().packageManager - val info = manager.getPackageInfo(requireContext().packageName, 0) - summary = requireContext().getString(R.string.settings_app_version_description, info.versionName) - - onPreferenceClickListener = this@SettingsFragment - } - "download_folder_name" -> { - summary = Preferences["download_folder_name", "[-id-] -title-"] - - setOnPreferenceClickListener { - DownloadFolderNameDialogFragment().show(requireActivity().supportFragmentManager, "Download Location Dialog") - - true - } - } - "download_folder" -> { - summary = FileX(context, Preferences.get("download_folder")).canonicalPath - - onPreferenceClickListener = this@SettingsFragment - } - "nomedia" -> { - (this as SwitchPreferenceCompat).isChecked = kotlin.runCatching { - downloadManager.downloadFolder.getChild(".nomedia").exists() - }.getOrDefault(false) - - onPreferenceChangeListener = this@SettingsFragment - } - "app_lock" -> { - val lockManager = LockManager(requireContext()) - summary = - if (lockManager.locks.isNullOrEmpty()) { - getString(R.string.settings_lock_none) - } else { - lockManager.locks?.joinToString(", ") { - when (it.type) { - Lock.Type.PATTERN -> getString(R.string.settings_lock_pattern) - Lock.Type.PIN -> getString(R.string.settings_lock_pin) - Lock.Type.PASSWORD -> getString(R.string.settings_lock_password) - } - } - } - - onPreferenceClickListener = this@SettingsFragment - } - "proxy" -> { - summary = getProxyInfo().type.name - - onPreferenceClickListener = this@SettingsFragment - } - "dark_mode" -> { - onPreferenceChangeListener = this@SettingsFragment - } - "old_import_galleries" -> { - onPreferenceClickListener = this@SettingsFragment - } - "user_id" -> { - summary = Preferences.get("user_id") - onPreferenceClickListener = this@SettingsFragment - } - "oss" -> { - setOnPreferenceClickListener { - context?.startActivity(Intent(context, OssLicensesMenuActivity::class.java)) - true - } - } - } - - } - } - } - } -} \ No newline at end of file diff --git a/app/src/main/java/xyz/quaver/pupil/ui/fragment/SourceSettingsFragment.kt b/app/src/main/java/xyz/quaver/pupil/ui/fragment/SourceSettingsFragment.kt deleted file mode 100644 index 1f0ac7b5..00000000 --- a/app/src/main/java/xyz/quaver/pupil/ui/fragment/SourceSettingsFragment.kt +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2021 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil.ui.fragment - -import android.os.Bundle -import androidx.preference.ListPreference -import androidx.preference.Preference -import androidx.preference.PreferenceCategory -import androidx.preference.PreferenceFragmentCompat -import io.ktor.client.* -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.launch -import org.kodein.di.DIAware -import org.kodein.di.android.x.closestDI -import org.kodein.di.direct -import org.kodein.di.instance -import xyz.quaver.pupil.ui.dialog.DefaultQueryDialogFragment -import xyz.quaver.pupil.util.Preferences -import xyz.quaver.pupil.util.getAvailableLanguages -import xyz.quaver.pupil.util.updateTranslations -import java.util.* - -class SourceSettingsFragment(private val source: String) : - PreferenceFragmentCompat(), - Preference.OnPreferenceClickListener, - Preference.OnPreferenceChangeListener, - DIAware { - - override val di by closestDI() - - private val client: HttpClient by instance() - - override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { - /*setPreferencesFromResource(direct.instance().toMap()[source]!!, rootKey)*/ - - initPreferences() - } - - override fun onPreferenceClick(preference: Preference?): Boolean { - with (preference) { - this ?: return false - - when (key) { - "hitomi.default_query" -> { - DefaultQueryDialogFragment().apply { - onPositiveButtonClickListener = { newTags -> - Preferences["hitomi.default_query"] = newTags.toString() - summary = newTags.toString() - } - }.show(parentFragmentManager, "Default Query Dialog") - } - } - } - - return true - } - - override fun onPreferenceChange(preference: Preference?, newValue: Any?): Boolean { - with (preference) { - this ?: return false - - when (key) { - "hitomi.tag_translation" -> { - updateTranslations(client) - } - else -> return false - } - } - - return true - } - - private fun initPreferences() { - for (i in 0 until preferenceScreen.preferenceCount) { - - preferenceScreen.getPreference(i).run { - if (this is PreferenceCategory) - (0 until preferenceCount).map { getPreference(it) } - else - listOf(this) - }.forEach { preference -> - with (preference) { - when (key) { - "hitomi.default_query" -> { - summary = Preferences.get(key) - - onPreferenceClickListener = this@SourceSettingsFragment - } - - "hitomi.tag_translation" -> { - this as ListPreference - - isEnabled = false - - CoroutineScope(Dispatchers.IO).launch { - kotlin.runCatching { - val languages = getAvailableLanguages(client).distinct().toTypedArray() - - entries = languages.map { Locale(it).let { loc -> loc.getDisplayLanguage(loc) } }.toTypedArray() - entryValues = languages - - launch(Dispatchers.Main) { - isEnabled = true - } - } - } - - onPreferenceChangeListener = this@SourceSettingsFragment - - } - } - } - } - } - } -} \ No newline at end of file diff --git a/app/src/main/java/xyz/quaver/pupil/ui/view/FloatingSearchView.kt b/app/src/main/java/xyz/quaver/pupil/ui/view/FloatingSearchView.kt deleted file mode 100644 index 2125545d..00000000 --- a/app/src/main/java/xyz/quaver/pupil/ui/view/FloatingSearchView.kt +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2020 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil.ui.view - -import android.content.Context -import android.graphics.PorterDuff -import android.graphics.PorterDuffColorFilter -import android.text.Editable -import android.text.TextWatcher -import android.util.AttributeSet -import android.view.inputmethod.EditorInfo -import androidx.core.content.ContextCompat -import androidx.core.content.res.ResourcesCompat -import androidx.swiperefreshlayout.widget.CircularProgressDrawable -import xyz.quaver.floatingsearchview.FloatingSearchView -import xyz.quaver.floatingsearchview.databinding.SearchSuggestionItemBinding -import xyz.quaver.floatingsearchview.suggestions.model.SearchSuggestion -import xyz.quaver.floatingsearchview.util.view.SearchInputView -import xyz.quaver.pupil.R -import xyz.quaver.pupil.sources.Hitomi -import xyz.quaver.pupil.types.FavoriteHistorySwitch -import xyz.quaver.pupil.types.HistorySuggestion -import xyz.quaver.pupil.types.LoadingSuggestion -import xyz.quaver.pupil.types.NoResultSuggestion - -class FloatingSearchView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : - xyz.quaver.floatingsearchview.FloatingSearchView(context, attrs), - FloatingSearchView.OnSearchListener, - TextWatcher -{ - private val searchInputView = findViewById(R.id.search_bar_text) - - var onHistoryDeleteClickedListener: ((String) -> Unit)? = null - var onFavoriteHistorySwitchClickListener: (() -> Unit)? = null - - var onSuggestionBinding: ((SearchSuggestionItemBinding, SearchSuggestion) -> Unit)? = null - - init { - searchInputView.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI or searchInputView.imeOptions - - searchInputView.addTextChangedListener(this) - onSearchListener = this - onBindSuggestionCallback = { binding, item, _ -> - onBindSuggestion(binding, item) - } - } - - override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) { - - } - - override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { - - } - - override fun afterTextChanged(s: Editable?) { - s ?: return - - if (s.any { it.isUpperCase() }) - s.replace(0, s.length, s.toString().lowercase()) - } - - override fun onSuggestionClicked(searchSuggestion: SearchSuggestion?) { - when (searchSuggestion) { - is Hitomi.TagSuggestion -> { - val tag = "${searchSuggestion.n}:${searchSuggestion.s.replace(Regex("\\s"), "_")}" - with (searchInputView.text!!) { - delete(if (lastIndexOf(' ') == -1) 0 else lastIndexOf(' ') + 1, length) - - if (!this.contains(tag)) - append("$tag ") - } - } - is HistorySuggestion -> { - with (searchInputView.text!!) { - clear() - append(searchSuggestion.body) - } - } - is FavoriteHistorySwitch -> onFavoriteHistorySwitchClickListener?.invoke() - } - } - - override fun onSearchAction(currentQuery: String?) {} - - private fun onBindSuggestion(binding: SearchSuggestionItemBinding, item: SearchSuggestion) { - when(item) { - is FavoriteHistorySwitch -> { - binding.leftIcon.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.swap_horizontal, context.theme)) - } - is LoadingSuggestion -> { - binding.leftIcon.setImageDrawable(CircularProgressDrawable(context).also { - it.setStyle(CircularProgressDrawable.DEFAULT) - it.colorFilter = PorterDuffColorFilter(ContextCompat.getColor(context, R.color.colorAccent), PorterDuff.Mode.SRC_IN) - it.start() - }) - } - is NoResultSuggestion -> { - binding.leftIcon.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.close, context.theme)) - } - else -> { - onSuggestionBinding?.invoke(binding, item) - } - } - } -} diff --git a/app/src/main/java/xyz/quaver/pupil/ui/view/SwipePageTurnView.java b/app/src/main/java/xyz/quaver/pupil/ui/view/SwipePageTurnView.java deleted file mode 100644 index da5065cf..00000000 --- a/app/src/main/java/xyz/quaver/pupil/ui/view/SwipePageTurnView.java +++ /dev/null @@ -1,471 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2020 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil.ui.view; - -import android.animation.ValueAnimator; -import android.content.Context; -import android.content.res.Configuration; -import android.graphics.Canvas; -import android.graphics.Paint; -import android.graphics.Rect; -import android.os.Vibrator; -import android.util.AttributeSet; -import android.util.DisplayMetrics; -import android.view.Gravity; -import android.view.View; -import android.view.ViewGroup; -import android.view.animation.DecelerateInterpolator; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.appcompat.content.res.AppCompatResources; -import androidx.core.content.ContextCompat; -import androidx.core.view.NestedScrollingChild; -import androidx.core.view.NestedScrollingChildHelper; -import androidx.core.view.NestedScrollingParent; -import androidx.core.view.NestedScrollingParentHelper; -import androidx.core.view.ViewCompat; -import androidx.core.widget.TextViewCompat; - -import xyz.quaver.pupil.R; - -@SuppressWarnings("NullableProblems") -public class SwipePageTurnView extends ViewGroup implements NestedScrollingChild, NestedScrollingParent { - - private static final int PAGE_TURN_LAYOUT_SIZE = 48; - private static final int PAGE_TURN_ANIM_DURATION = 500; - private static final int PREV_OFFSET = 64; - private static final int RIPPLE_GIVE = 4; - - private final float adjustedPageTurnLayoutSize; - private final float adjustedPrevOffset; - private final float adjustedRippleGive; - - final private NestedScrollingParentHelper mNestedScrollingParentHelper; - final private NestedScrollingChildHelper mNestedScrollingChildHelper; - - final private Vibrator mVibrator; - - private View mTarget; - - private TextView mPrev; - private TextView mNext; - - private final Paint mRipplePaint = new Paint(); - private final Rect mRippleBound = new Rect(); - - private int mRippleSize = 0; - private final int mRippleTargetSize; - private final ValueAnimator mRippleAnimator = new ValueAnimator(); - - private int mCurrentOverScroll = 0; - - private int mCurrentPage = 1; - private boolean mShowPrev; - private boolean mShowNext; - - private OnPageTurnListener mOnPageTurnListener; - - public SwipePageTurnView(@NonNull Context context) { - this(context, null); - } - - public SwipePageTurnView(@NonNull Context context, AttributeSet attr) { - this(context, attr, 0); - } - - public SwipePageTurnView(@NonNull Context context, AttributeSet attr, int defStyle) { - super(context, attr, defStyle); - - setWillNotDraw(false); - - DisplayMetrics metrics = getResources().getDisplayMetrics(); - - adjustedPageTurnLayoutSize = PAGE_TURN_LAYOUT_SIZE * metrics.density; - adjustedPrevOffset = PREV_OFFSET * metrics.density; - adjustedRippleGive = RIPPLE_GIVE * metrics.density; - - mRippleTargetSize = metrics.widthPixels; - - mNestedScrollingParentHelper = new NestedScrollingParentHelper(this); - mNestedScrollingChildHelper = new NestedScrollingChildHelper(this); - - mVibrator = (Vibrator) getContext().getSystemService(Context.VIBRATOR_SERVICE); - - mRippleAnimator.addUpdateListener(animation -> { - mRippleSize = (int) animation.getAnimatedValue(); - invalidate(); - }); - mRippleAnimator.setDuration(PAGE_TURN_ANIM_DURATION); - - initPageTurnView(); - } - - public void setCurrentPage(int currentPage, boolean showNext) { - mCurrentPage = currentPage; - - mShowPrev = currentPage > 1; - mShowNext = showNext; - - mPrev.setText(getContext().getString(R.string.main_move_to_page, mCurrentPage-1)); - mNext.setText(getContext().getString(R.string.main_move_to_page, mCurrentPage+1)); - } - - public void setOnPageTurnListener(OnPageTurnListener listener) { - mOnPageTurnListener = listener; - } - - private void initPageTurnView() { - TextView prev = new TextView(getContext()); - TextView next = new TextView(getContext()); - - prev.setGravity(Gravity.CENTER_VERTICAL); - next.setGravity(Gravity.CENTER_VERTICAL); - - prev.setCompoundDrawablesWithIntrinsicBounds(R.drawable.navigate_prev, 0, 0, 0); - next.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.navigate_next, 0); - - TextViewCompat.setCompoundDrawableTintList(prev, AppCompatResources.getColorStateList(getContext(), R.color.colorAccent)); - TextViewCompat.setCompoundDrawableTintList(next, AppCompatResources.getColorStateList(getContext(), R.color.colorAccent)); - - prev.setVisibility(View.INVISIBLE); - next.setVisibility(View.INVISIBLE); - - mPrev = prev; - mNext = next; - - addView(mPrev); - addView(mNext); - - setCurrentPage(1, false); - } - - private void ensureTarget() { - if (mTarget == null) { - for (int i = 0; i < getChildCount(); i++) { - View child = getChildAt(i); - - if (!child.equals(mNext) && !child.equals(mPrev)) { - mTarget = child; - break; - } - } - } - } - - @Override - protected void onLayout(boolean changed, int l, int t, int r, int b) { - final int width = getMeasuredWidth(); - final int height = getMeasuredHeight(); - - if (getChildCount() == 0) - return; - if (mTarget == null) - ensureTarget(); - if (mTarget == null) - return; - - mTarget.layout( - getPaddingLeft(), - getPaddingTop(), - width - getPaddingRight(), - height - getPaddingBottom() - ); - - final int prevWidth = mPrev.getMeasuredWidth(); - mPrev.layout( - width / 2 - prevWidth / 2, - getPaddingTop() + (int) adjustedPrevOffset, - width / 2 + prevWidth / 2, - getPaddingTop() + (int) adjustedPrevOffset + mPrev.getMeasuredHeight() - ); - - final int nextWidth = mNext.getMeasuredWidth(); - mNext.layout( - width / 2 - nextWidth / 2, - height - getPaddingBottom() - mNext.getMeasuredHeight(), - width / 2 + nextWidth / 2, - height - getPaddingBottom() - ); - } - - @Override - protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - super.onMeasure(widthMeasureSpec, heightMeasureSpec); - if (mTarget == null) - ensureTarget(); - if (mTarget == null) - return; - - mTarget.measure( - MeasureSpec.makeMeasureSpec(getMeasuredWidth() - getPaddingLeft() - getPaddingRight(), MeasureSpec.EXACTLY), - MeasureSpec.makeMeasureSpec(getMeasuredHeight() - getPaddingTop() - getPaddingBottom(), MeasureSpec.EXACTLY) - ); - - mPrev.measure( - MeasureSpec.makeMeasureSpec(getMeasuredWidth(), MeasureSpec.AT_MOST), - MeasureSpec.makeMeasureSpec((int) adjustedPageTurnLayoutSize, MeasureSpec.EXACTLY) - ); - - mNext.measure( - MeasureSpec.makeMeasureSpec(getMeasuredWidth(), MeasureSpec.AT_MOST), - MeasureSpec.makeMeasureSpec((int) adjustedPageTurnLayoutSize, MeasureSpec.EXACTLY) - ); - } - - @Override - protected void onDraw(Canvas canvas) { - super.onDraw(canvas); - - if (mCurrentOverScroll == 0) - return; - - if (mCurrentOverScroll > 0) { - mRippleBound.set( - getPaddingLeft(), - (int) (getPaddingTop() - adjustedRippleGive), - getMeasuredWidth() - getPaddingRight(), - (int) (getPaddingTop() + adjustedPrevOffset + mPrev.getMeasuredHeight() + adjustedRippleGive) - ); - } - - if (mCurrentOverScroll < 0) { - final int height = getMeasuredHeight(); - mRippleBound.set( - getPaddingLeft(), - (int) (height - getPaddingBottom() - mNext.getMeasuredHeight() - adjustedRippleGive), - getMeasuredWidth() - getPaddingRight(), - height - getPaddingBottom() - ); - } - - mRipplePaint.reset(); - mRipplePaint.setStyle(Paint.Style.FILL); - - int currentNightMode = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; - - switch (currentNightMode) { - case Configuration.UI_MODE_NIGHT_YES: - mRipplePaint.setColor(ContextCompat.getColor(getContext(), R.color.material_light_blue_700)); - break; - case Configuration.UI_MODE_NIGHT_NO: - mRipplePaint.setColor(ContextCompat.getColor(getContext(), R.color.material_light_blue_300)); - break; - } - - canvas.drawCircle( - (mRippleBound.left + mRippleBound.right) / 2F, - mCurrentOverScroll > 0 ? mRippleBound.bottom : mRippleBound.top, - mRippleSize, - mRipplePaint - ); - } - - private void onOverscroll(int overscroll) { - if (mTarget == null) - ensureTarget(); - if (mTarget == null) - return; - - mCurrentOverScroll = overscroll; - - if (overscroll > 0) { - mPrev.setVisibility(View.VISIBLE); - mNext.setVisibility(View.INVISIBLE); - } else if (overscroll < 0) { - mPrev.setVisibility(View.INVISIBLE); - mNext.setVisibility(View.VISIBLE); - } else { - mPrev.setVisibility(View.INVISIBLE); - mNext.setVisibility(View.INVISIBLE); - } - - if (Math.abs(overscroll) >= adjustedPageTurnLayoutSize) { - if (!mRippleAnimator.isStarted() && mRippleSize != mRippleTargetSize) { - mVibrator.vibrate(10); - - mRippleAnimator.setIntValues(mRippleSize, mRippleTargetSize); - mRippleAnimator.start(); - } - } else { - if (!mRippleAnimator.isStarted() && mRippleSize != 0) { - mRippleAnimator.setIntValues(mRippleSize, 0); - mRippleAnimator.start(); - } - } - - float clippedOverScrollTop = (overscroll > 0 ? 1 : -1) * Math.min(Math.abs(overscroll), adjustedPageTurnLayoutSize); - mTarget.setTranslationY(clippedOverScrollTop); - } - - private void onOverscrollEnd(int overscroll) { - if (mTarget == null) - ensureTarget(); - if (mTarget == null) - return; - - mRippleAnimator.cancel(); - mRippleAnimator.setIntValues(mRippleSize, 0); - mRippleAnimator.start(); - - mPrev.setVisibility(View.INVISIBLE); - mNext.setVisibility(View.INVISIBLE); - - ViewCompat.animate(mTarget) - .setDuration(PAGE_TURN_ANIM_DURATION) - .setInterpolator(new DecelerateInterpolator()) - .translationY(0); - - if (Math.abs(overscroll) > adjustedPageTurnLayoutSize && mOnPageTurnListener != null) { - if (overscroll > 0) - mOnPageTurnListener.onPrev(mCurrentPage-1); - if (overscroll < 0) - mOnPageTurnListener.onNext(mCurrentPage+1); - } - } - - // NestedScrollingParent - - private int mTotalUnconsumed = 0; - - @Override - public boolean onStartNestedScroll(View child, View target, int nestedScrollAxes) { - return isEnabled() && (nestedScrollAxes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0; - } - - @Override - public void onNestedScrollAccepted(View child, View target, int axes) { - mNestedScrollingParentHelper.onNestedScrollAccepted(child, target, axes); - startNestedScroll(axes & ViewCompat.SCROLL_AXIS_VERTICAL); - - mTotalUnconsumed = 0; - } - - @Override - public void onNestedPreScroll(View target, int dx, int dy, int[] consumed) { - if (mTotalUnconsumed != 0 && dy > 0 == mTotalUnconsumed > 0) { - if (Math.abs(dy) > Math.abs(mTotalUnconsumed)) { - consumed[1] = dy - mTotalUnconsumed; - mTotalUnconsumed = 0; - } else { - mTotalUnconsumed -= dy; - consumed[1] = dy; - } - - onOverscroll(mTotalUnconsumed); - } - - final int[] parentConsumed = new int[2]; - if (dispatchNestedPreScroll(dx - consumed[0], dy - consumed[1], parentConsumed, null)) { - consumed[0] += parentConsumed[0]; - consumed[1] += parentConsumed[1]; - } - } - - @Override - public void onNestedScroll(View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) { - final int[] mParentOffsetInWindow = new int[2]; - dispatchNestedScroll(dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, mParentOffsetInWindow); - - final int dy = dyUnconsumed + mParentOffsetInWindow[1]; - - if (mTotalUnconsumed == 0 && ((dy < 0 && !mShowPrev) || (dy > 0 && !mShowNext))) - return; - - if (dy != 0) { - mTotalUnconsumed -= dy; - onOverscroll(mTotalUnconsumed); - } - } - - @Override - public void onStopNestedScroll(View child) { - mNestedScrollingParentHelper.onStopNestedScroll(child); - - if (Math.abs(mTotalUnconsumed) > 0) { - onOverscrollEnd(mTotalUnconsumed); - mTotalUnconsumed = 0; - } - - stopNestedScroll(); - } - - @Override - public boolean onNestedPreFling(View target, float velocityX, float velocityY) { - return dispatchNestedPreFling(velocityX, velocityY); - } - - @Override - public boolean onNestedFling(View target, float velocityX, float velocityY, boolean consumed) { - return dispatchNestedFling(velocityX, velocityY, consumed); - } - - // NestedScrollingChild - - @Override - public void setNestedScrollingEnabled(boolean enabled) { - mNestedScrollingChildHelper.setNestedScrollingEnabled(enabled); - } - - @Override - public boolean isNestedScrollingEnabled() { - return mNestedScrollingChildHelper.isNestedScrollingEnabled(); - } - - @Override - public boolean startNestedScroll(int axes) { - return mNestedScrollingChildHelper.startNestedScroll(axes); - } - - @Override - public void stopNestedScroll() { - mNestedScrollingChildHelper.stopNestedScroll(); - } - - @Override - public boolean hasNestedScrollingParent() { - return mNestedScrollingChildHelper.hasNestedScrollingParent(); - } - - @Override - public boolean dispatchNestedScroll(int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, @Nullable int[] offsetInWindow) { - return mNestedScrollingChildHelper.dispatchNestedScroll(dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, offsetInWindow); - } - - @Override - public boolean dispatchNestedPreScroll(int dx, int dy, @Nullable int[] consumed, @Nullable int[] offsetInWindow) { - return mNestedScrollingChildHelper.dispatchNestedPreScroll(dx, dy, consumed, offsetInWindow); - } - - @Override - public boolean dispatchNestedFling(float velocityX, float velocityY, boolean consumed) { - return mNestedScrollingChildHelper.dispatchNestedFling(velocityX, velocityY, consumed); - } - - @Override - public boolean dispatchNestedPreFling(float velocityX, float velocityY) { - return mNestedScrollingChildHelper.dispatchNestedPreFling(velocityX, velocityY); - } - - public interface OnPageTurnListener { - void onPrev(int page); - void onNext(int page); - } -} diff --git a/app/src/main/java/xyz/quaver/pupil/ui/viewmodel/MainViewModel.kt b/app/src/main/java/xyz/quaver/pupil/ui/viewmodel/MainViewModel.kt index c9781298..4ae94c60 100644 --- a/app/src/main/java/xyz/quaver/pupil/ui/viewmodel/MainViewModel.kt +++ b/app/src/main/java/xyz/quaver/pupil/ui/viewmodel/MainViewModel.kt @@ -29,7 +29,6 @@ import org.kodein.di.direct import org.kodein.di.instance import org.kodein.log.LoggerFactory import org.kodein.log.newLogger -import xyz.quaver.floatingsearchview.suggestions.model.SearchSuggestion import xyz.quaver.pupil.sources.* import xyz.quaver.pupil.util.Preferences import xyz.quaver.pupil.util.source @@ -58,7 +57,7 @@ class MainViewModel(app: Application) : AndroidViewModel(app), DIAware { direct.source(it) } private var sourceFactory: (String) -> Source = defaultSourceFactory - var source by mutableStateOf(sourceFactory("hiyobi.io")) + var source by mutableStateOf(sourceFactory("hitomi.la")) private set var sortModeIndex by mutableStateOf(0) @@ -74,9 +73,6 @@ class MainViewModel(app: Application) : AndroidViewModel(app), DIAware { ceil(it / perPage.toDouble()).roundToInt() } - private val _suggestions = MutableLiveData>() - val suggestions: LiveData> = _suggestions - fun setSourceAndReset(sourceName: String) { source = sourceFactory(sourceName) sortModeIndex = 0 @@ -153,21 +149,6 @@ class MainViewModel(app: Application) : AndroidViewModel(app), DIAware { } } - fun suggestion() { - suggestionJob?.cancel() - - _suggestions.value = mutableListOf() - - suggestionJob = viewModelScope.launch { - @SuppressLint("NullSafeMutableLiveData") - _suggestions.value = withContext(Dispatchers.IO) { - kotlin.runCatching { - source.suggestion(query) - }.getOrElse { emptyList() } - } - } - } - /** * @return true if backpress is consumed, false otherwise */ diff --git a/app/src/main/java/xyz/quaver/pupil/util/ItemClickSupport.kt b/app/src/main/java/xyz/quaver/pupil/util/ItemClickSupport.kt deleted file mode 100644 index 1b4ce3ba..00000000 --- a/app/src/main/java/xyz/quaver/pupil/util/ItemClickSupport.kt +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2020 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil.util - -import android.view.View -import androidx.recyclerview.widget.RecyclerView -import xyz.quaver.pupil.R - -class ItemClickSupport(private val recyclerView: RecyclerView) { - - var onItemClickListener: ((RecyclerView, Int, View) -> Unit)? = null - var onItemLongClickListener: ((RecyclerView, Int, View) -> Boolean)? = null - - init { - recyclerView.apply { - setTag(R.id.item_click_support, this) - addOnChildAttachStateChangeListener(object: RecyclerView.OnChildAttachStateChangeListener { - override fun onChildViewAttachedToWindow(view: View) { - onItemClickListener?.let { listener -> - view.setOnClickListener { - recyclerView.getChildViewHolder(view).let { holder -> - listener.invoke(recyclerView, holder.adapterPosition, view) - } - } - } - onItemLongClickListener?.let { listener -> - view.setOnLongClickListener { - recyclerView.getChildViewHolder(view).let { holder -> - listener.invoke(recyclerView, holder.adapterPosition, view) - } - } - } - } - - override fun onChildViewDetachedFromWindow(view: View) { - // Do Nothing - } - }) - } - } - - fun detach() { - recyclerView.apply { - clearOnChildAttachStateChangeListeners() - setTag(R.id.item_click_support, null) - } - } - - companion object { - fun addTo(view: RecyclerView) = view.let { removeFrom(it); ItemClickSupport(it) } - fun removeFrom(view: RecyclerView) = (view.tag as? ItemClickSupport)?.detach() - } -} \ No newline at end of file diff --git a/app/src/main/res/anim/shake.xml b/app/src/main/res/anim/shake.xml deleted file mode 100644 index 323768dd..00000000 --- a/app/src/main/res/anim/shake.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - \ No newline at end of file diff --git a/app/src/main/res/anim/shake_cycle.xml b/app/src/main/res/anim/shake_cycle.xml deleted file mode 100644 index 13dcab54..00000000 --- a/app/src/main/res/anim/shake_cycle.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - \ No newline at end of file diff --git a/app/src/main/res/color/lock_fab.xml b/app/src/main/res/color/lock_fab.xml deleted file mode 100644 index 197313e3..00000000 --- a/app/src/main/res/color/lock_fab.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable-hdpi/ic_email.png b/app/src/main/res/drawable-hdpi/ic_email.png deleted file mode 100644 index 6cf75e2a..00000000 Binary files a/app/src/main/res/drawable-hdpi/ic_email.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/ic_fullscreen.png b/app/src/main/res/drawable-hdpi/ic_fullscreen.png deleted file mode 100644 index c72a9b9e..00000000 Binary files a/app/src/main/res/drawable-hdpi/ic_fullscreen.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/ic_help.png b/app/src/main/res/drawable-hdpi/ic_help.png deleted file mode 100644 index 64941638..00000000 Binary files a/app/src/main/res/drawable-hdpi/ic_help.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/ic_home.png b/app/src/main/res/drawable-hdpi/ic_home.png deleted file mode 100644 index caccfac0..00000000 Binary files a/app/src/main/res/drawable-hdpi/ic_home.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/ic_notification.png b/app/src/main/res/drawable-hdpi/ic_notification.png deleted file mode 100644 index e69de29b..00000000 diff --git a/app/src/main/res/drawable-hdpi/ic_settings.png b/app/src/main/res/drawable-hdpi/ic_settings.png deleted file mode 100644 index 24ba874a..00000000 Binary files a/app/src/main/res/drawable-hdpi/ic_settings.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/ic_email.png b/app/src/main/res/drawable-mdpi/ic_email.png deleted file mode 100644 index d305e584..00000000 Binary files a/app/src/main/res/drawable-mdpi/ic_email.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/ic_fullscreen.png b/app/src/main/res/drawable-mdpi/ic_fullscreen.png deleted file mode 100644 index f19ccbfa..00000000 Binary files a/app/src/main/res/drawable-mdpi/ic_fullscreen.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/ic_help.png b/app/src/main/res/drawable-mdpi/ic_help.png deleted file mode 100644 index b2b8c636..00000000 Binary files a/app/src/main/res/drawable-mdpi/ic_help.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/ic_home.png b/app/src/main/res/drawable-mdpi/ic_home.png deleted file mode 100644 index 1eccf9f3..00000000 Binary files a/app/src/main/res/drawable-mdpi/ic_home.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/ic_notification.png b/app/src/main/res/drawable-mdpi/ic_notification.png deleted file mode 100644 index e69de29b..00000000 diff --git a/app/src/main/res/drawable-mdpi/ic_settings.png b/app/src/main/res/drawable-mdpi/ic_settings.png deleted file mode 100644 index c891ad02..00000000 Binary files a/app/src/main/res/drawable-mdpi/ic_settings.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_email.png b/app/src/main/res/drawable-xhdpi/ic_email.png deleted file mode 100644 index 6854119d..00000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_email.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_fullscreen.png b/app/src/main/res/drawable-xhdpi/ic_fullscreen.png deleted file mode 100644 index 6caba05d..00000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_fullscreen.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_help.png b/app/src/main/res/drawable-xhdpi/ic_help.png deleted file mode 100644 index 6ef7a89d..00000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_help.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_home.png b/app/src/main/res/drawable-xhdpi/ic_home.png deleted file mode 100644 index cea7b6c5..00000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_home.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_notification.png b/app/src/main/res/drawable-xhdpi/ic_notification.png deleted file mode 100644 index e69de29b..00000000 diff --git a/app/src/main/res/drawable-xhdpi/ic_settings.png b/app/src/main/res/drawable-xhdpi/ic_settings.png deleted file mode 100644 index 92d74d24..00000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_settings.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_email.png b/app/src/main/res/drawable-xxhdpi/ic_email.png deleted file mode 100644 index ed17daf2..00000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_email.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_fullscreen.png b/app/src/main/res/drawable-xxhdpi/ic_fullscreen.png deleted file mode 100644 index 4712c6c1..00000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_fullscreen.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_help.png b/app/src/main/res/drawable-xxhdpi/ic_help.png deleted file mode 100644 index 760e70d4..00000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_help.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_home.png b/app/src/main/res/drawable-xxhdpi/ic_home.png deleted file mode 100644 index a576a1a4..00000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_home.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_notification.png b/app/src/main/res/drawable-xxhdpi/ic_notification.png deleted file mode 100644 index e69de29b..00000000 diff --git a/app/src/main/res/drawable-xxhdpi/ic_settings.png b/app/src/main/res/drawable-xxhdpi/ic_settings.png deleted file mode 100644 index 2a50df97..00000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_settings.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_notification.png b/app/src/main/res/drawable-xxxhdpi/ic_notification.png deleted file mode 100644 index e69de29b..00000000 diff --git a/app/src/main/res/drawable/account_group.xml b/app/src/main/res/drawable/account_group.xml deleted file mode 100644 index 4680128b..00000000 --- a/app/src/main/res/drawable/account_group.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/account_star.xml b/app/src/main/res/drawable/account_star.xml deleted file mode 100644 index 5797e282..00000000 --- a/app/src/main/res/drawable/account_star.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/arrow_right.xml b/app/src/main/res/drawable/arrow_right.xml deleted file mode 100644 index 0ac62543..00000000 --- a/app/src/main/res/drawable/arrow_right.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/avd_star.xml b/app/src/main/res/drawable/avd_star.xml deleted file mode 100644 index 4ec5915e..00000000 --- a/app/src/main/res/drawable/avd_star.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/app/src/main/res/drawable/backspace_outline.xml b/app/src/main/res/drawable/backspace_outline.xml deleted file mode 100644 index aea682c7..00000000 --- a/app/src/main/res/drawable/backspace_outline.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/book_open.xml b/app/src/main/res/drawable/book_open.xml deleted file mode 100644 index f676d847..00000000 --- a/app/src/main/res/drawable/book_open.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/brush.xml b/app/src/main/res/drawable/brush.xml deleted file mode 100644 index cedc1a3a..00000000 --- a/app/src/main/res/drawable/brush.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/cancel.xml b/app/src/main/res/drawable/cancel.xml deleted file mode 100644 index 147fbdfe..00000000 --- a/app/src/main/res/drawable/cancel.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/clock_end.xml b/app/src/main/res/drawable/clock_end.xml deleted file mode 100644 index 4d205a72..00000000 --- a/app/src/main/res/drawable/clock_end.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/clock_start.xml b/app/src/main/res/drawable/clock_start.xml deleted file mode 100644 index c9d24b92..00000000 --- a/app/src/main/res/drawable/clock_start.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/close.xml b/app/src/main/res/drawable/close.xml deleted file mode 100644 index 5de405fe..00000000 --- a/app/src/main/res/drawable/close.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/delete.xml b/app/src/main/res/drawable/delete.xml deleted file mode 100644 index b174be80..00000000 --- a/app/src/main/res/drawable/delete.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/dot.xml b/app/src/main/res/drawable/dot.xml deleted file mode 100644 index f75e450c..00000000 --- a/app/src/main/res/drawable/dot.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/eye.xml b/app/src/main/res/drawable/eye.xml deleted file mode 100644 index c5853f1e..00000000 --- a/app/src/main/res/drawable/eye.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/eye_closed.xml b/app/src/main/res/drawable/eye_closed.xml deleted file mode 100644 index cb8e83fd..00000000 --- a/app/src/main/res/drawable/eye_closed.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - diff --git a/app/src/main/res/drawable/eye_off.xml b/app/src/main/res/drawable/eye_off.xml deleted file mode 100644 index 2f1a1e82..00000000 --- a/app/src/main/res/drawable/eye_off.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/eye_off_white.xml b/app/src/main/res/drawable/eye_off_white.xml deleted file mode 100644 index 15afd4cd..00000000 --- a/app/src/main/res/drawable/eye_off_white.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/eye_white.xml b/app/src/main/res/drawable/eye_white.xml deleted file mode 100644 index c1f3d205..00000000 --- a/app/src/main/res/drawable/eye_white.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/fingerprint.xml b/app/src/main/res/drawable/fingerprint.xml deleted file mode 100644 index 7c14a715..00000000 --- a/app/src/main/res/drawable/fingerprint.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/gender_female.xml b/app/src/main/res/drawable/gender_female.xml deleted file mode 100644 index 74729734..00000000 --- a/app/src/main/res/drawable/gender_female.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/gender_female_white.xml b/app/src/main/res/drawable/gender_female_white.xml deleted file mode 100644 index 7dbc415f..00000000 --- a/app/src/main/res/drawable/gender_female_white.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/gender_male.xml b/app/src/main/res/drawable/gender_male.xml deleted file mode 100644 index d58538ae..00000000 --- a/app/src/main/res/drawable/gender_male.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/gender_male_white.xml b/app/src/main/res/drawable/gender_male_white.xml deleted file mode 100644 index fddbc6ff..00000000 --- a/app/src/main/res/drawable/gender_male_white.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/github_circle.xml b/app/src/main/res/drawable/github_circle.xml deleted file mode 100644 index 297143ec..00000000 --- a/app/src/main/res/drawable/github_circle.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/history.xml b/app/src/main/res/drawable/history.xml deleted file mode 100644 index 448a3497..00000000 --- a/app/src/main/res/drawable/history.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/ic_download.xml b/app/src/main/res/drawable/ic_download.xml deleted file mode 100644 index e611a677..00000000 --- a/app/src/main/res/drawable/ic_download.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_downloading.xml b/app/src/main/res/drawable/ic_downloading.xml deleted file mode 100644 index bc694e22..00000000 --- a/app/src/main/res/drawable/ic_downloading.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/drawable/ic_imhentai.png b/app/src/main/res/drawable/ic_imhentai.png deleted file mode 100644 index 191eb1d5..00000000 Binary files a/app/src/main/res/drawable/ic_imhentai.png and /dev/null differ diff --git a/app/src/main/res/drawable/ic_message.xml b/app/src/main/res/drawable/ic_message.xml deleted file mode 100644 index 4e3135eb..00000000 --- a/app/src/main/res/drawable/ic_message.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/ic_progressbar.xml b/app/src/main/res/drawable/ic_progressbar.xml deleted file mode 100644 index 7d0e371f..00000000 --- a/app/src/main/res/drawable/ic_progressbar.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/app/src/main/res/drawable/ic_progressbar_cache.xml b/app/src/main/res/drawable/ic_progressbar_cache.xml deleted file mode 100644 index ca0643ea..00000000 --- a/app/src/main/res/drawable/ic_progressbar_cache.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/app/src/main/res/drawable/ic_progressbar_complete.xml b/app/src/main/res/drawable/ic_progressbar_complete.xml deleted file mode 100644 index c23c3b6b..00000000 --- a/app/src/main/res/drawable/ic_progressbar_complete.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/app/src/main/res/drawable/ic_progressbar_complete_cache.xml b/app/src/main/res/drawable/ic_progressbar_complete_cache.xml deleted file mode 100644 index 2fd4e05c..00000000 --- a/app/src/main/res/drawable/ic_progressbar_complete_cache.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/app/src/main/res/drawable/ic_star_filled.xml b/app/src/main/res/drawable/ic_star_filled.xml deleted file mode 100644 index a46ce175..00000000 --- a/app/src/main/res/drawable/ic_star_filled.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/icon.xml b/app/src/main/res/drawable/icon.xml deleted file mode 100644 index 8bca8ba9..00000000 --- a/app/src/main/res/drawable/icon.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/icon_red.xml b/app/src/main/res/drawable/icon_red.xml deleted file mode 100644 index 00fdcd21..00000000 --- a/app/src/main/res/drawable/icon_red.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/image_broken_variant.xml b/app/src/main/res/drawable/image_broken_variant.xml deleted file mode 100644 index 43e243e7..00000000 --- a/app/src/main/res/drawable/image_broken_variant.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/lastpass.xml b/app/src/main/res/drawable/lastpass.xml deleted file mode 100644 index b6b8a41a..00000000 --- a/app/src/main/res/drawable/lastpass.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/lock_pattern.xml b/app/src/main/res/drawable/lock_pattern.xml deleted file mode 100644 index 543da1c5..00000000 --- a/app/src/main/res/drawable/lock_pattern.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/menu.xml b/app/src/main/res/drawable/menu.xml deleted file mode 100644 index e058761e..00000000 --- a/app/src/main/res/drawable/menu.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/navigate_next.xml b/app/src/main/res/drawable/navigate_next.xml deleted file mode 100644 index c25983c7..00000000 --- a/app/src/main/res/drawable/navigate_next.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/navigate_prev.xml b/app/src/main/res/drawable/navigate_prev.xml deleted file mode 100644 index a3081f14..00000000 --- a/app/src/main/res/drawable/navigate_prev.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/pin_filled.xml b/app/src/main/res/drawable/pin_filled.xml deleted file mode 100644 index d2c2323c..00000000 --- a/app/src/main/res/drawable/pin_filled.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/app/src/main/res/drawable/reader_item_boundary.xml b/app/src/main/res/drawable/reader_item_boundary.xml deleted file mode 100644 index 18006135..00000000 --- a/app/src/main/res/drawable/reader_item_boundary.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/app/src/main/res/drawable/refresh.xml b/app/src/main/res/drawable/refresh.xml deleted file mode 100644 index 150addb8..00000000 --- a/app/src/main/res/drawable/refresh.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/shuffle_variant.xml b/app/src/main/res/drawable/shuffle_variant.xml deleted file mode 100644 index f954eb87..00000000 --- a/app/src/main/res/drawable/shuffle_variant.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/side_nav_bar.png b/app/src/main/res/drawable/side_nav_bar.png deleted file mode 100644 index 727e1e96..00000000 Binary files a/app/src/main/res/drawable/side_nav_bar.png and /dev/null differ diff --git a/app/src/main/res/drawable/sort_variant.xml b/app/src/main/res/drawable/sort_variant.xml deleted file mode 100644 index 83d5e4cb..00000000 --- a/app/src/main/res/drawable/sort_variant.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/tag.xml b/app/src/main/res/drawable/tag.xml deleted file mode 100644 index e152a6d9..00000000 --- a/app/src/main/res/drawable/tag.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/thumb.xml b/app/src/main/res/drawable/thumb.xml deleted file mode 100644 index 4541d8a9..00000000 --- a/app/src/main/res/drawable/thumb.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/app/src/main/res/drawable/thumb_drawable.xml b/app/src/main/res/drawable/thumb_drawable.xml deleted file mode 100644 index f72a3577..00000000 --- a/app/src/main/res/drawable/thumb_drawable.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/thumb_horizontal.xml b/app/src/main/res/drawable/thumb_horizontal.xml deleted file mode 100644 index 0de6aece..00000000 --- a/app/src/main/res/drawable/thumb_horizontal.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/app/src/main/res/drawable/track.xml b/app/src/main/res/drawable/track.xml deleted file mode 100644 index 770f3075..00000000 --- a/app/src/main/res/drawable/track.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/track_drawable.xml b/app/src/main/res/drawable/track_drawable.xml deleted file mode 100644 index 22113141..00000000 --- a/app/src/main/res/drawable/track_drawable.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/translate.xml b/app/src/main/res/drawable/translate.xml deleted file mode 100644 index 8507868c..00000000 --- a/app/src/main/res/drawable/translate.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/layout/default_query_dialog.xml b/app/src/main/res/layout/default_query_dialog.xml deleted file mode 100644 index 968fde0b..00000000 --- a/app/src/main/res/layout/default_query_dialog.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/download_folder_name_dialog.xml b/app/src/main/res/layout/download_folder_name_dialog.xml deleted file mode 100644 index 4104aace..00000000 --- a/app/src/main/res/layout/download_folder_name_dialog.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/download_location_dialog.xml b/app/src/main/res/layout/download_location_dialog.xml deleted file mode 100644 index fde6c7d9..00000000 --- a/app/src/main/res/layout/download_location_dialog.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/download_location_item.xml b/app/src/main/res/layout/download_location_item.xml deleted file mode 100644 index 50335e91..00000000 --- a/app/src/main/res/layout/download_location_item.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/gallery_dialog.xml b/app/src/main/res/layout/gallery_dialog.xml deleted file mode 100644 index bdae3e64..00000000 --- a/app/src/main/res/layout/gallery_dialog.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/gallery_dialog_details.xml b/app/src/main/res/layout/gallery_dialog_details.xml deleted file mode 100644 index 1c3448b7..00000000 --- a/app/src/main/res/layout/gallery_dialog_details.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/gallery_dialog_dotindicator.xml b/app/src/main/res/layout/gallery_dialog_dotindicator.xml deleted file mode 100644 index 02b91987..00000000 --- a/app/src/main/res/layout/gallery_dialog_dotindicator.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/gallery_dialog_tags.xml b/app/src/main/res/layout/gallery_dialog_tags.xml deleted file mode 100644 index 539d34a8..00000000 --- a/app/src/main/res/layout/gallery_dialog_tags.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/lock_activity.xml b/app/src/main/res/layout/lock_activity.xml deleted file mode 100644 index a19341ad..00000000 --- a/app/src/main/res/layout/lock_activity.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/main_activity.xml b/app/src/main/res/layout/main_activity.xml deleted file mode 100644 index 3a1ebd5f..00000000 --- a/app/src/main/res/layout/main_activity.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/main_activity_content.xml b/app/src/main/res/layout/main_activity_content.xml deleted file mode 100644 index 7872a8f5..00000000 --- a/app/src/main/res/layout/main_activity_content.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/mirrors_item.xml b/app/src/main/res/layout/mirrors_item.xml deleted file mode 100644 index 2b349771..00000000 --- a/app/src/main/res/layout/mirrors_item.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/nav_header_main.xml b/app/src/main/res/layout/nav_header_main.xml deleted file mode 100644 index a413c18b..00000000 --- a/app/src/main/res/layout/nav_header_main.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/pattern_lock_fragment.xml b/app/src/main/res/layout/pattern_lock_fragment.xml deleted file mode 100644 index c0105690..00000000 --- a/app/src/main/res/layout/pattern_lock_fragment.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/pin_lock_fragment.xml b/app/src/main/res/layout/pin_lock_fragment.xml deleted file mode 100644 index 7099e499..00000000 --- a/app/src/main/res/layout/pin_lock_fragment.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/progress_card_view.xml b/app/src/main/res/layout/progress_card_view.xml deleted file mode 100644 index ed004cd2..00000000 --- a/app/src/main/res/layout/progress_card_view.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/proxy_dialog.xml b/app/src/main/res/layout/proxy_dialog.xml deleted file mode 100644 index b48565e8..00000000 --- a/app/src/main/res/layout/proxy_dialog.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -