mirror of
https://github.com/hmalik144/Farmr.git
synced 2026-01-31 02:41:49 +00:00
- change list item view
- added pop menu to list item - fixed update/add shift bug
This commit is contained in:
@@ -131,6 +131,13 @@ class FragmentAddItem : FormFragment<SubmissionViewModel>(R.layout.fragment_add_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
requireActivity().onBackPressedDispatcher.addCallback(this, onBackPressed)
|
requireActivity().onBackPressedDispatcher.addCallback(this, onBackPressed)
|
||||||
|
|
||||||
|
id = try {
|
||||||
|
FragmentAddItemArgs.fromBundle(requireArguments()).shiftId
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.i("Nav Args", "Failed to retrieve args from navigation")
|
||||||
|
null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
@@ -150,17 +157,10 @@ class FragmentAddItem : FormFragment<SubmissionViewModel>(R.layout.fragment_add_
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setupViewAfterViewCreated() {
|
private fun setupViewAfterViewCreated() {
|
||||||
val id = try {
|
|
||||||
FragmentAddItemArgs.fromBundle(requireArguments()).shiftId
|
|
||||||
} catch (e: Exception) {
|
|
||||||
Log.i("Nav Args", "Failed to retrieve args from navigation")
|
|
||||||
null
|
|
||||||
}
|
|
||||||
|
|
||||||
wholeView.hide()
|
wholeView.hide()
|
||||||
|
|
||||||
// Since we are editing a shift lets load the shift data into the views
|
// Since we are editing a shift lets load the shift data into the views
|
||||||
id?.let { viewModel.getCurrentShift(id) }?.run {
|
id?.let { viewModel.getCurrentShift(it) }?.run {
|
||||||
mLocationEditText.setText(description)
|
mLocationEditText.setText(description)
|
||||||
mDateEditText.setText(date)
|
mDateEditText.setText(date)
|
||||||
|
|
||||||
|
|||||||
@@ -63,9 +63,7 @@ class FragmentMain : BaseFragment<MainViewModel>(R.layout.fragment_main) {
|
|||||||
emptyView = view.findViewById(R.id.empty_view)
|
emptyView = view.findViewById(R.id.empty_view)
|
||||||
productListView = view.findViewById(R.id.list_item_view)
|
productListView = view.findViewById(R.id.list_item_view)
|
||||||
|
|
||||||
mAdapter = ShiftListAdapter(this, emptyView) {
|
mAdapter = ShiftListAdapter(this, emptyView, viewModel)
|
||||||
viewModel.deleteShift(it)
|
|
||||||
}
|
|
||||||
productListView.adapter = mAdapter
|
productListView.adapter = mAdapter
|
||||||
|
|
||||||
view.findViewById<FloatingActionButton>(R.id.fab1).setOnClickListener {
|
view.findViewById<FloatingActionButton>(R.id.fab1).setOnClickListener {
|
||||||
|
|||||||
@@ -2,27 +2,30 @@ package com.appttude.h_mal.farmr.ui
|
|||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.app.AlertDialog
|
import android.app.AlertDialog
|
||||||
import android.os.Bundle
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
|
import androidx.appcompat.widget.PopupMenu
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.recyclerview.widget.DiffUtil
|
import androidx.recyclerview.widget.DiffUtil
|
||||||
import com.appttude.h_mal.farmr.R
|
import com.appttude.h_mal.farmr.R
|
||||||
import com.appttude.h_mal.farmr.base.BaseListAdapter
|
import com.appttude.h_mal.farmr.base.BaseListAdapter
|
||||||
import com.appttude.h_mal.farmr.data.legacydb.ShiftObject
|
import com.appttude.h_mal.farmr.data.legacydb.ShiftObject
|
||||||
import com.appttude.h_mal.farmr.model.ShiftType
|
import com.appttude.h_mal.farmr.model.ShiftType
|
||||||
import com.appttude.h_mal.farmr.utils.ID
|
|
||||||
import com.appttude.h_mal.farmr.utils.formatToTwoDpString
|
import com.appttude.h_mal.farmr.utils.formatToTwoDpString
|
||||||
import com.appttude.h_mal.farmr.utils.formatToTwoDp
|
|
||||||
import com.appttude.h_mal.farmr.utils.generateView
|
|
||||||
import com.appttude.h_mal.farmr.utils.navigateTo
|
import com.appttude.h_mal.farmr.utils.navigateTo
|
||||||
import com.appttude.h_mal.farmr.utils.navigateToFragment
|
import com.appttude.h_mal.farmr.viewmodel.MainViewModel
|
||||||
|
|
||||||
|
|
||||||
|
const val PIECE_ITEM = 500
|
||||||
|
const val HOURLY_ITEM = 501
|
||||||
|
|
||||||
class ShiftListAdapter(
|
class ShiftListAdapter(
|
||||||
private val fragment: Fragment,
|
private val fragment: Fragment,
|
||||||
emptyView: View,
|
emptyView: View,
|
||||||
private val longPressCallback: (Long) -> Unit
|
private val viewModel: MainViewModel
|
||||||
) : BaseListAdapter<ShiftObject>(diffCallBack, R.layout.list_item_1, emptyView) {
|
) : BaseListAdapter<ShiftObject>(diffCallBack, R.layout.list_item_1, emptyView) {
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
@@ -33,40 +36,28 @@ class ShiftListAdapter(
|
|||||||
val descriptionTextView: TextView = view.findViewById(R.id.location)
|
val descriptionTextView: TextView = view.findViewById(R.id.location)
|
||||||
val dateTextView: TextView = view.findViewById(R.id.date)
|
val dateTextView: TextView = view.findViewById(R.id.date)
|
||||||
val totalPay: TextView = view.findViewById(R.id.total_pay)
|
val totalPay: TextView = view.findViewById(R.id.total_pay)
|
||||||
val hoursView: TextView = view.findViewById(R.id.hours)
|
|
||||||
val h: TextView = view.findViewById(R.id.h)
|
|
||||||
val minutesView: TextView = view.findViewById(R.id.minutes)
|
|
||||||
val m: TextView = view.findViewById(R.id.m)
|
|
||||||
val editView: ImageView = view.findViewById(R.id.imageView)
|
val editView: ImageView = view.findViewById(R.id.imageView)
|
||||||
h.text = "h"
|
|
||||||
m.text = "m"
|
|
||||||
val typeText: String = data.type
|
|
||||||
val descriptionText: String = data.description
|
|
||||||
val dateText: String = data.date
|
|
||||||
val totalPayText: String = data.totalPay.formatToTwoDpString()
|
|
||||||
|
|
||||||
descriptionTextView.text = descriptionText
|
when (getItemViewType(position)) {
|
||||||
dateTextView.text = dateText
|
HOURLY_ITEM -> {
|
||||||
totalPay.text = totalPayText
|
val hoursView: TextView = view.findViewById(R.id.hours)
|
||||||
|
val minutesView: TextView = view.findViewById(R.id.minutes)
|
||||||
|
|
||||||
when (ShiftType.getEnumByType(typeText)) {
|
|
||||||
ShiftType.HOURLY -> {
|
|
||||||
val time = data.getHoursMinutesPairFromDuration()
|
val time = data.getHoursMinutesPairFromDuration()
|
||||||
|
|
||||||
hoursView.text = time.first
|
hoursView.text = time.first
|
||||||
minutesView.text = time.second
|
minutesView.text = if (time.second.length == 1) "0${time.second}" else time.second
|
||||||
}
|
}
|
||||||
|
|
||||||
ShiftType.PIECE -> {
|
PIECE_ITEM -> {
|
||||||
|
val unitsView: TextView = view.findViewById(R.id.pieces)
|
||||||
val unitsText: String = data.units.toString()
|
val unitsText: String = data.units.toString()
|
||||||
|
|
||||||
hoursView.text = unitsText
|
unitsView.text = unitsText
|
||||||
h.text = ""
|
|
||||||
minutesView.text = ""
|
|
||||||
m.text = "pcs"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
descriptionTextView.text = data.description
|
||||||
|
dateTextView.text = data.date
|
||||||
|
totalPay.text = data.totalPay.formatToTwoDpString()
|
||||||
|
|
||||||
view.setOnClickListener {
|
view.setOnClickListener {
|
||||||
// Navigate to further info
|
// Navigate to further info
|
||||||
@@ -74,22 +65,62 @@ class ShiftListAdapter(
|
|||||||
fragment.navigateTo(nav)
|
fragment.navigateTo(nav)
|
||||||
}
|
}
|
||||||
editView.setOnClickListener {
|
editView.setOnClickListener {
|
||||||
// Navigate to edit
|
//creating a popup menu
|
||||||
val nav = FragmentMainDirections.mainToAddItem(data.id)
|
val popup = PopupMenu(it.context, it)
|
||||||
fragment.navigateTo(nav)
|
//inflating menu from xml resource
|
||||||
}
|
popup.inflate(R.menu.options_menu)
|
||||||
view.setOnLongClickListener {
|
|
||||||
AlertDialog.Builder(it.context)
|
//adding click listener
|
||||||
.setMessage("Are you sure you want to delete")
|
popup.setOnMenuItemClickListener { menu ->
|
||||||
.setPositiveButton("delete") { _, _ -> longPressCallback.invoke(data.id) }
|
when (menu.itemId) {
|
||||||
.setNegativeButton("cancel") { dialog, _ ->
|
R.id.update -> {
|
||||||
dialog?.dismiss()
|
// Navigate to edit
|
||||||
|
val nav = FragmentMainDirections.mainToAddItem(data.id)
|
||||||
|
fragment.navigateTo(nav)
|
||||||
|
return@setOnMenuItemClickListener true
|
||||||
|
}
|
||||||
|
|
||||||
|
R.id.delete -> {
|
||||||
|
AlertDialog.Builder(it.context)
|
||||||
|
.setMessage("Are you sure you want to delete")
|
||||||
|
.setPositiveButton("delete") { _, _ -> viewModel.deleteShift(data.id) }
|
||||||
|
.setNegativeButton("cancel") { dialog, _ ->
|
||||||
|
dialog?.dismiss()
|
||||||
|
}
|
||||||
|
.create().show()
|
||||||
|
return@setOnMenuItemClickListener true
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> return@setOnMenuItemClickListener false
|
||||||
}
|
}
|
||||||
.create().show()
|
}
|
||||||
true
|
//displaying the popup
|
||||||
|
popup.show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun getItemViewType(position: Int): Int {
|
||||||
|
val typeString = getItem(position).type
|
||||||
|
return when (ShiftType.getEnumByType(typeString)) {
|
||||||
|
ShiftType.HOURLY -> HOURLY_ITEM
|
||||||
|
ShiftType.PIECE -> PIECE_ITEM
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): CurrentViewHolder {
|
||||||
|
val layoutId = when (viewType) {
|
||||||
|
HOURLY_ITEM -> R.layout.list_cell_hourly
|
||||||
|
PIECE_ITEM -> R.layout.list_cell_piece
|
||||||
|
else -> {
|
||||||
|
return super.onCreateViewHolder(parent, viewType)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
val currentView = LayoutInflater
|
||||||
|
.from(parent.context)
|
||||||
|
.inflate(layoutId, parent, false)
|
||||||
|
return CurrentViewHolder(currentView)
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val diffCallBack = object : DiffUtil.ItemCallback<ShiftObject>() {
|
val diffCallBack = object : DiffUtil.ItemCallback<ShiftObject>() {
|
||||||
override fun areItemsTheSame(oldItem: ShiftObject, newItem: ShiftObject): Boolean {
|
override fun areItemsTheSame(oldItem: ShiftObject, newItem: ShiftObject): Boolean {
|
||||||
|
|||||||
5
app/src/main/res/drawable/baseline_more_vert_24.xml
Normal file
5
app/src/main/res/drawable/baseline_more_vert_24.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#000000"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/>
|
||||||
|
</vector>
|
||||||
135
app/src/main/res/layout-v26/list_cell_hourly.xml
Normal file
135
app/src/main/res/layout-v26/list_cell_hourly.xml
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
<?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/linearLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:divider="#656565"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="24dp"
|
||||||
|
android:paddingBottom="24dp"
|
||||||
|
android:showDividers="end">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/time_holder"
|
||||||
|
android:layout_width="@dimen/unit_holder_width"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:gravity="end"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/hours"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="00"
|
||||||
|
android:textColor="#143d66"
|
||||||
|
android:textSize="@dimen/unit_text_size" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/h"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/hours_symbol"
|
||||||
|
android:textColor="#143d66"
|
||||||
|
android:textSize="@dimen/units_symbol_size" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/minutes"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="00"
|
||||||
|
android:textColor="#143d66"
|
||||||
|
android:textSize="@dimen/unit_text_size" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/m"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/minutes_symbol"
|
||||||
|
android:textColor="#143d66"
|
||||||
|
android:textSize="@dimen/units_symbol_size" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/totalpay_holder"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintRight_toRightOf="@id/time_holder"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/time_holder">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/currency"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/pound_sign"
|
||||||
|
android:textColor="#728fcc"
|
||||||
|
android:textSize="@dimen/units_symbol_size" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/total_pay"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="000.00"
|
||||||
|
android:textColor="#728fcc"
|
||||||
|
android:textSize="@dimen/total_pay_size" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/line"
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginLeft="6dp"
|
||||||
|
android:layout_marginRight="6dp"
|
||||||
|
android:background="@android:color/darker_gray"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/totalpay_holder"
|
||||||
|
app:layout_constraintLeft_toRightOf="@id/time_holder"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/time_holder" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/location"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginLeft="6dp"
|
||||||
|
android:layout_marginRight="6dp"
|
||||||
|
android:gravity="bottom|start"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/location_size"
|
||||||
|
android:autoSizeMinTextSize="@dimen/location_autosize_min"
|
||||||
|
android:autoSizeTextType="uniform"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/time_holder"
|
||||||
|
app:layout_constraintLeft_toRightOf="@id/line"
|
||||||
|
app:layout_constraintRight_toLeftOf="@id/imageView"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0"
|
||||||
|
android:maxLines="2"
|
||||||
|
tools:text="Location Name is quite long and with a second line and more" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/date"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:maxLines="3"
|
||||||
|
tools:text="01-05-2010"
|
||||||
|
android:textSize="@dimen/date_size"
|
||||||
|
android:gravity="center"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/location"
|
||||||
|
app:layout_constraintLeft_toLeftOf="@id/location"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/totalpay_holder"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/baseline_more_vert_24"
|
||||||
|
android:layout_marginEnd="12dp" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
118
app/src/main/res/layout-v26/list_cell_piece.xml
Normal file
118
app/src/main/res/layout-v26/list_cell_piece.xml
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
<?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/linearLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:divider="#656565"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="24dp"
|
||||||
|
android:paddingBottom="24dp"
|
||||||
|
android:showDividers="end">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/time_holder"
|
||||||
|
android:layout_width="@dimen/unit_holder_width"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:gravity="end"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/pieces"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="10.0"
|
||||||
|
android:textColor="#143d66"
|
||||||
|
android:textSize="@dimen/unit_text_size" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/h"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/piece_symbol"
|
||||||
|
android:textColor="#143d66"
|
||||||
|
android:textSize="@dimen/units_symbol_size" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/totalpay_holder"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintRight_toRightOf="@id/time_holder"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/time_holder">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/currency"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/pound_sign"
|
||||||
|
android:textColor="#728fcc"
|
||||||
|
android:textSize="@dimen/units_symbol_size" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/total_pay"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="000.00"
|
||||||
|
android:textColor="#728fcc"
|
||||||
|
android:textSize="@dimen/total_pay_size" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/line"
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginLeft="6dp"
|
||||||
|
android:layout_marginRight="6dp"
|
||||||
|
android:background="@android:color/darker_gray"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/totalpay_holder"
|
||||||
|
app:layout_constraintLeft_toRightOf="@id/time_holder"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/time_holder" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/location"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginLeft="6dp"
|
||||||
|
android:layout_marginRight="6dp"
|
||||||
|
android:gravity="bottom|start"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/location_size"
|
||||||
|
android:autoSizeMinTextSize="@dimen/location_autosize_min"
|
||||||
|
android:autoSizeTextType="uniform"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/time_holder"
|
||||||
|
app:layout_constraintLeft_toRightOf="@id/line"
|
||||||
|
app:layout_constraintRight_toLeftOf="@id/imageView"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0"
|
||||||
|
android:maxLines="2"
|
||||||
|
tools:text="Location Name is quite long and with a second line" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/date"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:maxLines="3"
|
||||||
|
tools:text="01-05-2010"
|
||||||
|
android:textSize="@dimen/date_size"
|
||||||
|
android:gravity="center"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/location"
|
||||||
|
app:layout_constraintLeft_toLeftOf="@id/location"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/totalpay_holder"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/baseline_more_vert_24"
|
||||||
|
android:layout_marginEnd="12dp" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
tools:listitem="@layout/list_item_1">
|
tools:listitem="@layout/list_cell_hourly">
|
||||||
</androidx.recyclerview.widget.RecyclerView>
|
</androidx.recyclerview.widget.RecyclerView>
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
|
|||||||
132
app/src/main/res/layout/list_cell_hourly.xml
Normal file
132
app/src/main/res/layout/list_cell_hourly.xml
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
<?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/linearLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:divider="#656565"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="24dp"
|
||||||
|
android:paddingBottom="24dp"
|
||||||
|
android:showDividers="end">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/time_holder"
|
||||||
|
android:layout_width="@dimen/unit_holder_width"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/hours"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="00"
|
||||||
|
android:textColor="#143d66"
|
||||||
|
android:textSize="@dimen/unit_text_size" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/h"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/hours_symbol"
|
||||||
|
android:textColor="#143d66"
|
||||||
|
android:textSize="@dimen/units_symbol_size" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/minutes"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="00"
|
||||||
|
android:textColor="#143d66"
|
||||||
|
android:textSize="@dimen/unit_text_size" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/m"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/minutes_symbol"
|
||||||
|
android:textColor="#143d66"
|
||||||
|
android:textSize="@dimen/units_symbol_size" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/totalpay_holder"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintRight_toRightOf="@id/time_holder"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/time_holder">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/currency"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/pound_sign"
|
||||||
|
android:textColor="#728fcc"
|
||||||
|
android:textSize="@dimen/units_symbol_size" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/total_pay"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="000.00"
|
||||||
|
android:textColor="#728fcc"
|
||||||
|
android:textSize="@dimen/total_pay_size" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/line"
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginLeft="6dp"
|
||||||
|
android:layout_marginRight="6dp"
|
||||||
|
android:background="@android:color/darker_gray"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/totalpay_holder"
|
||||||
|
app:layout_constraintLeft_toRightOf="@id/time_holder"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/time_holder" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/location"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginLeft="6dp"
|
||||||
|
android:layout_marginRight="6dp"
|
||||||
|
android:gravity="bottom|start"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/location_size"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/time_holder"
|
||||||
|
app:layout_constraintLeft_toRightOf="@id/line"
|
||||||
|
app:layout_constraintRight_toLeftOf="@id/imageView"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0"
|
||||||
|
android:maxLines="1"
|
||||||
|
tools:text="Location Name" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/date"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:maxLines="3"
|
||||||
|
tools:text="01-05-2010"
|
||||||
|
android:textSize="@dimen/date_size"
|
||||||
|
android:gravity="center"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/location"
|
||||||
|
app:layout_constraintLeft_toLeftOf="@id/location"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/totalpay_holder"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/baseline_more_vert_24"
|
||||||
|
android:layout_marginEnd="12dp" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
117
app/src/main/res/layout/list_cell_piece.xml
Normal file
117
app/src/main/res/layout/list_cell_piece.xml
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
<?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/linearLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:divider="#656565"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="24dp"
|
||||||
|
android:paddingBottom="24dp"
|
||||||
|
android:showDividers="end">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/time_holder"
|
||||||
|
android:layout_width="@dimen/unit_holder_width"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:gravity="end"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/pieces"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="10.0"
|
||||||
|
android:textColor="#143d66"
|
||||||
|
android:textSize="@dimen/unit_text_size" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/h"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/piece_symbol"
|
||||||
|
android:textColor="#143d66"
|
||||||
|
android:textSize="@dimen/units_symbol_size" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/totalpay_holder"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintRight_toRightOf="@id/time_holder"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/time_holder">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/currency"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/pound_sign"
|
||||||
|
android:textColor="#728fcc"
|
||||||
|
android:textSize="@dimen/units_symbol_size" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/total_pay"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="000.00"
|
||||||
|
android:textColor="#728fcc"
|
||||||
|
android:textSize="@dimen/total_pay_size" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/line"
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginLeft="6dp"
|
||||||
|
android:layout_marginRight="6dp"
|
||||||
|
android:background="@android:color/darker_gray"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/totalpay_holder"
|
||||||
|
app:layout_constraintLeft_toRightOf="@id/time_holder"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/time_holder" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/location"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginLeft="6dp"
|
||||||
|
android:layout_marginRight="6dp"
|
||||||
|
android:gravity="bottom|start"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/location_size"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/time_holder"
|
||||||
|
app:layout_constraintLeft_toRightOf="@id/line"
|
||||||
|
app:layout_constraintRight_toLeftOf="@id/imageView"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0"
|
||||||
|
android:maxLines="1"
|
||||||
|
tools:text="Location Name" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/date"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:maxLines="3"
|
||||||
|
tools:text="01-05-2010"
|
||||||
|
android:textSize="@dimen/date_size"
|
||||||
|
android:gravity="center"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/location"
|
||||||
|
app:layout_constraintLeft_toLeftOf="@id/location"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/totalpay_holder"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/baseline_more_vert_24"
|
||||||
|
android:layout_marginEnd="12dp" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/linearLayout"
|
android:id="@+id/linearLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -8,10 +9,11 @@
|
|||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingBottom="24dp"
|
android:paddingBottom="24dp"
|
||||||
android:paddingTop="24dp"
|
android:paddingTop="24dp"
|
||||||
android:showDividers="end">
|
android:showDividers="end"
|
||||||
|
tools:ignore="HardcodedText">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="87dp"
|
android:layout_width="@dimen/unit_holder_width"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
||||||
android:layout_marginStart="12dp"
|
android:layout_marginStart="12dp"
|
||||||
@@ -30,7 +32,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="00"
|
android:text="00"
|
||||||
android:textColor="#143d66"
|
android:textColor="#143d66"
|
||||||
android:textSize="30sp" />
|
android:textSize="@dimen/unit_text_size" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/h"
|
android:id="@+id/h"
|
||||||
@@ -38,7 +40,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="h"
|
android:text="h"
|
||||||
android:textColor="#143d66"
|
android:textColor="#143d66"
|
||||||
android:textSize="12sp" />
|
android:textSize="@dimen/units_symbol_size" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/minutes"
|
android:id="@+id/minutes"
|
||||||
@@ -47,7 +49,7 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="00"
|
android:text="00"
|
||||||
android:textColor="#143d66"
|
android:textColor="#143d66"
|
||||||
android:textSize="30sp" />
|
android:textSize="@dimen/unit_text_size"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/m"
|
android:id="@+id/m"
|
||||||
@@ -56,7 +58,7 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="m"
|
android:text="m"
|
||||||
android:textColor="#143d66"
|
android:textColor="#143d66"
|
||||||
android:textSize="12sp" />
|
android:textSize="@dimen/units_symbol_size" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -70,9 +72,9 @@
|
|||||||
android:id="@+id/currency"
|
android:id="@+id/currency"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="£"
|
android:text="@string/pound_sign"
|
||||||
android:textColor="#728fcc"
|
android:textColor="#728fcc"
|
||||||
android:textSize="12sp" />
|
android:textSize="@dimen/units_symbol_size" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/total_pay"
|
android:id="@+id/total_pay"
|
||||||
@@ -80,7 +82,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="000.00"
|
android:text="000.00"
|
||||||
android:textColor="#728fcc"
|
android:textColor="#728fcc"
|
||||||
android:textSize="20sp" />
|
android:textSize="@dimen/total_pay_size" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -106,7 +108,7 @@
|
|||||||
android:layout_below="@+id/date"
|
android:layout_below="@+id/date"
|
||||||
android:maxLines="3"
|
android:maxLines="3"
|
||||||
android:text="Location Name"
|
android:text="Location Name"
|
||||||
android:textSize="20sp" />
|
android:textSize="@dimen/location_size" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/date"
|
android:id="@+id/date"
|
||||||
@@ -119,7 +121,7 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="01-05-2010"
|
android:text="01-05-2010"
|
||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="16sp" />
|
android:textSize="@dimen/date_size" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/imageView"
|
||||||
|
|||||||
14
app/src/main/res/menu/options_menu.xml
Normal file
14
app/src/main/res/menu/options_menu.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
<item
|
||||||
|
android:id="@+id/update"
|
||||||
|
android:orderInCategory="100"
|
||||||
|
android:title="@string/update_shift"
|
||||||
|
app:showAsAction="never" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/delete"
|
||||||
|
android:orderInCategory="100"
|
||||||
|
android:title="@string/delete_shift"
|
||||||
|
app:showAsAction="never" />
|
||||||
|
</menu>
|
||||||
@@ -12,13 +12,25 @@
|
|||||||
tools:layout="@layout/fragment_main" >
|
tools:layout="@layout/fragment_main" >
|
||||||
<action
|
<action
|
||||||
android:id="@+id/main_to_addItem"
|
android:id="@+id/main_to_addItem"
|
||||||
app:destination="@id/fragmentAddItem" />
|
app:destination="@id/fragmentAddItem"
|
||||||
|
app:enterAnim="@anim/nav_default_enter_anim"
|
||||||
|
app:exitAnim="@anim/nav_default_exit_anim"
|
||||||
|
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||||
|
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||||
<action
|
<action
|
||||||
android:id="@+id/main_to_filterData"
|
android:id="@+id/main_to_filterData"
|
||||||
app:destination="@id/filterDataFragment" />
|
app:destination="@id/filterDataFragment"
|
||||||
|
app:enterAnim="@anim/nav_default_enter_anim"
|
||||||
|
app:exitAnim="@anim/nav_default_exit_anim"
|
||||||
|
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||||
|
app:popExitAnim="@anim/nav_default_pop_exit_anim"/>
|
||||||
<action
|
<action
|
||||||
android:id="@+id/main_to_furtherInfo"
|
android:id="@+id/main_to_furtherInfo"
|
||||||
app:destination="@id/furtherInfoFragment" />
|
app:destination="@id/furtherInfoFragment"
|
||||||
|
app:enterAnim="@anim/nav_default_enter_anim"
|
||||||
|
app:exitAnim="@anim/nav_default_exit_anim"
|
||||||
|
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||||
|
app:popExitAnim="@anim/nav_default_pop_exit_anim"/>
|
||||||
</fragment>
|
</fragment>
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/fragmentAddItem"
|
android:id="@+id/fragmentAddItem"
|
||||||
@@ -41,7 +53,11 @@
|
|||||||
tools:layout="@layout/fragment_futher_info" >
|
tools:layout="@layout/fragment_futher_info" >
|
||||||
<action
|
<action
|
||||||
android:id="@+id/furtherInfo_to_AddItem"
|
android:id="@+id/furtherInfo_to_AddItem"
|
||||||
app:destination="@id/fragmentAddItem" />
|
app:destination="@id/fragmentAddItem"
|
||||||
|
app:enterAnim="@anim/nav_default_enter_anim"
|
||||||
|
app:exitAnim="@anim/nav_default_exit_anim"
|
||||||
|
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||||
|
app:popExitAnim="@anim/nav_default_pop_exit_anim"/>
|
||||||
<argument
|
<argument
|
||||||
android:name="shiftId"
|
android:name="shiftId"
|
||||||
app:argType="long" />
|
app:argType="long" />
|
||||||
|
|||||||
@@ -4,6 +4,13 @@
|
|||||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||||
<dimen name="fab_margin">16dp</dimen>
|
<dimen name="fab_margin">16dp</dimen>
|
||||||
<dimen name="appbar_padding_top">8dp</dimen>
|
<dimen name="appbar_padding_top">8dp</dimen>
|
||||||
|
<dimen name="unit_text_size">20sp</dimen>
|
||||||
|
<dimen name="units_symbol_size">12sp</dimen>
|
||||||
|
<dimen name="total_pay_size">16sp</dimen>
|
||||||
|
<dimen name="location_size">16sp</dimen>
|
||||||
|
<dimen name="date_size">14sp</dimen>
|
||||||
|
<dimen name="unit_holder_width">75dp</dimen>
|
||||||
|
<dimen name="location_autosize_min">12sp</dimen>
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
@@ -97,4 +97,10 @@
|
|||||||
<string name="further_info_title">Shift Details</string>
|
<string name="further_info_title">Shift Details</string>
|
||||||
<string name="insert_break_in_minutes">insert break in minutes</string>
|
<string name="insert_break_in_minutes">insert break in minutes</string>
|
||||||
<string name="break_res">Break</string>
|
<string name="break_res">Break</string>
|
||||||
|
<string name="hours_symbol">h</string>
|
||||||
|
<string name="minutes_symbol">m</string>
|
||||||
|
<string name="piece_symbol">pcs</string>
|
||||||
|
<string name="pound_sign">£</string>
|
||||||
|
<string name="delete_shift">Delete shift</string>
|
||||||
|
<string name="update_shift">Update Shift</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user