diff --git a/app/src/main/java/com/example/inventory/AddItemFragment.kt b/app/src/main/java/com/example/inventory/AddItemFragment.kt index 6fd3e38f..d2dae7b5 100644 --- a/app/src/main/java/com/example/inventory/AddItemFragment.kt +++ b/app/src/main/java/com/example/inventory/AddItemFragment.kt @@ -28,6 +28,7 @@ import androidx.navigation.fragment.findNavController import androidx.navigation.fragment.navArgs import com.example.inventory.data.Item import com.example.inventory.databinding.FragmentAddItemBinding +import java.util.Locale /** * Fragment to add or update an item in the Inventory database. @@ -76,7 +77,7 @@ class AddItemFragment : Fragment() { * Binds views with the passed in [item] information. */ private fun bind(item: Item) { - val price = "%.2f".format(item.itemPrice) + val price = "%.2f".format(Locale.US, item.itemPrice) binding.apply { itemName.setText(item.itemName, TextView.BufferType.SPANNABLE) itemPrice.setText(price, TextView.BufferType.SPANNABLE)