aboutsummaryrefslogtreecommitdiff
path: root/anastasis-ui
diff options
context:
space:
mode:
Diffstat (limited to 'anastasis-ui')
-rw-r--r--anastasis-ui/build.gradle8
-rw-r--r--anastasis-ui/src/main/java/org/gnu/anastasis/ui/IntroFragment.kt2
-rw-r--r--anastasis-ui/src/main/java/org/gnu/anastasis/ui/MainViewModel.kt2
-rw-r--r--anastasis-ui/src/main/java/org/gnu/anastasis/ui/authentication/AuthenticationFragment.kt6
-rw-r--r--anastasis-ui/src/main/java/org/gnu/anastasis/ui/authentication/SmsFragment.kt4
-rw-r--r--anastasis-ui/src/main/java/org/gnu/anastasis/ui/identity/IdentityFragment.kt2
-rw-r--r--anastasis-ui/src/main/res/drawable/ic_add_circle.xml10
-rw-r--r--anastasis-ui/src/main/res/layout/fragment_identity.xml6
8 files changed, 24 insertions, 16 deletions
diff --git a/anastasis-ui/build.gradle b/anastasis-ui/build.gradle
index 0f86815..cbb0077 100644
--- a/anastasis-ui/build.gradle
+++ b/anastasis-ui/build.gradle
@@ -57,8 +57,8 @@ android {
dependencies {
implementation project(":taler-kotlin-android")
- implementation 'com.google.android.material:material:1.2.0-beta01'
- implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
+ implementation "com.google.android.material:material:$material_version"
+ implementation "androidx.constraintlayout:constraintlayout:$constraintlayout_version"
// Navigation Library
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
@@ -69,6 +69,6 @@ dependencies {
testImplementation 'junit:junit:4.13'
- androidTestImplementation 'androidx.test.ext:junit:1.1.1'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.2'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
diff --git a/anastasis-ui/src/main/java/org/gnu/anastasis/ui/IntroFragment.kt b/anastasis-ui/src/main/java/org/gnu/anastasis/ui/IntroFragment.kt
index c4b8e73..1e5a8d1 100644
--- a/anastasis-ui/src/main/java/org/gnu/anastasis/ui/IntroFragment.kt
+++ b/anastasis-ui/src/main/java/org/gnu/anastasis/ui/IntroFragment.kt
@@ -27,8 +27,6 @@ import kotlinx.android.synthetic.main.fragment_intro.*
class IntroFragment : Fragment() {
- private val model: MainViewModel by activityViewModels()
-
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
diff --git a/anastasis-ui/src/main/java/org/gnu/anastasis/ui/MainViewModel.kt b/anastasis-ui/src/main/java/org/gnu/anastasis/ui/MainViewModel.kt
index 3b97578..e2bf0c8 100644
--- a/anastasis-ui/src/main/java/org/gnu/anastasis/ui/MainViewModel.kt
+++ b/anastasis-ui/src/main/java/org/gnu/anastasis/ui/MainViewModel.kt
@@ -21,7 +21,7 @@ import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.MutableLiveData
import org.gnu.anastasis.ui.identity.LOCATIONS
-class MainViewModel(private val app: Application) : AndroidViewModel(app) {
+class MainViewModel(app: Application) : AndroidViewModel(app) {
val currentCountry = MutableLiveData(LOCATIONS[0])
diff --git a/anastasis-ui/src/main/java/org/gnu/anastasis/ui/authentication/AuthenticationFragment.kt b/anastasis-ui/src/main/java/org/gnu/anastasis/ui/authentication/AuthenticationFragment.kt
index fd770cb..5f7ab2e 100644
--- a/anastasis-ui/src/main/java/org/gnu/anastasis/ui/authentication/AuthenticationFragment.kt
+++ b/anastasis-ui/src/main/java/org/gnu/anastasis/ui/authentication/AuthenticationFragment.kt
@@ -79,17 +79,17 @@ class AuthenticationFragment : Fragment() {
)
}
- viewModel.securityQuestionChecked.observe(viewLifecycleOwner, Observer { checked ->
+ viewModel.securityQuestionChecked.observe(viewLifecycleOwner, { checked ->
passwordCard.isChecked = checked
updatePrice(checked, Amount.fromJSONString("KUDOS:0.5"))
updateNextButtonState()
})
- viewModel.smsChecked.observe(viewLifecycleOwner, Observer { checked ->
+ viewModel.smsChecked.observe(viewLifecycleOwner, { checked ->
smsCard.isChecked = checked
updatePrice(checked, Amount.fromJSONString("KUDOS:1.0"))
updateNextButtonState()
})
- viewModel.videoChecked.observe(viewLifecycleOwner, Observer { checked ->
+ viewModel.videoChecked.observe(viewLifecycleOwner, { checked ->
videoCard.isChecked = checked
updatePrice(checked, Amount.fromJSONString("KUDOS:2.25"))
updateNextButtonState()
diff --git a/anastasis-ui/src/main/java/org/gnu/anastasis/ui/authentication/SmsFragment.kt b/anastasis-ui/src/main/java/org/gnu/anastasis/ui/authentication/SmsFragment.kt
index f20fba5..2daf14a 100644
--- a/anastasis-ui/src/main/java/org/gnu/anastasis/ui/authentication/SmsFragment.kt
+++ b/anastasis-ui/src/main/java/org/gnu/anastasis/ui/authentication/SmsFragment.kt
@@ -97,8 +97,8 @@ class SmsFragment : Fragment() {
private fun fillPhoneNumber() {
val telephonyService = requireContext().getSystemService(TelephonyManager::class.java)
telephonyService?.line1Number?.let { phoneNumber ->
- smsView?.editText?.setText(phoneNumber)
- smsView?.editText?.setSelection(phoneNumber.length)
+ smsView.editText?.setText(phoneNumber)
+ smsView.editText?.setSelection(phoneNumber.length)
}
}
diff --git a/anastasis-ui/src/main/java/org/gnu/anastasis/ui/identity/IdentityFragment.kt b/anastasis-ui/src/main/java/org/gnu/anastasis/ui/identity/IdentityFragment.kt
index 40fa477..bcfbf24 100644
--- a/anastasis-ui/src/main/java/org/gnu/anastasis/ui/identity/IdentityFragment.kt
+++ b/anastasis-ui/src/main/java/org/gnu/anastasis/ui/identity/IdentityFragment.kt
@@ -52,7 +52,7 @@ class AnastasisIdentityFragment : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
- model.currentCountry.observe(viewLifecycleOwner, Observer { country ->
+ model.currentCountry.observe(viewLifecycleOwner, { country ->
countryView.text = country.name
if (stub != null) {
stub.layoutResource = country.layoutRes
diff --git a/anastasis-ui/src/main/res/drawable/ic_add_circle.xml b/anastasis-ui/src/main/res/drawable/ic_add_circle.xml
new file mode 100644
index 0000000..76e1fcb
--- /dev/null
+++ b/anastasis-ui/src/main/res/drawable/ic_add_circle.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:tint="?attr/colorControlNormal"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM17,13h-4v4h-2v-4L7,13v-2h4L11,7h2v4h4v2z" />
+</vector>
diff --git a/anastasis-ui/src/main/res/layout/fragment_identity.xml b/anastasis-ui/src/main/res/layout/fragment_identity.xml
index 072414d..bcf6e4d 100644
--- a/anastasis-ui/src/main/res/layout/fragment_identity.xml
+++ b/anastasis-ui/src/main/res/layout/fragment_identity.xml
@@ -68,7 +68,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="Change"
- android:textColor="@color/colorAccent"
+ android:textColor="?attr/colorAccent"
app:layout_constraintBaseline_toBaselineOf="@+id/countryView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
@@ -144,9 +144,9 @@
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:backgroundTint="@color/green"
- android:drawableLeft="@drawable/ic_baseline_lock"
- android:drawableTint="?attr/colorOnPrimarySurface"
+ android:drawableStart="@drawable/ic_baseline_lock"
android:text="Encrypt Identity"
+ app:drawableTint="?attr/colorOnPrimarySurface"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />