Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
What about Enums? Enum is a type-safe way to pass navigation arguments.
Will Enums be covered in this issue as part of Serializable or will have own handled separately?
Because for enum you can provide a reasonable default value but for Parcelable or Serializable only @null
Will Enums be covered in this issue as part of Serializable or will have own handled separately?
Because for enum you can provide a reasonable default value but for Parcelable or Serializable only @null
me...@gmail.com <me...@gmail.com> #3
Please add support for Serializable objects so Enums can be used.
me...@gmail.com <me...@gmail.com> #4
Support of Serializable objects is not enough for enums, you definitely need also the support of default values.
lb...@gmail.com <lb...@gmail.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 6f59e3d74d0da5a4bf79c8480f56964e3af47f1c
Author: Wojtek Kaliciński <wkal@google.com>
Date: Mon Jul 23 20:17:19 2018
Support more types for args
Provides support for Serializable, enums,
as well as arrays of primitive types and Parcelables
in Navigation arguments.
Only enums support default values other than @null,
in the form of the enum literal (without class name),
e.g. app:defaultValue="READ"
Test: unit tests updated
BUG: 111487504
BUG: 111316353
Change-Id: I7e5abbc8ed0950bfdef292342dbe1fb34a5c4b17
M navigation/runtime/src/androidTest/java/androidx/navigation/NavInflaterTest.kt
A navigation/runtime/src/androidTest/java/androidx/navigation/test/TestEnum.java
M navigation/runtime/src/androidTest/res/navigation/nav_default_arguments.xml
M navigation/runtime/src/main/java/androidx/navigation/NavInflater.java
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/NavParser.kt
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/NavParserErrors.kt
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/NavWriter.kt
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/Types.kt
M navigation/safe-args-generator/src/tests/kotlin/androidx/navigation/safe/args/generator/NavParserTest.kt
M navigation/safe-args-generator/src/tests/kotlin/androidx/navigation/safe/args/generator/NavWriterTest.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_writer_test/MainFragmentArgs.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_writer_test/Next.java
M navigation/safe-args-generator/src/tests/test-data/naive_test.xml
https://android-review.googlesource.com/720246
https://goto.google.com/android-sha1/6f59e3d74d0da5a4bf79c8480f56964e3af47f1c
Branch: androidx-master-dev
commit 6f59e3d74d0da5a4bf79c8480f56964e3af47f1c
Author: Wojtek Kaliciński <wkal@google.com>
Date: Mon Jul 23 20:17:19 2018
Support more types for args
Provides support for Serializable, enums,
as well as arrays of primitive types and Parcelables
in Navigation arguments.
Only enums support default values other than @null,
in the form of the enum literal (without class name),
e.g. app:defaultValue="READ"
Test: unit tests updated
BUG: 111487504
BUG: 111316353
Change-Id: I7e5abbc8ed0950bfdef292342dbe1fb34a5c4b17
M navigation/runtime/src/androidTest/java/androidx/navigation/NavInflaterTest.kt
A navigation/runtime/src/androidTest/java/androidx/navigation/test/TestEnum.java
M navigation/runtime/src/androidTest/res/navigation/nav_default_arguments.xml
M navigation/runtime/src/main/java/androidx/navigation/NavInflater.java
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/NavParser.kt
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/NavParserErrors.kt
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/NavWriter.kt
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/Types.kt
M navigation/safe-args-generator/src/tests/kotlin/androidx/navigation/safe/args/generator/NavParserTest.kt
M navigation/safe-args-generator/src/tests/kotlin/androidx/navigation/safe/args/generator/NavWriterTest.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_writer_test/MainFragmentArgs.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_writer_test/Next.java
M navigation/safe-args-generator/src/tests/test-data/naive_test.xml
me...@gmail.com <me...@gmail.com> #6
This is fixed internally and will be available in 1.0.0-alpha08
il...@google.com <il...@google.com>
mi...@gmail.com <mi...@gmail.com> #7
What happened if I declaire app:argType="androidx.navigation.test.TestEnum" and turn on proguard/R8? Because both ProGuard and R8 will optimize trivial enums into ints.
lb...@gmail.com <lb...@gmail.com> #8
ab...@gmail.com <ab...@gmail.com> #9
Thanks. Just saw the latest documentation.
me...@gmail.com <me...@gmail.com> #10
Hello, any estimate please?
ab...@gmail.com <ab...@gmail.com> #11
Facing a similar kind of issue when scrolling the fragments using a ViewPager.
https://issuetracker.google.com/issues/267677504
Can you update regarding any progress on this issue.
Can you update regarding any progress on this issue.
jb...@google.com <jb...@google.com>
sa...@google.com <sa...@google.com>
ap...@google.com <ap...@google.com> #13
Project: platform/frameworks/support
Branch: androidx-main
commit 50f098644adc703ae218b0b7e999629f516a0241
Author: sanura <sanura@google.com>
Date: Thu Mar 02 00:11:35 2023
Add check to only invalidate options menu when contributing menu items
FragmentManager previously appropriately only added
a MenuProvider when the host is a MenuHost **and**
we are at the root fragment that is providing the
menu items. This behavior should be mirrored when
removing a MenuProvider as well, so that only
components that directly contribute menu items will
invalidate the options menu.
Bug: 244336571
Test: all tests pass
Change-Id: I9404ee9fcc9ce6b80d70a93bea720fe4ccf583a0
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentContainerInflatedFragmentTest.kt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/OptionsMenuFragmentTest.kt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/test/FragmentTestActivity.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentActivity.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
https://android-review.googlesource.com/2465169
Branch: androidx-main
commit 50f098644adc703ae218b0b7e999629f516a0241
Author: sanura <sanura@google.com>
Date: Thu Mar 02 00:11:35 2023
Add check to only invalidate options menu when contributing menu items
FragmentManager previously appropriately only added
a MenuProvider when the host is a MenuHost **and**
we are at the root fragment that is providing the
menu items. This behavior should be mirrored when
removing a MenuProvider as well, so that only
components that directly contribute menu items will
invalidate the options menu.
Bug: 244336571
Test: all tests pass
Change-Id: I9404ee9fcc9ce6b80d70a93bea720fe4ccf583a0
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentContainerInflatedFragmentTest.kt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/OptionsMenuFragmentTest.kt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/test/FragmentTestActivity.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentActivity.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
sa...@google.com <sa...@google.com>
lb...@gmail.com <lb...@gmail.com> #14
@13 Fixed when? On which version of which dependency?
Please show what to write on gradle file.
Please show what to write on gradle file.
jb...@google.com <jb...@google.com> #15
This has been fixed internally and will be available in the Fragment 1.6.0-alpha07
release.
lb...@gmail.com <lb...@gmail.com> #16
@15 I've noticed I can avoid using the fragment dependency and still work fine with fragments. How come?
It's part of the material dependency, perhaps?
It's part of the material dependency, perhaps?
na...@google.com <na...@google.com> #17
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.fragment:fragment:1.6.0-alpha07
lb...@gmail.com <lb...@gmail.com> #18
@17 What if I don't use this dependency (probably imported automatically by material dependency) ? Use it, still?
lb...@gmail.com <lb...@gmail.com> #19
@17 I wanted to try what you wrote on the sample I've provided (after I remove my workaround), and for some reason it doesn't let me.
It says "Duplicate class found".
The IDE doesn't provide any useful explanation of what is the class that is duplicated and what to do about it.
Please help.
It says "Duplicate class found".
The IDE doesn't provide any useful explanation of what is the class that is duplicated and what to do about it.
Please help.
pr...@google.com <pr...@google.com> #20
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.fragment:fragment:1.5.6
lb...@gmail.com <lb...@gmail.com> #21
@20 Not 1.6.0-alpha07 ?
th...@gmail.com <th...@gmail.com> #22
@21 androidx.fragment:fragment:1.5.6 is a STABLE release. It has the fix we need. The androidx.fragment:fragment:1.6.0-alpha07 is an alpha as it says. 1.6 is "work in progress". 1.6.0 is still not a stable release. Use "alpha" only for testing
lb...@gmail.com <lb...@gmail.com> #23
@22 So it's fixed on both. OK
Description
Version used: 1.5.2
Devices/Android versions reproduced on: Android 12
I'm using SearchView in my Activity. If SearchView is expanded and i'm opening DialogFragment on the top of the activity and then dismissing it, SearchView is being collapsed. It must not collapse.
Seems like some bug in Fragment 1.5.0 - 1.5.2 version. In 1.4.1 version everything is working fine.
Please suggest some workarounds or how to fix this issue?