mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 11:51:50 +01:00
Remove unused preference layouts
This commit is contained in:
parent
80ea14bf7f
commit
e691e17efc
@ -35,9 +35,7 @@ class AboutController : BasicComposeController(), NoAppBarElevationController {
|
||||
nestedScrollInterop = nestedScrollInterop,
|
||||
checkVersion = this::checkVersion,
|
||||
getFormattedBuildTime = this::getFormattedBuildTime,
|
||||
onClickLicenses = {
|
||||
router.pushController(LicensesController())
|
||||
},
|
||||
onClickLicenses = { router.pushController(LicensesController()) },
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -1,47 +0,0 @@
|
||||
package eu.kanade.tachiyomi.ui.more
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceViewHolder
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.util.system.openInBrowser
|
||||
import eu.kanade.tachiyomi.util.view.setTooltip
|
||||
|
||||
class AboutLinksPreference @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
||||
Preference(context, attrs) {
|
||||
|
||||
init {
|
||||
layoutResource = R.layout.pref_about_links
|
||||
isSelectable = false
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
||||
super.onBindViewHolder(holder)
|
||||
|
||||
holder.findViewById(R.id.btn_website).apply {
|
||||
setTooltip(contentDescription.toString())
|
||||
setOnClickListener { context.openInBrowser("https://tachiyomi.org") }
|
||||
}
|
||||
holder.findViewById(R.id.btn_discord).apply {
|
||||
setTooltip(contentDescription.toString())
|
||||
setOnClickListener { context.openInBrowser("https://discord.gg/tachiyomi") }
|
||||
}
|
||||
holder.findViewById(R.id.btn_twitter).apply {
|
||||
setTooltip(contentDescription.toString())
|
||||
setOnClickListener { context.openInBrowser("https://twitter.com/tachiyomiorg") }
|
||||
}
|
||||
holder.findViewById(R.id.btn_facebook).apply {
|
||||
setTooltip(contentDescription.toString())
|
||||
setOnClickListener { context.openInBrowser("https://facebook.com/tachiyomiorg") }
|
||||
}
|
||||
holder.findViewById(R.id.btn_reddit).apply {
|
||||
setTooltip(contentDescription.toString())
|
||||
setOnClickListener { context.openInBrowser("https://www.reddit.com/r/Tachiyomi") }
|
||||
}
|
||||
holder.findViewById(R.id.btn_github).apply {
|
||||
setTooltip(contentDescription.toString())
|
||||
setOnClickListener { context.openInBrowser("https://github.com/tachiyomiorg") }
|
||||
}
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package eu.kanade.tachiyomi.ui.more
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import androidx.preference.Preference
|
||||
import eu.kanade.tachiyomi.R
|
||||
|
||||
class MoreHeaderPreference @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
||||
Preference(context, attrs) {
|
||||
|
||||
init {
|
||||
layoutResource = R.layout.pref_more_header
|
||||
isSelectable = false
|
||||
}
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_website"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/website"
|
||||
android:padding="16dp"
|
||||
android:src="@drawable/ic_public_24dp"
|
||||
app:tint="?attr/colorAccent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_discord"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Discord"
|
||||
android:padding="16dp"
|
||||
android:src="@drawable/ic_discord_24dp"
|
||||
app:tint="?attr/colorAccent"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_twitter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Twitter"
|
||||
android:padding="16dp"
|
||||
android:src="@drawable/ic_twitter_24dp"
|
||||
app:tint="?attr/colorAccent"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_facebook"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Facebook"
|
||||
android:padding="16dp"
|
||||
android:src="@drawable/ic_facebook_24dp"
|
||||
app:tint="?attr/colorAccent"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_reddit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Reddit"
|
||||
android:padding="16dp"
|
||||
android:src="@drawable/ic_reddit_24dp"
|
||||
app:tint="?attr/colorAccent"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_github"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="GitHub"
|
||||
android:padding="16dp"
|
||||
android:src="@drawable/ic_github_24dp"
|
||||
app:tint="?attr/colorAccent"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
</LinearLayout>
|
@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorSurface">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="32dp"
|
||||
app:srcCompat="@drawable/ic_tachi"
|
||||
app:tint="?attr/colorOnSurface"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom" />
|
||||
|
||||
</FrameLayout>
|
Loading…
Reference in New Issue
Block a user