Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(Android): fix lint warning of CustomToolbar component #2176

Merged
merged 3 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.swmansion.rnscreens

import android.annotation.SuppressLint
import android.content.Context
import androidx.activity.OnBackPressedCallback
import androidx.appcompat.widget.SearchView
import androidx.fragment.app.Fragment

@SuppressLint("ViewConstructor") // Only we construct this view, it is never inflated.
class CustomSearchView(context: Context, fragment: Fragment) : SearchView(context) {
/*
CustomSearchView uses some variables from SearchView. They are listed below with links to documentation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.swmansion.rnscreens

import android.annotation.SuppressLint
import android.content.Context
import androidx.appcompat.widget.Toolbar

// This class is used to store config closer to search bar
@SuppressLint("ViewConstructor") // Only we construct this view, it is never inflated.
open class CustomToolbar(context: Context, val config: ScreenStackHeaderConfig) : Toolbar(context)
2 changes: 1 addition & 1 deletion android/src/main/java/com/swmansion/rnscreens/Screen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import com.facebook.react.uimanager.UIManagerHelper
import com.facebook.react.uimanager.UIManagerModule
import com.swmansion.rnscreens.events.HeaderHeightChangeEvent

@SuppressLint("ViewConstructor")
@SuppressLint("ViewConstructor") // Only we construct this view, it is never inflated.
class Screen(context: ReactContext?) : FabricEnabledViewGroup(context) {
val fragment: Fragment?
get() = fragmentWrapper?.fragment
Expand Down
Loading