NotificationsActivity.kt creation and notification api integration
FM radio webview implementation MyList Fragment creation and api integration. Worked on navigation and status bar color handling between screens. WebSeriesAdapter and showed first list. back button handling
This commit is contained in:
@@ -15,10 +15,15 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Woka"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".home.FMActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/TransparentActivity" />
|
||||
<activity
|
||||
android:name=".home.notifications.NotificationsActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".shop.MyOrdersActivity"
|
||||
android:exported="false"
|
||||
|
||||
73
app/src/main/java/com/woka/home/FMActivity.kt
Normal file
73
app/src/main/java/com/woka/home/FMActivity.kt
Normal file
@@ -0,0 +1,73 @@
|
||||
package com.woka.home
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.webkit.WebSettings
|
||||
import android.webkit.WebViewClient
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import com.woka.R
|
||||
import com.woka.databinding.ActivityFmactivityBinding
|
||||
import com.woka.modules.webview.WebViewActivity
|
||||
import com.woka.utils.WokaBaseActivity
|
||||
|
||||
class FMActivity : WokaBaseActivity() {
|
||||
|
||||
companion object{
|
||||
private const val FM_URL = "https://wokastaging.in/api/woka_fm"
|
||||
}
|
||||
|
||||
private lateinit var binding: ActivityFmactivityBinding
|
||||
|
||||
@SuppressLint("SetJavaScriptEnabled")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
enableEdgeToEdge()
|
||||
binding = ActivityFmactivityBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
|
||||
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
insets
|
||||
}
|
||||
|
||||
window.navigationBarColor = Color.BLACK
|
||||
|
||||
val webSettings: WebSettings = binding.webView.getSettings()
|
||||
webSettings.javaScriptEnabled = true
|
||||
|
||||
webSettings.allowFileAccess = false;
|
||||
webSettings.allowContentAccess = false;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
webSettings.safeBrowsingEnabled = true
|
||||
};
|
||||
|
||||
binding.webView.setWebViewClient(WebViewClient())
|
||||
|
||||
binding.webView.loadUrl(FM_URL)
|
||||
|
||||
binding.root.setOnClickListener {
|
||||
onBackPressedDispatcher.onBackPressed()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
binding.webView.onPause()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
binding.webView.onResume()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
binding.webView.destroy()
|
||||
}
|
||||
}
|
||||
@@ -199,8 +199,6 @@ class HomeActivity : WokaBaseActivity(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
registerReceiver(minuteReceiver, IntentFilter(Intent.ACTION_TIME_TICK))
|
||||
}
|
||||
|
||||
private fun initViews() {
|
||||
@@ -452,16 +450,23 @@ class HomeActivity : WokaBaseActivity(),
|
||||
override fun onBottomTabSelected(tab: Int) {
|
||||
when (tab){
|
||||
HOME -> {
|
||||
binding.notifications.show()
|
||||
|
||||
if (userPrefs?.appTheme == Theme.THEME_TWO){
|
||||
binding.root.backgroundTintList = ColorStateList.valueOf(getColor(R.color.color_primary))
|
||||
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.fc_home, Home2Fragment.newInstance())
|
||||
.commit()
|
||||
}else{
|
||||
binding.root.backgroundTintList = null
|
||||
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.fc_home, Home1Fragment.newInstance())
|
||||
.commit()
|
||||
}
|
||||
|
||||
registerReceiver(minuteReceiver, IntentFilter(Intent.ACTION_TIME_TICK))
|
||||
updateBackground()
|
||||
viewModel.selectedBottomTab = tab
|
||||
}
|
||||
@@ -473,6 +478,9 @@ class HomeActivity : WokaBaseActivity(),
|
||||
, ActivityOptions.makeSceneTransitionAnimation(this).toBundle())
|
||||
}
|
||||
MY_LIST -> {
|
||||
binding.notifications.hide()
|
||||
binding.root.backgroundTintList = ColorStateList.valueOf(getColor(R.color.orders_bg))
|
||||
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.fc_home, MyListFragment.newInstance())
|
||||
.commit()
|
||||
@@ -496,7 +504,6 @@ class HomeActivity : WokaBaseActivity(),
|
||||
when(binding.bottomNav.getSelectedTab()){
|
||||
HOME -> {
|
||||
if (userPrefs?.appTheme == Theme.THEME_ONE){
|
||||
binding.root.backgroundTintList = null
|
||||
|
||||
val timePeriod = TimePeriod.getCurrentTimePeriod()
|
||||
if (currentBackground != timePeriod){
|
||||
@@ -518,8 +525,6 @@ class HomeActivity : WokaBaseActivity(),
|
||||
|
||||
currentBackground = timePeriod
|
||||
}
|
||||
}else{
|
||||
binding.root.backgroundTintList = ColorStateList.valueOf(getColor(R.color.color_primary))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import androidx.lifecycle.ViewModelProvider
|
||||
import com.woka.R
|
||||
import com.woka.WokaApp.Companion.userPrefs
|
||||
import com.woka.databinding.FragmentHome1Binding
|
||||
import com.woka.home.FMActivity
|
||||
import com.woka.home.HomeViewModel
|
||||
import com.woka.home.MoreHomeActivity
|
||||
import com.woka.home.TimePeriod
|
||||
@@ -70,9 +71,9 @@ class Home1Fragment : Fragment() {
|
||||
}
|
||||
|
||||
private fun initViews() {
|
||||
if (viewModel.isHomeBackgroundBlurred){
|
||||
if (viewModel.isHomeBackgroundBlurred) {
|
||||
binding.playerView.hide()
|
||||
}else{
|
||||
} else {
|
||||
binding.playerView.show()
|
||||
}
|
||||
}
|
||||
@@ -80,7 +81,7 @@ class Home1Fragment : Fragment() {
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
handleAnimations()
|
||||
if (viewModel.player?.isPlaying == false){
|
||||
if (viewModel.player?.isPlaying == false) {
|
||||
viewModel.player?.play()
|
||||
}
|
||||
|
||||
@@ -97,7 +98,7 @@ class Home1Fragment : Fragment() {
|
||||
|
||||
if (viewModel.player?.isPlaying == true) viewModel.player?.pause()
|
||||
|
||||
if (viewModel.isHomeBackgroundBlurred){
|
||||
if (viewModel.isHomeBackgroundBlurred) {
|
||||
binding.playerView.hide()
|
||||
}
|
||||
}
|
||||
@@ -151,9 +152,18 @@ class Home1Fragment : Fragment() {
|
||||
|
||||
more.setOnClickListener {
|
||||
activity?.let {
|
||||
startActivity(Intent(it, MoreHomeActivity::class.java),
|
||||
ActivityOptions.makeSceneTransitionAnimation(it).toBundle())
|
||||
} }
|
||||
startActivity(
|
||||
Intent(it, MoreHomeActivity::class.java),
|
||||
ActivityOptions.makeSceneTransitionAnimation(it).toBundle()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fmButton.setOnClickListener {
|
||||
activity?.let {
|
||||
startActivity(Intent(it, FMActivity::class.java))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,7 +213,7 @@ class Home1Fragment : Fragment() {
|
||||
}
|
||||
|
||||
private fun handleAnimations() {
|
||||
synchronized(this){
|
||||
synchronized(this) {
|
||||
if (tvAnimator == null) {
|
||||
binding.tvView.post {
|
||||
val endMargin: Float =
|
||||
@@ -379,7 +389,7 @@ class Home1Fragment : Fragment() {
|
||||
binding.moon.show()
|
||||
|
||||
currentBackground = timePeriod
|
||||
synchronized(this){
|
||||
synchronized(this) {
|
||||
handleNightAnimations()
|
||||
}
|
||||
|
||||
|
||||
@@ -6,19 +6,79 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.woka.databinding.FragmentMyListBinding
|
||||
import com.woka.home.mylist.MyListRepository
|
||||
import com.woka.home.mylist.adapters.WebSeriesAdapter
|
||||
import com.woka.networking.ApiResult
|
||||
import com.woka.utils.hide
|
||||
import com.woka.utils.show
|
||||
|
||||
class MyListFragment : Fragment() {
|
||||
|
||||
private lateinit var binding: FragmentMyListBinding
|
||||
|
||||
private lateinit var webSeriesEAdapter: WebSeriesAdapter
|
||||
private lateinit var webSeriesHAdapter: WebSeriesAdapter
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
): View {
|
||||
binding = FragmentMyListBinding.inflate(inflater, container, false)
|
||||
|
||||
// adapters
|
||||
webSeriesEAdapter = WebSeriesAdapter()
|
||||
webSeriesHAdapter = WebSeriesAdapter()
|
||||
|
||||
initViews()
|
||||
|
||||
clickEvents()
|
||||
|
||||
setObservers()
|
||||
|
||||
MyListRepository.loadMyFavList()
|
||||
|
||||
return binding.root
|
||||
}
|
||||
|
||||
private fun initViews() {
|
||||
binding.apply {
|
||||
rvWebSeriesEnglish.adapter = webSeriesEAdapter
|
||||
rvWebSeriesHindi.adapter = webSeriesHAdapter
|
||||
}
|
||||
}
|
||||
|
||||
private fun clickEvents(){
|
||||
binding.apply {
|
||||
backBtn.setOnClickListener {
|
||||
activity?.onBackPressed()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setObservers(){
|
||||
binding.apply {
|
||||
MyListRepository.myFavListLiveData.observe(viewLifecycleOwner){
|
||||
when (it){
|
||||
is ApiResult.Error -> {
|
||||
webSeriesEnglishView.hide()
|
||||
webSeriesHindiView.hide()
|
||||
}
|
||||
is ApiResult.Loading -> {}
|
||||
is ApiResult.Success -> {
|
||||
it.data?.result?.let { result ->
|
||||
result.show_data?.let {showData ->
|
||||
if (showData.isNotEmpty()){
|
||||
webSeriesEnglishView.show()
|
||||
webSeriesEAdapter.submitList(ArrayList(showData))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun newInstance() = MyListFragment()
|
||||
}
|
||||
|
||||
24
app/src/main/java/com/woka/home/mylist/MyListRepository.kt
Normal file
24
app/src/main/java/com/woka/home/mylist/MyListRepository.kt
Normal file
@@ -0,0 +1,24 @@
|
||||
package com.woka.home.mylist
|
||||
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.woka.home.mylist.models.MyListResponse
|
||||
import com.woka.networking.ApiResult
|
||||
import com.woka.userdata.UserRepository
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
object MyListRepository {
|
||||
|
||||
private val _myFavListLiveData = MutableLiveData<ApiResult<MyListResponse>>()
|
||||
val myFavListLiveData: LiveData<ApiResult<MyListResponse>>
|
||||
get() = _myFavListLiveData
|
||||
|
||||
fun loadMyFavList(){
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
_myFavListLiveData.postValue(ApiResult.Loading())
|
||||
_myFavListLiveData.postValue(UserRepository.loadMyFavList())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.woka.home.mylist.adapters
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView.ViewHolder
|
||||
import com.woka.databinding.FavViewHolderBinding
|
||||
|
||||
class FavoriteViewHolder(val binding: FavViewHolderBinding): ViewHolder(binding.root)
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.woka.home.mylist.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.AsyncDifferConfig
|
||||
import androidx.recyclerview.widget.DiffUtil
|
||||
import androidx.recyclerview.widget.ListAdapter
|
||||
import com.bumptech.glide.Glide
|
||||
import com.woka.databinding.FavViewHolderBinding
|
||||
import com.woka.home.mylist.models.ShowData
|
||||
import java.util.concurrent.Executors
|
||||
|
||||
class WebSeriesAdapter(config: AsyncDifferConfig<ShowData>): ListAdapter<ShowData, FavoriteViewHolder>(config) {
|
||||
|
||||
companion object{
|
||||
private val DIFF_UTIL = object : DiffUtil.ItemCallback<ShowData>(){
|
||||
override fun areItemsTheSame(oldItem: ShowData, newItem: ShowData): Boolean = oldItem.id == newItem.id
|
||||
override fun areContentsTheSame(oldItem: ShowData, newItem: ShowData): Boolean = oldItem == newItem
|
||||
}
|
||||
|
||||
private val DIFF_CONFIG = AsyncDifferConfig.Builder(DIFF_UTIL)
|
||||
.setBackgroundThreadExecutor(Executors.newSingleThreadExecutor())
|
||||
.build()
|
||||
}
|
||||
|
||||
constructor(): this(DIFF_CONFIG)
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): FavoriteViewHolder {
|
||||
return FavoriteViewHolder(
|
||||
FavViewHolderBinding.inflate(
|
||||
LayoutInflater.from(parent.context),
|
||||
parent,
|
||||
false
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: FavoriteViewHolder, position: Int) {
|
||||
val showData = getItem(position)
|
||||
|
||||
holder.binding.apply {
|
||||
showData.thumbnail_path?.let {
|
||||
Glide.with(root.context)
|
||||
.load(it)
|
||||
.into(image)
|
||||
}
|
||||
|
||||
title.text = showData.title
|
||||
|
||||
fav.isSelected = true
|
||||
}
|
||||
}
|
||||
}
|
||||
24
app/src/main/java/com/woka/home/mylist/models/AudioData.kt
Normal file
24
app/src/main/java/com/woka/home/mylist/models/AudioData.kt
Normal file
@@ -0,0 +1,24 @@
|
||||
package com.woka.home.mylist.models
|
||||
|
||||
data class AudioData(
|
||||
val age_range_master_id: String?,
|
||||
val audio_duration: String?,
|
||||
val audio_url: String?,
|
||||
val bookmark_category_ids: String?,
|
||||
val bookmark_count: Int?,
|
||||
val category_master_id: String?,
|
||||
val content_more_details: List<ContentMoreDetail?>?,
|
||||
val description: String?,
|
||||
val gender_master_id: String?,
|
||||
val id: Int?,
|
||||
val is_liked: Boolean?,
|
||||
val language_master_id: Int?,
|
||||
val likes_count: Int?,
|
||||
val mark_as_favourite: Boolean?,
|
||||
val media_id: String?,
|
||||
val release_date: String?,
|
||||
val tags_keyword: String?,
|
||||
val thumbnail_path: String?,
|
||||
val title: String?,
|
||||
val views_count: Int?
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.woka.home.mylist.models
|
||||
|
||||
data class ContentMoreDetail(
|
||||
val content_id: Int?,
|
||||
val description: String?,
|
||||
val id: Int?,
|
||||
val language_master_id: Int?,
|
||||
val post_type: Int?,
|
||||
val tags_keywords: String?,
|
||||
val title: String?,
|
||||
val url: String?
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.woka.home.mylist.models
|
||||
|
||||
data class ContentMoreDetailXX(
|
||||
val content_id: Int?,
|
||||
val description: String?,
|
||||
val id: Int?,
|
||||
val language_master_id: Int?,
|
||||
val post_type: Int?,
|
||||
val tags_keywords: String?,
|
||||
val title: String?
|
||||
)
|
||||
22
app/src/main/java/com/woka/home/mylist/models/GameData.kt
Normal file
22
app/src/main/java/com/woka/home/mylist/models/GameData.kt
Normal file
@@ -0,0 +1,22 @@
|
||||
package com.woka.home.mylist.models
|
||||
|
||||
data class GameData(
|
||||
val age_range_master_id: String?,
|
||||
val bookmark_category_ids: String?,
|
||||
val bookmark_count: Int?,
|
||||
val category_master_id: String?,
|
||||
val content_more_details: List<ContentMoreDetail>?,
|
||||
val description: String?,
|
||||
val game_url: String?,
|
||||
val gender_master_id: String?,
|
||||
val id: Int?,
|
||||
val is_liked: Boolean?,
|
||||
val language_master_id: Int?,
|
||||
val likes_count: Int?,
|
||||
val mark_as_favourite: Boolean?,
|
||||
val release_date: String?,
|
||||
val screen_orientation: String?,
|
||||
val thumbnail_path: String?,
|
||||
val title: String?,
|
||||
val views_count: Int?
|
||||
)
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.woka.home.mylist.models
|
||||
|
||||
data class MyListResponse(
|
||||
val result: Result?
|
||||
)
|
||||
9
app/src/main/java/com/woka/home/mylist/models/Result.kt
Normal file
9
app/src/main/java/com/woka/home/mylist/models/Result.kt
Normal file
@@ -0,0 +1,9 @@
|
||||
package com.woka.home.mylist.models
|
||||
|
||||
data class Result(
|
||||
val audio_data: List<AudioData>?,
|
||||
val game_data: List<GameData>?,
|
||||
val show_data: List<ShowData>?,
|
||||
val sing_karaoke_data: List<SingKaraokeData>?,
|
||||
val video_data: List<Any>?
|
||||
)
|
||||
21
app/src/main/java/com/woka/home/mylist/models/ShowData.kt
Normal file
21
app/src/main/java/com/woka/home/mylist/models/ShowData.kt
Normal file
@@ -0,0 +1,21 @@
|
||||
package com.woka.home.mylist.models
|
||||
|
||||
data class ShowData(
|
||||
val age_range_master_id: String?,
|
||||
val bookmark_category_ids: String?,
|
||||
val bookmark_count: Int?,
|
||||
val category_master_id: String?,
|
||||
val content_more_details: List<ContentMoreDetailXX>?,
|
||||
val description: String?,
|
||||
val gender_master_id: String?,
|
||||
val id: Int?,
|
||||
val is_liked: Boolean?,
|
||||
val likes_count: Int?,
|
||||
val mark_as_favourite: Boolean?,
|
||||
val show_type: String?,
|
||||
val thumbnail_path: String?,
|
||||
val title: String?,
|
||||
val total_episodes: Int?,
|
||||
val total_seasons: Int?,
|
||||
val views_count: Int?
|
||||
)
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.woka.home.mylist.models
|
||||
|
||||
data class SingKaraokeData(
|
||||
val age_range_master_id: String?,
|
||||
val bookmark_category_ids: String?,
|
||||
val bookmark_count: Int?,
|
||||
val category_master_id: String?,
|
||||
val content_more_details: List<ContentMoreDetail>?,
|
||||
val description: String?,
|
||||
val duration: String?,
|
||||
val gender_master_id: String?,
|
||||
val id: Int?,
|
||||
val is_liked: Boolean?,
|
||||
val language_master_id: Int?,
|
||||
val likes_count: Int?,
|
||||
val mark_as_favourite: Boolean?,
|
||||
val release_date: String?,
|
||||
val thumbnail_path: String?,
|
||||
val title: String?,
|
||||
val video_url: String?,
|
||||
val views_count: Int?
|
||||
)
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.woka.home.notifications
|
||||
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.AsyncDifferConfig
|
||||
@@ -8,6 +9,7 @@ import androidx.recyclerview.widget.ListAdapter
|
||||
import androidx.recyclerview.widget.RecyclerView.ViewHolder
|
||||
import com.woka.databinding.NotificationViewHolderBinding
|
||||
import com.woka.home.notifications.models.NotificationData
|
||||
import com.woka.utils.TAG
|
||||
import java.text.SimpleDateFormat
|
||||
import java.time.LocalDate
|
||||
import java.time.temporal.ChronoUnit
|
||||
@@ -50,17 +52,21 @@ class NotificationAdapter(config: AsyncDifferConfig<NotificationData>): ListAdap
|
||||
|
||||
override fun onBindViewHolder(holder: NotificationViewHolder, position: Int) {
|
||||
val notification = getItem(position)
|
||||
notification.updated_at?.let {
|
||||
notification.created_at?.let {
|
||||
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'", Locale.getDefault())
|
||||
.parse(it)?.let { notificationDate ->
|
||||
val today = Calendar.getInstance()
|
||||
val today = Calendar.getInstance().apply {
|
||||
set(Calendar.HOUR_OF_DAY, notificationDate.hours)
|
||||
set(Calendar.MINUTE, notificationDate.minutes)
|
||||
set(Calendar.SECOND, notificationDate.seconds)
|
||||
}
|
||||
|
||||
val dayDiffs = (today.time.time - notificationDate.time)/(24 * 60 * 60 * 1000)
|
||||
val daysTxt = "$dayDiffs days ago"
|
||||
val daysTxt = if (dayDiffs == 0L) "Today" else if (dayDiffs == 1L) "Yesterday" else "$dayDiffs days ago"
|
||||
holder.binding.daysTxt.text = daysTxt
|
||||
}
|
||||
|
||||
holder.binding.bodyTxt.text = notification.title
|
||||
}
|
||||
|
||||
holder.binding.bodyTxt.text = notification.title
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.woka.home.notifications
|
||||
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.woka.home.notifications.models.NotificationData
|
||||
import com.woka.networking.ApiResult
|
||||
import com.woka.userdata.UserRepository
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
object NotificationRepository {
|
||||
|
||||
private val _notificationsLiveData = MutableLiveData<ApiResult<List<NotificationData>>>()
|
||||
val notificationLiveData: LiveData<ApiResult<List<NotificationData>>>
|
||||
get() = _notificationsLiveData
|
||||
|
||||
fun loadNotifications(){
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
_notificationsLiveData.postValue(ApiResult.Loading())
|
||||
_notificationsLiveData.postValue(UserRepository.loadNotifications())
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,13 +1,18 @@
|
||||
package com.woka.home.notifications
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import com.woka.R
|
||||
import com.woka.databinding.ActivityNotificationsBinding
|
||||
import com.woka.home.notifications.models.NotificationData
|
||||
import com.woka.networking.ApiResult
|
||||
import com.woka.utils.TAG
|
||||
import com.woka.utils.WokaBaseActivity
|
||||
import com.woka.utils.hide
|
||||
import com.woka.utils.show
|
||||
import com.woka.utils.toast
|
||||
|
||||
class NotificationsActivity : WokaBaseActivity() {
|
||||
|
||||
@@ -30,34 +35,11 @@ class NotificationsActivity : WokaBaseActivity() {
|
||||
|
||||
initViews()
|
||||
|
||||
adapter.submitList(listOf(
|
||||
NotificationData(
|
||||
created_at = "2024-05-31T10:44:09.000000Z",
|
||||
description = "2024-05-31T10:44:09.000000Z",
|
||||
id = 1,
|
||||
image = null,
|
||||
is_read = 1,
|
||||
link = null,
|
||||
post_type = 2,
|
||||
title = "New Episode has been added toBang Bang Bang",
|
||||
type = "type",
|
||||
updated_at = "2024-05-31T10:44:09.000000Z",
|
||||
user_id = 1
|
||||
),
|
||||
NotificationData(
|
||||
created_at = "2024-05-31T10:44:09.000000Z",
|
||||
description = "2024-05-31T10:44:09.000000Z",
|
||||
id = 2,
|
||||
image = null,
|
||||
is_read = 1,
|
||||
link = null,
|
||||
post_type = 2,
|
||||
title = "New Episode has been added toBang Bang Bang",
|
||||
type = "type",
|
||||
updated_at = "2024-06-01T10:44:09.000000Z",
|
||||
user_id = 1
|
||||
)
|
||||
))
|
||||
clickEvents()
|
||||
|
||||
setObservers()
|
||||
|
||||
NotificationRepository.loadNotifications()
|
||||
|
||||
}
|
||||
|
||||
@@ -66,4 +48,52 @@ class NotificationsActivity : WokaBaseActivity() {
|
||||
rvNotifications.adapter = adapter
|
||||
}
|
||||
}
|
||||
|
||||
private fun clickEvents() {
|
||||
binding.apply {
|
||||
retry.setOnClickListener {
|
||||
NotificationRepository.loadNotifications()
|
||||
}
|
||||
|
||||
backBtn.setOnClickListener {
|
||||
onBackPressedDispatcher.onBackPressed()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setObservers() {
|
||||
NotificationRepository.notificationLiveData.observe(this){
|
||||
binding.apply {
|
||||
when (it){
|
||||
is ApiResult.Error -> {
|
||||
rvNotifications.hide()
|
||||
progressBar.hide()
|
||||
noData.hide()
|
||||
|
||||
errorView.show()
|
||||
}
|
||||
is ApiResult.Loading -> {
|
||||
progressBar.show()
|
||||
errorView.hide()
|
||||
}
|
||||
is ApiResult.Success -> {
|
||||
it.data?.let { notifications ->
|
||||
progressBar.hide()
|
||||
errorView.hide()
|
||||
|
||||
if (notifications.isEmpty()){
|
||||
noData.show()
|
||||
rvNotifications.hide()
|
||||
return@observe
|
||||
}
|
||||
|
||||
rvNotifications.show()
|
||||
|
||||
adapter.submitList(notifications)
|
||||
}?:noData.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.woka.shop
|
||||
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.core.view.ViewCompat
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.woka.userdata
|
||||
|
||||
import com.woka.home.mylist.models.MyListResponse
|
||||
import com.woka.home.notifications.models.NotificationData
|
||||
import com.woka.userdata.userDataModels.UserDataResponse
|
||||
import com.woka.networking.ApiResponse
|
||||
import okhttp3.FormBody
|
||||
@@ -21,4 +23,10 @@ interface UserApiService {
|
||||
|
||||
@GET("user_deactivate_account")
|
||||
suspend fun deActivateAccount(): Response<ApiResponse<Any>>
|
||||
|
||||
@GET("get_user_notifications")
|
||||
suspend fun getNotifications(): Response<ApiResponse<List<NotificationData>>>
|
||||
|
||||
@POST("favourite_listing")
|
||||
suspend fun getMyFavList(): Response<ApiResponse<MyListResponse>>
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.woka.userdata
|
||||
|
||||
import com.woka.home.mylist.models.MyListResponse
|
||||
import com.woka.home.notifications.models.NotificationData
|
||||
import com.woka.userdata.userDataModels.UserDataResponse
|
||||
import com.woka.networking.ApiResult
|
||||
import com.woka.networking.RetrofitHelper
|
||||
@@ -39,4 +41,16 @@ object UserRepository {
|
||||
userApiService.deActivateAccount()
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun loadNotifications(): ApiResult<List<NotificationData>>{
|
||||
return handleApiCall {
|
||||
userApiService.getNotifications()
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun loadMyFavList(): ApiResult<MyListResponse>{
|
||||
return handleApiCall {
|
||||
userApiService.getMyFavList()
|
||||
}
|
||||
}
|
||||
}
|
||||
5
app/src/main/res/drawable/ic_heart_not_filled.xml
Normal file
5
app/src/main/res/drawable/ic_heart_not_filled.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:viewportHeight="471.7" android:viewportWidth="471.7" android:width="24dp">
|
||||
|
||||
<path android:fillColor="#000000" android:pathData="M433.6,67c-24.7,-24.7 -57.4,-38.2 -92.3,-38.2s-67.7,13.6 -92.4,38.3l-12.9,12.9l-13.1,-13.1c-24.7,-24.7 -57.6,-38.4 -92.5,-38.4c-34.8,0 -67.6,13.6 -92.2,38.2c-24.7,24.7 -38.3,57.5 -38.2,92.4c0,34.9 13.7,67.6 38.4,92.3l187.8,187.8c2.6,2.6 6.1,4 9.5,4c3.4,0 6.9,-1.3 9.5,-3.9l188.2,-187.5c24.7,-24.7 38.3,-57.5 38.3,-92.4C471.8,124.5 458.3,91.7 433.6,67zM414.4,232.7l-178.7,178l-178.3,-178.3c-19.6,-19.6 -30.4,-45.6 -30.4,-73.3s10.7,-53.7 30.3,-73.2c19.5,-19.5 45.5,-30.3 73.1,-30.3c27.7,0 53.8,10.8 73.4,30.4l22.6,22.6c5.3,5.3 13.8,5.3 19.1,0l22.4,-22.4c19.6,-19.6 45.7,-30.4 73.3,-30.4c27.6,0 53.6,10.8 73.2,30.3c19.6,19.6 30.3,45.6 30.3,73.3C444.8,187.1 434,213.1 414.4,232.7z"/>
|
||||
|
||||
</vector>
|
||||
11
app/src/main/res/drawable/ic_heart_select.xml
Normal file
11
app/src/main/res/drawable/ic_heart_select.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_selected="true"
|
||||
android:drawable="@drawable/ic_heart_filled"/>
|
||||
|
||||
<item android:state_selected="false"
|
||||
android:drawable="@drawable/ic_heart_not_filled"
|
||||
/>
|
||||
|
||||
</selector>
|
||||
44
app/src/main/res/layout/activity_fmactivity.xml
Normal file
44
app/src/main/res/layout/activity_fmactivity.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?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:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/black_50"
|
||||
tools:context=".home.FMActivity">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_30sdp"
|
||||
android:layout_height="@dimen/_30sdp"
|
||||
|
||||
android:contentDescription="@string/image"
|
||||
android:src="@drawable/ic_close_filled"
|
||||
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/g1"
|
||||
|
||||
android:layout_margin="10dp"
|
||||
|
||||
app:tint="@color/white" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/g1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.6"
|
||||
/>
|
||||
|
||||
<WebView
|
||||
android:id="@+id/web_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/g1"
|
||||
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -11,7 +11,7 @@
|
||||
<ImageView
|
||||
android:id="@+id/back_btn"
|
||||
android:layout_width="@dimen/_27sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
android:layout_height= "@dimen/_25sdp"
|
||||
android:contentDescription="@string/back_btn"
|
||||
android:src="@drawable/ic_arrow_back_full"
|
||||
android:scaleType="fitXY"
|
||||
@@ -44,18 +44,102 @@
|
||||
|
||||
/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
|
||||
android:visibility="gone"
|
||||
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
app:layout_constraintTop_toBottomOf="@id/back_btn"
|
||||
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_marginTop="25dp"
|
||||
|
||||
android:indeterminateTint="@color/white"
|
||||
android:indeterminate="true"
|
||||
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_notifications"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
|
||||
android:visibility="visible"
|
||||
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/notification_view_holder"
|
||||
|
||||
android:layout_marginTop="10dp"
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/progress_bar"
|
||||
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/error_view"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
|
||||
android:gravity="center"
|
||||
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/back_btn"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/something_went_wrong"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/retry"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/retry"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/white"
|
||||
android:textAllCaps="false"
|
||||
|
||||
android:background="@drawable/grad_btn_bg_4"
|
||||
|
||||
android:layout_marginTop="10dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_data"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/no_notifications_found"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/back_btn"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
/>
|
||||
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
|
||||
app:cardElevation="3dp"
|
||||
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="5dp">
|
||||
|
||||
|
||||
74
app/src/main/res/layout/fav_view_holder.xml
Normal file
74
app/src/main/res/layout/fav_view_holder.xml
Normal file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardBackgroundColor="@color/white">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="@dimen/_200sdp"
|
||||
android:layout_height="@dimen/_120sdp"
|
||||
android:contentDescription="@string/image"
|
||||
android:src="@android:color/darker_gray"
|
||||
android:scaleType="fitXY"
|
||||
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
tools:text="Woka title of show"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
|
||||
app:layout_constraintTop_toBottomOf="@id/image"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/fav"
|
||||
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fav"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="16dp"
|
||||
android:contentDescription="@string/image"
|
||||
android:src="@drawable/ic_heart_select"
|
||||
android:scaleType="fitXY"
|
||||
app:tint="@color/color_primary"
|
||||
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/image"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
android:layout_marginTop="8dp"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
@@ -1,16 +1,249 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/holo_blue_bright"
|
||||
tools:context=".home.fragments.Home1Fragment">
|
||||
android:background="#D3EFF8"
|
||||
tools:context=".shop.MyOrdersActivity">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_btn"
|
||||
android:layout_width="@dimen/_27sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
android:contentDescription="@string/back_btn"
|
||||
android:src="@drawable/ic_arrow_back_full"
|
||||
android:scaleType="fitXY"
|
||||
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
android:translationZ="1dp"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="20dp"
|
||||
|
||||
app:tint="@color/color_primary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Home"
|
||||
android:layout_centerInParent="true"
|
||||
android:translationZ="1dp"
|
||||
|
||||
android:text="@string/favorites"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_13ssp"
|
||||
|
||||
android:layout_marginStart="10dp"
|
||||
|
||||
app:layout_constraintStart_toEndOf="@id/back_btn"
|
||||
app:layout_constraintTop_toTopOf="@id/back_btn"
|
||||
app:layout_constraintBottom_toBottomOf="@id/back_btn"
|
||||
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/g1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.7"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:contentDescription="@string/image"
|
||||
android:src="@drawable/img_my_orders_ng"
|
||||
android:scaleType="fitXY"
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/g1"
|
||||
/>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/back_btn"
|
||||
|
||||
android:layout_marginTop="25dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/web_series_english_view"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/web_series_english"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_web_series_english"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="0dp"
|
||||
tools:listitem="@layout/fav_view_holder" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/web_series_hindi_view"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/web_series_hindi"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_web_series_hindi"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="0dp"
|
||||
tools:listitem="@layout/fav_view_holder"
|
||||
android:orientation="horizontal"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/audio_books_view"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/audio_books"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_audio_books"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="0dp"
|
||||
tools:listitem="@layout/fav_view_holder"
|
||||
android:orientation="horizontal"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/karaoke_view"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/karaoke"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_karaoke"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="0dp"
|
||||
tools:listitem="@layout/fav_view_holder"
|
||||
android:orientation="horizontal"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/games_view"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/games"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_games"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="0dp"
|
||||
tools:listitem="@layout/fav_view_holder"
|
||||
android:orientation="horizontal"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -19,4 +19,5 @@
|
||||
<color name="night_status">#443682</color>
|
||||
|
||||
<color name="more_bg">#cbe16f</color>
|
||||
<color name="orders_bg">#D3EFF8</color>
|
||||
</resources>
|
||||
@@ -166,4 +166,9 @@
|
||||
<string name="_00_00">00:00</string>
|
||||
<string name="slash">/</string>
|
||||
<string name="notifications">Notifications</string>
|
||||
<string name="retry">Retry</string>
|
||||
<string name="no_notifications_found">No notifications found</string>
|
||||
<string name="favorites">Favorites</string>
|
||||
<string name="web_series_hindi">WEB SERIES (HINDI)</string>
|
||||
<string name="web_series_english">WEB SERIES (ENGLISH)</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user