Skip to content

Commit f36939f

Browse files
authored
Migrate to non-transitive R classes (#1469)
1 parent 69399eb commit f36939f

File tree

10 files changed

+14
-15
lines changed

10 files changed

+14
-15
lines changed

app/src/main/java/com/lagradost/cloudstream3/services/SubscriptionWorkManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class SubscriptionWorkManager(val context: Context, workerParams: WorkerParamete
7777
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
7878
.setColor(context.colorFromAttribute(R.attr.colorPrimary))
7979
.setContentTitle(context.getString(R.string.subscription_in_progress_notification))
80-
.setSmallIcon(R.drawable.quantum_ic_refresh_white_24)
80+
.setSmallIcon(com.google.android.gms.cast.framework.R.drawable.quantum_ic_refresh_white_24)
8181
.setProgress(0, 0, true)
8282

8383
private val updateNotificationBuilder =

app/src/main/java/com/lagradost/cloudstream3/ui/MiniControllerFragment.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ class MyMiniControllerFragment : MiniControllerFragment() {
5353
// SEE https://github.com/dandar3/android-google-play-services-cast-framework/blob/master/res/layout/cast_mini_controller.xml
5454
try {
5555
val progressBar: ProgressBar? = view.findViewById(R.id.progressBar)
56-
val containerAll: LinearLayout? = view.findViewById(R.id.container_all)
57-
val containerCurrent: RelativeLayout? = view.findViewById(R.id.container_current)
56+
val containerAll: LinearLayout? = view.findViewById(com.google.android.gms.cast.framework.R.id.container_all)
57+
val containerCurrent: RelativeLayout? = view.findViewById(com.google.android.gms.cast.framework.R.id.container_current)
5858

5959
context?.let { ctx ->
6060
progressBar?.setBackgroundColor(
@@ -79,4 +79,4 @@ class MyMiniControllerFragment : MiniControllerFragment() {
7979
// JUST IN CASE
8080
}
8181
}
82-
}
82+
}

app/src/main/java/com/lagradost/cloudstream3/ui/library/LibraryFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class LibraryFragment : Fragment() {
155155
binding?.sortFab?.setOnClickListener(sortChangeClickListener)
156156
binding?.librarySort?.setOnClickListener(sortChangeClickListener)
157157

158-
binding?.libraryRoot?.findViewById<TextView>(R.id.search_src_text)?.apply {
158+
binding?.libraryRoot?.findViewById<TextView>(androidx.appcompat.R.id.search_src_text)?.apply {
159159
tag = "tv_no_focus_tag"
160160
//Expand the Appbar when search bar is focused, fixing scroll up issue
161161
setOnFocusChangeListener { _, _ ->

app/src/main/java/com/lagradost/cloudstream3/ui/player/AbstractPlayerFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ abstract class AbstractPlayerFragment(
561561
}
562562
}
563563

564-
subView = playerView?.findViewById(R.id.exo_subtitles)
564+
subView = playerView?.findViewById(androidx.media3.ui.R.id.exo_subtitles)
565565
subStyle = SubtitlesFragment.getCurrentSavedStyle()
566566
player.initSubtitles(subView, subtitleHolder, subStyle)
567567
(player.imageGenerator as? PreviewGenerator)?.params = ImageParams.new16by9(screenWidth)

app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ class GeneratorPlayer : FullScreenPlayer() {
470470
val currentTempMeta = getMetaData()
471471

472472
// bruh idk why it is not correct
473-
val color = ColorStateList.valueOf(context.colorFromAttribute(R.attr.colorAccent))
473+
val color = ColorStateList.valueOf(context.colorFromAttribute(androidx.appcompat.R.attr.colorAccent))
474474
binding.searchLoadingBar.progressTintList = color
475475
binding.searchLoadingBar.indeterminateTintList = color
476476

app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchFragment.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ class SearchFragment : Fragment() {
229229
SearchHelper.handleSearchClickCallback(callback)
230230
}
231231

232-
searchRoot.findViewById<TextView>(R.id.search_src_text)?.tag = "tv_no_focus_tag"
232+
searchRoot.findViewById<TextView>(androidx.appcompat.R.id.search_src_text)?.tag = "tv_no_focus_tag"
233233
searchAutofitResults.adapter = adapter
234234
searchLoadingBar.alpha = 0f
235235
}
@@ -576,4 +576,4 @@ class SearchFragment : Fragment() {
576576
.commit()*/
577577
}
578578

579-
}
579+
}

app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginDetailsFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class PluginDetailsFragment(val data: PluginViewData) : BottomSheetDialogFragmen
150150
)
151151
} else {
152152
upvote.imageTintList = ColorStateList.valueOf(
153-
context?.colorFromAttribute(R.attr.colorOnSurface) ?: R.color.white
153+
context?.colorFromAttribute(com.google.android.material.R.attr.colorOnSurface) ?: R.color.white
154154
)
155155
}
156156
}

app/src/main/java/com/lagradost/cloudstream3/utils/AppContextUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ object AppContextUtils {
105105
this?.window?.setWindowAnimations(-1)
106106
this?.show()
107107
Handler(Looper.getMainLooper()).postDelayed({
108-
this?.window?.setWindowAnimations(R.style.Animation_Design_BottomSheetDialog)
108+
this?.window?.setWindowAnimations(com.google.android.material.R.style.Animation_Design_BottomSheetDialog)
109109
}, 200)
110110
}
111111

app/src/main/java/com/lagradost/cloudstream3/utils/UIHelper.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ object UIHelper {
486486
onMenuItemClick: MenuItem.() -> Unit,
487487
): PopupMenu {
488488
val ctw = ContextThemeWrapper(context, R.style.PopupMenu)
489-
val popup = PopupMenu(ctw, this, Gravity.NO_GRAVITY, R.attr.actionOverflowMenuStyle, 0)
489+
val popup = PopupMenu(ctw, this, Gravity.NO_GRAVITY, androidx.appcompat.R.attr.actionOverflowMenuStyle, 0)
490490

491491
items.forEach { (id, stringRes) ->
492492
popup.menu.add(0, id, 0, stringRes)
@@ -510,7 +510,7 @@ object UIHelper {
510510
onMenuItemClick: MenuItem.() -> Unit,
511511
): PopupMenu {
512512
val ctw = ContextThemeWrapper(context, R.style.PopupMenu)
513-
val popup = PopupMenu(ctw, this, Gravity.NO_GRAVITY, R.attr.actionOverflowMenuStyle, 0)
513+
val popup = PopupMenu(ctw, this, Gravity.NO_GRAVITY, androidx.appcompat.R.attr.actionOverflowMenuStyle, 0)
514514

515515
items.forEach { (id, string) ->
516516
popup.menu.add(0, id, 0, string)

gradle.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@ android.useAndroidX=true
1919
# android.enableJetifier=true
2020
# Kotlin code style for this project: "official" or "obsolete":
2121
kotlin.code.style=official
22-
android.nonTransitiveRClass=false
23-
android.nonFinalResIds=false
22+
android.nonTransitiveRClass=true

0 commit comments

Comments
 (0)