Fix crash for bookmarks
parent
d42e72fd8b
commit
c342a680d8
|
@ -30,16 +30,16 @@ open class LibraryPageView(
|
|||
protected fun setUiForNormalMode(title: String?) {
|
||||
activity?.title = title
|
||||
setToolbarColors(
|
||||
ContextCompat.getColor(context, R.color.white_color),
|
||||
context.getColorFromAttr(R.attr.accentHighContrast)
|
||||
context.getColorFromAttr(R.attr.primaryText),
|
||||
context.getColorFromAttr(R.attr.foundation)
|
||||
)
|
||||
}
|
||||
|
||||
protected fun setUiForSelectingMode(title: String?) {
|
||||
activity?.title = title
|
||||
setToolbarColors(
|
||||
context.getColorFromAttr(R.attr.primaryText),
|
||||
context.getColorFromAttr(R.attr.foundation)
|
||||
ContextCompat.getColor(context, R.color.white_color),
|
||||
context.getColorFromAttr(R.attr.accentHighContrast)
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
package org.mozilla.fenix.library.bookmarks
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import kotlinx.android.synthetic.main.component_bookmark.view.*
|
||||
import mozilla.appservices.places.BookmarkRoot
|
||||
import mozilla.components.concept.storage.BookmarkNode
|
||||
|
@ -130,9 +130,8 @@ class BookmarkView(
|
|||
val interactor: BookmarkViewInteractor
|
||||
) : LibraryPageView(container), BackHandler {
|
||||
|
||||
val view: LinearLayout = LayoutInflater.from(container.context)
|
||||
val view: View = LayoutInflater.from(container.context)
|
||||
.inflate(R.layout.component_bookmark, container, true)
|
||||
.findViewById(R.id.bookmarks_wrapper)
|
||||
|
||||
var mode: BookmarkState.Mode = BookmarkState.Mode.Normal
|
||||
private set
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
package org.mozilla.fenix.library.history
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.SimpleItemAnimator
|
||||
|
@ -67,9 +67,8 @@ class HistoryView(
|
|||
val interactor: HistoryInteractor
|
||||
) : LibraryPageView(container), BackHandler {
|
||||
|
||||
val view: ConstraintLayout = LayoutInflater.from(container.context)
|
||||
val view: View = LayoutInflater.from(container.context)
|
||||
.inflate(R.layout.component_history, container, true)
|
||||
.findViewById(R.id.history_wrapper)
|
||||
|
||||
private var items: List<HistoryItem> = listOf()
|
||||
var mode: HistoryState.Mode = HistoryState.Mode.Normal
|
||||
|
|
Loading…
Reference in New Issue