[skip ci] feat: new settings UI
This commit is contained in:
parent
91d1d2cf1d
commit
cd3bb20afd
11 changed files with 170 additions and 209 deletions
|
@ -1,8 +1,8 @@
|
||||||
package ani.dantotsu.settings
|
package ani.dantotsu.settings
|
||||||
|
|
||||||
|
import android.view.ViewGroup
|
||||||
import ani.dantotsu.databinding.ItemSettingsBinding
|
import ani.dantotsu.databinding.ItemSettingsBinding
|
||||||
import ani.dantotsu.databinding.ItemSettingsSwitchBinding
|
import ani.dantotsu.databinding.ItemSettingsSwitchBinding
|
||||||
import java.lang.reflect.Array
|
|
||||||
|
|
||||||
data class Settings(
|
data class Settings(
|
||||||
val type: Int,
|
val type: Int,
|
||||||
|
@ -14,5 +14,6 @@ data class Settings(
|
||||||
var isChecked : Boolean = false,
|
var isChecked : Boolean = false,
|
||||||
val switch: ((isChecked:Boolean , view: ItemSettingsSwitchBinding ) -> Unit)? = null,
|
val switch: ((isChecked:Boolean , view: ItemSettingsSwitchBinding ) -> Unit)? = null,
|
||||||
val isVisible: Boolean = true,
|
val isVisible: Boolean = true,
|
||||||
val isActivity: Boolean = false
|
val isActivity: Boolean = false,
|
||||||
|
val attach:((ViewGroup) -> Unit)? = null
|
||||||
)
|
)
|
|
@ -63,6 +63,8 @@ class SettingsAdapter(private val settings: ArrayList<Settings>) :
|
||||||
b.settingsLayout.visibility = if (settings.isVisible) View.VISIBLE else View.GONE
|
b.settingsLayout.visibility = if (settings.isVisible) View.VISIBLE else View.GONE
|
||||||
b.settingsIconRight.visibility =
|
b.settingsIconRight.visibility =
|
||||||
if (settings.isActivity) View.VISIBLE else View.GONE
|
if (settings.isActivity) View.VISIBLE else View.GONE
|
||||||
|
b.attachView.visibility = if (settings.attach != null) View.VISIBLE else View.GONE
|
||||||
|
settings.attach?.invoke(b.attachView)
|
||||||
}
|
}
|
||||||
|
|
||||||
2 -> {
|
2 -> {
|
||||||
|
|
|
@ -48,7 +48,13 @@ class SettingsExtensionsActivity: AppCompatActivity() {
|
||||||
binding = ActivitySettingsExtensionsBinding.inflate(layoutInflater)
|
binding = ActivitySettingsExtensionsBinding.inflate(layoutInflater)
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
binding.apply {
|
binding.apply {
|
||||||
|
settingsExtensionsLayout.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||||
|
topMargin = statusBarHeight
|
||||||
|
bottomMargin = navBarHeight
|
||||||
|
}
|
||||||
|
extensionSettingsBack.setOnClickListener{
|
||||||
|
onBackPressedDispatcher.onBackPressed()
|
||||||
|
}
|
||||||
fun setExtensionOutput(repoInventory: ViewGroup, type: MediaType) {
|
fun setExtensionOutput(repoInventory: ViewGroup, type: MediaType) {
|
||||||
repoInventory.removeAllViews()
|
repoInventory.removeAllViews()
|
||||||
val prefName: PrefName? = when (type) {
|
val prefName: PrefName? = when (type) {
|
||||||
|
@ -70,7 +76,7 @@ class SettingsExtensionsActivity: AppCompatActivity() {
|
||||||
LayoutInflater.from(repoInventory.context), repoInventory, true
|
LayoutInflater.from(repoInventory.context), repoInventory, true
|
||||||
)
|
)
|
||||||
view.repositoryItem.text =
|
view.repositoryItem.text =
|
||||||
item.removePrefix("https://raw.githubusercontent.com")
|
item.removePrefix("https://raw.githubusercontent.com/")
|
||||||
view.repositoryItem.setOnClickListener {
|
view.repositoryItem.setOnClickListener {
|
||||||
AlertDialog.Builder(context, R.style.MyPopup)
|
AlertDialog.Builder(context, R.style.MyPopup)
|
||||||
.setTitle(R.string.rem_repository).setMessage(item)
|
.setTitle(R.string.rem_repository).setMessage(item)
|
||||||
|
@ -107,7 +113,7 @@ class SettingsExtensionsActivity: AppCompatActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun processUserInput(input: String, mediaType: MediaType) {
|
fun processUserInput(input: String, mediaType: MediaType, view: ViewGroup) {
|
||||||
val entry =
|
val entry =
|
||||||
if (input.endsWith("/") || input.endsWith("index.min.json")) input.substring(
|
if (input.endsWith("/") || input.endsWith("index.min.json")) input.substring(
|
||||||
0,
|
0,
|
||||||
|
@ -120,7 +126,7 @@ class SettingsExtensionsActivity: AppCompatActivity() {
|
||||||
CoroutineScope(Dispatchers.IO).launch {
|
CoroutineScope(Dispatchers.IO).launch {
|
||||||
animeExtensionManager.findAvailableExtensions()
|
animeExtensionManager.findAvailableExtensions()
|
||||||
}
|
}
|
||||||
setExtensionOutput(animeRepoInventory, MediaType.ANIME)
|
setExtensionOutput(view, MediaType.ANIME)
|
||||||
}
|
}
|
||||||
if (mediaType == MediaType.MANGA) {
|
if (mediaType == MediaType.MANGA) {
|
||||||
val manga =
|
val manga =
|
||||||
|
@ -129,17 +135,17 @@ class SettingsExtensionsActivity: AppCompatActivity() {
|
||||||
CoroutineScope(Dispatchers.IO).launch {
|
CoroutineScope(Dispatchers.IO).launch {
|
||||||
mangaExtensionManager.findAvailableExtensions()
|
mangaExtensionManager.findAvailableExtensions()
|
||||||
}
|
}
|
||||||
setExtensionOutput(mangaRepoInventory, MediaType.MANGA)
|
setExtensionOutput(view, MediaType.MANGA)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun processEditorAction(dialog: AlertDialog, editText: EditText, mediaType: MediaType) {
|
fun processEditorAction(dialog: AlertDialog, editText: EditText, mediaType: MediaType, view: ViewGroup) {
|
||||||
editText.setOnEditorActionListener { textView, action, keyEvent ->
|
editText.setOnEditorActionListener { textView, action, keyEvent ->
|
||||||
if (action == EditorInfo.IME_ACTION_SEARCH || action == EditorInfo.IME_ACTION_DONE || (keyEvent?.action == KeyEvent.ACTION_UP && keyEvent.keyCode == KeyEvent.KEYCODE_ENTER)) {
|
if (action == EditorInfo.IME_ACTION_SEARCH || action == EditorInfo.IME_ACTION_DONE || (keyEvent?.action == KeyEvent.ACTION_UP && keyEvent.keyCode == KeyEvent.KEYCODE_ENTER)) {
|
||||||
return@setOnEditorActionListener if (textView.text.isNullOrBlank()) {
|
return@setOnEditorActionListener if (textView.text.isNullOrBlank()) {
|
||||||
false
|
false
|
||||||
} else {
|
} else {
|
||||||
processUserInput(textView.text.toString(), mediaType)
|
processUserInput(textView.text.toString(), mediaType, view)
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
@ -147,131 +153,141 @@ class SettingsExtensionsActivity: AppCompatActivity() {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
settingsExtensionsLayout.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
settingsRecyclerView.adapter = SettingsAdapter(
|
||||||
topMargin = statusBarHeight
|
arrayListOf(
|
||||||
bottomMargin = navBarHeight
|
Settings(
|
||||||
}
|
type = 1,
|
||||||
extensionSettingsBack.setOnClickListener{
|
name = getString(R.string.anime_add_repository),
|
||||||
onBackPressedDispatcher.onBackPressed()
|
desc = getString(R.string.anime_add_repository),
|
||||||
}
|
icon = R.drawable.ic_github,
|
||||||
setExtensionOutput(animeRepoInventory, MediaType.ANIME)
|
onClick = {
|
||||||
setExtensionOutput(mangaRepoInventory, MediaType.MANGA)
|
val dialogView = layoutInflater.inflate(R.layout.dialog_user_agent, null)
|
||||||
animeAddRepository.setOnClickListener {
|
val editText =
|
||||||
val dialogView = layoutInflater.inflate(R.layout.dialog_user_agent, null)
|
dialogView.findViewById<TextInputEditText>(R.id.userAgentTextBox).apply {
|
||||||
val editText =
|
hint = getString(R.string.anime_add_repository)
|
||||||
dialogView.findViewById<TextInputEditText>(R.id.userAgentTextBox).apply {
|
}
|
||||||
hint = getString(R.string.anime_add_repository)
|
val alertDialog = AlertDialog.Builder(context, R.style.MyPopup)
|
||||||
}
|
.setTitle(R.string.anime_add_repository).setView(dialogView)
|
||||||
val alertDialog = AlertDialog.Builder(context, R.style.MyPopup)
|
.setPositiveButton(getString(R.string.ok)) { dialog, _ ->
|
||||||
.setTitle(R.string.anime_add_repository).setView(dialogView)
|
if (!editText.text.isNullOrBlank()) processUserInput(
|
||||||
.setPositiveButton(getString(R.string.ok)) { dialog, _ ->
|
editText.text.toString(),
|
||||||
if (!editText.text.isNullOrBlank()) processUserInput(
|
MediaType.ANIME,
|
||||||
editText.text.toString(),
|
it.attachView
|
||||||
MediaType.ANIME
|
)
|
||||||
)
|
dialog.dismiss()
|
||||||
dialog.dismiss()
|
}.setNegativeButton(getString(R.string.cancel)) { dialog, _ ->
|
||||||
}.setNegativeButton(getString(R.string.cancel)) { dialog, _ ->
|
dialog.dismiss()
|
||||||
dialog.dismiss()
|
}.create()
|
||||||
}.create()
|
|
||||||
|
|
||||||
processEditorAction(alertDialog, editText, MediaType.ANIME)
|
processEditorAction(alertDialog, editText, MediaType.ANIME, it.attachView)
|
||||||
alertDialog.show()
|
alertDialog.show()
|
||||||
alertDialog.window?.setDimAmount(0.8f)
|
alertDialog.window?.setDimAmount(0.8f)
|
||||||
}
|
},
|
||||||
|
attach = { view ->
|
||||||
mangaAddRepository.setOnClickListener {
|
setExtensionOutput(view, MediaType.ANIME)
|
||||||
val dialogView = layoutInflater.inflate(R.layout.dialog_user_agent, null)
|
|
||||||
val editText =
|
|
||||||
dialogView.findViewById<TextInputEditText>(R.id.userAgentTextBox).apply {
|
|
||||||
hint = getString(R.string.manga_add_repository)
|
|
||||||
}
|
|
||||||
val alertDialog = AlertDialog.Builder(context, R.style.MyPopup)
|
|
||||||
.setTitle(R.string.manga_add_repository).setView(dialogView)
|
|
||||||
.setPositiveButton(getString(R.string.ok)) { dialog, _ ->
|
|
||||||
if (!editText.text.isNullOrBlank()) processUserInput(
|
|
||||||
editText.text.toString(),
|
|
||||||
MediaType.MANGA
|
|
||||||
)
|
|
||||||
dialog.dismiss()
|
|
||||||
}.setNegativeButton(getString(R.string.cancel)) { dialog, _ ->
|
|
||||||
dialog.dismiss()
|
|
||||||
}.create()
|
|
||||||
|
|
||||||
processEditorAction(alertDialog, editText, MediaType.MANGA)
|
|
||||||
alertDialog.show()
|
|
||||||
alertDialog.window?.setDimAmount(0.8f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.settingsRecyclerView.adapter = SettingsAdapter(
|
|
||||||
arrayListOf(
|
|
||||||
Settings(
|
|
||||||
type = 1,
|
|
||||||
name = getString(R.string.user_agent),
|
|
||||||
desc = getString(R.string.NSFWExtention),
|
|
||||||
icon = R.drawable.ic_round_video_settings_24,
|
|
||||||
onClick = {
|
|
||||||
val dialogView = DialogUserAgentBinding.inflate(layoutInflater)
|
|
||||||
val editText = dialogView.userAgentTextBox
|
|
||||||
editText.setText(PrefManager.getVal<String>(PrefName.DefaultUserAgent))
|
|
||||||
val alertDialog = AlertDialog.Builder(context, R.style.MyPopup)
|
|
||||||
.setTitle(R.string.user_agent).setView(dialogView.root)
|
|
||||||
.setPositiveButton(getString(R.string.ok)) { dialog, _ ->
|
|
||||||
PrefManager.setVal(PrefName.DefaultUserAgent, editText.text.toString())
|
|
||||||
dialog.dismiss()
|
|
||||||
}.setNeutralButton(getString(R.string.reset)) { dialog, _ ->
|
|
||||||
PrefManager.removeVal(PrefName.DefaultUserAgent)
|
|
||||||
editText.setText("")
|
|
||||||
dialog.dismiss()
|
|
||||||
}.setNegativeButton(getString(R.string.cancel)) { dialog, _ ->
|
|
||||||
dialog.dismiss()
|
|
||||||
}.create()
|
|
||||||
|
|
||||||
alertDialog.show()
|
|
||||||
alertDialog.window?.setDimAmount(0.8f)
|
|
||||||
}
|
|
||||||
),
|
|
||||||
Settings(
|
|
||||||
type = 2,
|
|
||||||
name = getString(R.string.force_legacy_installer),
|
|
||||||
desc = getString(R.string.force_legacy_installer),
|
|
||||||
icon = R.drawable.ic_round_new_releases_24,
|
|
||||||
isChecked = extensionInstaller.get() == BasePreferences.ExtensionInstaller.LEGACY,
|
|
||||||
switch = { isChecked, _ ->
|
|
||||||
if (isChecked) {
|
|
||||||
extensionInstaller.set(BasePreferences.ExtensionInstaller.LEGACY)
|
|
||||||
} else {
|
|
||||||
extensionInstaller.set(BasePreferences.ExtensionInstaller.PACKAGEINSTALLER)
|
|
||||||
}
|
}
|
||||||
}
|
),
|
||||||
|
Settings(
|
||||||
|
type = 1,
|
||||||
|
name = getString(R.string.manga_add_repository),
|
||||||
|
desc = getString(R.string.manga_add_repository),
|
||||||
|
icon = R.drawable.ic_github,
|
||||||
|
onClick = {
|
||||||
|
val dialogView = layoutInflater.inflate(R.layout.dialog_user_agent, null)
|
||||||
|
val editText =
|
||||||
|
dialogView.findViewById<TextInputEditText>(R.id.userAgentTextBox).apply {
|
||||||
|
hint = getString(R.string.manga_add_repository)
|
||||||
|
}
|
||||||
|
val alertDialog = AlertDialog.Builder(context, R.style.MyPopup)
|
||||||
|
.setTitle(R.string.manga_add_repository).setView(dialogView)
|
||||||
|
.setPositiveButton(getString(R.string.ok)) { dialog, _ ->
|
||||||
|
if (!editText.text.isNullOrBlank()) processUserInput(
|
||||||
|
editText.text.toString(),
|
||||||
|
MediaType.MANGA,
|
||||||
|
it.attachView
|
||||||
|
)
|
||||||
|
dialog.dismiss()
|
||||||
|
}.setNegativeButton(getString(R.string.cancel)) { dialog, _ ->
|
||||||
|
dialog.dismiss()
|
||||||
|
}.create()
|
||||||
|
|
||||||
),
|
processEditorAction(alertDialog, editText, MediaType.MANGA, it.attachView)
|
||||||
Settings(
|
alertDialog.show()
|
||||||
type = 2,
|
alertDialog.window?.setDimAmount(0.8f)
|
||||||
name = getString(R.string.skip_loading_extension_icons),
|
},
|
||||||
desc = getString(R.string.skip_loading_extension_icons),
|
attach = { view ->
|
||||||
icon = R.drawable.ic_round_no_icon_24,
|
setExtensionOutput(view, MediaType.MANGA)
|
||||||
isChecked = PrefManager.getVal(PrefName.SkipExtensionIcons),
|
}
|
||||||
switch = { isChecked, _ ->
|
),
|
||||||
PrefManager.setVal(PrefName.SkipExtensionIcons, isChecked)
|
Settings(
|
||||||
}
|
type = 1,
|
||||||
),
|
name = getString(R.string.user_agent),
|
||||||
Settings(
|
desc = getString(R.string.NSFWExtention),
|
||||||
type = 2,
|
icon = R.drawable.ic_round_video_settings_24,
|
||||||
name = getString(R.string.NSFWExtention),
|
onClick = {
|
||||||
desc = getString(R.string.NSFWExtention),
|
val dialogView = DialogUserAgentBinding.inflate(layoutInflater)
|
||||||
icon = R.drawable.ic_round_nsfw_24,
|
val editText = dialogView.userAgentTextBox
|
||||||
isChecked = PrefManager.getVal(PrefName.NSFWExtension),
|
editText.setText(PrefManager.getVal<String>(PrefName.DefaultUserAgent))
|
||||||
switch = { isChecked, _ ->
|
val alertDialog = AlertDialog.Builder(context, R.style.MyPopup)
|
||||||
PrefManager.setVal(PrefName.NSFWExtension, isChecked)
|
.setTitle(R.string.user_agent).setView(dialogView.root)
|
||||||
}
|
.setPositiveButton(getString(R.string.ok)) { dialog, _ ->
|
||||||
|
PrefManager.setVal(PrefName.DefaultUserAgent, editText.text.toString())
|
||||||
|
dialog.dismiss()
|
||||||
|
}.setNeutralButton(getString(R.string.reset)) { dialog, _ ->
|
||||||
|
PrefManager.removeVal(PrefName.DefaultUserAgent)
|
||||||
|
editText.setText("")
|
||||||
|
dialog.dismiss()
|
||||||
|
}.setNegativeButton(getString(R.string.cancel)) { dialog, _ ->
|
||||||
|
dialog.dismiss()
|
||||||
|
}.create()
|
||||||
|
|
||||||
|
alertDialog.show()
|
||||||
|
alertDialog.window?.setDimAmount(0.8f)
|
||||||
|
}
|
||||||
|
),
|
||||||
|
Settings(
|
||||||
|
type = 2,
|
||||||
|
name = getString(R.string.force_legacy_installer),
|
||||||
|
desc = getString(R.string.force_legacy_installer),
|
||||||
|
icon = R.drawable.ic_round_new_releases_24,
|
||||||
|
isChecked = extensionInstaller.get() == BasePreferences.ExtensionInstaller.LEGACY,
|
||||||
|
switch = { isChecked, _ ->
|
||||||
|
if (isChecked) {
|
||||||
|
extensionInstaller.set(BasePreferences.ExtensionInstaller.LEGACY)
|
||||||
|
} else {
|
||||||
|
extensionInstaller.set(BasePreferences.ExtensionInstaller.PACKAGEINSTALLER)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
),
|
||||||
|
Settings(
|
||||||
|
type = 2,
|
||||||
|
name = getString(R.string.skip_loading_extension_icons),
|
||||||
|
desc = getString(R.string.skip_loading_extension_icons),
|
||||||
|
icon = R.drawable.ic_round_no_icon_24,
|
||||||
|
isChecked = PrefManager.getVal(PrefName.SkipExtensionIcons),
|
||||||
|
switch = { isChecked, _ ->
|
||||||
|
PrefManager.setVal(PrefName.SkipExtensionIcons, isChecked)
|
||||||
|
}
|
||||||
|
),
|
||||||
|
Settings(
|
||||||
|
type = 2,
|
||||||
|
name = getString(R.string.NSFWExtention),
|
||||||
|
desc = getString(R.string.NSFWExtention),
|
||||||
|
icon = R.drawable.ic_round_nsfw_24,
|
||||||
|
isChecked = PrefManager.getVal(PrefName.NSFWExtension),
|
||||||
|
switch = { isChecked, _ ->
|
||||||
|
PrefManager.setVal(PrefName.NSFWExtension, isChecked)
|
||||||
|
}
|
||||||
|
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
settingsRecyclerView.apply {
|
||||||
binding.settingsRecyclerView.apply {
|
layoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
|
||||||
layoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
|
setHasFixedSize(true)
|
||||||
setHasFixedSize(true)
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -63,7 +63,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginHorizontal="32dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="32dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="32dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
android:alpha="0.58"
|
android:alpha="0.58"
|
||||||
android:fontFamily="@font/poppins_bold"
|
android:fontFamily="@font/poppins_bold"
|
||||||
android:text="@string/selected_dns" />
|
android:text="@string/selected_dns" />
|
||||||
|
@ -144,7 +144,7 @@
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="32dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
app:boxCornerRadiusBottomEnd="8dp"
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
app:boxCornerRadiusBottomStart="8dp"
|
||||||
|
|
|
@ -60,71 +60,6 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<Button
|
|
||||||
android:layout_marginHorizontal="12dp"
|
|
||||||
android:id="@+id/animeAddRepository"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="64dp"
|
|
||||||
android:background="@drawable/ui_bg"
|
|
||||||
android:backgroundTint="?attr/colorSecondary"
|
|
||||||
android:backgroundTintMode="src_atop"
|
|
||||||
android:fontFamily="@font/poppins_bold"
|
|
||||||
android:insetTop="0dp"
|
|
||||||
android:insetBottom="0dp"
|
|
||||||
android:paddingHorizontal="31dp"
|
|
||||||
android:text="@string/anime_add_repository"
|
|
||||||
android:textAlignment="viewStart"
|
|
||||||
android:textAllCaps="false"
|
|
||||||
android:textColor="?attr/colorOnBackground"
|
|
||||||
app:cornerRadius="0dp"
|
|
||||||
app:icon="@drawable/ic_github"
|
|
||||||
app:iconPadding="16dp"
|
|
||||||
app:iconSize="24dp"
|
|
||||||
app:iconTint="?attr/colorPrimary" />
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/animeRepoInventory"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingStart="36dp"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:ignore="RtlSymmetry" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/mangaAddRepository"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="64dp"
|
|
||||||
android:layout_marginHorizontal="12dp"
|
|
||||||
android:background="@drawable/ui_bg"
|
|
||||||
android:backgroundTint="?attr/colorSecondary"
|
|
||||||
android:backgroundTintMode="src_atop"
|
|
||||||
android:fontFamily="@font/poppins_bold"
|
|
||||||
android:insetTop="0dp"
|
|
||||||
android:insetBottom="0dp"
|
|
||||||
android:paddingHorizontal="31dp"
|
|
||||||
android:text="@string/manga_add_repository"
|
|
||||||
android:textAlignment="viewStart"
|
|
||||||
android:textAllCaps="false"
|
|
||||||
android:textColor="?attr/colorOnBackground"
|
|
||||||
app:cornerRadius="0dp"
|
|
||||||
app:icon="@drawable/ic_github"
|
|
||||||
app:iconPadding="16dp"
|
|
||||||
app:iconSize="24dp"
|
|
||||||
app:iconTint="?attr/colorPrimary" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/mangaRepoInventory"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingStart="36dp"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:ignore="RtlSymmetry" />
|
|
||||||
|
|
||||||
<ani.dantotsu.FadingEdgeRecyclerView
|
<ani.dantotsu.FadingEdgeRecyclerView
|
||||||
android:id="@+id/settingsRecyclerView"
|
android:id="@+id/settingsRecyclerView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="32dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginHorizontal="32dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:layout_marginHorizontal="32dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
app:boxCornerRadiusBottomEnd="8dp"
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
app:boxCornerRadiusBottomStart="8dp"
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
app:boxCornerRadiusTopEnd="8dp"
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
android:id="@+id/repositoryItem"
|
android:id="@+id/repositoryItem"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
|
android:alpha="0.66"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:textColor="?attr/colorOnBackground"
|
android:textColor="?attr/colorOnBackground"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
android:id="@+id/settingsIcon"
|
android:id="@+id/settingsIcon"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_margin="24dp"
|
android:layout_marginVertical="24dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
app:srcCompat="@drawable/ic_circle_add"
|
app:srcCompat="@drawable/ic_circle_add"
|
||||||
app:tint="?attr/colorPrimary"
|
app:tint="?attr/colorPrimary"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
@ -32,7 +33,7 @@
|
||||||
android:fontFamily="@font/poppins_bold"
|
android:fontFamily="@font/poppins_bold"
|
||||||
android:text="@string/name"
|
android:text="@string/name"
|
||||||
android:textColor="?attr/colorOnSurface"
|
android:textColor="?attr/colorOnSurface"
|
||||||
android:textSize="18sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/settingsDesc"
|
android:id="@+id/settingsDesc"
|
||||||
|
@ -42,13 +43,19 @@
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
android:text="@string/slogan"
|
android:text="@string/slogan"
|
||||||
android:textColor="?attr/colorOnSurfaceVariant" />
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/attachView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:ignore="RtlSymmetry" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/settingsIconRight"
|
android:id="@+id/settingsIconRight"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible"
|
tools:visibility="visible"
|
||||||
app:srcCompat="@drawable/ic_round_arrow_back_ios_new_24"
|
app:srcCompat="@drawable/ic_round_arrow_back_ios_new_24"
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
android:id="@+id/settingsIcon"
|
android:id="@+id/settingsIcon"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_margin="24dp"
|
android:layout_marginVertical="24dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
app:srcCompat="@drawable/ic_circle_add"
|
app:srcCompat="@drawable/ic_circle_add"
|
||||||
app:tint="?attr/colorPrimary"
|
app:tint="?attr/colorPrimary"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
@ -30,10 +31,9 @@
|
||||||
android:layout_height="12dp"
|
android:layout_height="12dp"
|
||||||
android:checked="false"
|
android:checked="false"
|
||||||
android:elegantTextHeight="true"
|
android:elegantTextHeight="true"
|
||||||
android:layout_marginEnd="24dp"
|
|
||||||
android:fontFamily="@font/poppins_bold"
|
android:fontFamily="@font/poppins_bold"
|
||||||
android:text="@string/name"
|
android:text="@string/name"
|
||||||
android:textSize="18sp"
|
android:textSize="16sp"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:textColor="?attr/colorOnBackground"
|
android:textColor="?attr/colorOnBackground"
|
||||||
app:cornerRadius="0dp"
|
app:cornerRadius="0dp"
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
android:id="@+id/settingsDesc"
|
android:id="@+id/settingsDesc"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="64dp"
|
android:layout_marginEnd="32dp"
|
||||||
android:alpha="0.66"
|
android:alpha="0.66"
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
android:text="@string/slogan"
|
android:text="@string/slogan"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue