Created bottom sheet for tracking order: Ui, integrated api, inflated data.
This commit is contained in:
@@ -51,6 +51,7 @@ import com.woka.players.views.PlayerActivity
|
||||
import com.woka.userPreference.UserType
|
||||
import com.woka.utils.hide
|
||||
import com.woka.utils.isNetworkConnected
|
||||
import com.woka.utils.setVisibility
|
||||
import com.woka.utils.show
|
||||
import com.woka.utils.toast
|
||||
import com.woka.webseries.models.ShowData
|
||||
@@ -255,6 +256,8 @@ class MyListFragment : Fragment() {
|
||||
webSeriesEnglishView.show()
|
||||
dataLoaded = true
|
||||
webSeriesEAdapter.submitList(engList.reversed())
|
||||
|
||||
webSeriesEngViewAll.setVisibility(engList.size >= 3)
|
||||
}else{
|
||||
webSeriesEnglishView.hide()
|
||||
}
|
||||
@@ -263,6 +266,8 @@ class MyListFragment : Fragment() {
|
||||
webSeriesHindiView.show()
|
||||
dataLoaded = true
|
||||
webSeriesHAdapter.submitList(hinList.reversed())
|
||||
|
||||
webSeriesHinViewAll.setVisibility(hinList.size >= 3)
|
||||
}else{
|
||||
webSeriesHindiView.hide()
|
||||
}
|
||||
@@ -280,6 +285,8 @@ class MyListFragment : Fragment() {
|
||||
|
||||
dataLoaded = true
|
||||
audioBooksAdapter.submitList(audioData.reversed())
|
||||
|
||||
audioBooksViewAll.setVisibility(audioData.size >= 3)
|
||||
}else{
|
||||
audioBooksView.hide()
|
||||
}
|
||||
@@ -292,6 +299,7 @@ class MyListFragment : Fragment() {
|
||||
|
||||
dataLoaded = true
|
||||
karaokeAdapter.submitList(singKaraokeData.reversed())
|
||||
karaokeViewAll.setVisibility(singKaraokeData.size >= 3)
|
||||
}else{
|
||||
karaokeView.hide()
|
||||
}
|
||||
@@ -303,6 +311,7 @@ class MyListFragment : Fragment() {
|
||||
|
||||
dataLoaded = true
|
||||
gamesAdapter.submitList(gamesData.reversed())
|
||||
gamesViewAll.setVisibility(gamesData.size >= 3)
|
||||
}else{
|
||||
gamesView.hide()
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ class KaraokeActivity : WokaBaseActivity() {
|
||||
}
|
||||
|
||||
like.setOnClickListener {
|
||||
if (isNetworkConnected()){
|
||||
if (!isNetworkConnected()){
|
||||
toast(getString(R.string.no_internet))
|
||||
return@setOnClickListener
|
||||
}
|
||||
@@ -299,7 +299,7 @@ class KaraokeActivity : WokaBaseActivity() {
|
||||
}
|
||||
|
||||
fav.setOnClickListener {
|
||||
if (isNetworkConnected()){
|
||||
if (!isNetworkConnected()){
|
||||
toast(getString(R.string.no_internet))
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
61
app/src/main/java/com/woka/shop/adapters/OrderScanAdapter.kt
Normal file
61
app/src/main/java/com/woka/shop/adapters/OrderScanAdapter.kt
Normal file
@@ -0,0 +1,61 @@
|
||||
package com.woka.shop.adapters
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.recyclerview.widget.RecyclerView.ViewHolder
|
||||
import com.woka.databinding.OrderTrackViewHolderBinding
|
||||
import com.woka.shop.models.ordertrack.ScanDetail
|
||||
import com.woka.utils.convertTimeFormat
|
||||
import com.woka.utils.setVisibility
|
||||
|
||||
class OrderScanAdapter: RecyclerView.Adapter<OrderScanAdapter.OrderTrackViewHolder>(){
|
||||
|
||||
private val orderTrackList = mutableListOf<ScanDetail>()
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
fun submitOrderTrack(list: List<ScanDetail>){
|
||||
orderTrackList.clear()
|
||||
orderTrackList.addAll(list)
|
||||
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
fun clearCurrentData(){
|
||||
orderTrackList.clear()
|
||||
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
inner class OrderTrackViewHolder(val binding: OrderTrackViewHolderBinding): ViewHolder(binding.root)
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): OrderTrackViewHolder {
|
||||
return OrderTrackViewHolder(
|
||||
OrderTrackViewHolderBinding.inflate(
|
||||
LayoutInflater.from(parent.context),
|
||||
parent,
|
||||
false
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = orderTrackList.size
|
||||
|
||||
override fun onBindViewHolder(holder: OrderTrackViewHolder, position: Int) {
|
||||
val scanDetail = orderTrackList[holder.absoluteAdapterPosition]
|
||||
|
||||
holder.binding.apply {
|
||||
date.text = scanDetail.updated_date?.convertTimeFormat("yyyy-MM-dd HH:mm:ss", "dd/MM")?:"NA"
|
||||
time.text = scanDetail.updated_date?.convertTimeFormat("yyyy-MM-dd HH:mm:ss", "hh:mm a")?:"NA"
|
||||
|
||||
statusTitle.text = if (scanDetail.remarks != null) "Order ${scanDetail.remarks}" else "NA"
|
||||
scanDetail.location?.let {location ->
|
||||
"Arrived at $location".also { statusSubtitle.text = it }
|
||||
}
|
||||
|
||||
lineView.setVisibility(holder.absoluteAdapterPosition != orderTrackList.size -1)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import androidx.recyclerview.widget.ListAdapter
|
||||
import androidx.recyclerview.widget.RecyclerView.ViewHolder
|
||||
import com.woka.databinding.OrdersViewHolderBinding
|
||||
import com.woka.shop.models.orders.OrderData
|
||||
import com.woka.utils.convertTimeFormat
|
||||
import java.util.concurrent.Executors
|
||||
|
||||
class OrdersAdapter: ListAdapter<OrderData, OrdersAdapter.OrderViewHolder>(ASYNC_DIFF_UTIL){
|
||||
@@ -25,6 +26,8 @@ class OrdersAdapter: ListAdapter<OrderData, OrdersAdapter.OrderViewHolder>(ASYNC
|
||||
|
||||
inner class OrderViewHolder(val binding: OrdersViewHolderBinding): ViewHolder(binding.root)
|
||||
|
||||
var orderTrackClickListener: ((OrderData) -> Unit)? = null
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): OrderViewHolder {
|
||||
return OrderViewHolder(
|
||||
OrdersViewHolderBinding.inflate(
|
||||
@@ -41,20 +44,21 @@ class OrdersAdapter: ListAdapter<OrderData, OrdersAdapter.OrderViewHolder>(ASYNC
|
||||
holder.binding.apply {
|
||||
orderId.text = "${order.order_id}"
|
||||
|
||||
val priceVal = "INR ${order.grand_total}"
|
||||
val priceVal = "INR ${order.grand_total?:"NA"}"
|
||||
price.text = priceVal
|
||||
|
||||
val orderedDate = try {
|
||||
order.order_booked_date_time?.split(" ")?.first()
|
||||
}catch (e: Exception){
|
||||
order.order_booked_date_time
|
||||
|
||||
placedOn.text = order.order_booked_date_time?.convertTimeFormat("yyyy-MM-dd hh:mm:ss", "dd/MM/yyyy")?:"NA"
|
||||
|
||||
airwayBillNo.text = "${order.airwaybilno?:"NA"}"
|
||||
|
||||
courier.text = "${order.courier?:"NA"}"
|
||||
|
||||
trackBtn.setOnClickListener {
|
||||
order?.let {
|
||||
orderTrackClickListener?.invoke(it)
|
||||
}
|
||||
}
|
||||
|
||||
placedOn.text = "$orderedDate"
|
||||
|
||||
airwayBillNo.text = "${order.airwaybilno}"
|
||||
|
||||
courier.text = "${order.courier}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,15 +61,13 @@ class OrdersViewModel: ViewModel() {
|
||||
}
|
||||
}
|
||||
|
||||
private val _orderTrackingLiveData = MutableLiveData<ApiResult<MutableList<OrderData>>>()
|
||||
val orderTrackingLiveData: LiveData<ApiResult<MutableList<OrderData>>>
|
||||
get() = _orderTrackingLiveData
|
||||
|
||||
private val orderTrackingMap = HashMap<String, OrderTrack>()
|
||||
|
||||
suspend fun trackOrder(orderId: String): ApiResult.Success<OrderTrack> {
|
||||
if (orderTrackingMap.containsKey(orderId)){
|
||||
return ApiResult.Success(orderTrackingMap[orderId])
|
||||
suspend fun trackOrder(orderId: String): ApiResult<OrderTrack> {
|
||||
return when (val response = repository.orderTracking(orderId)){
|
||||
is ApiResult.Error -> {ApiResult.Error(response.errorMessage, response.error)}
|
||||
is ApiResult.Loading -> {ApiResult.Loading()}
|
||||
is ApiResult.Success -> {
|
||||
ApiResult.Success(response.data?.result?.firstOrNull())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,28 +6,40 @@ import androidx.activity.enableEdgeToEdge
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog
|
||||
import com.woka.R
|
||||
import com.woka.WokaApp
|
||||
import com.woka.databinding.ActivityMyOrdersBinding
|
||||
import com.woka.databinding.BsOrderTrackingBinding
|
||||
import com.woka.networking.ApiResult
|
||||
import com.woka.shop.adapters.OrderScanAdapter
|
||||
import com.woka.shop.adapters.OrdersAdapter
|
||||
import com.woka.shop.models.orders.OrderData
|
||||
import com.woka.shop.viewmodels.OrdersViewModel
|
||||
import com.woka.userPreference.UserType
|
||||
import com.woka.utils.NoSignInDialog
|
||||
import com.woka.utils.WokaBaseActivity
|
||||
import com.woka.utils.convertTimeFormat
|
||||
import com.woka.utils.hide
|
||||
import com.woka.utils.lightStatusBar
|
||||
import com.woka.utils.setVisibility
|
||||
import com.woka.utils.show
|
||||
import com.woka.utils.toast
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
class MyOrdersActivity : WokaBaseActivity() {
|
||||
|
||||
private lateinit var binding: ActivityMyOrdersBinding
|
||||
private lateinit var viewModel: OrdersViewModel
|
||||
|
||||
private lateinit var bsOrderTrackDialog: BottomSheetDialog
|
||||
private lateinit var bsBinding: BsOrderTrackingBinding
|
||||
|
||||
private lateinit var noSignInDialog: NoSignInDialog
|
||||
|
||||
private lateinit var adapter: OrdersAdapter
|
||||
private lateinit var orderTrackAdapter: OrderScanAdapter
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
@@ -43,9 +55,16 @@ class MyOrdersActivity : WokaBaseActivity() {
|
||||
viewModel = ViewModelProvider(this)[OrdersViewModel::class.java]
|
||||
noSignInDialog = NoSignInDialog(this)
|
||||
|
||||
// adapters
|
||||
adapter = OrdersAdapter()
|
||||
orderTrackAdapter = OrderScanAdapter()
|
||||
|
||||
window.navigationBarColor = getColor(R.color.my_orders_img_color)
|
||||
// order tracking dialog init
|
||||
bsBinding = BsOrderTrackingBinding.inflate(layoutInflater)
|
||||
bsOrderTrackDialog = BottomSheetDialog(this, R.style.BottomSheetDialog)
|
||||
bsOrderTrackDialog.setContentView(bsBinding.root)
|
||||
|
||||
window.navigationBarColor = getColor(R.color.black)
|
||||
window.lightStatusBar(true)
|
||||
|
||||
initViews()
|
||||
@@ -62,6 +81,7 @@ class MyOrdersActivity : WokaBaseActivity() {
|
||||
private fun initViews(){
|
||||
binding.apply {
|
||||
rvOrders.adapter = adapter
|
||||
bsBinding.rvOrderTrack.adapter = orderTrackAdapter
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,6 +102,55 @@ class MyOrdersActivity : WokaBaseActivity() {
|
||||
loadMoreBtn.setOnClickListener {
|
||||
viewModel.loadOrders()
|
||||
}
|
||||
|
||||
adapter.orderTrackClickListener = {
|
||||
showOrderTrackingDialog(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showOrderTrackingDialog(orderData: OrderData){
|
||||
lifecycleScope.launch {
|
||||
bsBinding.apply {
|
||||
|
||||
orderTrackAdapter.clearCurrentData()
|
||||
|
||||
dataView.hide()
|
||||
rvOrderTrack.hide()
|
||||
shimmer.show()
|
||||
|
||||
bsOrderTrackDialog.show()
|
||||
|
||||
orderData.order_id?.let {
|
||||
when (val response = viewModel.trackOrder(it)){
|
||||
is ApiResult.Error -> {
|
||||
toast(response.errorMessage)
|
||||
bsOrderTrackDialog.dismiss()
|
||||
}
|
||||
is ApiResult.Loading -> {}
|
||||
is ApiResult.Success -> {
|
||||
response.data?.let {trackingData ->
|
||||
|
||||
val orderIdVal = "Order ID : ${trackingData.orderno?:"NA"}"
|
||||
orderId.text = orderIdVal
|
||||
|
||||
airwayBillNo.text = trackingData.awbno?:"NA"
|
||||
deliveryStatus.text = trackingData.shipment_latest_status?:"NA"
|
||||
expectedDelivery.text = trackingData.edd?.convertTimeFormat("yyyy-MM-dd", "dd/MM/yyyy")?:"NA"
|
||||
|
||||
shimmer.hide()
|
||||
dataView.show()
|
||||
|
||||
trackingData.scan_detail?.filterNotNull()?.let {scanList ->
|
||||
orderTrackAdapter.submitOrderTrack(scanList)
|
||||
rvOrderTrack.show()
|
||||
rvOrderTrack.smoothScrollToPosition(scanList.size)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,5 +28,5 @@ interface UserApiService {
|
||||
suspend fun getNotifications(): Response<ApiResponse<List<NotificationData>>>
|
||||
|
||||
@POST("favourite_listing")
|
||||
suspend fun getMyFavList(): Response<ApiResponse<MyListResponse>>
|
||||
suspend fun getMyFavList(@Body formBody: FormBody): Response<ApiResponse<MyListResponse>>
|
||||
}
|
||||
@@ -50,7 +50,11 @@ object UserRepository {
|
||||
|
||||
suspend fun loadMyFavList(): ApiResult<MyListResponse>{
|
||||
return handleApiCall {
|
||||
userApiService.getMyFavList()
|
||||
userApiService.getMyFavList(
|
||||
FormBody.Builder()
|
||||
.add("api_version", "v2")
|
||||
.build()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,7 @@ import androidx.fragment.app.Fragment
|
||||
import com.google.i18n.phonenumbers.PhoneNumberUtil
|
||||
import com.google.i18n.phonenumbers.Phonenumber
|
||||
import com.woka.WokaApp.Companion.userPrefs
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
import kotlin.math.ceil
|
||||
|
||||
@@ -99,6 +100,18 @@ fun Long.formatTime(): String {
|
||||
}
|
||||
}
|
||||
|
||||
fun String.convertTimeFormat(fromFormat: String, toFormat: String): String{
|
||||
return try{
|
||||
val sdf1 = SimpleDateFormat(fromFormat, Locale.getDefault())
|
||||
val sdf2 = SimpleDateFormat(toFormat, Locale.getDefault())
|
||||
|
||||
val date = sdf1.parse(this) ?: throw Exception()
|
||||
sdf2.format(date)
|
||||
}catch (e: Exception){
|
||||
this
|
||||
}
|
||||
}
|
||||
|
||||
fun Context.isNetworkConnected(): Boolean {
|
||||
val connectivityManager = getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
|
||||
val network = connectivityManager.activeNetwork ?: return false
|
||||
|
||||
210
app/src/main/res/layout/bs_order_tracking.xml
Normal file
210
app/src/main/res/layout/bs_order_tracking.xml
Normal file
@@ -0,0 +1,210 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:backgroundTint="@color/color_primary"
|
||||
android:background="@drawable/top_round_15_white">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/data_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/order_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
tools:text="Order ID : FJ8924783294293KJJJJFLSJFFJ"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:layout_gravity="center_horizontal"
|
||||
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/airway_bill_number"
|
||||
android:fontFamily="@font/exo_2"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/airway_bill_no"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
tools:text="42948209424"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
android:layout_marginStart="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/status"
|
||||
android:fontFamily="@font/exo_2"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/delivery_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
tools:text="UNDELIVERED"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
android:layout_marginStart="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/expected_date"
|
||||
android:fontFamily="@font/exo_2"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/expected_delivery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
tools:text="02-09-2001"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
android:layout_marginStart="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_order_track"
|
||||
android:visibility="visible"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/order_track_view_holder"
|
||||
tools:itemCount="4"
|
||||
|
||||
android:layout_marginTop="15dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.facebook.shimmer.ShimmerFrameLayout
|
||||
android:id="@+id/shimmer"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="15dp"
|
||||
app:shimmer_auto_start="true"
|
||||
app:shimmer_duration="1500"
|
||||
app:shimmer_highlight_alpha="0.5">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_marginHorizontal="25dp"
|
||||
|
||||
android:background="@drawable/round_25"
|
||||
android:backgroundTint="@android:color/darker_gray"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_marginHorizontal="25dp"
|
||||
|
||||
android:background="@drawable/round_25"
|
||||
android:backgroundTint="@android:color/darker_gray"
|
||||
/>
|
||||
|
||||
<include layout="@layout/order_track_place_holder"/>
|
||||
<include layout="@layout/order_track_place_holder"/>
|
||||
<include layout="@layout/order_track_place_holder"/>
|
||||
<include layout="@layout/order_track_place_holder"/>
|
||||
<include layout="@layout/order_track_place_holder"/>
|
||||
<include layout="@layout/order_track_place_holder"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.facebook.shimmer.ShimmerFrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -97,18 +97,47 @@
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/web_series_eng_txt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
android:text="@string/web_series_english"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
<TextView
|
||||
android:id="@+id/web_series_eng_txt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:text="@string/web_series_english"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
/>
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/web_series_eng_view_all"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/view_all"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
android:backgroundTint="@color/white"
|
||||
android:background="@drawable/round_25"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:paddingHorizontal="13dp"
|
||||
android:paddingVertical="3dp"
|
||||
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_web_series_english"
|
||||
@@ -130,18 +159,47 @@
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/web_series_hin_txt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
android:text="@string/web_series_hindi"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
<TextView
|
||||
android:id="@+id/web_series_hin_txt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:text="@string/web_series_hindi"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
/>
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/web_series_hin_view_all"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/view_all"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
android:backgroundTint="@color/white"
|
||||
android:background="@drawable/round_25"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:paddingHorizontal="13dp"
|
||||
android:paddingVertical="3dp"
|
||||
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_web_series_hindi"
|
||||
@@ -165,18 +223,47 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/audio_books_txt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
android:text="@string/audio_books"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
<TextView
|
||||
android:id="@+id/audio_books_txt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:text="@string/audio_books"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
/>
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/audio_books_view_all"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/view_all"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
android:backgroundTint="@color/white"
|
||||
android:background="@drawable/round_25"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:paddingHorizontal="13dp"
|
||||
android:paddingVertical="3dp"
|
||||
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_audio_books"
|
||||
@@ -199,18 +286,47 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/karaoke_txt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
android:text="@string/karaoke"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
<TextView
|
||||
android:id="@+id/karaoke_txt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:text="@string/karaoke"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
/>
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/karaoke_view_all"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/view_all"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
android:backgroundTint="@color/white"
|
||||
android:background="@drawable/round_25"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:paddingHorizontal="13dp"
|
||||
android:paddingVertical="3dp"
|
||||
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_karaoke"
|
||||
@@ -233,18 +349,47 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/games_txt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
android:text="@string/games"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
<TextView
|
||||
android:id="@+id/games_txt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:text="@string/games"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
/>
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/games_view_all"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/view_all"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
android:backgroundTint="@color/white"
|
||||
android:background="@drawable/round_25"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:paddingHorizontal="13dp"
|
||||
android:paddingVertical="3dp"
|
||||
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_games"
|
||||
|
||||
106
app/src/main/res/layout/order_track_place_holder.xml
Normal file
106
app/src/main/res/layout/order_track_place_holder.xml
Normal file
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginHorizontal="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/time_stamp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:gravity="center_horizontal"
|
||||
>
|
||||
|
||||
<View
|
||||
android:id="@+id/date"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="15dp"
|
||||
|
||||
android:background="@drawable/round_25"
|
||||
android:backgroundTint="@android:color/darker_gray"
|
||||
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/time"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="15dp"
|
||||
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
android:background="@drawable/round_25"
|
||||
android:backgroundTint="@android:color/darker_gray"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/status_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="15dp"
|
||||
|
||||
android:background="@drawable/round_25"
|
||||
android:backgroundTint="@android:color/darker_gray"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/time_stamp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_subtitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="15dp"
|
||||
|
||||
android:background="@drawable/round_25"
|
||||
android:backgroundTint="@android:color/darker_gray"
|
||||
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="120dp"
|
||||
|
||||
app:layout_constraintTop_toBottomOf="@id/status_title"
|
||||
app:layout_constraintStart_toEndOf="@id/time_stamp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
|
||||
android:background="@color/color_primary"
|
||||
|
||||
app:layout_constraintTop_toBottomOf="@id/status_subtitle"
|
||||
app:layout_constraintStart_toStartOf="@id/status_subtitle"
|
||||
app:layout_constraintEnd_toEndOf="@id/status_subtitle"
|
||||
|
||||
android:layout_marginTop="40dp"
|
||||
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="0dp"
|
||||
|
||||
app:layout_constraintTop_toBottomOf="@id/time_stamp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@id/time_stamp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
android:background="@android:color/darker_gray"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
112
app/src/main/res/layout/order_track_view_holder.xml
Normal file
112
app/src/main/res/layout/order_track_view_holder.xml
Normal file
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_marginHorizontal="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/time_stamp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:gravity="center_horizontal"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
tools:text="05/08"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
tools:text="11:42 PM"
|
||||
android:fontFamily="@font/exo_2"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
tools:text="Order online shipment booked"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/time_stamp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_subtitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
tools:text="Arrived at virar"
|
||||
android:fontFamily="@font/exo_2"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
app:layout_constraintTop_toBottomOf="@id/status_title"
|
||||
app:layout_constraintStart_toEndOf="@id/time_stamp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
|
||||
android:background="@color/color_primary"
|
||||
|
||||
app:layout_constraintTop_toBottomOf="@id/status_subtitle"
|
||||
app:layout_constraintStart_toStartOf="@id/status_subtitle"
|
||||
app:layout_constraintEnd_toEndOf="@id/status_subtitle"
|
||||
|
||||
android:layout_marginTop="40dp"
|
||||
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/line_view"
|
||||
android:visibility="visible"
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="0dp"
|
||||
|
||||
app:layout_constraintTop_toBottomOf="@id/time_stamp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@id/time_stamp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
android:background="@android:color/holo_green_dark"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -6,4 +6,14 @@
|
||||
<item name="android:textCursorDrawable">@drawable/cursor_drawable</item>
|
||||
<item name="android:windowDisablePreview">true</item>
|
||||
</style>
|
||||
|
||||
<!-- top corner rounded bottom sheet-->
|
||||
<style name="BottomSheetDialog" parent="Theme.Design.Light.BottomSheetDialog">
|
||||
<item name="bottomSheetStyle">@style/bottomSheetStyleWrapper</item>
|
||||
<item name="marginHorizontal">50dp</item>
|
||||
</style>
|
||||
|
||||
<style name="bottomSheetStyleWrapper" parent="Widget.Design.BottomSheet.Modal">
|
||||
<item name="android:background">@android:color/transparent</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -293,4 +293,8 @@
|
||||
<string name="courier">COURIER</string>
|
||||
<string name="track">TRACK</string>
|
||||
<string name="no_orders_found">No orders found</string>
|
||||
<string name="airway_bill_number">AIRWAY BILL NUMBER:</string>
|
||||
<string name="status">Status:</string>
|
||||
<string name="expected_date">Expected Date:</string>
|
||||
<string name="view_all">VIEW ALL</string>
|
||||
</resources>
|
||||
@@ -40,5 +40,15 @@
|
||||
<item name="android:windowBackground">@color/black</item>
|
||||
</style>
|
||||
|
||||
<!-- top corner rounded bottom sheet-->
|
||||
<style name="BottomSheetDialog" parent="Theme.Design.Light.BottomSheetDialog">
|
||||
<item name="bottomSheetStyle">@style/bottomSheetStyleWrapper</item>
|
||||
<item name="marginHorizontal">50dp</item>
|
||||
</style>
|
||||
|
||||
<style name="bottomSheetStyleWrapper" parent="Widget.Design.BottomSheet.Modal">
|
||||
<item name="android:background">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Woka" parent="Base.Theme.Woka" />
|
||||
</resources>
|
||||
Reference in New Issue
Block a user