Skip to content

Commit 42e1e30

Browse files
Merge pull request #136 from vanpra/0.7.0
Library release 0.7.0
2 parents 704724c + fe0c536 commit 42e1e30

File tree

25 files changed

+413
-187
lines changed

25 files changed

+413
-187
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
~/.gradle/wrapper
2525
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'buildSrc/src/main/kotlin/*') }}
2626
- name: Build, lint and spotless
27-
run: ./gradlew spotlessCheck assemble assembleAndroidTest lintDebug
27+
run: ./gradlew spotlessCheck assemble assembleAndroidTest
2828
- name: Cleanup Gradle Cache
2929
run: |
3030
rm -f ~/.gradle/caches/modules-2/modules-2.lock

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
### 0.7.0 - 2021-03-03
4+
5+
- Update compose to 1.1.1
6+
- [BREAKING CHANGE] Modify arguments of the `input` component to better match those of `TextField`
7+
- Add `textFieldStyle` parameter to `input` component to allow for outlined text field style ([#92](https://github.com/vanpra/compose-material-dialogs/issues/92))
8+
- Add text color options for month and day of week header text of date picker ([#124](https://github.com/vanpra/compose-material-dialogs/issues/124))
9+
- Add ability to change time picker title color ([#123](https://github.com/vanpra/compose-material-dialogs/issues/123))
10+
- Fix bug which causes input field to lose focus on validity change ([#132](https://github.com/vanpra/compose-material-dialogs/issues/132))
11+
312
### 0.6.3 - 2021-01-21
413

514
- Update compose to 1.1.0-rc01

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ae8d455118164f43a24732761a970cc8)](https://www.codacy.com/gh/vanpra/compose-material-dialogs/dashboard?utm_source=github.com&utm_medium=referral&utm_content=vanpra/compose-material-dialogs&utm_campaign=Badge_Grade)![Build & Test](https://github.com/vanpra/compose-material-dialogs/actions/workflows/main.yml/badge.svg)
66

7-
**Current Library Compose Version: 1.1.0-rc01**
7+
**Current Library Compose Version: 1.1.1**
88

99
### [See Releases and Changelog](https://github.com/vanpra/compose-material-dialogs/blob/main/CHANGELOG.md)
1010

@@ -19,7 +19,7 @@
1919
```gradle
2020
dependencies {
2121
...
22-
implementation "io.github.vanpra.compose-material-dialogs:core:0.6.3"
22+
implementation "io.github.vanpra.compose-material-dialogs:core:0.7.0"
2323
...
2424
}
2525
```
@@ -35,7 +35,7 @@ dependencies {
3535
```gradle
3636
dependencies {
3737
...
38-
implementation "io.github.vanpra.compose-material-dialogs:datetime:0.6.3"
38+
implementation "io.github.vanpra.compose-material-dialogs:datetime:0.7.0"
3939
...
4040
}
4141
```
@@ -51,7 +51,7 @@ dependencies {
5151
```gradle
5252
dependencies {
5353
...
54-
implementation "io.github.vanpra.compose-material-dialogs:color:0.6.3"
54+
implementation "io.github.vanpra.compose-material-dialogs:color:0.7.0"
5555
...
5656
}
5757
```

app/src/main/java/com/vanpra/composematerialdialogdemos/demos/BasicDialog.kt

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import androidx.compose.ui.text.input.ImeAction
1616
import com.vanpra.composematerialdialogdemos.DialogAndShowButton
1717
import com.vanpra.composematerialdialogdemos.R
1818
import com.vanpra.composematerialdialogs.iconTitle
19-
import com.vanpra.composematerialdialogs.input
2019
import com.vanpra.composematerialdialogs.message
2120
import com.vanpra.composematerialdialogs.title
21+
import input
2222

2323
/**
2424
* @brief Basic Dialog Demos
@@ -80,7 +80,20 @@ fun BasicDialogDemo() {
8080
}
8181
) {
8282
title(res = R.string.input_dialog_title)
83-
input(label = "Name", hint = "Jon Smith") {
83+
input(label = "Name", placeholder = "Jon Smith") {
84+
Log.d("SELECTION:", it)
85+
}
86+
}
87+
88+
DialogAndShowButton(
89+
buttonText = "Outlined Input Dialog",
90+
buttons = {
91+
negativeButton("Cancel")
92+
positiveButton("Ok")
93+
}
94+
) {
95+
title(res = R.string.input_dialog_title)
96+
input(label = "Name", placeholder = "Jon Smith", textFieldStyle = TextFieldStyle.Outlined) {
8497
Log.d("SELECTION:", it)
8598
}
8699
}
@@ -96,7 +109,7 @@ fun BasicDialogDemo() {
96109
title(res = R.string.input_dialog_title)
97110
input(
98111
label = "Name",
99-
hint = "Jon Smith",
112+
placeholder = "Jon Smith",
100113
focusRequester = focusRequester,
101114
focusOnShow = true
102115
) {
@@ -113,7 +126,7 @@ fun BasicDialogDemo() {
113126
) {
114127
title(res = R.string.input_dialog_title)
115128
input(
116-
label = "Name", hint = "Jon Smith",
129+
label = "Name", placeholder = "Jon Smith",
117130
keyboardActions = KeyboardActions(
118131
onDone = { submit() }
119132
),
@@ -133,7 +146,7 @@ fun BasicDialogDemo() {
133146
title("Please enter your email")
134147
input(
135148
label = "Email",
136-
149+
placeholder = "[email protected]",
137150
errorMessage = "Invalid email",
138151
isTextValid = {
139152
Patterns.EMAIL_ADDRESS.matcher(it).matches() && it.isNotEmpty()

app/src/main/java/com/vanpra/composematerialdialogdemos/demos/DateTimeDialog.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import androidx.compose.ui.graphics.Color
88
import androidx.compose.ui.platform.LocalContext
99
import com.vanpra.composematerialdialogdemos.DialogAndShowButton
1010
import com.vanpra.composematerialdialogs.MaterialDialogButtons
11+
import com.vanpra.composematerialdialogs.datetime.date.DatePickerDefaults
1112
import com.vanpra.composematerialdialogs.datetime.date.datepicker
1213
import com.vanpra.composematerialdialogs.datetime.time.TimePickerColors
1314
import com.vanpra.composematerialdialogs.datetime.time.TimePickerDefaults
@@ -92,7 +93,7 @@ fun DateTimeDialogDemo() {
9293
buttonText = "Date Picker Dialog",
9394
buttons = { defaultDateTimeDialogButtons() }
9495
) {
95-
datepicker {
96+
datepicker(colors = DatePickerDefaults.colors(headerBackgroundColor = Color.Red)) {
9697
println(it.toString())
9798
}
9899
}

app/src/main/java/com/vanpra/composematerialdialogdemos/demos/ListDialog.kt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ import androidx.compose.foundation.layout.Row
55
import androidx.compose.foundation.layout.fillMaxWidth
66
import androidx.compose.foundation.layout.padding
77
import androidx.compose.foundation.layout.size
8+
import androidx.compose.material.Button
89
import androidx.compose.material.MaterialTheme
910
import androidx.compose.material.Text
1011
import androidx.compose.material.icons.Icons
1112
import androidx.compose.material.icons.filled.AccountCircle
1213
import androidx.compose.runtime.Composable
1314
import androidx.compose.runtime.getValue
15+
import androidx.compose.runtime.mutableStateListOf
1416
import androidx.compose.runtime.mutableStateOf
1517
import androidx.compose.runtime.remember
1618
import androidx.compose.runtime.setValue
@@ -47,7 +49,7 @@ private val ringtones =
4749
"Zen Too"
4850
)
4951
private val labels = listOf("None", "Forums", "Social", "Updates", "Promotions", "Spam", "Bin")
50-
private val emails = listOf(
52+
private val emails = mutableStateListOf(
5153
5254
5355
@@ -68,12 +70,17 @@ fun BasicListDialogDemo() {
6870
DialogAndShowButton(buttonText = "Simple List Dialog") {
6971
title(res = R.string.backup_dialog_title)
7072
listItems(emails)
73+
Button(onClick = { emails.add("[email protected]") }) {
74+
Text("Add")
75+
}
7176
}
7277

7378
DialogAndShowButton(buttonText = "Custom List Dialog") {
7479
title(res = R.string.backup_dialog_title)
7580
listItems(
76-
modifier = Modifier.padding(bottom = 8.dp).padding(horizontal = 24.dp),
81+
modifier = Modifier
82+
.padding(bottom = 8.dp)
83+
.padding(horizontal = 24.dp),
7784
list = emails,
7885
item = { _, email ->
7986
Row(Modifier.fillMaxWidth()) {

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ buildscript {
1414

1515
dependencies {
1616
classpath(Dependencies.Kotlin.gradlePlugin)
17-
classpath("com.android.tools.build:gradle:7.2.0-alpha07")
17+
classpath("com.android.tools.build:gradle:7.3.0-alpha04")
1818
classpath("com.vanniktech:gradle-maven-publish-plugin:0.18.0")
1919
classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.6.0")
2020
classpath(Dependencies.Shot.core)

buildSrc/src/main/kotlin/Dependencies.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,49 @@ object Dependencies {
22
const val desugar = "com.android.tools:desugar_jdk_libs:1.1.5"
33

44
object ComposeMaterialDialogs {
5-
const val version = "0.6.2"
5+
const val version = "0.6.3"
66

77
const val core = "io.github.vanpra.compose-material-dialogs:core:$version"
88
const val datetime = "io.github.vanpra.compose-material-dialogs:datetime:$version"
99
const val color = "io.github.vanpra.compose-material-dialogs:color:$version"
1010
}
1111

1212
object Ktlint {
13-
const val version = "0.42.1"
13+
const val version = "0.44.0"
1414
}
1515

1616
object Accompanist {
17-
private const val version = "0.22.0-rc"
17+
private const val version = "0.23.1"
1818
const val pager = "com.google.accompanist:accompanist-pager:$version"
1919
}
2020

2121
object Kotlin {
22-
private const val version = "1.6.0"
22+
private const val version = "1.6.10"
2323
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version"
2424
}
2525

2626
object Shot {
27-
private const val version = "5.12.2"
27+
private const val version = "5.13.0"
2828
const val core = "com.karumi:shot:$version"
2929
const val android = "com.karumi:shot-android:$version"
3030
}
3131

3232
object Google {
33-
const val material = "com.google.android.material:material:1.6.0-alpha02"
33+
const val material = "com.google.android.material:material:1.5.0"
3434
}
3535

3636
object AndroidX {
3737
const val coreKtx = "androidx.core:core-ktx:1.7.0"
3838

3939
object Testing {
40-
const val version = "1.4.1-alpha03"
40+
const val version = "1.4.1-alpha04"
4141
const val core = "androidx.test:core:$version"
4242
const val rules = "androidx.test:rules:$version"
4343
const val runner = "androidx.test:runner:$version"
4444
}
4545

4646
object Compose {
47-
const val version = "1.1.0-rc01"
47+
const val version = "1.1.1"
4848

4949
const val ui = "androidx.compose.ui:ui:$version"
5050
const val material = "androidx.compose.material:material:$version"
@@ -55,7 +55,7 @@ object Dependencies {
5555

5656
const val testing = "androidx.compose.ui:ui-test-junit4:$version"
5757
const val activity = "androidx.activity:activity-compose:1.4.0"
58-
const val navigation = "androidx.navigation:navigation-compose:2.4.0-rc01"
58+
const val navigation = "androidx.navigation:navigation-compose:2.4.1"
5959
}
6060
}
6161
}
21 KB
Loading
21.8 KB
Loading

0 commit comments

Comments
 (0)