aboutsummaryrefslogtreecommitdiff
path: root/wallet/src/main/java
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-04-30 14:57:41 -0300
committerTorsten Grote <t@grobox.de>2020-04-30 14:57:41 -0300
commitd118436966331f23acb872d9c13e1ab6403072c0 (patch)
tree3d8202563424466eb5eca72a6d5b8ccc3369c3a3 /wallet/src/main/java
parent056be53a8d51fb6e45167f5d1ec317513b87a906 (diff)
downloadtaler-android-d118436966331f23acb872d9c13e1ab6403072c0.tar.gz
taler-android-d118436966331f23acb872d9c13e1ab6403072c0.tar.bz2
taler-android-d118436966331f23acb872d9c13e1ab6403072c0.zip
Fix lint warnings that appeared after android gradle plugin update
Diffstat (limited to 'wallet/src/main/java')
-rw-r--r--wallet/src/main/java/net/taler/wallet/SettingsFragment.kt4
-rw-r--r--wallet/src/main/java/net/taler/wallet/payment/ProductImageFragment.kt2
-rw-r--r--wallet/src/main/java/net/taler/wallet/pending/PendingOperationsFragment.kt4
-rw-r--r--wallet/src/main/java/net/taler/wallet/transactions/JsonDialogFragment.kt2
4 files changed, 6 insertions, 6 deletions
diff --git a/wallet/src/main/java/net/taler/wallet/SettingsFragment.kt b/wallet/src/main/java/net/taler/wallet/SettingsFragment.kt
index a38a5a3..c4622a6 100644
--- a/wallet/src/main/java/net/taler/wallet/SettingsFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/SettingsFragment.kt
@@ -77,10 +77,10 @@ class SettingsFragment : PreferenceFragmentCompat() {
.setMessage("Do you really want to reset the wallet and lose all coins and purchases?")
.setPositiveButton("Reset") { _, _ ->
model.dangerouslyReset()
- Snackbar.make(view!!, "Wallet has been reset", LENGTH_SHORT).show()
+ Snackbar.make(requireView(), "Wallet has been reset", LENGTH_SHORT).show()
}
.setNegativeButton("Cancel") { _, _ ->
- Snackbar.make(view!!, "Reset cancelled", LENGTH_SHORT).show()
+ Snackbar.make(requireView(), "Reset cancelled", LENGTH_SHORT).show()
}
.show()
}
diff --git a/wallet/src/main/java/net/taler/wallet/payment/ProductImageFragment.kt b/wallet/src/main/java/net/taler/wallet/payment/ProductImageFragment.kt
index 02414a6..ff70f75 100644
--- a/wallet/src/main/java/net/taler/wallet/payment/ProductImageFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/payment/ProductImageFragment.kt
@@ -45,7 +45,7 @@ class ProductImageFragment private constructor() : DialogFragment() {
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- val bitmap = arguments!!.getParcelable<Bitmap>(IMAGE)
+ val bitmap = requireArguments().getParcelable<Bitmap>(IMAGE)
productImageView.setImageBitmap(bitmap)
}
diff --git a/wallet/src/main/java/net/taler/wallet/pending/PendingOperationsFragment.kt b/wallet/src/main/java/net/taler/wallet/pending/PendingOperationsFragment.kt
index 2eb8721..293dbdb 100644
--- a/wallet/src/main/java/net/taler/wallet/pending/PendingOperationsFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/pending/PendingOperationsFragment.kt
@@ -37,9 +37,9 @@ import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.snackbar.Snackbar
import com.google.android.material.snackbar.Snackbar.LENGTH_SHORT
import kotlinx.android.synthetic.main.fragment_pending_operations.*
+import net.taler.wallet.MainViewModel
import net.taler.wallet.R
import net.taler.wallet.TAG
-import net.taler.wallet.MainViewModel
import org.json.JSONObject
interface PendingOperationClickListener {
@@ -109,7 +109,7 @@ class PendingOperationsFragment : Fragment(), PendingOperationClickListener {
}
override fun onPendingOperationClick(type: String, detail: JSONObject) {
- Snackbar.make(view!!, "No detail view for $type implemented yet.", LENGTH_SHORT).show()
+ Snackbar.make(requireView(), "No detail view for $type implemented yet.", LENGTH_SHORT).show()
}
override fun onPendingOperationActionClick(type: String, detail: JSONObject) {
diff --git a/wallet/src/main/java/net/taler/wallet/transactions/JsonDialogFragment.kt b/wallet/src/main/java/net/taler/wallet/transactions/JsonDialogFragment.kt
index 4139da8..2337059 100644
--- a/wallet/src/main/java/net/taler/wallet/transactions/JsonDialogFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/transactions/JsonDialogFragment.kt
@@ -45,7 +45,7 @@ class JsonDialogFragment : DialogFragment() {
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- val json = arguments!!.getString("json")
+ val json = requireArguments().getString("json")
jsonView.text = json
}