Skip to content

Commit

Permalink
PX-1140 Release 3.1.0 (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
tl-keenen-charles authored Apr 4, 2024
1 parent cf6167c commit c202df2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$json_serialization_version"
implementation "com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:$retrofit2_kotlinx_serialization"

implementation "com.truelayer.payments:ui:3.0.1"
implementation "com.truelayer.payments:ui:3.1.0"
}
13 changes: 7 additions & 6 deletions app/src/main/java/com/truelayer/demo/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material3.Divider
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.TextField
Expand Down Expand Up @@ -44,7 +43,6 @@ import com.truelayer.payments.core.domain.configuration.Environment
*/
class MainActivity : AppCompatActivity() {

@OptIn(ExperimentalMaterial3Api::class)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

Expand Down Expand Up @@ -102,7 +100,7 @@ class MainActivity : AppCompatActivity() {
TextWithDropdownMenu(
modifier = Modifier.weight(1f),
label = paymentType.name,
dropdownItems = PaymentType.values().map { it.name to it },
dropdownItems = PaymentType.entries.map { it.name to it },
onClick = {
paymentType = it
PrefUtils.setPaymentType(it, this@MainActivity)
Expand All @@ -112,7 +110,7 @@ class MainActivity : AppCompatActivity() {
TextWithDropdownMenu(
modifier = Modifier.weight(1f),
label = env.name,
dropdownItems = Environment.values().map { it.name to it },
dropdownItems = Environment.entries.map { it.name to it },
onClick = {
env = it
PrefUtils.setEnvironment(it, this@MainActivity)
Expand Down Expand Up @@ -140,7 +138,10 @@ class MainActivity : AppCompatActivity() {
}
}
)
Divider(modifier = Modifier.padding(all = 4.dp), color = Color.Transparent)
HorizontalDivider(
modifier = Modifier.padding(all = 4.dp),
color = Color.Transparent
)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ class ComposeIntegrationActivity : AppCompatActivity() {
primary = Primary,
error = Secondary
),
darkPalette = DarkColorDefaults.copy(
primary = PrimaryDark,
error = Secondary
),
typography = TypographyDefaults
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.defaultMinSize
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Divider
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
Expand Down Expand Up @@ -38,7 +39,7 @@ fun <T> TextWithDropdownMenu(
border = BorderStroke(1.dp, Color.Gray),
onClick = { dropdownExpanded = true }
) {
Text(text = label)
Text(text = label, color = MaterialTheme.colorScheme.onSurface)
DropdownMenu(
expanded = dropdownExpanded,
onDismissRequest = { dropdownExpanded = false },
Expand All @@ -61,7 +62,7 @@ fun <T> TextWithDropdownMenu(
textAlign = TextAlign.Center
)
}
Divider()
HorizontalDivider()
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/truelayer/demo/utils/PrefUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object PrefUtils {
@JvmStatic
fun getQuickstartUrl(context: Context): String {
val sharedPreferences = context.getSharedPreferences("Settings", Context.MODE_PRIVATE)
return sharedPreferences.getString("quickstartUrl", null) ?: ""
return sharedPreferences.getString("quickstartUrl", null) ?: "http://"
}

@JvmStatic
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ buildscript {
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.2.2' apply false
id 'com.android.library' version '8.2.2' apply false
id 'com.android.application' version '8.3.1' apply false
id 'com.android.library' version '8.3.1' apply false
id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Jul 13 09:51:06 BST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit c202df2

Please sign in to comment.