Commit eb55cedd authored by satya's avatar satya

update home banner link and yes partner

parent d3741251
...@@ -14,6 +14,28 @@ ...@@ -14,6 +14,28 @@
<option name="screenX" value="720" /> <option name="screenX" value="720" />
<option name="screenY" value="1280" /> <option name="screenY" value="1280" />
</PersistentDeviceSelectionData> </PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="OnePlus" />
<option name="codename" value="OP535DL1" />
<option name="id" value="OP535DL1" />
<option name="manufacturer" value="OnePlus" />
<option name="name" value="CPH2409" />
<option name="screenDensity" value="401" />
<option name="screenX" value="1080" />
<option name="screenY" value="2412" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="OnePlus" />
<option name="codename" value="OP5552L1" />
<option name="id" value="OP5552L1" />
<option name="manufacturer" value="OnePlus" />
<option name="name" value="CPH2415" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1080" />
<option name="screenY" value="2412" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData> <PersistentDeviceSelectionData>
<option name="api" value="34" /> <option name="api" value="34" />
<option name="brand" value="OPPO" /> <option name="brand" value="OPPO" />
...@@ -36,17 +58,6 @@ ...@@ -36,17 +58,6 @@
<option name="screenX" value="1080" /> <option name="screenX" value="1080" />
<option name="screenY" value="2160" /> <option name="screenY" value="2160" />
</PersistentDeviceSelectionData> </PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="Lenovo" />
<option name="codename" value="TB370FU" />
<option name="id" value="TB370FU" />
<option name="manufacturer" value="Lenovo" />
<option name="name" value="Tab P12" />
<option name="screenDensity" value="340" />
<option name="screenX" value="1840" />
<option name="screenY" value="2944" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData> <PersistentDeviceSelectionData>
<option name="api" value="34" /> <option name="api" value="34" />
<option name="brand" value="samsung" /> <option name="brand" value="samsung" />
...@@ -58,6 +69,28 @@ ...@@ -58,6 +69,28 @@
<option name="screenX" value="1080" /> <option name="screenX" value="1080" />
<option name="screenY" value="2340" /> <option name="screenY" value="2340" />
</PersistentDeviceSelectionData> </PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="a15x" />
<option name="id" value="a15x" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="A15 5G" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="a16x" />
<option name="id" value="a16x" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="A16 5G" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData> <PersistentDeviceSelectionData>
<option name="api" value="34" /> <option name="api" value="34" />
<option name="brand" value="samsung" /> <option name="brand" value="samsung" />
...@@ -102,6 +135,17 @@ ...@@ -102,6 +135,17 @@
<option name="screenX" value="1080" /> <option name="screenX" value="1080" />
<option name="screenY" value="1272" /> <option name="screenY" value="1272" />
</PersistentDeviceSelectionData> </PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="motorola" />
<option name="codename" value="austin" />
<option name="id" value="austin" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="moto g 5G (2022)" />
<option name="screenDensity" value="280" />
<option name="screenX" value="720" />
<option name="screenY" value="1600" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData> <PersistentDeviceSelectionData>
<option name="api" value="33" /> <option name="api" value="33" />
<option name="brand" value="samsung" /> <option name="brand" value="samsung" />
...@@ -146,6 +190,17 @@ ...@@ -146,6 +190,17 @@
<option name="screenX" value="2076" /> <option name="screenX" value="2076" />
<option name="screenY" value="2152" /> <option name="screenY" value="2152" />
</PersistentDeviceSelectionData> </PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="35" />
<option name="brand" value="google" />
<option name="codename" value="comet" />
<option name="id" value="comet" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro Fold" />
<option name="screenDensity" value="390" />
<option name="screenX" value="2076" />
<option name="screenY" value="2152" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData> <PersistentDeviceSelectionData>
<option name="api" value="29" /> <option name="api" value="29" />
<option name="brand" value="samsung" /> <option name="brand" value="samsung" />
...@@ -267,6 +322,17 @@ ...@@ -267,6 +322,17 @@
<option name="screenX" value="1080" /> <option name="screenX" value="1080" />
<option name="screenY" value="2340" /> <option name="screenY" value="2340" />
</PersistentDeviceSelectionData> </PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="gta9pwifi" />
<option name="id" value="gta9pwifi" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="SM-X210" />
<option name="screenDensity" value="240" />
<option name="screenX" value="1200" />
<option name="screenY" value="1920" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData> <PersistentDeviceSelectionData>
<option name="api" value="34" /> <option name="api" value="34" />
<option name="brand" value="samsung" /> <option name="brand" value="samsung" />
...@@ -300,6 +366,17 @@ ...@@ -300,6 +366,17 @@
<option name="screenX" value="1600" /> <option name="screenX" value="1600" />
<option name="screenY" value="2560" /> <option name="screenY" value="2560" />
</PersistentDeviceSelectionData> </PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="gts9fe" />
<option name="id" value="gts9fe" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Tab S9 FE 5G" />
<option name="screenDensity" value="280" />
<option name="screenX" value="1440" />
<option name="screenY" value="2304" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData> <PersistentDeviceSelectionData>
<option name="api" value="34" /> <option name="api" value="34" />
<option name="brand" value="google" /> <option name="brand" value="google" />
...@@ -333,6 +410,17 @@ ...@@ -333,6 +410,17 @@
<option name="screenX" value="1008" /> <option name="screenX" value="1008" />
<option name="screenY" value="2244" /> <option name="screenY" value="2244" />
</PersistentDeviceSelectionData> </PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="35" />
<option name="brand" value="google" />
<option name="codename" value="komodo" />
<option name="id" value="komodo" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro XL" />
<option name="screenDensity" value="360" />
<option name="screenX" value="1008" />
<option name="screenY" value="2244" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData> <PersistentDeviceSelectionData>
<option name="api" value="33" /> <option name="api" value="33" />
<option name="brand" value="google" /> <option name="brand" value="google" />
...@@ -477,6 +565,17 @@ ...@@ -477,6 +565,17 @@
<option name="screenX" value="1600" /> <option name="screenX" value="1600" />
<option name="screenY" value="2560" /> <option name="screenY" value="2560" />
</PersistentDeviceSelectionData> </PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="35" />
<option name="brand" value="google" />
<option name="codename" value="tegu" />
<option name="id" value="tegu" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2424" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData> <PersistentDeviceSelectionData>
<option name="api" value="34" /> <option name="api" value="34" />
<option name="brand" value="google" /> <option name="brand" value="google" />
...@@ -488,6 +587,28 @@ ...@@ -488,6 +587,28 @@
<option name="screenX" value="1080" /> <option name="screenX" value="1080" />
<option name="screenY" value="2424" /> <option name="screenY" value="2424" />
</PersistentDeviceSelectionData> </PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="35" />
<option name="brand" value="google" />
<option name="codename" value="tokay" />
<option name="id" value="tokay" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2424" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="xcover7" />
<option name="id" value="xcover7" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="SM-G556B" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1080" />
<option name="screenY" value="2408" />
</PersistentDeviceSelectionData>
</list> </list>
</option> </option>
</component> </component>
......
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="AndroidLintUnsafeImplicitIntentLaunch" enabled="false" level="ERROR" enabled_by_default="false" />
</profile>
</component>
\ No newline at end of file
This diff is collapsed.
...@@ -17,7 +17,7 @@ android { ...@@ -17,7 +17,7 @@ android {
storePassword 'seatel_Cambodia' storePassword 'seatel_Cambodia'
keyPassword 'seatel_Cambodia' keyPassword 'seatel_Cambodia'
keyAlias 'seatel_cambodia' keyAlias 'seatel_cambodia'
storeFile file('/Users/seatel/Documents/seashop.jks') storeFile file('/Users/seatel/android_project/android-yes/seashop.jks')
} }
} }
compileSdk 34 compileSdk 34
...@@ -27,8 +27,8 @@ android { ...@@ -27,8 +27,8 @@ android {
applicationId "com.seatel.mobilehall" applicationId "com.seatel.mobilehall"
minSdk 23 minSdk 23
targetSdk 34 targetSdk 34
versionCode 201907118 versionCode 201907119
versionName "2.3.17" versionName "2.3.18"
multiDexEnabled true multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.release signingConfig signingConfigs.release
......
...@@ -140,6 +140,7 @@ ...@@ -140,6 +140,7 @@
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity
android:name=".ui.home.activity.TopUpActivity" android:name=".ui.home.activity.TopUpActivity"
android:windowSoftInputMode="stateHidden|adjustResize"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity
......
package com.seatel.mobilehall.ui.game
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.util.Log
import android.view.View
import android.view.View.OnClickListener
import com.android.volley.Request
import com.google.gson.Gson
import com.seatel.mobilehall.R
import com.seatel.mobilehall.data.network.SeatelJSONObjectRequest
import com.seatel.mobilehall.data.network.SeatelSuperRequest
import com.seatel.mobilehall.databinding.ActivityCholchoungBinding
import com.seatel.mobilehall.ui.base.activity.BaseActivity
import com.seatel.mobilehall.util.SeatelAlertDialog
import com.seatel.mobilehall.util.dialogannouncement.CustomGameDialog
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import org.json.JSONObject
class GameActivity : BaseActivity<ActivityCholchoungBinding>(), OnClickListener {
private var mChance: Int = 0
private var mTitle: String = ""
private var mPrize: String = ""
private var mSubTitle: String = ""
private var mImage: String = ""
override fun getViewBinding(): ActivityCholchoungBinding {
return ActivityCholchoungBinding.inflate(layoutInflater)
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(binding.root)
init()
}
private fun init() {
binding.imageViewBack.setOnClickListener(this)
binding.buttonPlay.setOnClickListener(this)
binding.tvGetPrice.setOnClickListener(this)
}
companion object {
fun lunch(context: Context) {
val intent = Intent(context, GameActivity::class.java)
context.startActivity(intent)
}
}
override fun onClick(v: View?) {
when (v?.id) {
R.id.button_play -> {
binding.cholChoungAnim.playAnimation()
requestChance()
}
R.id.tv_get_price -> {
GameRewardActivity.launch(this)
}
R.id.imageViewBack -> onBackPressed()
}
}
private fun requestChance() {
// error_view.setViewMode(ErrorHandleView.Mode.LOADING)
object : SeatelJSONObjectRequest(this) {
override fun getFunctionName(): String {
return "v2/seatel/get-chance/${getPhoneLogin()}/chaol-chhoung"
}
override fun getMethod(): Int {
return Request.Method.GET
}
}.setOnErrorListener {
binding.cholChoungAnim.cancelAnimation()
// error_view.visibility = View.GONE
SeatelAlertDialog.with(this, SeatelSuperRequest.getErrorMessageFrom(it)).show()
}.execute {
// error_view.visibility = View.GONE
mChance = (it as JSONObject).optInt("chance")
if (mChance > 0) {
CoroutineScope(Dispatchers.Main).launch {
delay(1000) // 1000 milliseconds = 1 second
randomGame()
}
} else {
binding.cholChoungAnim.pauseAnimation()
SeatelAlertDialog.with(
this, applicationContext.getString(R.string.game_no_chance)
).show()
}
}
}
private fun randomGame() {
object : SeatelJSONObjectRequest(this) {
override fun getFunctionName(): String {
return "v2/seatel/get-angpao/${getPhoneLogin()}/chaol-chhoung"
}
override fun getMethod(): Int {
return Request.Method.GET
}
}.setOnErrorListener {
binding.cholChoungAnim.cancelAnimation()
SeatelAlertDialog.with(this, SeatelSuperRequest.getErrorMessageFrom(it)).show()
}.execute {
binding.cholChoungAnim.cancelAnimation()
val data = it as JSONObject
Log.d("TAG::>>>", "randomGame: ${Gson().toJson(data)} ")
mTitle = data.optString("title")
mPrize = data.optString("prize")
mSubTitle = data.optString("subtitle")
mImage = data.optString("image")
val valentineDialog =
CustomGameDialog(this, mTitle, mPrize, mSubTitle, mImage, true, false)
valentineDialog.show()
}
}
}
package com.seatel.mobilehall.ui.game
import com.android.volley.VolleyError
interface GameInteractor {
interface View {
fun onGameRewardSucceed(angPaoListItem: ArrayList<GameModel>)
fun onGameRewardFailed(error: VolleyError)
}
interface Presenter {
fun getGameReward(phoneNumber: String)
}
}
\ No newline at end of file
package com.seatel.mobilehall.ui.game
data class GameModel(
val _id: String,
val claimed: Boolean,
val prize: String,
val status: String,
val usefor: String,
val validity: String,
val winDate: String,
val prizeImage: String
)
\ No newline at end of file
package com.seatel.mobilehall.ui.game
import android.content.Context
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import com.seatel.mobilehall.data.network.SeatelJSONArrayRequest
import org.json.JSONArray
class GamePresenter(
private var mContext: Context,
private var angPaoInteractor: GameInteractor.View
) : GameInteractor.Presenter {
override fun getGameReward(phoneNumber: String) {
valentineRequest(phoneNumber).setOnErrorListener { error ->
angPaoInteractor.onGameRewardFailed(error)
}.setOnResponseListener { response ->
angPaoInteractor.onGameRewardSucceed(getResponseValentine(response as JSONArray))
}.execute()
}
private fun getResponseValentine(response: JSONArray): ArrayList<GameModel> {
val itemType = object : TypeToken<List<GameModel>>() {}.type
return Gson().fromJson(response.toString(), itemType)
}
private fun valentineRequest(phoneNumber: String): SeatelJSONArrayRequest {
return object : SeatelJSONArrayRequest(mContext) {
override fun getFunctionName(): String {
return "v2/seatel/get-prize/$phoneNumber/chaol-chhoung"
}
}
}
}
\ No newline at end of file
package com.seatel.mobilehall.ui.game
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.View
import com.android.volley.NoConnectionError
import com.android.volley.Request
import com.android.volley.TimeoutError
import com.android.volley.VolleyError
import com.seatel.mobilehall.R
import com.seatel.mobilehall.data.network.SeatelJSONObjectRequest
import com.seatel.mobilehall.data.network.SeatelSuperRequest
import com.seatel.mobilehall.databinding.LayoutGameRewardBinding
import com.seatel.mobilehall.ui.base.activity.BaseActivity
import com.seatel.mobilehall.util.SeatelAlertDialog
import com.seatel.mobilehall.util.customview.ErrorHandleView
import com.seatel.mobilehall.util.dialogannouncement.CustomGameDialog
import org.json.JSONObject
class GameRewardActivity : BaseActivity<LayoutGameRewardBinding>(), GameInteractor.View {
companion object {
fun launch(context: Context) {
val intent = Intent(context, GameRewardActivity::class.java)
context.startActivity(intent)
}
}
private var firstOpen = false
override fun getViewBinding(): LayoutGameRewardBinding {
return LayoutGameRewardBinding.inflate(layoutInflater)
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(binding.root)
binding.errorView.setViewMode(ErrorHandleView.Mode.LOADING)
binding.imageViewBack.setOnClickListener {
onBackPressed()
}
firstOpen = true
GamePresenter(this, this).getGameReward("${getPhoneLogin()}")
}
override fun onGameRewardSucceed(angPaoListItem: ArrayList<GameModel>) {
firstOpen = false
binding.errorView.visibility = View.GONE
binding.gameRecycler.apply {
adapter = GameRewardAdapter(this@GameRewardActivity, angPaoListItem) {
binding.errorView.visibility = View.VISIBLE
claimPrize(it._id, it.usefor)
}
}
}
override fun onGameRewardFailed(error: VolleyError) {
firstOpen = false
binding.errorView.visibility = View.GONE
when (error) {
is TimeoutError -> {
binding.errorView.errorMessage = getString(R.string.connection_timeout)
binding.errorView.setViewMode(ErrorHandleView.Mode.TIME_OUT)
}
is NoConnectionError -> {
binding.errorView.errorMessage = getString(R.string.message_no_internet)
binding.errorView.setViewMode(ErrorHandleView.Mode.NO_INTERNET)
}
else -> {
binding.errorView.errorMessage = getString(R.string.no_data)
binding.errorView.setViewMode(ErrorHandleView.Mode.NO_DATA)
}
}
}
private fun claimPrize(id: String, type: String) {
object : SeatelJSONObjectRequest(this) {
override fun getFunctionName(): String {
return "v2/seatel/claim-prize/$id/chaol-chhoung"
}
override fun getMethod(): Int {
return Request.Method.PUT
}
}.setOnErrorListener {
binding.errorView.visibility = View.GONE
SeatelAlertDialog.with(this, SeatelSuperRequest.getErrorMessageFrom(it)).show()
}.execute {
binding.errorView.visibility = View.GONE
val mTitle = (it as JSONObject).optString("smsTitle")
val mPrize = it.optString("prize")
val image = it.optString("image")
val subtitle = it.optString("smsContent")
val valentineDialog =
CustomGameDialog(this, mTitle, mPrize, subtitle, image, true, true)
valentineDialog.show()
valentineDialog.setOnDismissListener {
onResume()
}
}
}
override fun onResume() {
super.onResume()
if (!firstOpen)
GamePresenter(this, this).getGameReward("${getPhoneLogin()}")
}
}
\ No newline at end of file
package com.seatel.mobilehall.ui.game
import android.content.Context
import android.content.res.ColorStateList
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import coil.load
import com.seatel.mobilehall.R
import com.seatel.mobilehall.ui.base.adapter.BaseAdapter
import com.seatel.mobilehall.util.SeatelUtils
class GameRewardAdapter(
private var mContext: Context,
private var angPaoListItem: ArrayList<GameModel>,
private var rowClick: (index: GameModel) -> Unit
) :
BaseAdapter<GameRewardAdapter.YesAngPaoViewHolder>() {
class YesAngPaoViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
val valentinePrize = itemView.findViewById<TextView>(R.id.valentine_data)
val valentineUseFor = itemView.findViewById<TextView>(R.id.valentine_use_for)
val valentineValidity = itemView.findViewById<TextView>(R.id.valentine_validity)
val valentineBtnClaim = itemView.findViewById<Button>(R.id.btn_claim_valentine)
val iv_heart = itemView.findViewById<ImageView>(R.id.iv_heart)
}
override fun onCreateViewHolder(
parent: ViewGroup,
viewType: Int
): YesAngPaoViewHolder {
return YesAngPaoViewHolder(
LayoutInflater.from(mContext).inflate(R.layout.item_game_reward, parent, false)
)
}
override fun onBindViewHolder(
holder: YesAngPaoViewHolder,
position: Int
) {
// holder.itemView.visibility = View.INVISIBLE
setAnimations(holder.itemView, position)
val data = angPaoListItem[position]
holder.iv_heart.load(data.prizeImage)
holder.valentinePrize.text = data.prize
holder.valentineUseFor.text = " ${data.usefor}"
if (!data.winDate.isNullOrBlank() && !data.validity.isNullOrBlank()){
val winDate = SeatelUtils.getDateTime(
"yyyy-MM-dd", "dd/MM/YYYY",
data.winDate
)
val mValidity = SeatelUtils.getDateTime(
"yyyy-MM-dd", "dd/MM/YYYY",
data.validity
)
holder.valentineValidity.text = " $winDate - $mValidity"
}
holder.valentineBtnClaim.text = data.status
if (data.claimed) {
holder.valentineBtnClaim.backgroundTintList =
ColorStateList.valueOf(mContext.getColor(R.color.color_claim_gray))
} else {
holder.valentineBtnClaim.backgroundTintList =
ColorStateList.valueOf(mContext.getColor(R.color.colorPrimary))
holder.valentineBtnClaim.setOnClickListener {
data.let(rowClick)
}
}
}
override fun getItemCount(): Int {
return angPaoListItem.size
}
}
\ No newline at end of file
...@@ -64,7 +64,7 @@ class TopUpActivity : BaseActivity<ActivityTopUpBinding>() { ...@@ -64,7 +64,7 @@ class TopUpActivity : BaseActivity<ActivityTopUpBinding>() {
mTopUpViewpagerAdapter = TopUpPagerAdapter(supportFragmentManager) mTopUpViewpagerAdapter = TopUpPagerAdapter(supportFragmentManager)
mPinLessFragment = PinlessFragment() mPinLessFragment = PinlessFragment()
mPinLessFragment?.setPhoneNuber(getPhoneLogin()) mPinLessFragment?.setPhoneNumber(getPhoneLogin())
mPinFragment = PinFragment() mPinFragment = PinFragment()
mPinFragment?.setPhoneNuber(getPhoneLogin()) mPinFragment?.setPhoneNuber(getPhoneLogin())
......
...@@ -11,8 +11,10 @@ import com.seatel.mobilehall.ui.home.model.BannersModel ...@@ -11,8 +11,10 @@ import com.seatel.mobilehall.ui.home.model.BannersModel
import com.seatel.mobilehall.ui.login.activity.TermsAndConditionsActivity import com.seatel.mobilehall.ui.login.activity.TermsAndConditionsActivity
import com.smarteist.autoimageslider.SliderViewAdapter import com.smarteist.autoimageslider.SliderViewAdapter
class HomeImageSliderAdapter(var context: Context) : class HomeImageSliderAdapter(
SliderViewAdapter<HomeImageSliderAdapter.SliderAdapterVH>() { var context: Context,
private var onActionLink: (String) -> Unit,
) : SliderViewAdapter<HomeImageSliderAdapter.SliderAdapterVH>() {
private var mSliderItems = mutableListOf<BannersModel>() private var mSliderItems = mutableListOf<BannersModel>()
...@@ -43,18 +45,29 @@ class HomeImageSliderAdapter(var context: Context) : ...@@ -43,18 +45,29 @@ class HomeImageSliderAdapter(var context: Context) :
val sliderItem = mSliderItems[position] val sliderItem = mSliderItems[position]
// Load image with Coil // Load image with Coil
viewHolder.view.ivAutoImageSlider.load(sliderItem.getMobileUrl()) { viewHolder.view.ivAutoImageSlider.load(sliderItem.imageUrl) {
crossfade(true) crossfade(true)
placeholder(R.drawable.bg_round_gray_section) placeholder(R.drawable.bg_round_gray_section)
error(R.drawable.bg_round_gray_section) error(R.drawable.bg_round_gray_section)
} }
viewHolder.itemView.setOnClickListener(View.OnClickListener { viewHolder.itemView.setOnClickListener(View.OnClickListener {
if (sliderItem.getUrl().isNotBlank()) {
TermsAndConditionsActivity.launch( when (sliderItem.actionType) {
context, sliderItem.getUrl() "in-app" -> {
) TermsAndConditionsActivity.launch(
context, sliderItem.imageUrl!!
)
}
"out-app" -> {
sliderItem.url?.let { url ->
onActionLink.invoke(url)
}
}
} }
}) })
} }
......
...@@ -23,7 +23,7 @@ class ImageSliderAdapter (private val banners: List<BannersModel>) : RecyclerVie ...@@ -23,7 +23,7 @@ class ImageSliderAdapter (private val banners: List<BannersModel>) : RecyclerVie
override fun onBindViewHolder(holder: ViewHolder, position: Int) { override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val banner = banners[position] val banner = banners[position]
Glide.with(holder.imageView.context) Glide.with(holder.imageView.context)
.load(banner.imgUrl) // Use banner.url here .load(banner.imageUrl) // Use banner.url here
.into(holder.imageView) .into(holder.imageView)
} }
......
package com.seatel.mobilehall.ui.home.adapter
import android.annotation.SuppressLint
import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.seatel.mobilehall.R
import com.seatel.mobilehall.databinding.ItemTopupAmountBinding
import com.seatel.mobilehall.ui.home.model.Amount
class TopupWithPlanAdapter(
private val mContext: Context,
private val amountList: ArrayList<Amount>,
private val onSelect: (Amount) -> Unit
) : RecyclerView.Adapter<TopupWithPlanAdapter.ViewHolder>() {
private var selectedPosition = -1 // Track the selected position
inner class ViewHolder(val binding: ItemTopupAmountBinding) : RecyclerView.ViewHolder(binding.root) {
fun bind(amount: Amount, isSelected: Boolean) {
binding.tvAmount.text = "${amount.amount} USD"
binding.tvValidity.text = amount.validity
// Highlight the selected item
if (isSelected) {
binding.frameContent.setBackgroundColor(mContext.getColor(R.color.colorPrimary))
binding.tvAmount.setTextColor(mContext.getColor(R.color.white))
binding.tvValidity.setTextColor(mContext.getColor(R.color.white))
} else {
binding.frameContent.setBackgroundColor(mContext.getColor(R.color.white))
binding.tvAmount.setTextColor(mContext.getColor(R.color.colorPrimary))
binding.tvValidity.setTextColor(mContext.getColor(R.color.colorGray))
}
}
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val binding = ItemTopupAmountBinding.inflate(LayoutInflater.from(parent.context), parent, false)
return ViewHolder(binding)
}
override fun onBindViewHolder(holder: ViewHolder, @SuppressLint("RecyclerView") position: Int) {
val amount = amountList[position]
val isSelected = position == selectedPosition
holder.bind(amount, isSelected)
// Handle item click
holder.itemView.setOnClickListener {
selectedPosition = position // Update the selected position
notifyDataSetChanged() // Refresh the RecyclerView to update the UI
onSelect(amount) // Notify the listener
}
}
override fun getItemCount(): Int {
return amountList.size
}
// Method to update the dataset
fun updateData(newAmountList: List<Amount>) {
amountList.clear()
amountList.addAll(newAmountList)
notifyDataSetChanged()
}
// Method to get the selected item
fun getSelectedItem(): Amount? {
return if (selectedPosition != -1) amountList[selectedPosition] else null
}
}
\ No newline at end of file
...@@ -32,7 +32,6 @@ import com.seatel.mobilehall.data.prefs.SeatelSharePreferences ...@@ -32,7 +32,6 @@ import com.seatel.mobilehall.data.prefs.SeatelSharePreferences
import com.seatel.mobilehall.databinding.FragmentHomeBinding import com.seatel.mobilehall.databinding.FragmentHomeBinding
import com.seatel.mobilehall.ui.application.MyApplication import com.seatel.mobilehall.ui.application.MyApplication
import com.seatel.mobilehall.ui.base.fragment.BaseFragment import com.seatel.mobilehall.ui.base.fragment.BaseFragment
import com.seatel.mobilehall.ui.game.GameActivity
import com.seatel.mobilehall.ui.home.activity.BuyTopUpCardActivity import com.seatel.mobilehall.ui.home.activity.BuyTopUpCardActivity
import com.seatel.mobilehall.ui.home.activity.BuyYesNumberPhaseTwoActivity import com.seatel.mobilehall.ui.home.activity.BuyYesNumberPhaseTwoActivity
import com.seatel.mobilehall.ui.home.activity.EShopPhaseTwoActivity import com.seatel.mobilehall.ui.home.activity.EShopPhaseTwoActivity
...@@ -102,8 +101,8 @@ class HomeFragment : BaseFragment(), View.OnClickListener, BannersInteractor.Vie ...@@ -102,8 +101,8 @@ class HomeFragment : BaseFragment(), View.OnClickListener, BannersInteractor.Vie
private var contactService = ArrayList<ContactService>() private var contactService = ArrayList<ContactService>()
lateinit var homeImageSliderAdapter: HomeImageSliderAdapter private lateinit var homeImageSliderAdapter: HomeImageSliderAdapter
lateinit var categoryAdapter: CategoryAdapter private lateinit var categoryAdapter: CategoryAdapter
override fun onAttach(context: Context) { override fun onAttach(context: Context) {
...@@ -433,7 +432,7 @@ class HomeFragment : BaseFragment(), View.OnClickListener, BannersInteractor.Vie ...@@ -433,7 +432,7 @@ class HomeFragment : BaseFragment(), View.OnClickListener, BannersInteractor.Vie
mDialogShow = SeatelAlertDialog.with( mDialogShow = SeatelAlertDialog.with(
requireActivity(), getString(R.string.message_available_download_new) requireActivity(), getString(R.string.message_available_download_new)
).setCancelable(false).setPositiveButton(getString(R.string.update)) { _, _ -> ).setCancelable(false).setPositiveButton(getString(R.string.update)) { _, _ ->
gotoPlayStore() gotoPlayStore(requireActivity().packageName)
}.show() }.show()
} else if (!dataMainScreen!!.getForceUpdate() && FirstLoginPreference.getInstance( } else if (!dataMainScreen!!.getForceUpdate() && FirstLoginPreference.getInstance(
requireActivity() requireActivity()
...@@ -443,7 +442,7 @@ class HomeFragment : BaseFragment(), View.OnClickListener, BannersInteractor.Vie ...@@ -443,7 +442,7 @@ class HomeFragment : BaseFragment(), View.OnClickListener, BannersInteractor.Vie
mDialogShow = SeatelAlertDialog.with( mDialogShow = SeatelAlertDialog.with(
requireActivity(), getString(R.string.message_available_download_new) requireActivity(), getString(R.string.message_available_download_new)
).setCancelable(false).setPositiveButton(getString(R.string.update)) { _, _ -> ).setCancelable(false).setPositiveButton(getString(R.string.update)) { _, _ ->
gotoPlayStore() gotoPlayStore(requireActivity().packageName)
}.setNegativeButton(getString(R.string.later)) { _, _ -> }.setNegativeButton(getString(R.string.later)) { _, _ ->
FirstLoginPreference.getInstance(requireActivity()) FirstLoginPreference.getInstance(requireActivity())
?.setIsForceUpdatePreference(true) ?.setIsForceUpdatePreference(true)
...@@ -453,34 +452,32 @@ class HomeFragment : BaseFragment(), View.OnClickListener, BannersInteractor.Vie ...@@ -453,34 +452,32 @@ class HomeFragment : BaseFragment(), View.OnClickListener, BannersInteractor.Vie
} }
private fun gotoPlayStore() { private fun gotoPlayStore(packageName: String) {
val appPackageName = requireActivity().packageName
try { try {
startActivity( startActivity(
Intent( Intent(
Intent.ACTION_VIEW, Uri.parse("market://details?id=$appPackageName") Intent.ACTION_VIEW, Uri.parse("market://details?id=$packageName")
) )
) )
} catch (obj: android.content.ActivityNotFoundException) { } catch (obj: android.content.ActivityNotFoundException) {
startActivity( startActivity(
Intent( Intent(
Intent.ACTION_VIEW, Intent.ACTION_VIEW,
Uri.parse("https://play.google.com/store/apps/details?id=$appPackageName") Uri.parse("https://play.google.com/store/apps/details?id=$packageName")
) )
) )
} }
} }
/* override fun onDestroy() {
// binding.homeImageSlider.stopAutoCycle()
}*/
override fun onGetBannersSucceed(bannersList: ArrayList<BannersModel>) { override fun onGetBannersSucceed(bannersList: ArrayList<BannersModel>) {
binding.run { binding.run {
bannersList.let { bannersList.let {
it.run { it.run {
homeImageSliderAdapter = HomeImageSliderAdapter(requireContext()) homeImageSliderAdapter = HomeImageSliderAdapter(requireContext()) {
gotoPlayStore(packageName = "com.nacd.stopdrug")
}
homeImageSliderAdapter.addItem(it) homeImageSliderAdapter.addItem(it)
homeImageSlider.setSliderAdapter(homeImageSliderAdapter) homeImageSlider.setSliderAdapter(homeImageSliderAdapter)
homeImageSlider.setIndicatorAnimation(IndicatorAnimationType.WORM) homeImageSlider.setIndicatorAnimation(IndicatorAnimationType.WORM)
...@@ -543,22 +540,12 @@ class HomeFragment : BaseFragment(), View.OnClickListener, BannersInteractor.Vie ...@@ -543,22 +540,12 @@ class HomeFragment : BaseFragment(), View.OnClickListener, BannersInteractor.Vie
"Ang Pao" -> { "Ang Pao" -> {
} }
"Chhoung" -> {
if (getPhoneLogin().isBlank() || getMainPhoneLogin().isBlank()) {
LoginActivity.lunch(requireContext())
} else GameActivity.lunch(requireContext())
}
"Point" -> { "Point" -> {
Toast.makeText(requireContext(), "Coming Soon...", Toast.LENGTH_SHORT) Toast.makeText(requireContext(), "Coming Soon...", Toast.LENGTH_SHORT)
.show() .show()
} }
} }
when (it.code) {
"chaol-chhoung" -> if (getPhoneLogin().isBlank() || getMainPhoneLogin().isBlank()) {
LoginActivity.lunch(requireContext())
} else GameActivity.lunch(requireContext())
}
} }
homeRecyclerView.adapter = categoryAdapter homeRecyclerView.adapter = categoryAdapter
......
package com.seatel.mobilehall.ui.home.interactor
import com.android.volley.VolleyError
import com.seatel.mobilehall.ui.home.model.TopUpWithPlanModel
interface TopUpWithPlanInteractor {
interface View {
fun onGetTopUpWithPlanSucceed(topUpWithPlan: TopUpWithPlanModel)
fun onGetTopUpWithPlanFailed(error: VolleyError)
}
interface Presenter {
fun onGetTopUpWithPlan(phoneNumber: String)
}
}
\ No newline at end of file
package com.seatel.mobilehall.ui.home.model
data class AddOn(
val _id: String,
val addOnCode: String,
val addOnName: String,
val amount: Int,
val benefit: Benefit,
val createdAt: String,
val includeAddOn: Boolean,
val isArchived: Boolean,
val status: String,
val updatedAt: String,
val validity: String
)
\ No newline at end of file
package com.seatel.mobilehall.ui.home.model
data class Amount(
val _id: String,
val amount: Double,
val createdAt: String,
val includeAddOn: Boolean,
val isArchived: Boolean,
val status: String,
val updatedAt: String,
val validity: String
)
\ No newline at end of file
package com.seatel.mobilehall.ui.home.model package com.seatel.mobilehall.ui.home.model
class BannersModel { class BannersModel {
var url: String? = null
var imgUrl: String = "" var imageUrl: String? = null
private var mobileUrl: String = "" var type: String? = null
private var type: String = "" var title: String? = null
private var title: String = "" var actionType: String? = null
fun setUrl(url: String) {
this.imgUrl = url
}
fun getUrl(): String {
return imgUrl
}
fun setMobileUrl(mobileUrl: String) {
this.mobileUrl = mobileUrl
}
fun getMobileUrl(): String {
return mobileUrl
}
fun setType(type: String) {
this.type = type
}
fun getTitle(): String {
return type
}
fun setTitle(title: String) {
this.title = title
}
fun getType(): String {
return title
}
} }
package com.seatel.mobilehall.ui.home.model
data class Benefit(
val calls: String,
val internet: String,
val outnetCall: String,
val sms: String
)
\ No newline at end of file
package com.seatel.mobilehall.ui.home.model
data class TopUpWithPlanModel(
val addOnList: ArrayList<AddOn>,
val amountList: ArrayList<Amount>
)
\ No newline at end of file
...@@ -8,8 +8,7 @@ import com.seatel.mobilehall.util.SeatelUtils ...@@ -8,8 +8,7 @@ import com.seatel.mobilehall.util.SeatelUtils
import org.json.JSONArray import org.json.JSONArray
class BannersPresenter( class BannersPresenter(
private var mContext: Context, private var mContext: Context, private var mBannerView: BannersInteractor.View
private var mBannerView: BannersInteractor.View
) : BannersInteractor.Presenter { ) : BannersInteractor.Presenter {
override fun onGetBanners() { override fun onGetBanners() {
...@@ -21,16 +20,19 @@ class BannersPresenter( ...@@ -21,16 +20,19 @@ class BannersPresenter(
} }
private fun getBannersModel(response: JSONArray): ArrayList<BannersModel> { private fun getBannersModel(response: JSONArray): ArrayList<BannersModel> {
val bannersModel: ArrayList<BannersModel> = ArrayList() val bannersList = ArrayList<BannersModel>()
for (i in 0 until response.length()) { for (i in 0 until response.length()) {
val bannersDataModel = BannersModel() val obj = response.getJSONObject(i)
bannersDataModel.setMobileUrl(response.getJSONObject(i).optString("imageUrl")) val model = BannersModel().apply {
bannersDataModel.setUrl(response.getJSONObject(i).optString("url")) url = obj.optString("url")
bannersDataModel.setType(response.getJSONObject(i).optString("type")) imageUrl = obj.optString("imageUrl")
bannersDataModel.setTitle(response.getJSONObject(i).optString("title")) type = obj.optString("type")
bannersModel.add(bannersDataModel) title = obj.optString("title")
actionType = obj.optString("actionType") // if exists
}
bannersList.add(model)
} }
return bannersModel return bannersList
} }
......
package com.seatel.mobilehall.ui.home.presenter
import android.content.Context
import com.android.volley.Request
import com.google.gson.Gson
import com.seatel.mobilehall.data.network.SeatelJSONObjectRequest
import com.seatel.mobilehall.ui.home.interactor.TopUpWithPlanInteractor
import com.seatel.mobilehall.ui.home.model.TopUpWithPlanModel
import org.json.JSONObject
class TopUpWithPlanPresenter(var mContext: Context, var view: TopUpWithPlanInteractor.View) :
TopUpWithPlanInteractor.Presenter {
override fun onGetTopUpWithPlan(phoneNumber: String) {
requestTopUpWithPlan(phoneNumber).setOnErrorListener {
view.onGetTopUpWithPlanFailed(it)
}.setOnResponseListener { response ->
view.onGetTopUpWithPlanSucceed(getTopUpWithPlan(response as JSONObject))
}.execute()
}
private fun getTopUpWithPlan(jsonObject: JSONObject): TopUpWithPlanModel {
val gson = Gson()
val data = gson.fromJson(jsonObject.toString(), TopUpWithPlanModel::class.java)
return data
}
private fun requestTopUpWithPlan(phoneNumber: String): SeatelJSONObjectRequest {
return object : SeatelJSONObjectRequest(mContext) {
override fun getFunctionName(): String {
return "top-up/amount-list?phoneNumber=$phoneNumber"
}
override fun getMethod(): Int {
return Request.Method.GET
}
}
}
}
\ No newline at end of file
...@@ -695,6 +695,15 @@ public class MySubscriptionAdapter extends BaseAdapter<RecyclerView.ViewHolder> ...@@ -695,6 +695,15 @@ public class MySubscriptionAdapter extends BaseAdapter<RecyclerView.ViewHolder>
mTotalData.setText(totalData.toString()); mTotalData.setText(totalData.toString());
mTvTotalDisplay.setText("(" + SeatelUtils.translatForDialog(itemView.getContext(), "Total Minutes") + ")"); mTvTotalDisplay.setText("(" + SeatelUtils.translatForDialog(itemView.getContext(), "Total Minutes") + ")");
mDataSize.setText(SeatelUtils.translatForDialog(mContext, "Min")); mDataSize.setText(SeatelUtils.translatForDialog(mContext, "Min"));
} else if (TextUtils.equals(dataPlansModel.getCode().toLowerCase(), "outnet-voice")) {
totalData = dataPlansModel.getTotalValue();
remainProgress = dataPlansModel.getRemainingData().floatValue();
dataLeft.setSuffixText(SeatelUtils.translatForDialog(mContext, "Min"));
dataLeft.setDataLeftText(SeatelUtils.translatForDialog(mContext, "Out Net Call Left"));
dataLeft.setMax(totalData.intValue());
mTotalData.setText(totalData.toString());
mTvTotalDisplay.setText("(" + SeatelUtils.translatForDialog(itemView.getContext(), "Total Minutes") + ")");
mDataSize.setText(SeatelUtils.translatForDialog(mContext, "Min"));
} else { } else {
if (totalData != null) { if (totalData != null) {
......
...@@ -41,6 +41,10 @@ class PartnerActivity : BaseActivity<ActivityPartnerBinding>(), TopPartnerIntera ...@@ -41,6 +41,10 @@ class PartnerActivity : BaseActivity<ActivityPartnerBinding>(), TopPartnerIntera
onBackPressed() onBackPressed()
} }
binding.scanQr.setOnClickListener {
OutLetScanQrActivity.launch(this)
}
binding.ivPartnerBanner.load(intent.getStringExtra("imgBanner")) { binding.ivPartnerBanner.load(intent.getStringExtra("imgBanner")) {
crossfade(true) crossfade(true)
} }
......
...@@ -3,16 +3,21 @@ package com.seatel.mobilehall.ui.yes_member.activity ...@@ -3,16 +3,21 @@ package com.seatel.mobilehall.ui.yes_member.activity
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.view.KeyEvent
import android.view.inputmethod.EditorInfo
import android.widget.EditText
import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.GridLayoutManager
import com.android.volley.VolleyError import com.android.volley.VolleyError
import com.seatel.mobilehall.data.network.SeatelSuperRequest import com.seatel.mobilehall.data.network.SeatelSuperRequest
import com.seatel.mobilehall.databinding.ActivityPartnerSearchBinding import com.seatel.mobilehall.databinding.ActivityPartnerSearchBinding
import com.seatel.mobilehall.ui.base.activity.BaseActivity import com.seatel.mobilehall.ui.base.activity.BaseActivity
import com.seatel.mobilehall.ui.yes_member.adapter.MainPartnerCategoryAdapter import com.seatel.mobilehall.ui.yes_member.adapter.MainPartnerCategoryAdapter
import com.seatel.mobilehall.ui.yes_member.adapter.PartnerSearchCategoryListAdapter
import com.seatel.mobilehall.ui.yes_member.adapter.TopPartnerSearchAdapter import com.seatel.mobilehall.ui.yes_member.adapter.TopPartnerSearchAdapter
import com.seatel.mobilehall.ui.yes_member.interactor.PartnerSearchInteractor import com.seatel.mobilehall.ui.yes_member.interactor.PartnerSearchInteractor
import com.seatel.mobilehall.ui.yes_member.model.PartnerCategoryModelItem import com.seatel.mobilehall.ui.yes_member.model.PartnerCategoryModelItem
import com.seatel.mobilehall.ui.yes_member.model.PartnerModelItem import com.seatel.mobilehall.ui.yes_member.model.PartnerModelItem
import com.seatel.mobilehall.ui.yes_member.model.PartnerSearchCategoryModel
import com.seatel.mobilehall.ui.yes_member.presenter.PartnerSearchPresenter import com.seatel.mobilehall.ui.yes_member.presenter.PartnerSearchPresenter
import com.seatel.mobilehall.util.SeatelAlertDialog import com.seatel.mobilehall.util.SeatelAlertDialog
...@@ -28,6 +33,9 @@ class PartnerSearchActivity : BaseActivity<ActivityPartnerSearchBinding>(), ...@@ -28,6 +33,9 @@ class PartnerSearchActivity : BaseActivity<ActivityPartnerSearchBinding>(),
} }
private lateinit var originalList: ArrayList<PartnerModelItem>
private lateinit var adapter: TopPartnerSearchAdapter
override fun getViewBinding(): ActivityPartnerSearchBinding { override fun getViewBinding(): ActivityPartnerSearchBinding {
return ActivityPartnerSearchBinding.inflate(layoutInflater) return ActivityPartnerSearchBinding.inflate(layoutInflater)
...@@ -44,6 +52,31 @@ class PartnerSearchActivity : BaseActivity<ActivityPartnerSearchBinding>(), ...@@ -44,6 +52,31 @@ class PartnerSearchActivity : BaseActivity<ActivityPartnerSearchBinding>(),
} }
PartnerSearchPresenter(this, this).onTopPartner() PartnerSearchPresenter(this, this).onTopPartner()
PartnerSearchPresenter(this, this).onPartnerCategory() PartnerSearchPresenter(this, this).onPartnerCategory()
setupSearch(binding.btnSearch)
}
private fun setupSearch(searchEditText: EditText) {
searchEditText.setOnEditorActionListener { _, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH ||
(event != null && event.keyCode == KeyEvent.KEYCODE_ENTER && event.action == KeyEvent.ACTION_DOWN)
) {
filterList(searchEditText.text.toString())
return@setOnEditorActionListener true
}
false
}
}
private fun filterList(query: String) {
val filteredList = originalList.filter {
it.name.contains(
query,
ignoreCase = true
) // Assuming PartnerSearchCategoryModel has a `name` field
}
adapter.updateList(ArrayList(filteredList)) // Update the adapter with the filtered data
} }
...@@ -57,7 +90,9 @@ class PartnerSearchActivity : BaseActivity<ActivityPartnerSearchBinding>(), ...@@ -57,7 +90,9 @@ class PartnerSearchActivity : BaseActivity<ActivityPartnerSearchBinding>(),
} }
override fun onTopPartnerSucceed(partnerSearchList: ArrayList<PartnerModelItem>) { override fun onTopPartnerSucceed(partnerSearchList: ArrayList<PartnerModelItem>) {
binding.recyclerPartner.adapter = TopPartnerSearchAdapter(this, partnerSearchList) originalList = partnerSearchList
adapter = TopPartnerSearchAdapter(this, originalList)
binding.recyclerPartner.adapter = adapter
} }
override fun onTopPartnerFail(error: VolleyError) { override fun onTopPartnerFail(error: VolleyError) {
......
...@@ -55,7 +55,7 @@ class RewardsDetailActivity : BaseActivity<ActivityRewardsDetailBinding>(), ...@@ -55,7 +55,7 @@ class RewardsDetailActivity : BaseActivity<ActivityRewardsDetailBinding>(),
crossfade(true) crossfade(true)
} }
binding.tvRewardName.text = intent.getStringExtra("reward_name") binding.tvRewardName.text = intent.getStringExtra("reward_name")
binding.tvRewardCoin.text = intent.getStringExtra("reward_coin") binding.tvRewardCoin.text = intent.getStringExtra("reward_coin") + " Coins"
binding.tvRewardTermConditionDetail.text = intent.getStringExtra("reward_term_condition") binding.tvRewardTermConditionDetail.text = intent.getStringExtra("reward_term_condition")
binding.btnRedeem.setOnClickListener { binding.btnRedeem.setOnClickListener {
......
...@@ -46,6 +46,7 @@ class EarnCoinHistoryAdapter( ...@@ -46,6 +46,7 @@ class EarnCoinHistoryAdapter(
return ViewHolder(binding) return ViewHolder(binding)
} }
@RequiresApi(Build.VERSION_CODES.O)
override fun onBindViewHolder(holder: ViewHolder, position: Int) { override fun onBindViewHolder(holder: ViewHolder, position: Int) {
holder.bind(earnCoinHistoryModel[position]) holder.bind(earnCoinHistoryModel[position])
} }
......
...@@ -10,6 +10,7 @@ import androidx.recyclerview.widget.RecyclerView ...@@ -10,6 +10,7 @@ import androidx.recyclerview.widget.RecyclerView
import coil.load import coil.load
import com.seatel.mobilehall.R import com.seatel.mobilehall.R
import com.seatel.mobilehall.ui.base.adapter.BaseAdapter import com.seatel.mobilehall.ui.base.adapter.BaseAdapter
import com.seatel.mobilehall.ui.yes_member.activity.PartnerSearchCategoryDetailActivity
import com.seatel.mobilehall.ui.yes_member.model.PartnerModelItem import com.seatel.mobilehall.ui.yes_member.model.PartnerModelItem
import com.seatel.mobilehall.ui.yes_member.model.TopPartnerModelItem import com.seatel.mobilehall.ui.yes_member.model.TopPartnerModelItem
...@@ -37,7 +38,7 @@ class PartnerAdapter( ...@@ -37,7 +38,7 @@ class PartnerAdapter(
val data = yesPartnerModelItem[position] val data = yesPartnerModelItem[position]
holder.logo.load(data.icon) holder.logo.load(data.icon)
holder.title.text = data.name holder.title.text = data.description
holder.image.load(data.banner) holder.image.load(data.banner)
if (data.discount > 0) { if (data.discount > 0) {
...@@ -49,6 +50,10 @@ class PartnerAdapter( ...@@ -49,6 +50,10 @@ class PartnerAdapter(
} }
holder.discount.text = data.discountDesc holder.discount.text = data.discountDesc
holder.itemView.setOnClickListener {
PartnerSearchCategoryDetailActivity.launch(mContext,data.name)
}
} }
override fun getItemCount(): Int { override fun getItemCount(): Int {
......
...@@ -6,6 +6,7 @@ import android.view.ViewGroup ...@@ -6,6 +6,7 @@ import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.seatel.mobilehall.databinding.ItemPartnerCategoryListBinding import com.seatel.mobilehall.databinding.ItemPartnerCategoryListBinding
import com.seatel.mobilehall.ui.yes_member.activity.PartnerSearchCategoryDetailActivity
import com.seatel.mobilehall.ui.yes_member.model.PartnerModelItem import com.seatel.mobilehall.ui.yes_member.model.PartnerModelItem
class PartnerCategoryListAdapter( class PartnerCategoryListAdapter(
...@@ -43,6 +44,9 @@ class PartnerCategoryListAdapter( ...@@ -43,6 +44,9 @@ class PartnerCategoryListAdapter(
override fun onBindViewHolder(holder: PartnerCategoryListAdapter.ViewHolder, position: Int) { override fun onBindViewHolder(holder: PartnerCategoryListAdapter.ViewHolder, position: Int) {
val data = partnerModelItem[position] val data = partnerModelItem[position]
holder.bind(mContext, data) holder.bind(mContext, data)
holder.itemView.setOnClickListener {
PartnerSearchCategoryDetailActivity.launch(mContext,data.name)
}
} }
} }
\ No newline at end of file
...@@ -14,8 +14,8 @@ class RewardAdapter(var mContext: Context, var rewardList: ArrayList<RewardModel ...@@ -14,8 +14,8 @@ class RewardAdapter(var mContext: Context, var rewardList: ArrayList<RewardModel
class ViewHolder(var binding: ItemRewardBinding) : RecyclerView.ViewHolder(binding.root) { class ViewHolder(var binding: ItemRewardBinding) : RecyclerView.ViewHolder(binding.root) {
fun bind(rewardModel: RewardModel) { fun bind(rewardModel: RewardModel) {
binding.tvCoin.text = rewardModel.exchangePoint.toString() binding.tvCoin.text = rewardModel.exchangePoint.toString() + " Coins"
binding.ivTextReward.text = rewardModel.name binding.tvTextReward.text = rewardModel.name
binding.ivReward.load(rewardModel.imageUrl) { binding.ivReward.load(rewardModel.imageUrl) {
crossfade(true) crossfade(true)
} }
......
...@@ -24,7 +24,7 @@ class RewardHistoryAdapter( ...@@ -24,7 +24,7 @@ class RewardHistoryAdapter(
@RequiresApi(Build.VERSION_CODES.O) @RequiresApi(Build.VERSION_CODES.O)
fun bind(data: RewardHistoryData) { fun bind(data: RewardHistoryData) {
binding.tvItemName.text = data.rewardName binding.tvItemName.text = data.rewardName
binding.tvClaimRewardDate.text = SeatelUtils.formatDateCoin(data.expiredAt) binding.tvClaimRewardDate.text = SeatelUtils.formatDateCoin(data.createdAt)
binding.tvRewardCoin.text = "-${data.coin}" binding.tvRewardCoin.text = "-${data.coin}"
} }
} }
......
...@@ -6,7 +6,10 @@ import androidx.recyclerview.widget.RecyclerView ...@@ -6,7 +6,10 @@ import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.seatel.mobilehall.R import com.seatel.mobilehall.R
import com.seatel.mobilehall.databinding.ItemTopPartnerSearchBinding import com.seatel.mobilehall.databinding.ItemTopPartnerSearchBinding
import com.seatel.mobilehall.ui.yes_member.activity.PartnerSearchCategoryActivity
import com.seatel.mobilehall.ui.yes_member.activity.PartnerSearchCategoryDetailActivity
import com.seatel.mobilehall.ui.yes_member.model.PartnerModelItem import com.seatel.mobilehall.ui.yes_member.model.PartnerModelItem
import com.seatel.mobilehall.ui.yes_member.model.PartnerSearchCategoryModel
class TopPartnerSearchAdapter( class TopPartnerSearchAdapter(
private var mContext: Context, private var partnerSearchList: ArrayList<PartnerModelItem> private var mContext: Context, private var partnerSearchList: ArrayList<PartnerModelItem>
...@@ -22,9 +25,17 @@ class TopPartnerSearchAdapter( ...@@ -22,9 +25,17 @@ class TopPartnerSearchAdapter(
.placeholder(R.drawable.ic_yes_profile).dontAnimate().into(binding.ivIcon) .placeholder(R.drawable.ic_yes_profile).dontAnimate().into(binding.ivIcon)
binding.tvPartnerName.text = partnerModelItem.name binding.tvPartnerName.text = partnerModelItem.name
itemView.setOnClickListener {
PartnerSearchCategoryDetailActivity.launch(mContext, partnerModelItem.name)
}
} }
} }
fun updateList(newList: ArrayList<PartnerModelItem>) {
partnerSearchList = newList
notifyDataSetChanged() // Refresh RecyclerView
}
override fun onCreateViewHolder( override fun onCreateViewHolder(
parent: ViewGroup, parent: ViewGroup,
viewType: Int viewType: Int
...@@ -37,6 +48,7 @@ class TopPartnerSearchAdapter( ...@@ -37,6 +48,7 @@ class TopPartnerSearchAdapter(
override fun onBindViewHolder(holder: TopPartnerSearchAdapter.ViewHolder, position: Int) { override fun onBindViewHolder(holder: TopPartnerSearchAdapter.ViewHolder, position: Int) {
holder.bind(mContext, partnerSearchList[position]) holder.bind(mContext, partnerSearchList[position])
} }
override fun getItemCount(): Int { override fun getItemCount(): Int {
......
...@@ -10,6 +10,7 @@ import androidx.recyclerview.widget.RecyclerView ...@@ -10,6 +10,7 @@ import androidx.recyclerview.widget.RecyclerView
import coil.load import coil.load
import com.seatel.mobilehall.R import com.seatel.mobilehall.R
import com.seatel.mobilehall.ui.base.adapter.BaseAdapter import com.seatel.mobilehall.ui.base.adapter.BaseAdapter
import com.seatel.mobilehall.ui.yes_member.activity.PartnerSearchCategoryDetailActivity
import com.seatel.mobilehall.ui.yes_member.model.TopPartnerModelItem import com.seatel.mobilehall.ui.yes_member.model.TopPartnerModelItem
class YesMemberAdapter( class YesMemberAdapter(
...@@ -48,6 +49,10 @@ class YesMemberAdapter( ...@@ -48,6 +49,10 @@ class YesMemberAdapter(
} }
holder.discount.text = data.discountDesc holder.discount.text = data.discountDesc
holder.itemView.setOnClickListener {
PartnerSearchCategoryDetailActivity.launch(mContext,data.name)
}
} }
override fun getItemCount(): Int { override fun getItemCount(): Int {
......
package com.seatel.mobilehall.ui.yes_member.fragment package com.seatel.mobilehall.ui.yes_member.fragment
import android.content.res.ColorStateList
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.core.content.ContextCompat
import androidx.core.view.ViewCompat
import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import com.android.volley.VolleyError import com.android.volley.VolleyError
import com.seatel.mobilehall.R
import com.seatel.mobilehall.data.network.SeatelSuperRequest import com.seatel.mobilehall.data.network.SeatelSuperRequest
import com.seatel.mobilehall.databinding.FragmentYesMemberBinding import com.seatel.mobilehall.databinding.FragmentYesMemberBinding
import com.seatel.mobilehall.ui.base.fragment.BaseFragment import com.seatel.mobilehall.ui.base.fragment.BaseFragment
import com.seatel.mobilehall.ui.home.activity.TopUpActivity
import com.seatel.mobilehall.ui.yes_member.activity.CoinActivity import com.seatel.mobilehall.ui.yes_member.activity.CoinActivity
import com.seatel.mobilehall.ui.yes_member.activity.OutLetScanQrActivity
import com.seatel.mobilehall.ui.yes_member.activity.PartnerActivity import com.seatel.mobilehall.ui.yes_member.activity.PartnerActivity
import com.seatel.mobilehall.ui.yes_member.activity.YesMemberTermConditionActivity import com.seatel.mobilehall.ui.yes_member.activity.YesMemberTermConditionActivity
import com.seatel.mobilehall.ui.yes_member.adapter.MainPartnerCategoryAdapter import com.seatel.mobilehall.ui.yes_member.adapter.MainPartnerCategoryAdapter
...@@ -54,13 +60,14 @@ class YesMemberFragment : BaseFragment(), MainTopPartnerInteractor.View { ...@@ -54,13 +60,14 @@ class YesMemberFragment : BaseFragment(), MainTopPartnerInteractor.View {
} }
private fun init() { private fun init() {
binding.tvNotify.isSelected = true
MainTopPartnerPresenter(requireContext(), this).getYesMemberMain(getPhoneLogin()) MainTopPartnerPresenter(requireContext(), this).getYesMemberMain(getPhoneLogin())
MainTopPartnerPresenter(requireContext(), this).onTopPartnerData() MainTopPartnerPresenter(requireContext(), this).onTopPartnerData()
MainTopPartnerPresenter(requireContext(), this).onPartnerCategory() MainTopPartnerPresenter(requireContext(), this).onPartnerCategory()
binding.btnCoin.setOnClickListener {
CoinActivity.launch(requireContext(), imgCoin!!, coinEarn!!, coinDescription!!)
}
binding.btnNotification.setOnClickListener { binding.btnNotification.setOnClickListener {
YesMemberTermConditionActivity.launch(requireContext()) YesMemberTermConditionActivity.launch(requireContext())
...@@ -69,6 +76,10 @@ class YesMemberFragment : BaseFragment(), MainTopPartnerInteractor.View { ...@@ -69,6 +76,10 @@ class YesMemberFragment : BaseFragment(), MainTopPartnerInteractor.View {
binding.btnPartner.setOnClickListener { binding.btnPartner.setOnClickListener {
PartnerActivity.launch(requireContext(), imgBanner!!) PartnerActivity.launch(requireContext(), imgBanner!!)
} }
binding.topUp.setOnClickListener {
TopUpActivity.lunch(requireContext())
}
} }
...@@ -107,6 +118,20 @@ class YesMemberFragment : BaseFragment(), MainTopPartnerInteractor.View { ...@@ -107,6 +118,20 @@ class YesMemberFragment : BaseFragment(), MainTopPartnerInteractor.View {
binding.tvCoinDescription.text = mainModel.coinDescription binding.tvCoinDescription.text = mainModel.coinDescription
binding.tvPartnerDescription.text = mainModel.partnerDescription binding.tvPartnerDescription.text = mainModel.partnerDescription
val colorRes = if (mainModel.eligiblePartner) R.color.colorPrimary else R.color.colorGray
val color = ContextCompat.getColor(requireContext(), colorRes)
ViewCompat.setBackgroundTintList(binding.frameYesPartner, ColorStateList.valueOf(color))
ViewCompat.setBackgroundTintList(binding.frameYesCoins, ColorStateList.valueOf(color))
ViewCompat.setBackgroundTintList(binding.qrCodeContainer, ColorStateList.valueOf(color))
binding.qrCodeContainer.setOnClickListener {
OutLetScanQrActivity.launch(requireContext())
}
binding.btnCoin.setOnClickListener {
CoinActivity.launch(requireContext(), imgCoin!!, coinEarn!!, coinDescription!!)
}
} }
......
...@@ -2,8 +2,8 @@ package com.seatel.mobilehall.ui.yes_member.model ...@@ -2,8 +2,8 @@ package com.seatel.mobilehall.ui.yes_member.model
data class EarnCoinHistoryData( data class EarnCoinHistoryData(
val _id: String, val _id: String,
val amount: Int, val amount: Double,
val coin: Int, val coin: Double,
val createdAt: String, val createdAt: String,
val earnDate: String, val earnDate: String,
val expiredDate: String, val expiredDate: String,
......
...@@ -7,7 +7,7 @@ import kotlinx.parcelize.Parcelize ...@@ -7,7 +7,7 @@ import kotlinx.parcelize.Parcelize
data class RewardHistoryData( data class RewardHistoryData(
val __v: Int, val __v: Int,
val _id: String, val _id: String,
val coin: Int, val coin: Double,
val createdAt: String, val createdAt: String,
val expiredAt: String, val expiredAt: String,
val phoneNumber: String, val phoneNumber: String,
......
package com.seatel.mobilehall.util.customview
import android.content.Context
import android.graphics.*
import android.util.AttributeSet
import android.view.View
import com.seatel.mobilehall.R
class StrokedTextView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : View(context, attrs, defStyleAttr) {
var text: String = "Hello, World!" // Default text
private val textSize = 60f
private val strokeWidth = 10f
private val textColor = Color.WHITE
private val strokeColor = context.getColor(R.color.colorPrimary)
private val textPaint = Paint().apply {
isAntiAlias = true
textSize = this@StrokedTextView.textSize
color = textColor
style = Paint.Style.FILL
}
private val strokePaint = Paint().apply {
isAntiAlias = true
textSize = this@StrokedTextView.textSize
color = strokeColor
style = Paint.Style.STROKE
strokeWidth = this@StrokedTextView.strokeWidth
}
init {
// Load custom attributes
attrs?.let {
val typedArray = context.obtainStyledAttributes(it, R.styleable.StrokedTextView, 0, 0)
text = typedArray.getString(R.styleable.StrokedTextView_text) ?: "Hello, World!"
typedArray.recycle()
}
}
override fun onDraw(canvas: Canvas) {
super.onDraw(canvas)
// Calculate text position (centered)
val x = (width - textPaint.measureText(text)) / 2
val y = (height + textSize) / 2
// Draw the stroke first
canvas.drawText(text, x, y, strokePaint)
// Draw the text on top
canvas.drawText(text, x, y, textPaint)
}
}
\ No newline at end of file
...@@ -76,7 +76,7 @@ class YesMemberDialog( ...@@ -76,7 +76,7 @@ class YesMemberDialog(
mSubtitle2?.text = translatForDialog(context, subtitle2) mSubtitle2?.text = translatForDialog(context, subtitle2)
if (coin.isNotEmpty()) { if (coin.isNotEmpty()) {
mCoin.visibility = View.VISIBLE mCoin.visibility = View.VISIBLE
mCoin.text = translatForDialog(context, coin) mCoin.text = translatForDialog(context, coin) + " Coins"
} }
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/bg_cholchoung"
android:layout_width="0dp"
android:layout_height="0dp"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/mToolbar"
app:srcCompat="@drawable/bg_cholchoung" />
<ImageView
android:id="@+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/cholchoung"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/mToolbar" />
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/chol_choung_anim"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:lottie_autoPlay="false"
app:lottie_loop="true"
app:lottie_rawRes="@raw/cholchoung" />
<androidx.appcompat.widget.Toolbar
android:id="@+id/mToolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageViewBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_left_back" />
<com.seatel.mobilehall.util.customview.CustomTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/cholchoung"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/tv_get_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginEnd="10dp"
android:text="View Prize"
android:textColor="@color/white"
android:textStyle="bold" />
</androidx.appcompat.widget.Toolbar>
<com.seatel.mobilehall.util.customview.CustomButton
android:id="@+id/button_play"
android:layout_width="match_parent"
android:layout_height="@dimen/button_height"
android:layout_marginStart="50dp"
android:layout_marginEnd="50dp"
android:layout_marginBottom="80dp"
android:background="@drawable/bg_round_button_primary"
android:gravity="center"
android:text="@string/cholchoung"
android:textColor="@android:color/white"
android:textSize="@dimen/default_text_size"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<!-- <com.seatel.mobilehall.util.customview.ErrorHandleView
android:id="@+id/error_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
-->
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -79,8 +79,8 @@ ...@@ -79,8 +79,8 @@
android:backgroundTint="@color/colorLightGray" android:backgroundTint="@color/colorLightGray"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingStart="@dimen/margin_5x_size" android:paddingStart="@dimen/margin_5x_size"
android:textColor="@color/colorGray"
android:text="Search For a yes Partner" android:text="Search For a yes Partner"
android:textColor="@color/colorGray"
app:layout_constraintTop_toBottomOf="@+id/card_banner" /> app:layout_constraintTop_toBottomOf="@+id/card_banner" />
<com.seatel.mobilehall.util.customview.CustomTextView <com.seatel.mobilehall.util.customview.CustomTextView
...@@ -98,6 +98,7 @@ ...@@ -98,6 +98,7 @@
android:id="@+id/recyclerTopPartner" android:id="@+id/recyclerTopPartner"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
android:padding="@dimen/margin_2x_size" android:padding="@dimen/margin_2x_size"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
...@@ -107,6 +108,7 @@ ...@@ -107,6 +108,7 @@
android:id="@+id/recyclerPartner" android:id="@+id/recyclerPartner"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
android:padding="@dimen/margin_2x_size" android:padding="@dimen/margin_2x_size"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintTop_toBottomOf="@+id/recyclerTopPartner" /> app:layout_constraintTop_toBottomOf="@+id/recyclerTopPartner" />
...@@ -116,12 +118,13 @@ ...@@ -116,12 +118,13 @@
</ScrollView> </ScrollView>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/scan_qr"
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="35dp" android:layout_height="35dp"
android:layout_marginEnd="@dimen/margin_2x_size" android:layout_marginEnd="@dimen/margin_2x_size"
android:layout_marginBottom="@dimen/margin_2x_size" android:layout_marginBottom="@dimen/margin_2x_size"
android:backgroundTint="@color/colorPrimary"
android:background="@drawable/bg_roaming_round_pink" android:background="@drawable/bg_roaming_round_pink"
android:backgroundTint="@color/colorPrimary"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"> app:layout_constraintEnd_toEndOf="parent">
......
...@@ -65,49 +65,72 @@ ...@@ -65,49 +65,72 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/btn_search" /> app:layout_constraintTop_toTopOf="@+id/btn_search" />
<com.seatel.mobilehall.util.customview.CustomTextView <ScrollView
android:id="@+id/tv_top_partner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_1x_size"
android:layout_marginTop="@dimen/margin_2x_size"
android:text="Top yes Partner"
android:textColor="@color/colorPrimary"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btn_search" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerPartner"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="0dp"
android:layout_marginTop="@dimen/margin_1x_size" android:layout_marginBottom="@dimen/margin_2x_size"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" android:nestedScrollingEnabled="false"
app:layout_constraintEnd_toEndOf="parent" android:scrollbars="none"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_top_partner" /> app:layout_constraintTop_toBottomOf="@+id/btn_search">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp">
<com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/tv_by_category"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_1x_size"
android:layout_marginTop="@dimen/margin_2x_size"
android:text="Search by Category"
android:textColor="@color/colorPrimary"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/recyclerPartner" />
<androidx.recyclerview.widget.RecyclerView <com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/recyclerCategoryPartner" android:id="@+id/tv_top_partner"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_1x_size" android:layout_marginStart="@dimen/margin_1x_size"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginTop="@dimen/margin_2x_size"
app:layout_constraintStart_toStartOf="parent" android:text="Top yes Partner"
app:layout_constraintTop_toBottomOf="@+id/tv_by_category" /> android:textColor="@color/colorPrimary"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerPartner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_1x_size"
android:nestedScrollingEnabled="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_top_partner" />
<com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/tv_by_category"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_1x_size"
android:layout_marginTop="@dimen/margin_2x_size"
android:text="Search by Category"
android:textColor="@color/colorPrimary"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/recyclerPartner" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerCategoryPartner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
android:padding="@dimen/margin_1x_size"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_by_category" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -5,72 +5,74 @@ ...@@ -5,72 +5,74 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white"> android:background="@color/white">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/iv_reward_img" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="0dp">
android:layout_height="wrap_content"
android:padding="@dimen/margin_2x_size"
android:scaleType="centerInside"
android:src="@drawable/ic_coins"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.seatel.mobilehall.util.customview.CustomTextView <ImageView
android:id="@+id/tv_reward_name" android:id="@+id/iv_reward_img"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_2x_size" android:padding="@dimen/margin_2x_size"
android:text="yes T-shirt" android:scaleType="centerInside"
android:textColor="@color/black" android:src="@drawable/ic_coins"
android:textSize="@dimen/large_text_size" app:layout_constraintEnd_toEndOf="parent"
android:textStyle="bold" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/iv_reward_img" />
<com.seatel.mobilehall.util.customview.CustomTextView <com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/tv_reward_coin" android:id="@+id/tv_reward_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_2x_size" android:layout_marginStart="@dimen/margin_2x_size"
android:text="1800 coins" android:text="yes T-shirt"
android:textColor="@color/colorPrimary" android:textColor="@color/black"
app:layout_constraintStart_toStartOf="parent" android:textSize="@dimen/large_text_size"
app:layout_constraintTop_toBottomOf="@+id/tv_reward_name" /> android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/iv_reward_img" />
<com.seatel.mobilehall.util.customview.CustomTextView <com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/tv_reward_term_condition" android:id="@+id/tv_reward_coin"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_2x_size" android:layout_marginStart="@dimen/margin_2x_size"
android:layout_marginTop="@dimen/margin_2x_size" android:text="1800 coins"
android:text="Terms and Conditions" android:textColor="@color/colorPrimary"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_reward_coin" /> app:layout_constraintTop_toBottomOf="@+id/tv_reward_name" />
<com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/tv_reward_term_condition_detail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_4x_size"
android:layout_marginTop="@dimen/margin_1x_size"
android:text="llllalal"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_reward_term_condition" />
<com.seatel.mobilehall.util.customview.CustomButton <com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/btn_redeem" android:id="@+id/tv_reward_term_condition_detail"
android:layout_width="150dp" android:layout_width="wrap_content"
android:layout_height="35dp" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_3x_size" android:layout_marginStart="@dimen/margin_4x_size"
android:background="@drawable/bg_button_primary" android:layout_marginTop="@dimen/margin_1x_size"
android:gravity="center" android:text="llllalal"
android:text="Redeem" app:layout_constraintStart_toStartOf="parent"
android:textColor="@color/white" app:layout_constraintTop_toBottomOf="@+id/tv_reward_coin" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" <com.seatel.mobilehall.util.customview.CustomButton
app:layout_constraintTop_toBottomOf="@+id/tv_reward_term_condition_detail" /> android:id="@+id/btn_redeem"
android:layout_width="150dp"
android:layout_height="35dp"
android:layout_marginTop="@dimen/margin_3x_size"
android:background="@drawable/bg_button_primary"
android:gravity="center"
android:text="Redeem"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_reward_term_condition_detail" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginTop="@dimen/margin_2x_size" android:layout_marginTop="@dimen/margin_2x_size"
android:layout_marginBottom="@dimen/margin_2x_size" android:layout_marginBottom="@dimen/margin_2x_size"
android:scaleType="centerCrop" android:scaleType="fitCenter"
android:src="@drawable/ic_logo" android:src="@drawable/ic_logo"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
......
...@@ -106,6 +106,32 @@ ...@@ -106,6 +106,32 @@
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/linear_layout_pinless"
android:layout_marginStart="5dp"
android:layout_marginTop="@dimen/margin_2x_size"
android:layout_marginEnd="5dp"
android:orientation="vertical">
<com.seatel.mobilehall.util.customview.CustomTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Choose the top up a mount" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerTopUpAmount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_2x_size"
/>
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/linear_layout_top_up_bottom" android:id="@+id/linear_layout_top_up_bottom"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -114,9 +140,11 @@ ...@@ -114,9 +140,11 @@
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:gravity="bottom" android:gravity="bottom"
android:orientation="vertical"> android:orientation="vertical"
>
<include <include
android:visibility="gone"
android:id="@+id/view_radio" android:id="@+id/view_radio"
layout="@layout/view_radio_button_top_up" /> layout="@layout/view_radio_button_top_up" />
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<ImageView <ImageView
android:visibility="gone"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/ic_left_back" /> android:src="@drawable/ic_left_back" />
...@@ -76,16 +77,21 @@ ...@@ -76,16 +77,21 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_1x_size" android:layout_marginStart="@dimen/margin_1x_size"
android:ellipsize="end" android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:focusable="true"
android:focusableInTouchMode="true"
android:singleLine="true"
android:marqueeRepeatLimit="marquee_forever"
android:maxLines="1" android:maxLines="1"
android:text="Top up 5 USD each month to become a yes member." android:text="Top up 5 USD each month to hhhhhhbecome a yes member."
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/customButton2" app:layout_constraintEnd_toStartOf="@+id/top_up"
app:layout_constraintStart_toEndOf="@id/iv_notify" app:layout_constraintStart_toEndOf="@id/iv_notify"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<com.seatel.mobilehall.util.customview.CustomButton <com.seatel.mobilehall.util.customview.CustomButton
android:id="@+id/customButton2" android:id="@+id/top_up"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="35dp" android:layout_height="35dp"
android:layout_marginEnd="@dimen/margin_1x_size" android:layout_marginEnd="@dimen/margin_1x_size"
...@@ -119,39 +125,50 @@ ...@@ -119,39 +125,50 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="wrap_content" <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_2x_size" android:layout_marginStart="@dimen/margin_2x_size"
android:gravity="center_vertical"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/btn_coin"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<ImageView <ImageView
android:id="@+id/iv_coin_banner" android:id="@+id/iv_coin_banner"
android:layout_width="100dp" android:layout_width="100dp"
android:layout_height="50dp" android:layout_height="50dp"
android:src="@drawable/ic_coins" /> android:src="@drawable/ic_coins"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.seatel.mobilehall.util.customview.CustomTextView <com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/tv_coin_earn" android:id="@+id/tv_coin_earn"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Your coins 800" android:text="Your coins 800"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="20sp" android:textSize="20sp"
android:textStyle="bold" /> android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/iv_coin_banner" />
<com.seatel.mobilehall.util.customview.CustomTextView <com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/tv_coin_description" android:id="@+id/tv_coin_description"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="200 coins will expire on 31 Dec 24" android:text="200 coins will expire on 31 Dec 24 "
android:textColor="@color/white" /> android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_coin_earn" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<com.seatel.mobilehall.util.customview.CustomButton <com.seatel.mobilehall.util.customview.CustomButton
android:id="@+id/btn_coin" android:id="@+id/btn_coin"
...@@ -184,13 +201,14 @@ ...@@ -184,13 +201,14 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frame_yes_coins"> app:layout_constraintTop_toBottomOf="@+id/frame_yes_coins">
<LinearLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_2x_size" android:layout_marginStart="@dimen/margin_2x_size"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/btn_partner"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
...@@ -198,24 +216,33 @@ ...@@ -198,24 +216,33 @@
android:id="@+id/iv_partner_banner" android:id="@+id/iv_partner_banner"
android:layout_width="100dp" android:layout_width="100dp"
android:layout_height="50dp" android:layout_height="50dp"
android:src="@drawable/ic_yes_partner" /> android:src="@drawable/ic_yes_partner"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.seatel.mobilehall.util.customview.CustomTextView <com.seatel.mobilehall.util.customview.CustomTextView
android:layout_width="wrap_content" android:id="@+id/tv_partner_title"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="All you can find here" android:text="All you can find here"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="20sp" android:textSize="20sp"
android:textStyle="bold" /> android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/iv_partner_banner" />
<com.seatel.mobilehall.util.customview.CustomTextView <com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/tv_partner_description" android:id="@+id/tv_partner_description"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Over 200+ yes partners" android:text="Over 200+ yes partners"
android:textColor="@color/white" /> android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_partner_title" />
</LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<com.seatel.mobilehall.util.customview.CustomButton <com.seatel.mobilehall.util.customview.CustomButton
android:id="@+id/btn_partner" android:id="@+id/btn_partner"
...@@ -287,6 +314,7 @@ ...@@ -287,6 +314,7 @@
</ScrollView> </ScrollView>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/qrCodeContainer"
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="35dp" android:layout_height="35dp"
android:layout_marginEnd="@dimen/margin_2x_size" android:layout_marginEnd="@dimen/margin_2x_size"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:padding="@dimen/margin_1x_size"> android:padding="@dimen/margin_1x_size">
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_1x_size"
android:layout_marginTop="@dimen/margin_1x_size"
android:layout_marginEnd="@dimen/margin_1x_size"
android:layout_marginBottom="@dimen/margin_1x_size"
android:background="@drawable/bg_round_valentine_white"
android:paddingStart="@dimen/margin_1x_size"
android:paddingTop="@dimen/margin_3x_size"
android:paddingEnd="@dimen/margin_1x_size"
android:paddingBottom="@dimen/margin_3x_size">
<RelativeLayout
android:id="@+id/frame_logo"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@drawable/background_rewardldpi"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_heart"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_centerVertical="true"
android:src="@drawable/ic_cny" />
</RelativeLayout>
<LinearLayout
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="10dp"
android:layout_toEndOf="@+id/frame_logo"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="@+id/frame_logo"
app:layout_constraintStart_toEndOf="@+id/frame_logo"
app:layout_constraintTop_toTopOf="@+id/frame_logo">
<com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/valentine_data"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/colorPrimary"
android:textSize="@dimen/large_text_size"
android:textStyle="bold" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_1x_size"
android:orientation="horizontal"
android:visibility="gone">
<com.seatel.mobilehall.util.customview.CustomTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Use for:"
android:textSize="@dimen/small_text_size"
android:textStyle="bold" />
<com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/valentine_use_for"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" Call, Sms, Internet"
android:textSize="@dimen/small_text_size" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.seatel.mobilehall.util.customview.CustomTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Validity:"
android:textSize="@dimen/small_text_size"
android:textStyle="bold" />
<com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/valentine_validity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/small_text_size" />
</LinearLayout>
</LinearLayout>
<com.seatel.mobilehall.util.customview.CustomButton
android:id="@+id/btn_claim_valentine"
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_below="@+id/text"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="20dp"
android:background="@drawable/bg_button_primary"
android:gravity="center"
android:paddingStart="@dimen/margin_2x_size"
android:paddingEnd="@dimen/margin_2x_size"
android:text="@string/clicktoclaim"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frame_logo" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<com.seatel.mobilehall.util.customview.CustomButton <com.seatel.mobilehall.util.customview.CustomButton
android:id="@+id/btn_discount" android:id="@+id/btn_discount"
android:layout_width="wrap_content" android:layout_width="80dp"
android:layout_height="35dp" android:layout_height="35dp"
android:background="@drawable/bg_button_primary" android:background="@drawable/bg_button_primary"
android:gravity="center" android:gravity="center"
......
...@@ -10,16 +10,25 @@ ...@@ -10,16 +10,25 @@
android:background="@drawable/bg_order_topup_card"> android:background="@drawable/bg_order_topup_card">
<com.seatel.mobilehall.util.customview.StrokedTextView <TextView
android:id="@+id/iv_text_reward" android:id="@+id/tv_text_reward"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="30dp" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_1x_size"
android:layout_marginEnd="@dimen/margin_1x_size"
android:gravity="center"
android:shadowColor="@color/colorPrimary"
android:shadowDx="0"
android:shadowDy="0"
android:textStyle="bold"
android:shadowRadius="8"
android:text="Hello Word"
android:textColor="@color/white"
android:textSize="@dimen/default_text_size"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/iv_reward" app:layout_constraintEnd_toStartOf="@+id/iv_reward"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:strokeColor="@color/colorPrimary"
app:text="T-Shirt" />
<com.seatel.mobilehall.util.customview.CustomTextView <com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/tv_coin" android:id="@+id/tv_coin"
...@@ -28,9 +37,9 @@ ...@@ -28,9 +37,9 @@
android:text="500 Coins" android:text="500 Coins"
android:textColor="@color/colorBlue" android:textColor="@color/colorBlue"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/iv_text_reward" app:layout_constraintEnd_toEndOf="@+id/tv_text_reward"
app:layout_constraintStart_toStartOf="@+id/iv_text_reward" app:layout_constraintStart_toStartOf="@+id/tv_text_reward"
app:layout_constraintTop_toBottomOf="@+id/iv_text_reward" /> app:layout_constraintTop_toBottomOf="@+id/tv_text_reward" />
<ImageView <ImageView
android:id="@+id/iv_reward" android:id="@+id/iv_reward"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:padding="@dimen/margin_1x_size"> android:padding="@dimen/margin_1x_size">
......
...@@ -52,22 +52,24 @@ ...@@ -52,22 +52,24 @@
android:id="@+id/iv_location_img" android:id="@+id/iv_location_img"
android:layout_width="20dp" android:layout_width="20dp"
android:layout_height="20dp" android:layout_height="20dp"
android:layout_marginTop="@dimen/margin_2x_size"
android:src="@drawable/ic_map_pin" android:src="@drawable/ic_map_pin"
app:layout_constraintBottom_toBottomOf="@+id/tv_location"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_shop_name" app:layout_constraintTop_toTopOf="@+id/tv_location"
app:tint="@color/white" /> app:tint="@color/white" />
<com.seatel.mobilehall.util.customview.CustomTextView <com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/tv_location" android:id="@+id/tv_location"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_1x_size" android:layout_marginStart="@dimen/margin_1x_size"
android:text="phnom Penh" android:padding="@dimen/margin_1x_size"
android:textColor="@color/white" android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="@+id/iv_location_img" android:textSize="@dimen/small_text_size"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/iv_location_img" app:layout_constraintStart_toEndOf="@+id/iv_location_img"
app:layout_constraintTop_toTopOf="@+id/iv_location_img" /> app:layout_constraintTop_toBottomOf="@+id/tv_shop_name" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardCornerRadius="@dimen/margin_1x_size"
app:cardUseCompatPadding="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/frame_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/margin_1x_size">
<com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/tv_amount"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="@dimen/margin_1x_size"
android:text="1 USD"
android:textSize="@dimen/default_text_size"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/line"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorRowUnseen"
android:padding="@dimen/margin_1x_size"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_amount" />
<com.seatel.mobilehall.util.customview.CustomTextView
android:id="@+id/tv_validity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/margin_1x_size"
android:text="7 days"
android:textColor="@color/colorGray"
android:textSize="@dimen/small_text_size"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/line" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_cholchoung">
<androidx.appcompat.widget.Toolbar
android:id="@+id/mToolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageViewBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_left_back" />
<com.seatel.mobilehall.util.customview.CustomTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/claim"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
</androidx.appcompat.widget.Toolbar>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/game_recycler"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="5dp"
android:nestedScrollingEnabled="false"
android:scrollbars="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/mToolbar" />
<com.seatel.mobilehall.util.customview.ErrorHandleView
android:id="@+id/error_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/mToolbar" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
This diff is collapsed.
...@@ -111,9 +111,6 @@ ...@@ -111,9 +111,6 @@
<attr name="arcProgressStyle" format="reference"/> <attr name="arcProgressStyle" format="reference"/>
</declare-styleable> </declare-styleable>
<declare-styleable name="StrokedTextView">
<attr name="text" format="string" />
</declare-styleable>
......
...@@ -108,6 +108,7 @@ ...@@ -108,6 +108,7 @@
<string name="pass_phone_empty" translatable="false">Please enter your phone number and password.</string> <string name="pass_phone_empty" translatable="false">Please enter your phone number and password.</string>
<string name="amount_topup_empty" translatable="false"> Please enter amount for top up.</string> <string name="amount_topup_empty" translatable="false"> Please enter amount for top up.</string>
<string name="amount_topup_cannot_bigger_100" translatable="false"> Maximum Top Up is $100 per time.</string> <string name="amount_topup_cannot_bigger_100" translatable="false"> Maximum Top Up is $100 per time.</string>
<string name="amount_topup_cannot_smaller_1" translatable="false"> The minimum top-up amount is $1 per transaction.</string>
<string name="amount_topup_not_number" translatable="false"> Please enter amount without special characters.</string> <string name="amount_topup_not_number" translatable="false"> Please enter amount without special characters.</string>
<string name="topup_pin_empty" translatable="false"> Please input your top up pin.</string> <string name="topup_pin_empty" translatable="false"> Please input your top up pin.</string>
<string name="ok" translatable="false">Ok</string> <string name="ok" translatable="false">Ok</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment