-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from 3dollar-in-my-pocket/feat/2.4.6
2.4.6
- Loading branch information
Showing
23 changed files
with
636 additions
and
142 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
...main/java/com/zion830/threedollars/repository/model/v2/response/HomeStoreEmptyResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.zion830.threedollars.repository.model.v2.response | ||
|
||
import com.zion830.threedollars.R | ||
|
||
data class HomeStoreEmptyResponse( | ||
val emptyImage: Int = R.drawable.ic_no_store, | ||
val emptyTitle: Int = R.string.empty_store, | ||
val emptyBody: Int = R.string.empty_store_msg | ||
) : AdAndStoreItem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
app/src/main/java/com/zion830/threedollars/ui/category/adapter/SearchByAdViewHolder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.zion830.threedollars.ui.category.adapter | ||
|
||
import android.annotation.SuppressLint | ||
import android.view.ViewGroup | ||
import androidx.core.graphics.toColorInt | ||
import com.bumptech.glide.Glide | ||
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions | ||
import com.zion830.threedollars.R | ||
import com.zion830.threedollars.databinding.ItemStoreListAdBinding | ||
import com.zion830.threedollars.repository.model.v2.response.Popups | ||
import zion830.com.common.base.BaseViewHolder | ||
import zion830.com.common.base.loadUrlImg | ||
import zion830.com.common.listener.OnItemClickListener | ||
|
||
class SearchByAdViewHolder(parent: ViewGroup) : | ||
BaseViewHolder<ItemStoreListAdBinding, Popups>(R.layout.item_store_list_ad, parent) { | ||
|
||
@SuppressLint("Range") | ||
override fun bind(item: Popups, listener: OnItemClickListener<Popups>?) { | ||
super.bind(item, listener) | ||
if (!item.fontColor.isNullOrEmpty()) { | ||
binding.tvAdTitle.setTextColor(item.fontColor.toColorInt()) | ||
binding.tvAdBody.setTextColor(item.fontColor.toColorInt()) | ||
} | ||
if (!item.bgColor.isNullOrEmpty()) { | ||
binding.layoutItem.setBackgroundColor(item.bgColor.toColorInt()) | ||
} | ||
binding.ivAdImage.loadUrlImg(item.imageUrl) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.