summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-02-21 16:32:08 -0300
committerTorsten Grote <t@grobox.de>2020-02-21 16:32:08 -0300
commit5f57c48b526f7f297e307851135fc52a5ea23ab3 (patch)
treeb54e02fdd8cd27553897f079e09dda3e4a9ed1c6
parent9b07cda04a02f5e8f685feb505db251006fd45fd (diff)
downloadwallet-android-5f57c48b526f7f297e307851135fc52a5ea23ab3.tar.gz
wallet-android-5f57c48b526f7f297e307851135fc52a5ea23ab3.tar.bz2
wallet-android-5f57c48b526f7f297e307851135fc52a5ea23ab3.zip
Fix lint and make all strings translatable
-rw-r--r--.idea/dictionaries/user.xml7
-rw-r--r--app/src/main/AndroidManifest.xml3
-rw-r--r--app/src/main/java/net/taler/wallet/Amount.kt1
-rw-r--r--app/src/main/java/net/taler/wallet/HostCardEmulatorService.kt10
-rw-r--r--app/src/main/java/net/taler/wallet/MainActivity.kt1
-rw-r--r--app/src/main/java/net/taler/wallet/ReviewExchangeTOS.kt5
-rw-r--r--app/src/main/java/net/taler/wallet/Settings.kt11
-rw-r--r--app/src/main/java/net/taler/wallet/ShowBalance.kt38
-rw-r--r--app/src/main/java/net/taler/wallet/backend/WalletBackendService.kt25
-rw-r--r--app/src/main/java/net/taler/wallet/crypto/Encoding.kt4
-rw-r--r--app/src/main/java/net/taler/wallet/history/HistoryEvent.kt14
-rw-r--r--app/src/main/java/net/taler/wallet/history/WalletHistory.kt12
-rw-r--r--app/src/main/java/net/taler/wallet/history/WalletHistoryAdapter.kt16
-rw-r--r--app/src/main/res/drawable/ic_launcher_foreground.xml99
-rw-r--r--app/src/main/res/drawable/ic_logo_taler.xml64
-rw-r--r--app/src/main/res/drawable/ic_menu_camera.xml28
-rw-r--r--app/src/main/res/drawable/ic_menu_gallery.xml25
-rw-r--r--app/src/main/res/drawable/ic_menu_share.xml25
-rw-r--r--app/src/main/res/drawable/ic_menu_slideshow.xml25
-rw-r--r--app/src/main/res/drawable/ic_scan_qr.xml368
-rw-r--r--app/src/main/res/layout/activity_main.xml10
-rw-r--r--app/src/main/res/layout/app_bar_main.xml32
-rw-r--r--app/src/main/res/layout/balance_row.xml81
-rw-r--r--app/src/main/res/layout/content_main.xml40
-rw-r--r--app/src/main/res/layout/fragment_already_paid.xml52
-rw-r--r--app/src/main/res/layout/fragment_prompt_withdraw.xml135
-rw-r--r--app/src/main/res/layout/fragment_review_exchange_tos.xml80
-rw-r--r--app/src/main/res/layout/fragment_settings.xml154
-rw-r--r--app/src/main/res/layout/fragment_show_balance.xml30
-rw-r--r--app/src/main/res/layout/fragment_withdraw_successful.xml75
-rw-r--r--app/src/main/res/layout/history_payment.xml7
-rw-r--r--app/src/main/res/layout/history_receive.xml7
-rw-r--r--app/src/main/res/layout/history_row.xml9
-rw-r--r--app/src/main/res/menu/activity_main_drawer.xml13
-rw-r--r--app/src/main/res/menu/balance.xml21
-rw-r--r--app/src/main/res/navigation/nav_graph.xml3
-rw-r--r--app/src/main/res/values/strings.xml41
-rw-r--r--app/src/main/res/values/styles.xml5
-rw-r--r--app/src/main/res/xml/backup_descriptor.xml (renamed from app/src/main/res/drawable/ic_menu_send.xml)13
39 files changed, 723 insertions, 866 deletions
diff --git a/.idea/dictionaries/user.xml b/.idea/dictionaries/user.xml
new file mode 100644
index 0000000..9ff1fd4
--- /dev/null
+++ b/.idea/dictionaries/user.xml
@@ -0,0 +1,7 @@
+<component name="ProjectDictionaryState">
+ <dictionary name="user">
+ <words>
+ <w>testkudos</w>
+ </words>
+ </dictionary>
+</component> \ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 4b9e4da..d916f21 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -30,7 +30,8 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
- tools:ignore="GoogleAppIndexingWarning">
+ tools:ignore="GoogleAppIndexingWarning"
+ android:fullBackupContent="@xml/backup_descriptor">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
diff --git a/app/src/main/java/net/taler/wallet/Amount.kt b/app/src/main/java/net/taler/wallet/Amount.kt
index 4954815..a19e9bc 100644
--- a/app/src/main/java/net/taler/wallet/Amount.kt
+++ b/app/src/main/java/net/taler/wallet/Amount.kt
@@ -125,6 +125,7 @@ class ParsedAmount(
return value == 0u && fraction == 0.0
}
+ @Suppress("unused")
fun toJSONString(): String {
return "$currency:${getValueString()}"
}
diff --git a/app/src/main/java/net/taler/wallet/HostCardEmulatorService.kt b/app/src/main/java/net/taler/wallet/HostCardEmulatorService.kt
index c38bc10..93f1d3f 100644
--- a/app/src/main/java/net/taler/wallet/HostCardEmulatorService.kt
+++ b/app/src/main/java/net/taler/wallet/HostCardEmulatorService.kt
@@ -16,14 +16,16 @@
package net.taler.wallet
-import android.content.*
+import android.content.BroadcastReceiver
+import android.content.Context
+import android.content.Intent
+import android.content.IntentFilter
import android.net.Uri
import android.nfc.cardemulation.HostApduService
import android.os.Bundle
import android.util.Log
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
-import java.net.URI
import java.util.concurrent.ConcurrentLinkedDeque
fun makeApduSuccessResponse(payload: ByteArray): ByteArray {
@@ -46,7 +48,7 @@ fun makeApduFailureResponse(): ByteArray {
fun readApduBodySize(stream: ByteArrayInputStream): Int {
val b0 = stream.read()
if (b0 == -1) {
- return 0;
+ return 0
}
if (b0 != 0) {
return b0
@@ -61,7 +63,7 @@ fun readApduBodySize(stream: ByteArrayInputStream): Int {
class HostCardEmulatorService: HostApduService() {
val queuedRequests: ConcurrentLinkedDeque<String> = ConcurrentLinkedDeque()
- lateinit var receiver: BroadcastReceiver
+ private lateinit var receiver: BroadcastReceiver
override fun onCreate() {
super.onCreate()
diff --git a/app/src/main/java/net/taler/wallet/MainActivity.kt b/app/src/main/java/net/taler/wallet/MainActivity.kt
index 299fbfe..29a56da 100644
--- a/app/src/main/java/net/taler/wallet/MainActivity.kt
+++ b/app/src/main/java/net/taler/wallet/MainActivity.kt
@@ -70,6 +70,7 @@ class MainActivity : AppCompatActivity(), OnNavigationItemSelectedListener,
nav_view.menu.getItem(0).isChecked = true
}
+ setSupportActionBar(toolbar)
val appBarConfiguration = AppBarConfiguration(
setOf(R.id.showBalance, R.id.settings, R.id.walletHistory), drawer_layout
)
diff --git a/app/src/main/java/net/taler/wallet/ReviewExchangeTOS.kt b/app/src/main/java/net/taler/wallet/ReviewExchangeTOS.kt
index 662bb8d..4f5db9e 100644
--- a/app/src/main/java/net/taler/wallet/ReviewExchangeTOS.kt
+++ b/app/src/main/java/net/taler/wallet/ReviewExchangeTOS.kt
@@ -18,14 +18,13 @@ package net.taler.wallet
import android.os.Bundle
-import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import android.widget.CheckBox
-import android.widget.CompoundButton
import android.widget.TextView
+import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProviders
import androidx.navigation.findNavController
@@ -61,7 +60,7 @@ class ReviewExchangeTOS : Fragment() {
model.cancelCurrentWithdraw()
navController.navigateUp()
}
- acceptButton = view.findViewById<Button>(R.id.button_tos_accept)
+ acceptButton = view.findViewById(R.id.button_tos_accept)
acceptButton.setOnClickListener {
model.acceptCurrentTermsOfService()
}
diff --git a/app/src/main/java/net/taler/wallet/Settings.kt b/app/src/main/java/net/taler/wallet/Settings.kt
index 66e6a34..8a91d62 100644
--- a/app/src/main/java/net/taler/wallet/Settings.kt
+++ b/app/src/main/java/net/taler/wallet/Settings.kt
@@ -18,19 +18,17 @@ package net.taler.wallet
import android.app.Dialog
import android.content.Context
-import android.content.DialogInterface
import android.content.Intent
import android.os.Bundle
-import android.provider.DocumentsContract
import android.util.Log
-import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.DialogFragment
-import androidx.lifecycle.ViewModelProviders
+import androidx.fragment.app.Fragment
+import kotlinx.android.synthetic.main.fragment_settings.*
interface ResetDialogEventListener {
@@ -40,7 +38,6 @@ interface ResetDialogEventListener {
class ResetDialogFragment : DialogFragment() {
- private lateinit var model: WalletViewModel
private lateinit var listener: ResetDialogEventListener
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
@@ -134,6 +131,10 @@ class Settings : Fragment() {
return view
}
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ textView4.text = BuildConfig.VERSION_NAME
+ }
+
companion object {
private const val TAG = "taler-wallet"
private const val CREATE_FILE = 1
diff --git a/app/src/main/java/net/taler/wallet/ShowBalance.kt b/app/src/main/java/net/taler/wallet/ShowBalance.kt
index b9e52ff..1238903 100644
--- a/app/src/main/java/net/taler/wallet/ShowBalance.kt
+++ b/app/src/main/java/net/taler/wallet/ShowBalance.kt
@@ -17,6 +17,7 @@
package net.taler.wallet
+import android.annotation.SuppressLint
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
@@ -30,7 +31,7 @@ import android.widget.LinearLayout
import android.widget.TextView
import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
-import androidx.lifecycle.ViewModelProviders
+import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
@@ -40,7 +41,7 @@ import com.google.zxing.integration.android.IntentIntegrator.QR_CODE_TYPES
import me.zhanghai.android.materialprogressbar.MaterialProgressBar
import org.json.JSONObject
-class WalletBalanceAdapter(private var myDataset: WalletBalances, private var model: WalletViewModel) :
+class WalletBalanceAdapter(private var myDataset: WalletBalances) :
RecyclerView.Adapter<WalletBalanceAdapter.MyViewHolder>() {
init {
@@ -72,6 +73,7 @@ class WalletBalanceAdapter(private var myDataset: WalletBalances, private var mo
amountIncomingRow.visibility = View.GONE
} else {
amountIncomingRow.visibility = View.VISIBLE
+ @SuppressLint("SetTextI18n")
amountIncomingView.text = "${amountIncoming.amount} ${amountIncoming.currency}"
}
}
@@ -117,7 +119,7 @@ class PendingOperationsAdapter(private var myDataset: PendingOperations) :
when (p.type) {
"proposal-choice" -> {
val btn1 = holder.rowView.findViewById<TextView>(R.id.button_pending_action_1)
- btn1.text = "Refuse Proposal"
+ btn1.text = btn1.context.getString(R.string.pending_operations_refuse)
btn1.visibility = View.VISIBLE
btn1.setOnClickListener {
this.listener?.onPendingOperationActionClick(p.type, p.detail)
@@ -125,7 +127,7 @@ class PendingOperationsAdapter(private var myDataset: PendingOperations) :
}
else -> {
val btn1 = holder.rowView.findViewById<TextView>(R.id.button_pending_action_1)
- btn1.text = "(no action)"
+ btn1.text = btn1.context.getString(R.string.pending_operations_no_action)
btn1.visibility = View.GONE
btn1.setOnClickListener {}
}
@@ -156,12 +158,12 @@ interface PendingOperationClickListener {
class ShowBalance : Fragment(), PendingOperationClickListener {
private lateinit var pendingOperationsLabel: View
- lateinit var balancesView: RecyclerView
- lateinit var balancesPlaceholderView: TextView
- lateinit var model: WalletViewModel
- lateinit var balancesAdapter: WalletBalanceAdapter
+ private lateinit var balancesView: RecyclerView
+ private lateinit var balancesPlaceholderView: TextView
+ private lateinit var model: WalletViewModel
+ private lateinit var balancesAdapter: WalletBalanceAdapter
- lateinit var pendingAdapter: PendingOperationsAdapter
+ private lateinit var pendingAdapter: PendingOperationsAdapter
private fun triggerLoading() {
val loading: Boolean =
@@ -199,7 +201,9 @@ class ShowBalance : Fragment(), PendingOperationClickListener {
}
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
- activity?.menuInflater?.inflate(R.menu.balance, menu)
+ inflater.inflate(R.menu.balance, menu)
+ Log.e("TEST", "MENU INFLATED!!! ${menu.size()}")
+ super.onCreateOptionsMenu(menu, inflater)
}
override fun onCreate(savedInstanceState: Bundle?) {
@@ -207,7 +211,7 @@ class ShowBalance : Fragment(), PendingOperationClickListener {
setHasOptionsMenu(true)
model = activity?.run {
- ViewModelProviders.of(this)[WalletViewModel::class.java]
+ ViewModelProvider(this)[WalletViewModel::class.java]
} ?: throw Exception("Invalid Activity")
}
@@ -224,12 +228,12 @@ class ShowBalance : Fragment(), PendingOperationClickListener {
balancesPlaceholderView.visibility = View.GONE
balancesView.visibility = View.VISIBLE
}
- Log.v(TAG, "updating balances ${balances}")
+ Log.v(TAG, "updating balances $balances")
balancesAdapter.update(balances)
}
private fun updatePending(pendingOperations: PendingOperations) {
- if (pendingOperations.pending.size == 0) {
+ if (pendingOperations.pending.isEmpty()) {
pendingOperationsLabel.visibility = View.GONE
} else {
pendingOperationsLabel.visibility = View.VISIBLE
@@ -256,7 +260,7 @@ class ShowBalance : Fragment(), PendingOperationClickListener {
val balances = model.balances.value!!
- balancesAdapter = WalletBalanceAdapter(balances, model)
+ balancesAdapter = WalletBalanceAdapter(balances)
view.findViewById<RecyclerView>(R.id.list_balances).apply {
val myLayoutManager = LinearLayoutManager(context)
@@ -280,7 +284,7 @@ class ShowBalance : Fragment(), PendingOperationClickListener {
}
model.testWithdrawalInProgress.observe(viewLifecycleOwner, Observer { loading ->
- Log.v("taler-wallet", "observing balance loading ${loading} in show balance")
+ Log.v("taler-wallet", "observing balance loading $loading in show balance")
withdrawTestkudosButton.isEnabled = !loading
triggerLoading()
})
@@ -307,11 +311,11 @@ class ShowBalance : Fragment(), PendingOperationClickListener {
override fun onPendingOperationClick(type: String, detail: JSONObject) {
val v = view ?: return
- when (type) {
+ when {
else -> {
val bar = Snackbar.make(
v,
- "No detail view for ${type} implemented yet.",
+ "No detail view for $type implemented yet.",
Snackbar.LENGTH_SHORT
)
bar.show()
diff --git a/app/src/main/java/net/taler/wallet/backend/WalletBackendService.kt b/app/src/main/java/net/taler/wallet/backend/WalletBackendService.kt
index d97ccf2..0b71774 100644
--- a/app/src/main/java/net/taler/wallet/backend/WalletBackendService.kt
+++ b/app/src/main/java/net/taler/wallet/backend/WalletBackendService.kt
@@ -20,7 +20,11 @@ package net.taler.wallet.backend
import akono.AkonoJni
import android.app.Service
import android.content.Intent
-import android.os.*
+import android.os.Handler
+import android.os.IBinder
+import android.os.Message
+import android.os.Messenger
+import android.os.RemoteException
import android.util.Log
import net.taler.wallet.HostCardEmulatorService
import org.json.JSONObject
@@ -96,7 +100,7 @@ class WalletBackendService : Service() {
val svc = serviceWeakRef.get() ?: return
when (msg.what) {
MSG_COMMAND -> {
- val data = msg.getData()
+ val data = msg.data
val serviceRequestID = svc.nextRequestID++
val clientRequestID = data.getInt("requestID", 0)
if (clientRequestID == 0) {
@@ -124,10 +128,7 @@ class WalletBackendService : Service() {
TAG,
"mapping service request ID $serviceRequestID to client request ID $clientRequestID"
)
- svc.requests.put(
- serviceRequestID,
- RequestData(clientRequestID, msg.replyTo)
- )
+ svc.requests[serviceRequestID] = RequestData(clientRequestID, msg.replyTo)
}
MSG_SUBSCRIBE_NOTIFY -> {
Log.i(TAG, "subscribing client")
@@ -165,7 +166,7 @@ class WalletBackendService : Service() {
s.send(m)
} catch (e: RemoteException) {
if (rm == null) {
- rm = LinkedList<Messenger>()
+ rm = LinkedList()
}
rm.add(s)
subscribers.remove(s)
@@ -179,10 +180,9 @@ class WalletBackendService : Service() {
}
private fun handleAkonoMessage(messageStr: String) {
- Log.v(TAG, "got back message: ${messageStr}")
+ Log.v(TAG, "got back message: $messageStr")
val message = JSONObject(messageStr)
- val type = message.getString("type")
- when (type) {
+ when (message.getString("type")) {
"notification" -> {
sendNotify()
}
@@ -195,8 +195,7 @@ class WalletBackendService : Service() {
}
}
"response" -> {
- val operation = message.getString("operation")
- when (operation) {
+ when (val operation = message.getString("operation")) {
"init" -> {
Log.v(TAG, "got response for init operation")
sendNotify()
@@ -207,7 +206,7 @@ class WalletBackendService : Service() {
else -> {
val id = message.getInt("id")
Log.v(TAG, "got response for operation $operation")
- val rd = requests.get(id)
+ val rd = requests[id]
if (rd == null) {
Log.e(TAG, "wallet returned unknown request ID ($id)")
return
diff --git a/app/src/main/java/net/taler/wallet/crypto/Encoding.kt b/app/src/main/java/net/taler/wallet/crypto/Encoding.kt
index 91a4c14..25a59be 100644
--- a/app/src/main/java/net/taler/wallet/crypto/Encoding.kt
+++ b/app/src/main/java/net/taler/wallet/crypto/Encoding.kt
@@ -51,7 +51,7 @@ object Base32Crockford {
sb.append(encTable[v])
numBits -= 5
}
- return sb.toString();
+ return sb.toString()
}
fun decode(encoded: String, out: ByteArrayOutputStream) {
@@ -114,6 +114,7 @@ object Base32Crockford {
* @param dataSize size of the data to encode in bytes
* @return size of the string that would result from encoding
*/
+ @Suppress("unused")
fun calculateEncodedStringLength(dataSize: Int): Int {
return (dataSize * 8 + 4) / 5
}
@@ -125,6 +126,7 @@ object Base32Crockford {
* @param stringSize size of the string to decode
* @return size of the resulting data in bytes
*/
+ @Suppress("unused")
fun calculateDecodedDataLength(stringSize: Int): Int {
return stringSize * 5 / 8
}
diff --git a/app/src/main/java/net/taler/wallet/history/HistoryEvent.kt b/app/src/main/java/net/taler/wallet/history/HistoryEvent.kt
index fbae49c..9e5c99d 100644
--- a/app/src/main/java/net/taler/wallet/history/HistoryEvent.kt
+++ b/app/src/main/java/net/taler/wallet/history/HistoryEvent.kt
@@ -19,11 +19,16 @@ package net.taler.wallet.history
import androidx.annotation.DrawableRes
import androidx.annotation.LayoutRes
import androidx.annotation.StringRes
-import com.fasterxml.jackson.annotation.*
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties
+import com.fasterxml.jackson.annotation.JsonInclude
import com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.fasterxml.jackson.annotation.JsonSubTypes
import com.fasterxml.jackson.annotation.JsonSubTypes.Type
+import com.fasterxml.jackson.annotation.JsonTypeInfo
import com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME
+import com.fasterxml.jackson.annotation.JsonTypeName
import net.taler.wallet.ParsedAmount.Companion.parseAmount
import net.taler.wallet.R
import org.json.JSONObject
@@ -38,6 +43,7 @@ enum class ReserveType {
* Withdrawn from a bank that has "tight" Taler integration
*/
@JsonProperty("taler-bank-withdraw")
+ @Suppress("unused")
TALER_BANK_WITHDRAW,
}
@@ -46,16 +52,21 @@ class ReserveCreationDetail(val type: ReserveType, val bankUrl: String?)
enum class RefreshReason {
@JsonProperty("manual")
+ @Suppress("unused")
MANUAL,
@JsonProperty("pay")
PAY,
@JsonProperty("refund")
+ @Suppress("unused")
REFUND,
@JsonProperty("abort-pay")
+ @Suppress("unused")
ABORT_PAY,
@JsonProperty("recoup")
+ @Suppress("unused")
RECOUP,
@JsonProperty("backup-restored")
+ @Suppress("unused")
BACKUP_RESTORED
}
@@ -406,6 +417,7 @@ class HistoryRefundedEvent(
)
abstract class WithdrawalSource
+@Suppress("unused")
@JsonTypeName("tip")
class WithdrawalSourceTip(
val tipId: String
diff --git a/app/src/main/java/net/taler/wallet/history/WalletHistory.kt b/app/src/main/java/net/taler/wallet/history/WalletHistory.kt
index a534f24..76b11ea 100644
--- a/app/src/main/java/net/taler/wallet/history/WalletHistory.kt
+++ b/app/src/main/java/net/taler/wallet/history/WalletHistory.kt
@@ -18,9 +18,14 @@ package net.taler.wallet.history
import android.os.Bundle
-import android.view.*
+import android.view.LayoutInflater
+import android.view.Menu
+import android.view.MenuInflater
+import android.view.MenuItem
+import android.view.View
import android.view.View.INVISIBLE
import android.view.View.VISIBLE
+import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
@@ -40,7 +45,7 @@ interface OnEventClickListener {
*/
class WalletHistory : Fragment(), OnEventClickListener {
- lateinit var model: WalletViewModel
+ private lateinit var model: WalletViewModel
private lateinit var showAllItem: MenuItem
private val historyAdapter = WalletHistoryAdapter(this)
@@ -107,7 +112,4 @@ class WalletHistory : Fragment(), OnEventClickListener {
.show(parentFragmentManager, null)
}
- companion object {
- const val TAG = "taler-wallet"
- }
}
diff --git a/app/src/main/java/net/taler/wallet/history/WalletHistoryAdapter.kt b/app/src/main/java/net/taler/wallet/history/WalletHistoryAdapter.kt
index d47c31f..71bdebc 100644
--- a/app/src/main/java/net/taler/wallet/history/WalletHistoryAdapter.kt
+++ b/app/src/main/java/net/taler/wallet/history/WalletHistoryAdapter.kt
@@ -16,8 +16,17 @@
package net.taler.wallet.history
+import android.annotation.SuppressLint
import android.graphics.Paint.STRIKE_THRU_TEXT_FLAG
-import android.text.format.DateUtils.*
+import android.text.format.DateUtils.DAY_IN_MILLIS
+import android.text.format.DateUtils.FORMAT_ABBREV_MONTH
+import android.text.format.DateUtils.FORMAT_ABBREV_RELATIVE
+import android.text.format.DateUtils.FORMAT_NO_YEAR
+import android.text.format.DateUtils.FORMAT_SHOW_DATE
+import android.text.format.DateUtils.FORMAT_SHOW_TIME
+import android.text.format.DateUtils.MINUTE_IN_MILLIS
+import android.text.format.DateUtils.formatDateTime
+import android.text.format.DateUtils.getRelativeTimeSpanString
import android.view.LayoutInflater
import android.view.View
import android.view.View.GONE
@@ -172,12 +181,14 @@ internal class WalletHistoryAdapter(
}
private fun showAmounts(effective: ParsedAmount, raw: ParsedAmount) {
+ @SuppressLint("SetTextI18n")
amountWithdrawn.text = "+$raw"
val calculatedFee = raw - effective
if (calculatedFee.isZero()) {
fee.visibility = GONE
feeLabel.visibility = GONE
} else {
+ @SuppressLint("SetTextI18n")
fee.text = "-$calculatedFee"
fee.visibility = VISIBLE
feeLabel.visibility = VISIBLE
@@ -208,11 +219,13 @@ internal class WalletHistoryAdapter(
private fun bind(event: HistoryPaymentSentEvent) {
title.text = event.orderShortInfo.summary
+ @SuppressLint("SetTextI18n")
amountPaidWithFees.text = "-${parseAmount(event.amountPaidWithFees)}"
}
private fun bind(event: HistoryPaymentAbortedEvent) {
title.text = event.orderShortInfo.summary
+ @SuppressLint("SetTextI18n")
amountPaidWithFees.text = "-${parseAmount(event.amountLost)}"
}
@@ -220,6 +233,7 @@ internal class WalletHistoryAdapter(
title.text = ""
val fee =
parseAmount(event.amountRefreshedRaw) - parseAmount(event.amountRefreshedEffective)
+ @SuppressLint("SetTextI18n")
if (fee.isZero()) amountPaidWithFees.text = null
else amountPaidWithFees.text = "-$fee"
}
diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml
index e37d18e..028c873 100644
--- a/app/src/main/res/drawable/ic_launcher_foreground.xml
+++ b/app/src/main/res/drawable/ic_launcher_foreground.xml
@@ -15,53 +15,54 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="108dp"
- android:height="108dp"
- android:viewportWidth="237.28813"
- android:viewportHeight="237.2881">
- <group android:translateX="48.64407"
- android:translateY="48.644062">
- <path
- android:pathData="m31.669,82.748h-4.702v-19.684h-6.041v-4.112h16.783v4.112L31.669,63.064Z"
- android:strokeWidth="0.81604069"
- android:fillColor="#ffffff"
- android:strokeColor="#00000000"
- android:fillAlpha="1"/>
- <path
- android:pathData="m50.301,74.364q-2.614,0 -3.65,0.669 -1.036,0.669 -1.036,2.295 0,1.211 0.717,1.929 0.717,0.717 1.944,0.717 1.849,0 2.869,-1.387 1.02,-1.403 1.02,-3.905v-0.319zM56.804,72.563v10.185h-4.638v-1.992q-0.845,1.179 -2.168,1.817 -1.323,0.638 -2.917,0.638 -3.044,0 -4.75,-1.61 -1.689,-1.61 -1.689,-4.495 0,-3.124 2.024,-4.606 2.024,-1.498 6.264,-1.498h3.235v-0.781q0,-1.132 -0.829,-1.705 -0.813,-0.59 -2.407,-0.59 -1.674,0 -3.251,0.43 -1.562,0.414 -3.267,1.339v-3.985q1.546,-0.638 3.14,-0.94 1.594,-0.303 3.379,-0.303 4.351,0 6.104,1.769 1.769,1.769 1.769,6.328z"
- android:strokeWidth="0.81604069"
- android:fillColor="#ffffff"
- android:strokeColor="#00000000"
- android:fillAlpha="1"/>
- <path
- android:pathData="m64.964,75.305v-13.771h-4.734v-3.586h9.404v17.357q0,2.104 0.653,2.98 0.653,0.877 2.215,0.877h3.73v3.586h-5.037q-3.331,0 -4.781,-1.721 -1.45,-1.721 -1.45,-5.722z"
- android:strokeWidth="0.81604069"
- android:fillColor="#ffffff"
- android:strokeColor="#00000000"
- android:fillAlpha="1"/>
- <path
- android:pathData="m96.012,81.871q-1.626,0.669 -3.315,1.004 -1.689,0.335 -3.57,0.335 -4.479,0 -6.853,-2.391 -2.359,-2.407 -2.359,-6.917 0,-4.367 2.279,-6.901 2.279,-2.534 6.216,-2.534 3.969,0 6.152,2.359 2.199,2.343 2.199,6.614v1.897h-12.097q0.016,2.104 1.243,3.14 1.227,1.036 3.666,1.036 1.61,0 3.172,-0.462 1.562,-0.462 3.267,-1.466zM92.059,71.83q-0.032,-1.849 -0.956,-2.789 -0.908,-0.956 -2.694,-0.956 -1.61,0 -2.566,0.988 -0.956,0.972 -1.132,2.773z"
- android:strokeWidth="0.81604069"
- android:fillColor="#ffffff"
- android:strokeColor="#00000000"
- android:fillAlpha="1"/>
- <path
- android:pathData="m116.445,69.822q-0.765,-0.701 -1.801,-1.052 -1.02,-0.351 -2.247,-0.351 -1.482,0 -2.598,0.526 -1.1,0.51 -1.705,1.498 -0.383,0.606 -0.542,1.466 -0.143,0.861 -0.143,2.614v8.224h-4.67v-17.851h4.67v2.773q0.685,-1.53 2.104,-2.359 1.419,-0.845 3.315,-0.845 0.956,0 1.865,0.239 0.924,0.223 1.753,0.669z"
- android:strokeWidth="0.81604069"
- android:fillColor="#ffffff"
- android:strokeColor="#00000000"
- android:fillAlpha="1"/>
- <path
- android:pathData="M25.843,97.583L16.433,97.583L0,70.865 16.433,44.111l9.409,0l-16.522,26.754z"
- android:strokeWidth="2.03518677"
- android:fillColor="#ae1010"
- android:strokeColor="#00000000"
- android:fillAlpha="1"/>
- <path
- android:pathData="m109.483,97.667 l17.087,-27.134 -17.041,-27.171l9.712,0l17.041,27.171 -17.041,27.134z"
- android:strokeWidth="2.08855891"
- android:fillColor="#ae1010"
- android:strokeColor="#00000000"
- android:fillAlpha="1"/>
- </group>
+ android:width="108dp"
+ android:height="108dp"
+ android:viewportWidth="237.28813"
+ android:viewportHeight="237.2881">
+ <group
+ android:translateX="48.64407"
+ android:translateY="48.644062">
+ <path
+ android:fillAlpha="1"
+ android:fillColor="#ffffff"
+ android:pathData="m31.669,82.748h-4.702v-19.684h-6.041v-4.112h16.783v4.112L31.669,63.064Z"
+ android:strokeWidth="0.81604069"
+ android:strokeColor="#00000000" />
+ <path
+ android:fillAlpha="1"
+ android:fillColor="#ffffff"
+ android:pathData="m50.301,74.364q-2.614,0 -3.65,0.669 -1.036,0.669 -1.036,2.295 0,1.211 0.717,1.929 0.717,0.717 1.944,0.717 1.849,0 2.869,-1.387 1.02,-1.403 1.02,-3.905v-0.319zM56.804,72.563v10.185h-4.638v-1.992q-0.845,1.179 -2.168,1.817 -1.323,0.638 -2.917,0.638 -3.044,0 -4.75,-1.61 -1.689,-1.61 -1.689,-4.495 0,-3.124 2.024,-4.606 2.024,-1.498 6.264,-1.498h3.235v-0.781q0,-1.132 -0.829,-1.705 -0.813,-0.59 -2.407,-0.59 -1.674,0 -3.251,0.43 -1.562,0.414 -3.267,1.339v-3.985q1.546,-0.638 3.14,-0.94 1.594,-0.303 3.379,-0.303 4.351,0 6.104,1.769 1.769,1.769 1.769,6.328z"
+ android:strokeWidth="0.81604069"
+ android:strokeColor="#00000000" />
+ <path
+ android:fillAlpha="1"
+ android:fillColor="#ffffff"
+ android:pathData="m64.964,75.305v-13.771h-4.734v-3.586h9.404v17.357q0,2.104 0.653,2.98 0.653,0.877 2.215,0.877h3.73v3.586h-5.037q-3.331,0 -4.781,-1.721 -1.45,-1.721 -1.45,-5.722z"
+ android:strokeWidth="0.81604069"
+ android:strokeColor="#00000000" />
+ <path
+ android:fillAlpha="1"
+ android:fillColor="#ffffff"
+ android:pathData="m96.012,81.871q-1.626,0.669 -3.315,1.004 -1.689,0.335 -3.57,0.335 -4.479,0 -6.853,-2.391 -2.359,-2.407 -2.359,-6.917 0,-4.367 2.279,-6.901 2.279,-2.534 6.216,-2.534 3.969,0 6.152,2.359 2.199,2.343 2.199,6.614v1.897h-12.097q0.016,2.104 1.243,3.14 1.227,1.036 3.666,1.036 1.61,0 3.172,-0.462 1.562,-0.462 3.267,-1.466zM92.059,71.83q-0.032,-1.849 -0.956,-2.789 -0.908,-0.956 -2.694,-0.956 -1.61,0 -2.566,0.988 -0.956,0.972 -1.132,2.773z"
+ android:strokeWidth="0.81604069"
+ android:strokeColor="#00000000" />
+ <path
+ android:fillAlpha="1"
+ android:fillColor="#ffffff"
+ android:pathData="m116.445,69.822q-0.765,-0.701 -1.801,-1.052 -1.02,-0.351 -2.247,-0.351 -1.482,0 -2.598,0.526 -1.1,0.51 -1.705,1.498 -0.383,0.606 -0.542,1.466 -0.143,0.861 -0.143,2.614v8.224h-4.67v-17.851h4.67v2.773q0.685,-1.53 2.104,-2.359 1.419,-0.845 3.315,-0.845 0.956,0 1.865,0.239 0.924,0.223 1.753,0.669z"
+ android:strokeWidth="0.81604069"
+ android:strokeColor="#00000000" />
+ <path
+ android:fillAlpha="1"
+ android:fillColor="#ae1010"
+ android:pathData="M25.843,97.583L16.433,97.583L0,70.865 16.433,44.111l9.409,0l-16.522,26.754z"
+ android:strokeWidth="2.03518677"
+ android:strokeColor="#00000000" />
+ <path
+ android:fillAlpha="1"
+ android:fillColor="#ae1010"
+ android:pathData="m109.483,97.667 l17.087,-27.134 -17.041,-27.171l9.712,0l17.041,27.171 -17.041,27.134z"
+ android:strokeWidth="2.08855891"
+ android:strokeColor="#00000000" />
+ </group>
</vector>
diff --git a/app/src/main/res/drawable/ic_logo_taler.xml b/app/src/main/res/drawable/ic_logo_taler.xml
deleted file mode 100644
index 8f80c3a..0000000
--- a/app/src/main/res/drawable/ic_logo_taler.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<!--
- ~ This file is part of GNU Taler
- ~ (C) 2020 Taler Systems S.A.
- ~
- ~ GNU Taler is free software; you can redistribute it and/or modify it under the
- ~ terms of the GNU General Public License as published by the Free Software
- ~ Foundation; either version 3, or (at your option) any later version.
- ~
- ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
- ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- ~
- ~ You should have received a copy of the GNU General Public License along with
- ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
- -->
-
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="14dp"
- android:height="14dp"
- android:viewportWidth="140"
- android:viewportHeight="139.99998">
- <path
- android:pathData="m31.669,82.748h-4.702v-19.684h-6.041v-4.112h16.783v4.112L31.669,63.064Z"
- android:strokeWidth="0.81604069"
- android:fillColor="#ffffff"
- android:strokeColor="#00000000"
- android:fillAlpha="1"/>
- <path
- android:pathData="m50.301,74.364q-2.614,0 -3.65,0.669 -1.036,0.669 -1.036,2.295 0,1.211 0.717,1.929 0.717,0.717 1.944,0.717 1.849,0 2.869,-1.387 1.02,-1.403 1.02,-3.905v-0.319zM56.804,72.563v10.185h-4.638v-1.992q-0.845,1.179 -2.168,1.817 -1.323,0.638 -2.917,0.638 -3.044,0 -4.75,-1.61 -1.689,-1.61 -1.689,-4.495 0,-3.124 2.024,-4.606 2.024,-1.498 6.264,-1.498h3.235v-0.781q0,-1.132 -0.829,-1.705 -0.813,-0.59 -2.407,-0.59 -1.674,0 -3.251,0.43 -1.562,0.414 -3.267,1.339v-3.985q1.546,-0.638 3.14,-0.94 1.594,-0.303 3.379,-0.303 4.351,0 6.104,1.769 1.769,1.769 1.769,6.328z"
- android:strokeWidth="0.81604069"
- android:fillColor="#ffffff"
- android:strokeColor="#00000000"
- android:fillAlpha="1"/>
- <path
- android:pathData="m64.964,75.305v-13.771h-4.734v-3.586h9.404v17.357q0,2.104 0.653,2.98 0.653,0.877 2.215,0.877h3.73v3.586h-5.037q-3.331,0 -4.781,-1.721 -1.45,-1.721 -1.45,-5.722z"
- android:strokeWidth="0.81604069"
- android:fillColor="#ffffff"
- android:strokeColor="#00000000"
- android:fillAlpha="1"/>
- <path
- android:pathData="m96.012,81.871q-1.626,0.669 -3.315,1.004 -1.689,0.335 -3.57,0.335 -4.479,0 -6.853,-2.391 -2.359,-2.407 -2.359,-6.917 0,-4.367 2.279,-6.901 2.279,-2.534 6.216,-2.534 3.969,0 6.152,2.359 2.199,2.343 2.199,6.614v1.897h-12.097q0.016,2.104 1.243,3.14 1.227,1.036 3.666,1.036 1.61,0 3.172,-0.462 1.562,-0.462 3.267,-1.466zM92.059,71.83q-0.032,-1.849 -0.956,-2.789 -0.908,-0.956 -2.694,-0.956 -1.61,0 -2.566,0.988 -0.956,0.972 -1.132,2.773z"
- android:strokeWidth="0.81604069"
- android:fillColor="#ffffff"
- android:strokeColor="#00000000"
- android:fillAlpha="1"/>
- <path
- android:pathData="m116.445,69.822q-0.765,-0.701 -1.801,-1.052 -1.02,-0.351 -2.247,-0.351 -1.482,0 -2.598,0.526 -1.1,0.51 -1.705,1.498 -0.383,0.606 -0.542,1.466 -0.143,0.861 -0.143,2.614v8.224h-4.67v-17.851h4.67v2.773q0.685,-1.53 2.104,-2.359 1.419,-0.845 3.315,-0.845 0.956,0 1.865,0.239 0.924,0.223 1.753,0.669z"
- android:strokeWidth="0.81604069"
- android:fillColor="#ffffff"
- android:strokeColor="#00000000"
- android:fillAlpha="1"/>
- <path
- android:pathData="M25.843,97.583L16.433,97.583L0,70.865 16.433,44.111l9.409,0l-16.522,26.754z"
- android:strokeWidth="2.03518677"
- android:fillColor="#ae1010"
- android:strokeColor="#00000000"
- android:fillAlpha="1"/>
- <path
- android:pathData="m109.483,97.667 l17.087,-27.134 -17.041,-27.171l9.712,0l17.041,27.171 -17.041,27.134z"
- android:strokeWidth="2.08855891"
- android:fillColor="#ae1010"
- android:strokeColor="#00000000"
- android:fillAlpha="1"/>
-</vector>
diff --git a/app/src/main/res/drawable/ic_menu_camera.xml b/app/src/main/res/drawable/ic_menu_camera.xml
deleted file mode 100644
index 18973f9..0000000
--- a/app/src/main/res/drawable/ic_menu_camera.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
- ~ This file is part of GNU Taler
- ~ (C) 2020 Taler Systems S.A.
- ~
- ~ GNU Taler is free software; you can redistribute it and/or modify it under the
- ~ terms of the GNU General Public License as published by the Free Software
- ~ Foundation; either version 3, or (at your option) any later version.
- ~
- ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
- ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- ~
- ~ You should have received a copy of the GNU General Public License along with
- ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
- -->
-
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
- <path
- android:fillColor="#FF000000"
- android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"/>
- <path
- android:fillColor="#FF000000"
- android:pathData="M9,2L7.17,4H4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2H9zm3,15c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"/>
-</vector>
diff --git a/app/src/main/res/drawable/ic_menu_gallery.xml b/app/src/main/res/drawable/ic_menu_gallery.xml
deleted file mode 100644
index ffeed82..0000000
--- a/app/src/main/res/drawable/ic_menu_gallery.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
- ~ This file is part of GNU Taler
- ~ (C) 2020 Taler Systems S.A.
- ~
- ~ GNU Taler is free software; you can redistribute it and/or modify it under the
- ~ terms of the GNU General Public License as published by the Free Software
- ~ Foundation; either version 3, or (at your option) any later version.
- ~
- ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
- ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- ~
- ~ You should have received a copy of the GNU General Public License along with
- ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
- -->
-
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
- <path
- android:fillColor="#FF000000"
- android:pathData="M22,16V4c0,-1.1 -0.9,-2 -2,-2H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2zm-11,-4l2.03,2.71L16,11l4,5H8l3,-4zM2,6v14c0,1.1 0.9,2 2,2h14v-2H4V6H2z"/>
-</vector>
diff --git a/app/src/main/res/drawable/ic_menu_share.xml b/app/src/main/res/drawable/ic_menu_share.xml
deleted file mode 100644
index 1905038..0000000
--- a/app/src/main/res/drawable/ic_menu_share.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
- ~ This file is part of GNU Taler
- ~ (C) 2020 Taler Systems S.A.
- ~
- ~ GNU Taler is free software; you can redistribute it and/or modify it under the
- ~ terms of the GNU General Public License as published by the Free Software
- ~ Foundation; either version 3, or (at your option) any later version.
- ~
- ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
- ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- ~
- ~ You should have received a copy of the GNU General Public License along with
- ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
- -->
-
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
- <path
- android:fillColor="#FF000000"
- android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z"/>
-</vector>
diff --git a/app/src/main/res/drawable/ic_menu_slideshow.xml b/app/src/main/res/drawable/ic_menu_slideshow.xml
deleted file mode 100644
index db43ecc..0000000
--- a/app/src/main/res/drawable/ic_menu_slideshow.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
- ~ This file is part of GNU Taler
- ~ (C) 2020 Taler Systems S.A.
- ~
- ~ GNU Taler is free software; you can redistribute it and/or modify it under the
- ~ terms of the GNU General Public License as published by the Free Software
- ~ Foundation; either version 3, or (at your option) any later version.
- ~
- ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
- ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- ~
- ~ You should have received a copy of the GNU General Public License along with
- ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
- -->
-
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
- <path
- android:fillColor="#FF000000"
- android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6zm16,-4H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2zm-8,12.5v-9l6,4.5 -6,4.5z"/>
-</vector>
diff --git a/app/src/main/res/drawable/ic_scan_qr.xml b/app/src/main/res/drawable/ic_scan_qr.xml
index 40dabaf..a6d1172 100644
--- a/app/src/main/res/drawable/ic_scan_qr.xml
+++ b/app/src/main/res/drawable/ic_scan_qr.xml
@@ -15,188 +15,188 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="278dp"
- android:height="278dp"
- android:viewportWidth="278"
- android:viewportHeight="278">
- <path
- android:pathData="M103,28l0,77 -76,0 0,-77 76,0zM93,38l-56,0 0,57 56,0 0,-57z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M251,28l0,77 -76,0 0,-77 76,0zM241,38l-56,0 0,57 56,0 0,-57z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M103,174l0,76 -76,0 0,-76 76,0zM93,184l-56,0 0,56 56,0 0,-56z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M157,240l0,-12l-10,0l0,12l-12,0l0,-21l20,0l0,-10l-33,0l0,-9l-10,0l1,19l12,0l0,11l-13,0l0,10l13,0l0,10l42,0l0,-10z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M38,123l-11,0l0,-10l11,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M123,69l-10,0l0,-10l10,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M124,39l-11,0l0,-10l11,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M222,215l-10,0l0,-10l10,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M50,144l10,0l0,-10l-10,0l0,-10l-10,0l0,9l-12,0l0,24l12,0l0,8l31,0l0,-19l-11,0l0,9l-10,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M242,113l0,10 9,0 0,10 -16,0 0,13 -29,0 0,9 16,0 0,23 -11,0 0,-13 -23,0 0,-10 8,0 0,-9 -6,0 0,-10 33,0 0,-18 -13,0 0,-5c10,0 21,0 32,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M121,123l-31,0l0,10l-21,0l0,-10l-11,0l0,-10l63,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M123,74l-10,0l0,17l0,17l10,0l11,0l0,-17l-11,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M134,85l11,0l0,18l13,0l0,-12l8,0l0,-16l-32,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M153,44l-28,0 0,11 18,0 0,11 13,0 0,-11 11,0c0,-9 0,-18 0,-27l-24,0 0,11 10,0 0,5z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M138,70l-10,0l0,-10l10,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M112,139l-10,0l0,-10l10,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M157,183l-11,0l0,-18l11,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M140,180l-10,0l0,-10l10,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M206,189l-10,0l0,-20l10,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M241,240l-18,0l0,10l28,0l0,-26l-10,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M183,237l-11,0l0,-18l11,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M123,187l-10,0l0,-23l10,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M172,196l-15,0l0,-10l-32,0l0,10l23,0l0,10l12,0l0,11l46,0l0,-11l-13,0l0,-10l-11,0l0,10l-10,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M185,179l-13,0l0,11l-10,0l0,-21l23,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M198,220l10,0 0,20 9,0 0,10c-16,0 -13,0 -31,0l0,-10 12,0 0,-20z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M118,155l-30,0l0,10l-10,0l0,-13l0,0l0,-7l40,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M136,123l0,9l21,0l0,-9l13,0l0,-10l-43,0l0,10z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M145,147l-22,0l0,-10l22,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M158,150l-11,0l0,10l22,0l0,-23l-11,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M251,184l-6,0l0,8l-10,0l0,-8l-5,0l0,-22l21,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M222,194l-11,0l0,-10l11,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M228,217c7,0 15,0 23,0l0,-19 -10,0 0,9 -13,0 0,10z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M237,236l-11,0l0,-10l11,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M82,82l-34,0l0,-32l34,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M230,82l-34,0l0,-32l34,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M82,228l-34,0l0,-32l34,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M183,250l-11,0l0,-10l11,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M140,162l-11,0l0,-10l11,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M218,132l-10,0l0,-10l10,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M193,123l-11,0l0,-10l11,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M251,159l-10,0l0,-10l10,0z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M0,53l0,-53l54,0l0,10l-44,0l0,43z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M278,53l0,-53l-54,0l0,10l44,0l0,43z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M0,225l0,53l54,0l0,-10l-44,0l0,-43z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
- <path
- android:pathData="M278,225l0,53l-54,0l0,-10l44,0l0,-43z"
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"/>
+ android:width="200dp"
+ android:height="200dp"
+ android:viewportWidth="278"
+ android:viewportHeight="278">
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M103,28l0,77 -76,0 0,-77 76,0zM93,38l-56,0 0,57 56,0 0,-57z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M251,28l0,77 -76,0 0,-77 76,0zM241,38l-56,0 0,57 56,0 0,-57z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M103,174l0,76 -76,0 0,-76 76,0zM93,184l-56,0 0,56 56,0 0,-56z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M157,240l0,-12l-10,0l0,12l-12,0l0,-21l20,0l0,-10l-33,0l0,-9l-10,0l1,19l12,0l0,11l-13,0l0,10l13,0l0,10l42,0l0,-10z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M38,123l-11,0l0,-10l11,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M123,69l-10,0l0,-10l10,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M124,39l-11,0l0,-10l11,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M222,215l-10,0l0,-10l10,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M50,144l10,0l0,-10l-10,0l0,-10l-10,0l0,9l-12,0l0,24l12,0l0,8l31,0l0,-19l-11,0l0,9l-10,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M242,113l0,10 9,0 0,10 -16,0 0,13 -29,0 0,9 16,0 0,23 -11,0 0,-13 -23,0 0,-10 8,0 0,-9 -6,0 0,-10 33,0 0,-18 -13,0 0,-5c10,0 21,0 32,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M121,123l-31,0l0,10l-21,0l0,-10l-11,0l0,-10l63,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M123,74l-10,0l0,17l0,17l10,0l11,0l0,-17l-11,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M134,85l11,0l0,18l13,0l0,-12l8,0l0,-16l-32,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M153,44l-28,0 0,11 18,0 0,11 13,0 0,-11 11,0c0,-9 0,-18 0,-27l-24,0 0,11 10,0 0,5z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M138,70l-10,0l0,-10l10,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M112,139l-10,0l0,-10l10,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M157,183l-11,0l0,-18l11,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M140,180l-10,0l0,-10l10,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M206,189l-10,0l0,-20l10,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M241,240l-18,0l0,10l28,0l0,-26l-10,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M183,237l-11,0l0,-18l11,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M123,187l-10,0l0,-23l10,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M172,196l-15,0l0,-10l-32,0l0,10l23,0l0,10l12,0l0,11l46,0l0,-11l-13,0l0,-10l-11,0l0,10l-10,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M185,179l-13,0l0,11l-10,0l0,-21l23,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M198,220l10,0 0,20 9,0 0,10c-16,0 -13,0 -31,0l0,-10 12,0 0,-20z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M118,155l-30,0l0,10l-10,0l0,-13l0,0l0,-7l40,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M136,123l0,9l21,0l0,-9l13,0l0,-10l-43,0l0,10z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M145,147l-22,0l0,-10l22,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M158,150l-11,0l0,10l22,0l0,-23l-11,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M251,184l-6,0l0,8l-10,0l0,-8l-5,0l0,-22l21,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M222,194l-11,0l0,-10l11,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M228,217c7,0 15,0 23,0l0,-19 -10,0 0,9 -13,0 0,10z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M237,236l-11,0l0,-10l11,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M82,82l-34,0l0,-32l34,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M230,82l-34,0l0,-32l34,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M82,228l-34,0l0,-32l34,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M183,250l-11,0l0,-10l11,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M140,162l-11,0l0,-10l11,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M218,132l-10,0l0,-10l10,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M193,123l-11,0l0,-10l11,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M251,159l-10,0l0,-10l10,0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M0,53l0,-53l54,0l0,10l-44,0l0,43z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M278,53l0,-53l-54,0l0,10l44,0l0,43z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M0,225l0,53l54,0l0,-10l-44,0l0,-43z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M278,225l0,53l-54,0l0,-10l44,0l0,-43z" />
</vector>
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 9598673..7769fd3 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of GNU Taler
~ (C) 2020 Taler Systems S.A.
~
@@ -15,8 +14,7 @@
~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
-->
-<androidx.drawerlayout.widget.DrawerLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.drawerlayout.widget.DrawerLayout 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/drawer_layout"
@@ -28,7 +26,7 @@
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
- android:layout_height="match_parent"/>
+ android:layout_height="match_parent" />
<com.google.android.material.navigation.NavigationView
android:id="@+id/nav_view"
@@ -37,6 +35,6 @@
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
- app:menu="@menu/activity_main_drawer"/>
+ app:menu="@menu/activity_main_drawer" />
</androidx.drawerlayout.widget.DrawerLayout>
diff --git a/app/src/main/res/layout/app_bar_main.xml b/app/src/main/res/layout/app_bar_main.xml
index 87d08b4..f2d8571 100644
--- a/app/src/main/res/layout/app_bar_main.xml
+++ b/app/src/main/res/layout/app_bar_main.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of GNU Taler
~ (C) 2020 Taler Systems S.A.
~
@@ -15,8 +14,7 @@
~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
-->
-<androidx.coordinatorlayout.widget.CoordinatorLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.coordinatorlayout.widget.CoordinatorLayout 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:layout_width="match_parent"
@@ -25,20 +23,19 @@
<com.google.android.material.appbar.AppBarLayout
- android:layout_height="wrap_content"
android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<RelativeLayout
android:layout_width="match_parent"
- android:layout_height="?attr/actionBarSize">
+ android:layout_height="wrap_content">
- <androidx.appcompat.widget.Toolbar
+ <com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
+ style="@style/AppTheme.Toolbar"
android:layout_width="match_parent"
- android:layout_height="?attr/actionBarSize"
- android:background="?attr/colorPrimary"
- app:popupTheme="@style/AppTheme.PopupOverlay"/>
+ android:layout_height="wrap_content" />
<me.zhanghai.android.materialprogressbar.MaterialProgressBar
android:id="@+id/progress_bar"
@@ -55,7 +52,18 @@
</com.google.android.material.appbar.AppBarLayout>
- <include layout="@layout/content_main" android:id="@+id/include"/>
+ <androidx.fragment.app.FragmentContainerView
+ android:id="@+id/nav_host_fragment"
+ android:name="androidx.navigation.fragment.NavHostFragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ app:defaultNavHost="true"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:navGraph="@navigation/nav_graph" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
@@ -63,8 +71,8 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
- app:fabSize="normal"
android:scaleType="center"
+ app:fabSize="normal"
app:srcCompat="@drawable/ic_scan_qr" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/balance_row.xml b/app/src/main/res/layout/balance_row.xml
index c6b72bc..20ebf48 100644
--- a/app/src/main/res/layout/balance_row.xml
+++ b/app/src/main/res/layout/balance_row.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of GNU Taler
~ (C) 2020 Taler Systems S.A.
~
@@ -16,72 +15,76 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
- <LinearLayout android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
<TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/balance_amount"
- android:textSize="40sp" tools:text="100.50">
- </TextView>
+ android:id="@+id/balance_amount"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="40sp"
+ tools:text="100.50" />
- <Space android:layout_width="10sp"
- android:layout_height="match_parent"/>
+ <Space
+ android:layout_width="10sp"
+ android:layout_height="match_parent" />
<TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/balance_currency"
- android:textSize="20sp" tools:text="TESTKUDOS">
- </TextView>
+ android:id="@+id/balance_currency"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="20sp"
+ tools:text="TESTKUDOS" />
</LinearLayout>
- <LinearLayout android:layout_width="match_parent"
+ <LinearLayout
+ android:id="@+id/balance_row_pending"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:id="@+id/balance_row_pending">
+ android:orientation="horizontal">
- <Space android:layout_width="5sp"
- android:layout_height="match_parent"/>
+ <Space
+ android:layout_width="5sp"
+ android:layout_height="match_parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="+"
- android:textColor="#006600">
- </TextView>
+ android:textColor="#006600"
+ tools:ignore="HardcodedText" />
- <Space android:layout_width="5sp"
- android:layout_height="match_parent"/>
+ <Space
+ android:layout_width="5sp"
+ android:layout_height="match_parent" />
<TextView
+ android:id="@+id/balance_pending"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:id="@+id/balance_pending"
android:textColor="#006600"
- android:textSize="20sp" tools:text="10 TESTKUDOS">
- </TextView>
+ android:textSize="20sp"
+ tools:text="10 TESTKUDOS" />
- <Space android:layout_width="5sp"
- android:layout_height="match_parent"/>
+ <Space
+ android:layout_width="5sp"
+ android:layout_height="match_parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="inbound"
- android:textColor="#006600">
- </TextView>
+ android:text="@string/balance_inbound"
+ android:textColor="#006600" />
</LinearLayout>
-
</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/content_main.xml b/app/src/main/res/layout/content_main.xml
deleted file mode 100644
index c43af48..0000000
--- a/app/src/main/res/layout/content_main.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ This file is part of GNU Taler
- ~ (C) 2020 Taler Systems S.A.
- ~
- ~ GNU Taler is free software; you can redistribute it and/or modify it under the
- ~ terms of the GNU General Public License as published by the Free Software
- ~ Foundation; either version 3, or (at your option) any later version.
- ~
- ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
- ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- ~
- ~ You should have received a copy of the GNU General Public License along with
- ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
- -->
-
-<androidx.constraintlayout.widget.ConstraintLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- app:layout_behavior="@string/appbar_scrolling_view_behavior"
- tools:showIn="@layout/app_bar_main"
- tools:context=".MainActivity">
-
- <androidx.fragment.app.FragmentContainerView
- android:id="@+id/nav_host_fragment"
- android:name="androidx.navigation.fragment.NavHostFragment"
- android:layout_width="0dp"
- android:layout_height="0dp"
- app:layout_constraintLeft_toLeftOf="parent"
- app:layout_constraintRight_toRightOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toBottomOf="parent"
- app:defaultNavHost="true"
- app:navGraph="@navigation/nav_graph" />
-
-</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/app/src/main/res/layout/fragment_already_paid.xml b/app/src/main/res/layout/fragment_already_paid.xml
index beda615..d36fe69 100644
--- a/app/src/main/res/layout/fragment_already_paid.xml
+++ b/app/src/main/res/layout/fragment_already_paid.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of GNU Taler
~ (C) 2020 Taler Systems S.A.
~
@@ -15,40 +14,39 @@
~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
-->
-<FrameLayout 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:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="15dp"
+ android:orientation="vertical"
tools:context=".payment.PaymentSuccessfulFragment">
-
- <LinearLayout
- android:orientation="vertical"
+ <Space
android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <Space android:layout_width="match_parent" android:layout_height="0dp"
- android:layout_weight="1"/>
+ android:layout_height="0dp"
+ android:layout_weight="1" />
- <TextView
- android:layout_gravity="center"
- android:layout_width="match_parent"
- android:textAlignment="center"
- android:layout_height="50dp"
- android:text="You've already paid for this order."
- android:autoSizeTextType="uniform"
- android:textColor="@android:color/holo_green_dark"/>
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="50dp"
+ android:layout_gravity="center"
+ android:text="@string/payment_already_paid"
+ android:textAlignment="center"
+ android:textColor="@android:color/holo_green_dark"
+ app:autoSizeTextType="uniform" />
- <Space android:layout_width="match_parent" android:layout_height="0dp"
- android:layout_weight="1"/>
- <Button
- android:text="Go Back"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:id="@+id/backButton"/>
+ <Space
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
- </LinearLayout>
+ <Button
+ android:id="@+id/backButton"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/button_back" />
-</FrameLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/app/src/main/res/layout/fragment_prompt_withdraw.xml b/app/src/main/res/layout/fragment_prompt_withdraw.xml
index c9525a6..dba7450 100644
--- a/app/src/main/res/layout/fragment_prompt_withdraw.xml
+++ b/app/src/main/res/layout/fragment_prompt_withdraw.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of GNU Taler
~ (C) 2020 Taler Systems S.A.
~
@@ -15,87 +14,93 @@
~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
-->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/prompt_withdraw"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="15dp"
+ android:orientation="vertical"
tools:context=".PromptWithdraw">
- <LinearLayout
- android:orientation="vertical"
+ <Space
+ android:layout_width="match_parent"
+ android:layout_height="15dp"
+ android:layout_weight="1" />
+
+ <TextView
+ android:id="@+id/order_summary_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:text="@string/withdraw_do_you_want" />
+
+ <TextView
+ android:id="@+id/withdraw_amount"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:textSize="25sp"
+ tools:text="10.00 KUDOS" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:text="@string/withdraw_fees" />
+
+ <Space
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:id="@+id/prompt_withdraw">
+ android:layout_height="25dp" />
- <Space android:layout_width="match_parent"
- android:layout_height="15dp"
- android:layout_weight="1"/>
- <TextView
- android:text="Do you want to withdraw"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:id="@+id/order_summary_label"/>
+ <TextView
+ android:id="@+id/order_amount_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:text="@string/withdraw_exchange" />
- <TextView
- android:text="(amount)"
- tools:text="10.00 KUDOS"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="25sp"
- android:layout_gravity="center"
- android:id="@+id/withdraw_amount"/>
+ <TextView
+ android:id="@+id/withdraw_exchange"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:textSize="25sp"
+ tools:text="(exchange base url)" />
- <TextView
- android:text="(minus exchange fees not shown in this prototype)"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"/>
+ <Space
+ android:layout_width="match_parent"
+ android:layout_height="15dp"
+ android:layout_weight="1" />
- <Space android:layout_width="match_parent"
- android:layout_height="25dp"/>
+ <Space
+ android:layout_width="match_parent"
+ android:layout_height="15dp"
+ android:layout_weight="1" />
- <TextView
- android:text="Using the exchange provider"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:id="@+id/order_amount_label"/>
- <TextView
- android:text="(exchange base url)"
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+
+ <Button
+ android:id="@+id/button_cancel_withdraw"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="25sp"
- android:layout_gravity="center"
- android:id="@+id/withdraw_exchange"/>
-
- <Space android:layout_width="match_parent"
- android:layout_height="15dp"
- android:layout_weight="1"/>
+ android:text="@string/button_cancel" />
+ <Space
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1" />
- <Space android:layout_width="match_parent"
- android:layout_height="15dp"
- android:layout_weight="1"/>
-
- <LinearLayout android:layout_width="match_parent"
+ <Button
+ android:id="@+id/button_confirm_withdraw"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:orientation="horizontal">
- <Button android:layout_width="wrap_content" android:layout_height="wrap_content"
- android:text="Cancel"
- android:id="@+id/button_cancel_withdraw"/>
-
- <Space android:layout_width="15dp" android:layout_height="match_parent"
- android:layout_weight="1"/>
-
- <Button android:layout_width="wrap_content" android:layout_height="wrap_content"
- android:id="@+id/button_confirm_withdraw"
- android:text="Confirm Withdraw"/>
- </LinearLayout>
-
+ android:text="@string/withdraw_button_confirm" />
</LinearLayout>
-</FrameLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/app/src/main/res/layout/fragment_review_exchange_tos.xml b/app/src/main/res/layout/fragment_review_exchange_tos.xml
index 15f1c91..355fe25 100644
--- a/app/src/main/res/layout/fragment_review_exchange_tos.xml
+++ b/app/src/main/res/layout/fragment_review_exchange_tos.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of GNU Taler
~ (C) 2020 Taler Systems S.A.
~
@@ -15,58 +14,55 @@
~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
-->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="15dp"
+ android:orientation="vertical"
tools:context=".ReviewExchangeTOS">
- <LinearLayout
+ <ScrollView
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <ScrollView
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- android:scrollbars="vertical">
- <TextView
- android:id="@+id/text_tos"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="TextView" />
- </ScrollView>
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:fillViewport="true"
+ android:scrollbars="vertical">
- <CheckBox
- android:id="@+id/checkBox_accept_tos"
+ <TextView
+ android:id="@+id/text_tos"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="0"
- android:text="Accept Terms of Service" />
+ tools:text="TextView" />
+ </ScrollView>
- <LinearLayout
- android:layout_width="match_parent"
+ <CheckBox
+ android:id="@+id/checkBox_accept_tos"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/exchange_tos_accept" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+
+ <Button
+ android:id="@+id/button_tos_abort"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_weight="0"
- android:orientation="horizontal">
- <Button
- android:id="@+id/button_tos_abort"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Cancel" />
- <Space
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_weight="1"/>
+ android:text="@string/button_cancel" />
- <Button
- android:id="@+id/button_tos_accept"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Continue" />
- </LinearLayout>
+ <Space
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
+ <Button
+ android:id="@+id/button_tos_accept"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/exchange_tos_button_continue" />
</LinearLayout>
-</FrameLayout> \ No newline at end of file
+
+</LinearLayout>
diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml
index dffc26f..12a83ec 100644
--- a/app/src/main/res/layout/fragment_settings.xml
+++ b/app/src/main/res/layout/fragment_settings.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of GNU Taler
~ (C) 2020 Taler Systems S.A.
~
@@ -15,95 +14,90 @@
~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
-->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_margin="10dp"
- tools:context=".Settings">
-
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
-
- <TextView
- android:id="@+id/editText2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:inputType="textPersonName"
- android:text="Version Information"
- android:textSize="18sp" />
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_margin="10dp"
+ android:orientation="vertical"
+ tools:context=".Settings">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
-
- <TextView
- android:id="@+id/textView5"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:text="Android Wallet" />
-
- <TextView
- android:id="@+id/textView4"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:text="0.6.0pre8 (Wed 25 Dec 2019" />
+ <TextView
+ android:id="@+id/editText2"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ems="10"
+ android:text="@string/settings_version"
+ android:textSize="18sp" />
- </LinearLayout>
- <Space
- android:layout_width="0dp"
- android:layout_height="15dp" />
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
<TextView
- android:visibility="gone"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:text="Backups"
- android:textSize="18sp" />
-
- <Button
- android:visibility="gone"
- android:text="Export wallet to file"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/button_backup_export"/>
-
- <Button
- android:visibility="gone"
- android:text="Import from file"
+ android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:id="@+id/button_backup_import"/>
-
+ android:layout_weight="1"
+ android:text="@string/app_name" />
<TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:text="Developer Settings (use with caution!)"
- android:textSize="18sp" />
-
- <!--
- <Button
- android:text="Withdraw TESTKUDOS"
+ android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:id="@+id/button_withdraw_testkudos"/>-->
-
- <Button
- android:text="Reset Wallet (dangerous!)"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:id="@+id/button_reset_wallet_dangerously"/>
+ android:layout_weight="1"
+ tools:text="0.6.0pre8" />
</LinearLayout>
-</FrameLayout> \ No newline at end of file
+
+ <Space
+ android:layout_width="0dp"
+ android:layout_height="15dp" />
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ems="10"
+ android:text="@string/settings_backups"
+ android:textSize="18sp"
+ android:visibility="gone" />
+
+ <Button
+ android:id="@+id/button_backup_export"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/settings_export_to_file"
+ android:visibility="gone" />
+
+ <Button
+ android:id="@+id/button_backup_import"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/settings_import_from_file"
+ android:visibility="gone" />
+
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ems="10"
+ android:text="@string/settings_developer"
+ android:textSize="18sp" />
+
+ <!--
+ <Button
+ android:text="Withdraw TESTKUDOS"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/button_withdraw_testkudos"/>-->
+
+ <Button
+ android:id="@+id/button_reset_wallet_dangerously"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/settings_reset" />
+
+</LinearLayout>
diff --git a/app/src/main/res/layout/fragment_show_balance.xml b/app/src/main/res/layout/fragment_show_balance.xml
index 8fc483b..af003eb 100644
--- a/app/src/main/res/layout/fragment_show_balance.xml
+++ b/app/src/main/res/layout/fragment_show_balance.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of GNU Taler
~ (C) 2020 Taler Systems S.A.
~
@@ -15,8 +14,7 @@
~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
-->
-<androidx.core.widget.NestedScrollView
- xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -30,47 +28,49 @@
<View
android:id="@+id/header"
android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
+ android:layout_height="wrap_content" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list_balances"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:scrollbars="vertical"/>
+ android:scrollbars="vertical" />
<TextView
android:id="@+id/list_balances_placeholder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
- android:text="There is no digital cash in your wallet."
- tools:visibility="gone"/>
+ android:text="@string/balance_no_cash"
+ tools:visibility="gone" />
- <Space android:layout_width="match_parent" android:layout_height="20dp"/>
+ <Space
+ android:layout_width="match_parent"
+ android:layout_height="20dp" />
<Button
- android:text="Withdraw TESTKUDOS"
+ android:id="@+id/button_withdraw_testkudos"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:id="@+id/button_withdraw_testkudos"/>
+ android:text="@string/withdraw_button_testkudos" />
<Button
- android:text="Scan Taler QR Code"
+ android:id="@+id/button_pay_qr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:id="@+id/button_pay_qr"/>
+ android:text="@string/button_scan_qr_code" />
<TextView
android:id="@+id/pending_operations_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="Pending Operations:" />
+ android:text="@string/pending_operations_label" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list_pending"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:scrollbars="vertical"/>
+ android:scrollbars="vertical" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
diff --git a/app/src/main/res/layout/fragment_withdraw_successful.xml b/app/src/main/res/layout/fragment_withdraw_successful.xml
index b1474de..5a48f75 100644
--- a/app/src/main/res/layout/fragment_withdraw_successful.xml
+++ b/app/src/main/res/layout/fragment_withdraw_successful.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of GNU Taler
~ (C) 2020 Taler Systems S.A.
~
@@ -15,55 +14,51 @@
~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
-->
-<FrameLayout 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:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
+ android:orientation="vertical"
tools:context=".WithdrawSuccessful">
- <LinearLayout
+ <Space
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
+ android:layout_height="0dp"
+ android:layout_weight="1" />
- <Space
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" />
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="50dp"
- android:layout_gravity="center"
- android:autoSizeTextType="uniform"
- android:text="Withdrawal confirmed."
- android:textAlignment="center"
- android:textColor="@android:color/holo_green_dark" />
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="50dp"
+ android:layout_gravity="center"
+ android:text="@string/withdraw_accepted"
+ android:textAlignment="center"
+ android:textColor="@android:color/holo_green_dark"
+ app:autoSizeTextType="uniform" />
- <TextView
- android:layout_width="match_parent"
- android:layout_height="50dp"
- android:layout_gravity="center"
- android:text="Your bank will now ask you to approve a transfer to the selected change. After you've confirmed the transfer with your bank, the digital cash will show in this wallet."
- android:textAlignment="center" />
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="50dp"
+ android:layout_gravity="center"
+ android:text="@string/withdraw_success_info"
+ android:textAlignment="center" />
- <Space
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" />
+ <Space
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
- <Space
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" />
+ <Space
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
- <Button
- android:id="@+id/backButton"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="Go Back" />
+ <Button
+ android:id="@+id/backButton"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/button_back" />
- </LinearLayout>
-</FrameLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/app/src/main/res/layout/history_payment.xml b/app/src/main/res/layout/history_payment.xml
index 660e315..dd135e7 100644
--- a/app/src/main/res/layout/history_payment.xml
+++ b/app/src/main/res/layout/history_payment.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of GNU Taler
~ (C) 2020 Taler Systems S.A.
~
@@ -23,8 +22,8 @@
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
- android:background="?android:selectableItemBackground"
- android:layout_marginBottom="8dp">
+ android:layout_marginBottom="8dp"
+ android:background="?attr/selectableItemBackground">
<ImageView
android:id="@+id/icon"
diff --git a/app/src/main/res/layout/history_receive.xml b/app/src/main/res/layout/history_receive.xml
index 85cfccf..1f76376 100644
--- a/app/src/main/res/layout/history_receive.xml
+++ b/app/src/main/res/layout/history_receive.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of GNU Taler
~ (C) 2020 Taler Systems S.A.
~
@@ -22,9 +21,9 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
- android:background="?android:selectableItemBackground"
android:layout_marginEnd="16dp"
- android:layout_marginBottom="8dp">
+ android:layout_marginBottom="8dp"
+ android:background="?attr/selectableItemBackground">
<ImageView
android:id="@+id/icon"
diff --git a/app/src/main/res/layout/history_row.xml b/app/src/main/res/layout/history_row.xml
index e741d19..8f0db1f 100644
--- a/app/src/main/res/layout/history_row.xml
+++ b/app/src/main/res/layout/history_row.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of GNU Taler
~ (C) 2020 Taler Systems S.A.
~
@@ -20,8 +19,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="?android:selectableItemBackground"
- android:layout_margin="15dp">
+ android:layout_margin="15dp"
+ android:background="?attr/selectableItemBackground">
<ImageView
android:id="@+id/icon"
@@ -35,8 +34,8 @@
tools:ignore="ContentDescription" />
<TextView
- style="@style/HistoryTitle"
android:id="@+id/title"
+ style="@style/HistoryTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
diff --git a/app/src/main/res/menu/activity_main_drawer.xml b/app/src/main/res/menu/activity_main_drawer.xml
index 9b31ba0..f06f0ab 100644
--- a/app/src/main/res/menu/activity_main_drawer.xml
+++ b/app/src/main/res/menu/activity_main_drawer.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of GNU Taler
~ (C) 2020 Taler Systems S.A.
~
@@ -16,22 +15,22 @@
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- tools:showIn="navigation_view">
+ xmlns:tools="http://schemas.android.com/tools"
+ tools:showIn="navigation_view">
<group android:checkableBehavior="single">
<item
android:id="@+id/nav_home"
android:icon="@drawable/ic_home_black_24dp"
- android:title="Home"/>
+ android:title="@string/menu_home" />
<item
android:id="@+id/nav_history"
android:icon="@drawable/ic_history_black_24dp"
- android:title="History"/>
+ android:title="@string/menu_history" />
<item
android:id="@+id/nav_settings"
android:icon="@drawable/ic_menu_manage"
- android:title="Settings"/>
+ android:title="@string/menu_settings" />
</group>
</menu>
diff --git a/app/src/main/res/menu/balance.xml b/app/src/main/res/menu/balance.xml
index bc23595..15a6016 100644
--- a/app/src/main/res/menu/balance.xml
+++ b/app/src/main/res/menu/balance.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of GNU Taler
~ (C) 2020 Taler Systems S.A.
~
@@ -16,13 +15,15 @@
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto">
- <item android:id="@+id/reload_balance"
- android:title="Reload Balance"
- android:orderInCategory="100"
- app:showAsAction="never"/>
- <item android:id="@+id/retry_pending"
- android:title="Retry Pending Operations"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
+ <item
+ android:id="@+id/reload_balance"
android:orderInCategory="100"
- app:showAsAction="never"/>
+ android:title="@string/menu_balance_reload"
+ app:showAsAction="never" />
+ <item
+ android:id="@+id/retry_pending"
+ android:orderInCategory="100"
+ android:title="@string/menu_retry_pending_operations"
+ app:showAsAction="never" />
</menu>
diff --git a/app/src/main/res/navigation/nav_graph.xml b/app/src/main/res/navigation/nav_graph.xml
index a82d7be..39068ec 100644
--- a/app/src/main/res/navigation/nav_graph.xml
+++ b/app/src/main/res/navigation/nav_graph.xml
@@ -18,7 +18,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nav_graph"
- app:startDestination="@id/showBalance">
+ app:startDestination="@id/showBalance"
+ tools:ignore="UnusedNavigation">
<fragment
android:id="@+id/showBalance"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 7bfb004..8307e37 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -16,18 +16,20 @@
<resources>
<string name="app_name">Taler Wallet</string>
- <string name="navigation_drawer_open">Open navigation drawer</string>
- <string name="navigation_drawer_close">Close navigation drawer</string>
+
<string name="nav_header_title">GNU Taler</string>
<string name="nav_header_subtitle">Wallet</string>
<string name="nav_header_desc">Navigation header</string>
- <string name="action_settings">Settings</string>
+
+ <string name="button_back">Go Back</string>
+ <string name="button_cancel">Cancel</string>
+ <string name="button_scan_qr_code">Scan Taler QR Code</string>
<string name="menu_home">Home</string>
- <string name="menu_gallery">Gallery</string>
- <string name="menu_tools">Tools</string>
- <string name="menu_share">Share</string>
- <string name="menu_send">Send</string>
+ <string name="menu_history">History</string>
+ <string name="menu_settings">Settings</string>
+ <string name="menu_balance_reload">Reload balances</string>
+ <string name="menu_retry_pending_operations">Retry Pending Operations</string>
<string name="servicedesc">my service</string>
<string name="aiddescription">my aid</string>
@@ -63,5 +65,30 @@
<string name="payment_hide_details">Hide Details</string>
<string name="payment_successful">Payment was successful</string>
<string name="payment_back_button">Go Back</string>
+ <string name="payment_already_paid">You\'ve already paid for this order.</string>
+
+ <string name="withdraw_accepted">Withdrawal accepted</string>
+ <string name="withdraw_success_info">Your bank will now ask you to approve a transfer to the selected change. After you\'ve confirmed the transfer with your bank, the digital cash will show in this wallet.</string>
+ <string name="withdraw_do_you_want">Do you want to withdraw</string>
+ <string name="withdraw_fees">(minus exchange fees not shown in this prototype)</string>
+ <string name="withdraw_exchange">Using the exchange provider</string>
+ <string name="withdraw_button_testkudos">Withdraw TESTKUDOS</string>
+ <string name="withdraw_button_confirm">Confirm Withdraw</string>
+
+ <string name="balance_inbound">inbound</string>
+ <string name="balance_no_cash">There is no digital cash in your wallet.</string>
+
+ <string name="pending_operations_label">Pending Operations:</string>
+ <string name="pending_operations_refuse">Refuse Proposal</string>
+ <string name="pending_operations_no_action">(no action)</string>
+
+ <string name="settings_version">Version Information</string>
+ <string name="exchange_tos_accept">Accept Terms of Service</string>
+ <string name="exchange_tos_button_continue">Continue</string>
+ <string name="settings_backups">Backups</string>
+ <string name="settings_export_to_file">Export wallet to file</string>
+ <string name="settings_import_from_file">Import from file</string>
+ <string name="settings_developer">Developer Settings (use with caution!)</string>
+ <string name="settings_reset">Reset Wallet (dangerous!)</string>
</resources>
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 630196a..09d7a02 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -29,8 +29,9 @@
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
- <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar"/>
- <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.MaterialComponents.Light"/>
+ <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.MaterialComponents.ActionBar" />
+
+ <style name="AppTheme.Toolbar" parent="Widget.MaterialComponents.Toolbar.Primary" />
<style name="HistoryTitle">
<item name="android:textSize">17sp</item>
diff --git a/app/src/main/res/drawable/ic_menu_send.xml b/app/src/main/res/xml/backup_descriptor.xml
index 4db00c9..731d404 100644
--- a/app/src/main/res/drawable/ic_menu_send.xml
+++ b/app/src/main/res/xml/backup_descriptor.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
<!--
~ This file is part of GNU Taler
~ (C) 2020 Taler Systems S.A.
@@ -14,12 +15,6 @@
~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
-->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
- <path
- android:fillColor="#FF000000"
- android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z"/>
-</vector>
+<full-backup-content>
+ <!-- Exclude specific shared preferences that contain GCM registration Id -->
+</full-backup-content>