mirror of
https://github.com/shaulascr/ecommerce_serang.git
synced 2025-08-13 10:42:21 +00:00
sells fragment
This commit is contained in:
@ -3,7 +3,6 @@ package com.alya.ecommerce_serang.ui.profile.mystore.sells
|
|||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import com.alya.ecommerce_serang.R
|
import com.alya.ecommerce_serang.R
|
||||||
import com.alya.ecommerce_serang.ui.profile.mystore.sells.main.SellsFragment
|
|
||||||
|
|
||||||
class SellsActivity : AppCompatActivity() {
|
class SellsActivity : AppCompatActivity() {
|
||||||
|
|
||||||
@ -12,8 +11,8 @@ class SellsActivity : AppCompatActivity() {
|
|||||||
setContentView(R.layout.activity_sells)
|
setContentView(R.layout.activity_sells)
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
supportFragmentManager.beginTransaction()
|
supportFragmentManager.beginTransaction()
|
||||||
.replace(R.id.sells_fragment_container, SellsFragment.newInstance())
|
.replace(R.id.sells_fragment_container, SellsFragment())
|
||||||
.commitNow()
|
.commit()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.sells
|
||||||
|
|
||||||
|
import androidx.lifecycle.ViewModelProvider
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.viewpager2.widget.ViewPager2
|
||||||
|
|
||||||
|
import com.google.android.material.tabs.TabLayoutMediator
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
|
class SellsFragment : Fragment() {
|
||||||
|
private lateinit var viewModel: SellsViewModel
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
return inflater.inflate(R.layout.fragment_sells, container, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
viewModel = ViewModelProvider(this).get(SellsViewModel::class.java)
|
||||||
|
|
||||||
|
val tabs = listOf(
|
||||||
|
"Semua Pesanan", "Perlu Tagihan", "Konfirmasi Pembayaran",
|
||||||
|
"Perlu Dikirim", "Dikirim", "Selesai",
|
||||||
|
"Pembatalan", "Klaim Pembayaran", "Pengiriman Gagal"
|
||||||
|
)
|
||||||
|
|
||||||
|
val adapter = SellsPagerAdapter(this, tabs.size)
|
||||||
|
val viewPager: ViewPager2 = view.findViewById(R.id.view_pager_sells)
|
||||||
|
viewPager.adapter = adapter
|
||||||
|
|
||||||
|
TabLayoutMediator(view.findViewById(R.id.tab_layout_sells), viewPager) { tab, position ->
|
||||||
|
tab.text = tabs[position]
|
||||||
|
}.attach()
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.sells
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.all_sells.AllSellsFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.cancellation.CancellationFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.failed_payment.FailedPaymentFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.failed_shipment.FailedShipmentFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.finished.FinishedFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.order.OrderFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.payment.PaymentFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.shipment.ShipmentFragment
|
||||||
|
import com.alya.ecommerce_serang.ui.profile.mystore.sells.shipped.ShippedFragment
|
||||||
|
|
||||||
|
class SellsPagerAdapter(fragment: Fragment, private val itemCount: Int) :
|
||||||
|
FragmentStateAdapter(fragment) {
|
||||||
|
|
||||||
|
override fun getItemCount(): Int = itemCount
|
||||||
|
|
||||||
|
override fun createFragment(position: Int): Fragment {
|
||||||
|
return when (position) {
|
||||||
|
0 -> AllSellsFragment()
|
||||||
|
1 -> OrderFragment()
|
||||||
|
2 -> PaymentFragment()
|
||||||
|
3 -> ShipmentFragment()
|
||||||
|
4 -> ShippedFragment()
|
||||||
|
5 -> FinishedFragment()
|
||||||
|
6 -> CancellationFragment()
|
||||||
|
7 -> FailedPaymentFragment()
|
||||||
|
8 -> FailedShipmentFragment()
|
||||||
|
else -> Fragment()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.alya.ecommerce_serang.ui.profile.mystore.sells.main
|
package com.alya.ecommerce_serang.ui.profile.mystore.sells
|
||||||
|
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
|
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.profile.mystore.sells.all_sells
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
|
class AllSellsFragment : Fragment() {
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
return inflater.inflate(R.layout.fragment_all_sells, container, false)
|
||||||
|
}
|
||||||
|
}
|
@ -7,29 +7,7 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import com.alya.ecommerce_serang.R
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
// TODO: Rename parameter arguments, choose names that match
|
|
||||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
|
||||||
private const val ARG_PARAM1 = "param1"
|
|
||||||
private const val ARG_PARAM2 = "param2"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A simple [Fragment] subclass.
|
|
||||||
* Use the [CancellationFragment.newInstance] factory method to
|
|
||||||
* create an instance of this fragment.
|
|
||||||
*/
|
|
||||||
class CancellationFragment : Fragment() {
|
class CancellationFragment : Fragment() {
|
||||||
// TODO: Rename and change types of parameters
|
|
||||||
private var param1: String? = null
|
|
||||||
private var param2: String? = null
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
arguments?.let {
|
|
||||||
param1 = it.getString(ARG_PARAM1)
|
|
||||||
param2 = it.getString(ARG_PARAM2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
@ -37,24 +15,4 @@ class CancellationFragment : Fragment() {
|
|||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
return inflater.inflate(R.layout.fragment_cancellation, container, false)
|
return inflater.inflate(R.layout.fragment_cancellation, container, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
|
||||||
/**
|
|
||||||
* Use this factory method to create a new instance of
|
|
||||||
* this fragment using the provided parameters.
|
|
||||||
*
|
|
||||||
* @param param1 Parameter 1.
|
|
||||||
* @param param2 Parameter 2.
|
|
||||||
* @return A new instance of fragment CancellationFragment.
|
|
||||||
*/
|
|
||||||
// TODO: Rename and change types and number of parameters
|
|
||||||
@JvmStatic
|
|
||||||
fun newInstance(param1: String, param2: String) =
|
|
||||||
CancellationFragment().apply {
|
|
||||||
arguments = Bundle().apply {
|
|
||||||
putString(ARG_PARAM1, param1)
|
|
||||||
putString(ARG_PARAM2, param2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -8,29 +8,7 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import com.alya.ecommerce_serang.R
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
// TODO: Rename parameter arguments, choose names that match
|
|
||||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
|
||||||
private const val ARG_PARAM1 = "param1"
|
|
||||||
private const val ARG_PARAM2 = "param2"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A simple [Fragment] subclass.
|
|
||||||
* Use the [FailedPaymentFragment.newInstance] factory method to
|
|
||||||
* create an instance of this fragment.
|
|
||||||
*/
|
|
||||||
class FailedPaymentFragment : Fragment() {
|
class FailedPaymentFragment : Fragment() {
|
||||||
// TODO: Rename and change types of parameters
|
|
||||||
private var param1: String? = null
|
|
||||||
private var param2: String? = null
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
arguments?.let {
|
|
||||||
param1 = it.getString(ARG_PARAM1)
|
|
||||||
param2 = it.getString(ARG_PARAM2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
@ -38,24 +16,4 @@ class FailedPaymentFragment : Fragment() {
|
|||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
return inflater.inflate(R.layout.fragment_failed_payment, container, false)
|
return inflater.inflate(R.layout.fragment_failed_payment, container, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
|
||||||
/**
|
|
||||||
* Use this factory method to create a new instance of
|
|
||||||
* this fragment using the provided parameters.
|
|
||||||
*
|
|
||||||
* @param param1 Parameter 1.
|
|
||||||
* @param param2 Parameter 2.
|
|
||||||
* @return A new instance of fragment FailedPaymentFragment.
|
|
||||||
*/
|
|
||||||
// TODO: Rename and change types and number of parameters
|
|
||||||
@JvmStatic
|
|
||||||
fun newInstance(param1: String, param2: String) =
|
|
||||||
FailedPaymentFragment().apply {
|
|
||||||
arguments = Bundle().apply {
|
|
||||||
putString(ARG_PARAM1, param1)
|
|
||||||
putString(ARG_PARAM2, param2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -7,29 +7,7 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import com.alya.ecommerce_serang.R
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
// TODO: Rename parameter arguments, choose names that match
|
|
||||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
|
||||||
private const val ARG_PARAM1 = "param1"
|
|
||||||
private const val ARG_PARAM2 = "param2"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A simple [Fragment] subclass.
|
|
||||||
* Use the [FailedShipmentFragment.newInstance] factory method to
|
|
||||||
* create an instance of this fragment.
|
|
||||||
*/
|
|
||||||
class FailedShipmentFragment : Fragment() {
|
class FailedShipmentFragment : Fragment() {
|
||||||
// TODO: Rename and change types of parameters
|
|
||||||
private var param1: String? = null
|
|
||||||
private var param2: String? = null
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
arguments?.let {
|
|
||||||
param1 = it.getString(ARG_PARAM1)
|
|
||||||
param2 = it.getString(ARG_PARAM2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
@ -37,24 +15,4 @@ class FailedShipmentFragment : Fragment() {
|
|||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
return inflater.inflate(R.layout.fragment_failed_shipment, container, false)
|
return inflater.inflate(R.layout.fragment_failed_shipment, container, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
|
||||||
/**
|
|
||||||
* Use this factory method to create a new instance of
|
|
||||||
* this fragment using the provided parameters.
|
|
||||||
*
|
|
||||||
* @param param1 Parameter 1.
|
|
||||||
* @param param2 Parameter 2.
|
|
||||||
* @return A new instance of fragment FailedShipmentFragment.
|
|
||||||
*/
|
|
||||||
// TODO: Rename and change types and number of parameters
|
|
||||||
@JvmStatic
|
|
||||||
fun newInstance(param1: String, param2: String) =
|
|
||||||
FailedShipmentFragment().apply {
|
|
||||||
arguments = Bundle().apply {
|
|
||||||
putString(ARG_PARAM1, param1)
|
|
||||||
putString(ARG_PARAM2, param2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -7,29 +7,7 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import com.alya.ecommerce_serang.R
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
// TODO: Rename parameter arguments, choose names that match
|
|
||||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
|
||||||
private const val ARG_PARAM1 = "param1"
|
|
||||||
private const val ARG_PARAM2 = "param2"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A simple [Fragment] subclass.
|
|
||||||
* Use the [FinishedFragment.newInstance] factory method to
|
|
||||||
* create an instance of this fragment.
|
|
||||||
*/
|
|
||||||
class FinishedFragment : Fragment() {
|
class FinishedFragment : Fragment() {
|
||||||
// TODO: Rename and change types of parameters
|
|
||||||
private var param1: String? = null
|
|
||||||
private var param2: String? = null
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
arguments?.let {
|
|
||||||
param1 = it.getString(ARG_PARAM1)
|
|
||||||
param2 = it.getString(ARG_PARAM2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
@ -37,24 +15,4 @@ class FinishedFragment : Fragment() {
|
|||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
return inflater.inflate(R.layout.fragment_finished, container, false)
|
return inflater.inflate(R.layout.fragment_finished, container, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
|
||||||
/**
|
|
||||||
* Use this factory method to create a new instance of
|
|
||||||
* this fragment using the provided parameters.
|
|
||||||
*
|
|
||||||
* @param param1 Parameter 1.
|
|
||||||
* @param param2 Parameter 2.
|
|
||||||
* @return A new instance of fragment FinishedFragment.
|
|
||||||
*/
|
|
||||||
// TODO: Rename and change types and number of parameters
|
|
||||||
@JvmStatic
|
|
||||||
fun newInstance(param1: String, param2: String) =
|
|
||||||
FinishedFragment().apply {
|
|
||||||
arguments = Bundle().apply {
|
|
||||||
putString(ARG_PARAM1, param1)
|
|
||||||
putString(ARG_PARAM2, param2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,60 +0,0 @@
|
|||||||
package com.alya.ecommerce_serang.ui.profile.mystore.sells.main
|
|
||||||
|
|
||||||
import android.os.Bundle
|
|
||||||
import androidx.fragment.app.Fragment
|
|
||||||
import android.view.LayoutInflater
|
|
||||||
import android.view.View
|
|
||||||
import android.view.ViewGroup
|
|
||||||
import com.alya.ecommerce_serang.R
|
|
||||||
|
|
||||||
// TODO: Rename parameter arguments, choose names that match
|
|
||||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
|
||||||
private const val ARG_PARAM1 = "param1"
|
|
||||||
private const val ARG_PARAM2 = "param2"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A simple [Fragment] subclass.
|
|
||||||
* Use the [AllSellsFragment.newInstance] factory method to
|
|
||||||
* create an instance of this fragment.
|
|
||||||
*/
|
|
||||||
class AllSellsFragment : Fragment() {
|
|
||||||
// TODO: Rename and change types of parameters
|
|
||||||
private var param1: String? = null
|
|
||||||
private var param2: String? = null
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
arguments?.let {
|
|
||||||
param1 = it.getString(ARG_PARAM1)
|
|
||||||
param2 = it.getString(ARG_PARAM2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateView(
|
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
|
||||||
savedInstanceState: Bundle?
|
|
||||||
): View? {
|
|
||||||
// Inflate the layout for this fragment
|
|
||||||
return inflater.inflate(R.layout.fragment_all_sells, container, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
/**
|
|
||||||
* Use this factory method to create a new instance of
|
|
||||||
* this fragment using the provided parameters.
|
|
||||||
*
|
|
||||||
* @param param1 Parameter 1.
|
|
||||||
* @param param2 Parameter 2.
|
|
||||||
* @return A new instance of fragment SemuaPesananFragment.
|
|
||||||
*/
|
|
||||||
// TODO: Rename and change types and number of parameters
|
|
||||||
@JvmStatic
|
|
||||||
fun newInstance(param1: String, param2: String) =
|
|
||||||
AllSellsFragment().apply {
|
|
||||||
arguments = Bundle().apply {
|
|
||||||
putString(ARG_PARAM1, param1)
|
|
||||||
putString(ARG_PARAM2, param2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
package com.alya.ecommerce_serang.ui.profile.mystore.sells.main
|
|
||||||
|
|
||||||
import androidx.fragment.app.viewModels
|
|
||||||
import android.os.Bundle
|
|
||||||
import androidx.fragment.app.Fragment
|
|
||||||
import android.view.LayoutInflater
|
|
||||||
import android.view.View
|
|
||||||
import android.view.ViewGroup
|
|
||||||
|
|
||||||
import com.alya.ecommerce_serang.R
|
|
||||||
|
|
||||||
class SellsFragment : Fragment() {
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
fun newInstance() = SellsFragment()
|
|
||||||
}
|
|
||||||
|
|
||||||
private val viewModel: SellsViewModel by viewModels()
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
|
|
||||||
// TODO: Use the ViewModel
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
|
||||||
savedInstanceState: Bundle?): View {
|
|
||||||
return inflater.inflate(R.layout.fragment_sells, container, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -7,29 +7,7 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import com.alya.ecommerce_serang.R
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
// TODO: Rename parameter arguments, choose names that match
|
|
||||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
|
||||||
private const val ARG_PARAM1 = "param1"
|
|
||||||
private const val ARG_PARAM2 = "param2"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A simple [Fragment] subclass.
|
|
||||||
* Use the [OrderFragment.newInstance] factory method to
|
|
||||||
* create an instance of this fragment.
|
|
||||||
*/
|
|
||||||
class OrderFragment : Fragment() {
|
class OrderFragment : Fragment() {
|
||||||
// TODO: Rename and change types of parameters
|
|
||||||
private var param1: String? = null
|
|
||||||
private var param2: String? = null
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
arguments?.let {
|
|
||||||
param1 = it.getString(ARG_PARAM1)
|
|
||||||
param2 = it.getString(ARG_PARAM2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
@ -37,24 +15,4 @@ class OrderFragment : Fragment() {
|
|||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
return inflater.inflate(R.layout.fragment_order, container, false)
|
return inflater.inflate(R.layout.fragment_order, container, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
|
||||||
/**
|
|
||||||
* Use this factory method to create a new instance of
|
|
||||||
* this fragment using the provided parameters.
|
|
||||||
*
|
|
||||||
* @param param1 Parameter 1.
|
|
||||||
* @param param2 Parameter 2.
|
|
||||||
* @return A new instance of fragment OrderFragment.
|
|
||||||
*/
|
|
||||||
// TODO: Rename and change types and number of parameters
|
|
||||||
@JvmStatic
|
|
||||||
fun newInstance(param1: String, param2: String) =
|
|
||||||
OrderFragment().apply {
|
|
||||||
arguments = Bundle().apply {
|
|
||||||
putString(ARG_PARAM1, param1)
|
|
||||||
putString(ARG_PARAM2, param2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -7,29 +7,7 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import com.alya.ecommerce_serang.R
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
// TODO: Rename parameter arguments, choose names that match
|
|
||||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
|
||||||
private const val ARG_PARAM1 = "param1"
|
|
||||||
private const val ARG_PARAM2 = "param2"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A simple [Fragment] subclass.
|
|
||||||
* Use the [PaymentFragment.newInstance] factory method to
|
|
||||||
* create an instance of this fragment.
|
|
||||||
*/
|
|
||||||
class PaymentFragment : Fragment() {
|
class PaymentFragment : Fragment() {
|
||||||
// TODO: Rename and change types of parameters
|
|
||||||
private var param1: String? = null
|
|
||||||
private var param2: String? = null
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
arguments?.let {
|
|
||||||
param1 = it.getString(ARG_PARAM1)
|
|
||||||
param2 = it.getString(ARG_PARAM2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
@ -37,24 +15,4 @@ class PaymentFragment : Fragment() {
|
|||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
return inflater.inflate(R.layout.fragment_payment, container, false)
|
return inflater.inflate(R.layout.fragment_payment, container, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
|
||||||
/**
|
|
||||||
* Use this factory method to create a new instance of
|
|
||||||
* this fragment using the provided parameters.
|
|
||||||
*
|
|
||||||
* @param param1 Parameter 1.
|
|
||||||
* @param param2 Parameter 2.
|
|
||||||
* @return A new instance of fragment PaymentFragment.
|
|
||||||
*/
|
|
||||||
// TODO: Rename and change types and number of parameters
|
|
||||||
@JvmStatic
|
|
||||||
fun newInstance(param1: String, param2: String) =
|
|
||||||
PaymentFragment().apply {
|
|
||||||
arguments = Bundle().apply {
|
|
||||||
putString(ARG_PARAM1, param1)
|
|
||||||
putString(ARG_PARAM2, param2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -7,29 +7,7 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import com.alya.ecommerce_serang.R
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
// TODO: Rename parameter arguments, choose names that match
|
|
||||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
|
||||||
private const val ARG_PARAM1 = "param1"
|
|
||||||
private const val ARG_PARAM2 = "param2"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A simple [Fragment] subclass.
|
|
||||||
* Use the [ShipmentFragment.newInstance] factory method to
|
|
||||||
* create an instance of this fragment.
|
|
||||||
*/
|
|
||||||
class ShipmentFragment : Fragment() {
|
class ShipmentFragment : Fragment() {
|
||||||
// TODO: Rename and change types of parameters
|
|
||||||
private var param1: String? = null
|
|
||||||
private var param2: String? = null
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
arguments?.let {
|
|
||||||
param1 = it.getString(ARG_PARAM1)
|
|
||||||
param2 = it.getString(ARG_PARAM2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
@ -37,24 +15,4 @@ class ShipmentFragment : Fragment() {
|
|||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
return inflater.inflate(R.layout.fragment_shipment, container, false)
|
return inflater.inflate(R.layout.fragment_shipment, container, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
|
||||||
/**
|
|
||||||
* Use this factory method to create a new instance of
|
|
||||||
* this fragment using the provided parameters.
|
|
||||||
*
|
|
||||||
* @param param1 Parameter 1.
|
|
||||||
* @param param2 Parameter 2.
|
|
||||||
* @return A new instance of fragment ShipmentFragment.
|
|
||||||
*/
|
|
||||||
// TODO: Rename and change types and number of parameters
|
|
||||||
@JvmStatic
|
|
||||||
fun newInstance(param1: String, param2: String) =
|
|
||||||
ShipmentFragment().apply {
|
|
||||||
arguments = Bundle().apply {
|
|
||||||
putString(ARG_PARAM1, param1)
|
|
||||||
putString(ARG_PARAM2, param2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -7,29 +7,7 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import com.alya.ecommerce_serang.R
|
import com.alya.ecommerce_serang.R
|
||||||
|
|
||||||
// TODO: Rename parameter arguments, choose names that match
|
|
||||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
|
||||||
private const val ARG_PARAM1 = "param1"
|
|
||||||
private const val ARG_PARAM2 = "param2"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A simple [Fragment] subclass.
|
|
||||||
* Use the [ShippedFragment.newInstance] factory method to
|
|
||||||
* create an instance of this fragment.
|
|
||||||
*/
|
|
||||||
class ShippedFragment : Fragment() {
|
class ShippedFragment : Fragment() {
|
||||||
// TODO: Rename and change types of parameters
|
|
||||||
private var param1: String? = null
|
|
||||||
private var param2: String? = null
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
arguments?.let {
|
|
||||||
param1 = it.getString(ARG_PARAM1)
|
|
||||||
param2 = it.getString(ARG_PARAM2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
@ -37,24 +15,4 @@ class ShippedFragment : Fragment() {
|
|||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
return inflater.inflate(R.layout.fragment_shipped, container, false)
|
return inflater.inflate(R.layout.fragment_shipped, container, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
|
||||||
/**
|
|
||||||
* Use this factory method to create a new instance of
|
|
||||||
* this fragment using the provided parameters.
|
|
||||||
*
|
|
||||||
* @param param1 Parameter 1.
|
|
||||||
* @param param2 Parameter 2.
|
|
||||||
* @return A new instance of fragment ShippedFragment.
|
|
||||||
*/
|
|
||||||
// TODO: Rename and change types and number of parameters
|
|
||||||
@JvmStatic
|
|
||||||
fun newInstance(param1: String, param2: String) =
|
|
||||||
ShippedFragment().apply {
|
|
||||||
arguments = Bundle().apply {
|
|
||||||
putString(ARG_PARAM1, param1)
|
|
||||||
putString(ARG_PARAM2, param2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -4,7 +4,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:padding="13dp"
|
android:padding="13dp"
|
||||||
tools:context=".ui.profile.mystore.sells.main.AllSellsFragment">
|
tools:context=".ui.profile.mystore.sells.all_sells.AllSellsFragment">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_semua_pesanan"
|
android:id="@+id/tv_semua_pesanan"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".ui.profile.mystore.sells.main.SellsFragment">
|
tools:context=".ui.profile.mystore.sells.SellsFragment">
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabLayout
|
<com.google.android.material.tabs.TabLayout
|
||||||
android:id="@+id/tab_layout_sells"
|
android:id="@+id/tab_layout_sells"
|
||||||
|
Reference in New Issue
Block a user