refactor(hide-double-tap-overlay-filter): also hide the 'white circle overlay' https://github.com/inotia00/ReVanced_Extended/issues/745

This commit is contained in:
inotia00 2023-04-16 01:43:23 +09:00
parent 6589cf6379
commit 03d3e0ca28

View File

@ -22,8 +22,17 @@ class DoubleTapOverlayBackgroundPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
context.xmlEditor[RESOURCE_FILE_PATH].use {
it.file.getElementsByTagName("merge").item(0).childNodes.apply {
val attributes = arrayOf("height", "width")
for (i in 1 until length) {
val view = item(i)
if (
view.hasAttributes() &&
view.attributes.getNamedItem("android:id").nodeValue.endsWith("tap_bloom_view")
) {
attributes.forEach { attribute ->
view.attributes.getNamedItem("android:layout_$attribute").nodeValue = "0.0dip"
}
}
if (
view.hasAttributes() &&
view.attributes.getNamedItem("android:id").nodeValue.endsWith("dark_background")