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