This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ParentItemsAdapter(private val data: List<ParentItemModel>, | |
private var itemListener: ItemListener | |
) : RecyclerView.Adapter<ParentItemsViewHolder>() { | |
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ParentItemsViewHolder { | |
val inflater = LayoutInflater.from(parent.context) | |
return ParentItemsViewHolder( | |
inflater, | |
parent, | |
itemListener |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface ItemListener { | |
fun onViewCard(position: Int) | |
fun onRemoveCard(position: Int) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainFragment : Fragment(), ItemListener{ | |
companion object { | |
private const val TAG = "MainFragment" | |
} | |
private var _binding: FragmentMainBinding? = null | |
private val binding get() = _binding!! | |
private var mActivity : MainActivity? = null | |
var mView: View? = null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt" | |
android:viewportWidth="640" | |
android:viewportHeight="480" | |
android:width="640dp" | |
android:height="480dp"> | |
<path | |
android:pathData="M2.50002 0.499998H639.5V477.5H2.50002V0.499998Z" | |
android:strokeColor="#000000" | |
android:strokeWidth="20" /> | |
<group |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onKitchenOrdersReceived(KitchenOrdersResponse mKitchenOrdersResponse) | |
{ | |
AppLog.d(TAG, "onKitchenOrdersReceived"); | |
this.mKitchenOrdersResponse = mKitchenOrdersResponse; | |
mAdapter = new OrdersAdapter(mKitchenOrdersResponse); | |
recyclerView.setAdapter(mAdapter); | |
ItemTouchHelper.Callback callback = new ItemTouchHelperCallback(mAdapter); |
NewerOlder