Link colors in cards and list items.
This commit is contained in:
parent
eb5672901b
commit
533636f3a1
@ -382,13 +382,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
Scoop.getInstance()
|
Scoop.getInstance()
|
||||||
.update(Toppings.PRIMARY.value, appColors.colorPrimary)
|
.update(Toppings.PRIMARY.value, appColors.colorPrimary)
|
||||||
.update(Toppings.PRIMARY_DARK.value, appColors.colorPrimaryDark)
|
.update(Toppings.PRIMARY_DARK.value, appColors.colorPrimaryDark)
|
||||||
/*.update(Toppings.ACCENT.value, colorAccent)
|
|
||||||
.update(Toppings.ACCENT_DARK.value, colorAccentDark)
|
|
||||||
.update(Toppings.BACKGROUND.value, colorBackground)
|
|
||||||
.update(Toppings.CARD_BACKGROUND.value, cardBackgroundColor)
|
|
||||||
.update(Toppings.TEXT_PRIMARY.value, textColorPrimary)
|
|
||||||
.update(Toppings.TEXT_SECONDARY.value, textColorSecondary)
|
|
||||||
.update(Toppings.HEADER_DRAWER_TEXT.value, materialDrawerHeaderSelectionText)*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleDrawer() {
|
private fun handleDrawer() {
|
||||||
@ -943,7 +936,8 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
internalBrowser,
|
internalBrowser,
|
||||||
articleViewer,
|
articleViewer,
|
||||||
debugReadingItems,
|
debugReadingItems,
|
||||||
userIdentifier
|
userIdentifier,
|
||||||
|
appColors
|
||||||
)
|
)
|
||||||
|
|
||||||
recyclerView.addItemDecoration(
|
recyclerView.addItemDecoration(
|
||||||
|
@ -42,7 +42,7 @@ class ItemCardAdapter(
|
|||||||
private val internalBrowser: Boolean,
|
private val internalBrowser: Boolean,
|
||||||
private val articleViewer: Boolean,
|
private val articleViewer: Boolean,
|
||||||
private val fullHeightCards: Boolean,
|
private val fullHeightCards: Boolean,
|
||||||
private val appColors: AppColors,
|
override val appColors: AppColors,
|
||||||
override val debugReadingItems: Boolean,
|
override val debugReadingItems: Boolean,
|
||||||
override val userIdentifier: String
|
override val userIdentifier: String
|
||||||
) : ItemsAdapter<ItemCardAdapter.ViewHolder>() {
|
) : ItemsAdapter<ItemCardAdapter.ViewHolder>() {
|
||||||
@ -63,6 +63,8 @@ class ItemCardAdapter(
|
|||||||
holder.mView.favButton.isLiked = itm.starred
|
holder.mView.favButton.isLiked = itm.starred
|
||||||
holder.mView.title.text = Html.fromHtml(itm.title)
|
holder.mView.title.text = Html.fromHtml(itm.title)
|
||||||
|
|
||||||
|
holder.mView.title.setLinkTextColor(appColors.colorAccent)
|
||||||
|
|
||||||
holder.mView.sourceTitleAndDate.text = itm.sourceAndDateText()
|
holder.mView.sourceTitleAndDate.text = itm.sourceAndDateText()
|
||||||
|
|
||||||
if (!fullHeightCards) {
|
if (!fullHeightCards) {
|
||||||
|
@ -14,6 +14,7 @@ import apps.amine.bou.readerforselfoss.R
|
|||||||
import apps.amine.bou.readerforselfoss.api.selfoss.Item
|
import apps.amine.bou.readerforselfoss.api.selfoss.Item
|
||||||
import apps.amine.bou.readerforselfoss.api.selfoss.SelfossApi
|
import apps.amine.bou.readerforselfoss.api.selfoss.SelfossApi
|
||||||
import apps.amine.bou.readerforselfoss.api.selfoss.SuccessResponse
|
import apps.amine.bou.readerforselfoss.api.selfoss.SuccessResponse
|
||||||
|
import apps.amine.bou.readerforselfoss.themes.AppColors
|
||||||
import apps.amine.bou.readerforselfoss.utils.buildCustomTabsIntent
|
import apps.amine.bou.readerforselfoss.utils.buildCustomTabsIntent
|
||||||
import apps.amine.bou.readerforselfoss.utils.customtabs.CustomTabActivityHelper
|
import apps.amine.bou.readerforselfoss.utils.customtabs.CustomTabActivityHelper
|
||||||
import apps.amine.bou.readerforselfoss.utils.glide.bitmapCenterCrop
|
import apps.amine.bou.readerforselfoss.utils.glide.bitmapCenterCrop
|
||||||
@ -43,7 +44,8 @@ class ItemListAdapter(
|
|||||||
private val internalBrowser: Boolean,
|
private val internalBrowser: Boolean,
|
||||||
private val articleViewer: Boolean,
|
private val articleViewer: Boolean,
|
||||||
override val debugReadingItems: Boolean,
|
override val debugReadingItems: Boolean,
|
||||||
override val userIdentifier: String
|
override val userIdentifier: String,
|
||||||
|
override val appColors: AppColors
|
||||||
) : ItemsAdapter<ItemListAdapter.ViewHolder>() {
|
) : ItemsAdapter<ItemListAdapter.ViewHolder>() {
|
||||||
private val generator: ColorGenerator = ColorGenerator.MATERIAL
|
private val generator: ColorGenerator = ColorGenerator.MATERIAL
|
||||||
private val c: Context = app.baseContext
|
private val c: Context = app.baseContext
|
||||||
@ -64,6 +66,8 @@ class ItemListAdapter(
|
|||||||
|
|
||||||
holder.mView.title.text = Html.fromHtml(itm.title)
|
holder.mView.title.text = Html.fromHtml(itm.title)
|
||||||
|
|
||||||
|
holder.mView.title.setLinkTextColor(appColors.colorAccent)
|
||||||
|
|
||||||
holder.mView.sourceTitleAndDate.text = itm.sourceAndDateText()
|
holder.mView.sourceTitleAndDate.text = itm.sourceAndDateText()
|
||||||
|
|
||||||
if (itm.getThumbnail(c).isEmpty()) {
|
if (itm.getThumbnail(c).isEmpty()) {
|
||||||
|
@ -10,6 +10,7 @@ import apps.amine.bou.readerforselfoss.R
|
|||||||
import apps.amine.bou.readerforselfoss.api.selfoss.Item
|
import apps.amine.bou.readerforselfoss.api.selfoss.Item
|
||||||
import apps.amine.bou.readerforselfoss.api.selfoss.SelfossApi
|
import apps.amine.bou.readerforselfoss.api.selfoss.SelfossApi
|
||||||
import apps.amine.bou.readerforselfoss.api.selfoss.SuccessResponse
|
import apps.amine.bou.readerforselfoss.api.selfoss.SuccessResponse
|
||||||
|
import apps.amine.bou.readerforselfoss.themes.AppColors
|
||||||
import apps.amine.bou.readerforselfoss.utils.succeeded
|
import apps.amine.bou.readerforselfoss.utils.succeeded
|
||||||
import com.crashlytics.android.Crashlytics
|
import com.crashlytics.android.Crashlytics
|
||||||
import retrofit2.Call
|
import retrofit2.Call
|
||||||
@ -22,6 +23,7 @@ abstract class ItemsAdapter<VH : RecyclerView.ViewHolder?> : RecyclerView.Adapte
|
|||||||
abstract val debugReadingItems: Boolean
|
abstract val debugReadingItems: Boolean
|
||||||
abstract val userIdentifier: String
|
abstract val userIdentifier: String
|
||||||
abstract val app: Activity
|
abstract val app: Activity
|
||||||
|
abstract val appColors: AppColors
|
||||||
|
|
||||||
fun updateAllItems(newItems: ArrayList<Item>) {
|
fun updateAllItems(newItems: ArrayList<Item>) {
|
||||||
items = newItems
|
items = newItems
|
||||||
|
Loading…
Reference in New Issue
Block a user