Status Update
Comments
ey...@gmail.com <ey...@gmail.com> #2
Branch: androidx-master-dev
commit c60f33e229e31ab328ef6b59dab63b264954831c
Author: Alexandre Elias <aelias@google.com>
Date: Fri Jul 10 16:23:09 2020
Semantics no-op cleanups
Partly in response to lmr's broad code review, I did a pass of
superficial API/implementation cleanup. The main changes are:
- I changed each Boolean SemanticsProperty where false is equivalent to
not being present to take "Unit" instead. This is conceptually
clearer: it avoids questions like "can I cancel out a semantics from a
merged child by setting it to false?" Because "property = Unit" looks
weird, I also changed the style of these to "property()".
- I moved the Semantics id generator closer to where it's used, in
SemanticsModifierCore. I made it internal and an AtomicInt.
(Note that integer ids are heavily used in the Android
AccessibilityNodeInfo APIs so I can't simply remove them entirely.)
- I deleted dead code. Some examples include SemanticsHintOverrides,
a public API not connected to anything, and SemanticsPropertyKey
merge() open method which is never called. (In both cases I have
a different plan in mind for accessibility.)
Fixes: 145951226
Fixes: 145955412
Test: existing tests
Relnote: "Single-value semantics properties now use a calling style.
For example, 'semantics { hidden = true }' is now written as:
'semantics { hidden() }'."
Change-Id: Ic1afd12ea22c926babc9662f1804d80b33aa0cfc
M ui/integration-tests/benchmark/src/androidTest/java/androidx/ui/benchmark/test/LayoutNodeModifierBenchmark.kt
M ui/ui-core/api/0.1.0-dev15.txt
M ui/ui-core/api/current.txt
M ui/ui-core/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-core/api/public_plus_experimental_current.txt
M ui/ui-core/api/restricted_0.1.0-dev15.txt
M ui/ui-core/api/restricted_current.txt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/graphics/vector/VectorTest.kt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/semantics/SemanticsTests.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidActuals.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeView.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeViewAccessibilityDelegateCompat.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidPopup.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/Expect.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsConfiguration.kt
D ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsHintOverrides.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsModifier.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsNode.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsOwner.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsWrapper.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/semantics/SemanticsProperties.kt
M ui/ui-foundation/api/0.1.0-dev15.txt
M ui/ui-foundation/api/current.txt
M ui/ui-foundation/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-foundation/api/public_plus_experimental_current.txt
M ui/ui-foundation/api/restricted_0.1.0-dev15.txt
M ui/ui-foundation/api/restricted_current.txt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Clickable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Dialog.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Scroller.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Selectable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Toggleable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/semantics/FoundationSemanticsProperties.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CardTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CheckboxScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/RadioButtonScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ScaffoldTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ripple/RippleIndicationTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/TextFieldScreenshotTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/AppBar.kt
M ui/ui-material/src/main/java/androidx/ui/material/TextFieldImpl.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/AssertsTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/CallSemanticsActionTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ErrorMessagesTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/FindersTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/PrintToStringTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ScrollToTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/TextActionsTest.kt
M ui/ui-test/src/main/java/androidx/ui/test/Actions.kt
M ui/ui-test/src/main/java/androidx/ui/test/Filters.kt
M ui/ui-text/api/0.1.0-dev15.txt
M ui/ui-text/api/current.txt
M ui/ui-text/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-text/api/public_plus_experimental_current.txt
M ui/ui-text/api/restricted_0.1.0-dev15.txt
M ui/ui-text/api/restricted_current.txt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/CoreTextField.kt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/TextSemanticsProperties.kt
er...@google.com <er...@google.com> #3
er...@google.com <er...@google.com> #4
Bugjuggler:
bu...@google.com <bu...@google.com> #5
64...@gmail.com <64...@gmail.com> #6
bu...@google.com <bu...@google.com>
er...@google.com <er...@google.com> #7
Hi there,
We're actively looking at this and will provide another method to initialize.
ap...@google.com <ap...@google.com> #8
Branch: androidx-master-dev
commit 9015f3cff4053ad56b8b34b0708e3fe13945187c
Author: Trevor McGuire <trevormcguire@google.com>
Date: Thu Dec 05 18:21:19 2019
CameraX on-demand initialization through resources
Allows initializing CameraX without having to extend Application. A
default config provider can be specified through string resource or by
extending Application.
camera:camera-camera2 provides a default string resource which will be
included by default by the resource merger so users don't need to do
anything if they are ok with the default configuration.
Relnote: "Removed requirement that app must extend Application in order
to initialize CameraX. CameraX will now be initialized with a default
Camera2 configuration as long as the camera-camera2 artifact is included
in the application's build.gradle."
Bug: 146923574
Test: Integration tests are all successfully initialized and run
Change-Id: I58ff5c4440f9fec0afb3d9790f652dd91c2c84bd
A camera/camera-camera2/proguard-rules.pro
M camera/camera-camera2/src/main/AndroidManifest.xml
M camera/camera-camera2/src/main/java/androidx/camera/camera2/Camera2Config.java
A camera/camera-camera2/src/main/res/values/strings.xml
M camera/camera-core/src/main/java/androidx/camera/core/CameraX.java
A camera/camera-core/src/main/res/values/public.xml
A camera/camera-core/src/main/res/values/strings.xml
M camera/integration-tests/coretestapp/src/main/AndroidManifest.xml
D camera/integration-tests/coretestapp/src/main/java/androidx/camera/integration/core/CoreApplication.java
M camera/integration-tests/extensionstestapp/src/main/java/androidx/camera/integration/extensions/ExtensionsApplication.java
M camera/integration-tests/viewtestapp/src/main/AndroidManifest.xml
M camera/integration-tests/viewtestapp/src/main/java/androidx/camera/integration/view/ViewCameraXConfigProvider.java
M camera/integration-tests/viewtestapp/src/main/res/values/strings.xml
er...@google.com <er...@google.com> #9
Hi All,
This is merged and will be available in the next release. Please take a look and let us know what you think. Thanks.
ey...@gmail.com <ey...@gmail.com> #10
er...@google.com <er...@google.com> #11
re:
so...@gmail.com <so...@gmail.com> #12
Well.. I also think this behavior is not so good.
What happens, if we want to use camerax in dynamic features module?
Is this really acceptable?
Rather, initialization using ContentProvider looks better.
Please re-consider on-demand initialization more. 🙇♂️
tr...@google.com <tr...@google.com> #13
I notices this issue now. Well.. I also think this behavior is not so good.
As of alpha10
, users no longer need to extend Application
in order to initialize CameraX. Please let us know if this isn't working for you.
What happens, if we want to use camerax in dynamic features module?
I believe the current initialization mechanism introduced in alpha10 should work with dynamic features modules, but I'll admit I haven't yet tested it myself. If you have issues with dynamic features modules specifically, we would like to hear about it.
so...@gmail.com <so...@gmail.com> #14
Camera function is not primary in my application.
So I wanna reduce app size possible.
And I choose dynamic features module.
Then camerax libraries should be used in a dynamic features module only.
I understand, CameraX always needs config setup in application. (if extend Application exists)
If I wrong, so sorry.
tr...@google.com <tr...@google.com> #15
I understand, CameraX always needs config setup in application. (if extend Application exists)
I think there may be some confusion here. To be clear, this behavior was changed in alpha10
. Users no longer need to extend Application. CameraX will be initialized automatically if the user does not extend Application. Only in alpha07
, alpha08
, and alpha09
did users have to extend Application.
I believe this should work for dynamic feature modules as well, but have not yet had a chance to try it.
so...@gmail.com <so...@gmail.com> #16
I will check again for dynamic features module with extended Application.
If some problem exists, then report through another issue.
Have a good day.
fa...@gmail.com <fa...@gmail.com> #17
However, you should correct the order of camera2 dependency in build.gradle, because camera-view & camera-lifecycle will override the androidx_camera_default_config_provider string resource in build time with theirs camera-core dependencies
Correct the docs also pls
dependencies {
// CameraX core library using the camera2 implementation
def camerax_version = "1.0.0-alpha10"
// If you want to use the CameraX View class
implementation "androidx.camera:camera-view:1.0.0-alpha07"
// If you want to use the CameraX Extensions library
implementation "androidx.camera:camera-extensions:1.0.0-alpha07"
// If you want to use the CameraX Lifecycle library
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
implementation "androidx.camera:camera-camera2:${camerax_version}"
}
Description
There should definitely be an alternative to this (I see CameraX.initialize but it's hidden). I have a highly modularized app, and I feel like I'm getting punished by having to leak a camera dependency into my app module just to implement this interface.