Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AGP, Upgrade Gradle, Fix Override Library, Fix DnD samples on SDK 21 #193

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ accompanist = "0.32.0"
androidx-datastore = "1.0.0"
androidx-navigation = "2.7.7"
androidx-window = "1.2.0"
agp = "8.2.2"
agp = "8.5.2"
casa = "0.5.1"
coil = "2.4.0"
ksp = "1.9.22-1.0.17"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
#Wed Dec 07 13:21:03 CET 2022
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Shows various vibration effects.
- [Hyphenation](user-interface/text/src/main/java/com/example/platform/ui/text/Hyphenation.kt):
Demonstrates different options for the `android:hyphenationFrequency` attribute
- [Image Capture](camera/camera2/src/main/java/com/example/platform/camera/imagecapture/Camera2ImageCapture.kt):
This sample demonstrates how to capture and image using Camera2 and encode it
This sample demonstrates how to capture an image using Camera2 and encode it
- [Immersive mode](user-interface/window-insets/src/main/java/com/example/platform/ui/insets/ImmersiveMode.kt):
Immersive mode enables your app to display full-screen by hiding system bars.
- [LineBreak](user-interface/text/src/main/java/com/example/platform/ui/text/LineBreak.kt):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,11 @@ class UltraHDRWithOpenGL : Fragment(),
}

override fun onAttach(context: Context) {
requireActivity().display
?.registerHdrSdrRatioChangedListener(Runnable::run, updateHdrSdrRatio)
requireActivity().display?.let { display ->
if (display.isHdrSdrRatioAvailable) {
display.registerHdrSdrRatioChangedListener(Runnable::run, updateHdrSdrRatio)
}
}
super.onAttach(context)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.platform.ui.draganddrop">

<uses-sdk tools:overrideLibrary="androidx.draganddrop:draganddrop" />
<uses-sdk tools:overrideLibrary="androidx.draganddrop" />

<application>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import java.io.FileOutputStream
description = "Using RichContentReceiverInterface for implementing Drop for rich data types",
documentation = "https://developer.android.com/develop/ui/views/receive-rich-content",
)
@RequiresApi(Build.VERSION_CODES.S)
class DragAndDropRichContentReceiverFragment : Fragment(R.layout.fragment_dnd_richcontent) {
private val TAG = DragAndDropRichContentReceiverFragment::class.java.simpleName
private lateinit var binding: FragmentDndRichcontentBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import com.google.android.catalog.framework.annotations.Sample
description = "Drag and Drop using the DragHelper and DropHelper from DragAndDropHelper library",
documentation = "https://developer.android.com/develop/ui/views/touch-and-input/drag-drop#drophelper",
)
@RequiresApi(Build.VERSION_CODES.N)
class DragAndDropWithHelper : Fragment(R.layout.fragment_drag_and_drop_with_helper) {

private lateinit var binding: FragmentDragAndDropWithHelperBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import com.google.android.catalog.framework.annotations.Sample
description = "Drag and Drop using the views",
documentation = "https://developer.android.com/develop/ui/views/touch-and-input/drag-drop/view",
)
@RequiresApi(Build.VERSION_CODES.N)
class DragAndDropWithViews : Fragment(R.layout.fragment_drag_and_drop_with_views) {

val TAG = "DragAndDropWithViews"
Expand Down
Loading