Skip to content

Commit 19ccb41

Browse files
committedFeb 11, 2021
[Owl] Update to constraintlayout-compose dep.
Change-Id: I3b9378630713cc7f42c35a83734a0b291a3f72db
1 parent 19ae77e commit 19ccb41

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed
 

‎Owl/app/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ dependencies {
8787
implementation Libs.AndroidX.coreKtx
8888
implementation Libs.AndroidX.navigation
8989
implementation Libs.AndroidX.Activity.activityCompose
90+
implementation Libs.AndroidX.ConstraintLayout.constraintLayoutCompose
9091

9192
implementation Libs.AndroidX.Compose.runtime
9293
implementation Libs.AndroidX.Compose.foundation

‎Owl/app/src/main/java/com/example/owl/ui/courses/FeaturedCourses.kt

+3-5
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,18 @@
1414
* limitations under the License.
1515
*/
1616

17-
@file:Suppress("DEPRECATION") // FIXME move to new ConstraintLayout dep once released
18-
1917
package com.example.owl.ui.courses
2018

2119
import androidx.compose.foundation.clickable
2220
import androidx.compose.foundation.layout.Column
23-
import androidx.compose.foundation.layout.ConstraintLayout
2421
import androidx.compose.foundation.layout.ExperimentalLayout
2522
import androidx.compose.foundation.layout.aspectRatio
2623
import androidx.compose.foundation.layout.padding
2724
import androidx.compose.foundation.layout.preferredSize
2825
import androidx.compose.foundation.rememberScrollState
2926
import androidx.compose.foundation.verticalScroll
30-
import androidx.compose.material.AmbientElevationOverlay
3127
import androidx.compose.material.Icon
28+
import androidx.compose.material.LocalElevationOverlay
3229
import androidx.compose.material.MaterialTheme
3330
import androidx.compose.material.Surface
3431
import androidx.compose.material.Text
@@ -44,6 +41,7 @@ import androidx.compose.ui.text.style.TextAlign
4441
import androidx.compose.ui.tooling.preview.Preview
4542
import androidx.compose.ui.unit.Dp
4643
import androidx.compose.ui.unit.dp
44+
import androidx.constraintlayout.compose.ConstraintLayout
4745
import com.example.owl.R
4846
import com.example.owl.model.Course
4947
import com.example.owl.model.courses
@@ -111,7 +109,7 @@ fun FeaturedCourse(
111109
top.linkTo(parent.top)
112110
}
113111
)
114-
val outlineColor = AmbientElevationOverlay.current?.apply(
112+
val outlineColor = LocalElevationOverlay.current?.apply(
115113
color = MaterialTheme.colors.surface,
116114
elevation = OwlTheme.elevations.card
117115
) ?: MaterialTheme.colors.surface

‎Owl/buildSrc/src/main/java/com/example/owl/buildsrc/Dependencies.kt

+4
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ object Libs {
6868
const val activityCompose = "androidx.activity:activity-compose:1.3.0-alpha02"
6969
}
7070

71+
object ConstraintLayout {
72+
const val constraintLayoutCompose = "androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha02"
73+
}
74+
7175
object Test {
7276
private const val version = "1.3.0"
7377
const val core = "androidx.test:core:$version"

0 commit comments

Comments
 (0)
Please sign in to comment.