Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Alok, any idea on how we should lay this out?
zp...@spotify.com <zp...@spotify.com> #3
Split screen has 3 "stops" - 1/3, 1/2, and 2/3.
This looks like the icon is either getting cropped OR it is getting scrolled (same as other items such as Display > Lock screen display > Lock screen pop has a scrollable content inside). Do you know what is the case here?
In terms of solutions, assuming we need to keep all the elements, we can:
1. shrink the icon
2. let is scroll, and leave it WAI
This looks like the icon is either getting cropped OR it is getting scrolled (same as other items such as Display > Lock screen display > Lock screen pop has a scrollable content inside). Do you know what is the case here?
In terms of solutions, assuming we need to keep all the elements, we can:
1. shrink the icon
2. let is scroll, and leave it WAI
zp...@spotify.com <zp...@spotify.com> #4
I agree with Alok.
1. Can we shrink the icon to fit in the smallest UI scenario? (1/3 screen)?
-Is it possible to make the icon scalable? Or do we want to swap the icon to the smaller size?
2. If #1 is problematic, we could have a scroll bar for the description and icon area following our framework. Which is not ideal in this case.
1. Can we shrink the icon to fit in the smallest UI scenario? (1/3 screen)?
-Is it possible to make the icon scalable? Or do we want to swap the icon to the smaller size?
2. If #1 is problematic, we could have a scroll bar for the description and icon area following our framework. Which is not ideal in this case.
il...@google.com <il...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 32ad78e0ee659091e9074cc588d0759cd8b01d38
Author: Kevin Chyn <kchyn@google.com>
Date: Thu Jul 18 16:50:08 2019
Allow the FingerprintDialog to be scrollable
Fixes: 126367887
Test: Split screen, BiometricPromptDemo, dialog scrolls
Change-Id: Id14f116391c8ebfe27f1a7e6c40516ea0383221a
M biometric/res/layout/fingerprint_dialog_layout.xml
https://android-review.googlesource.com/1087532
https://goto.google.com/android-sha1/32ad78e0ee659091e9074cc588d0759cd8b01d38
Branch: androidx-master-dev
commit 32ad78e0ee659091e9074cc588d0759cd8b01d38
Author: Kevin Chyn <kchyn@google.com>
Date: Thu Jul 18 16:50:08 2019
Allow the FingerprintDialog to be scrollable
Fixes: 126367887
Test: Split screen, BiometricPromptDemo, dialog scrolls
Change-Id: Id14f116391c8ebfe27f1a7e6c40516ea0383221a
M biometric/res/layout/fingerprint_dialog_layout.xml
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 2180ea57914af961d4f2bb43802b42ae0d1802e0
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri Oct 04 16:02:03 2019
Generate default values for Directions safe_args in Java
Currently the safe args generation for java code does not contain
default Direction args values. The default directions arg values are
provided by the Kotlin safe args generation and we should be as
uniform as possible across both languages.
Test: ./gradlew --rerun-tasks navigation:navigation-safe-args-gradle-plugin:test
Change-Id: I07b67d9c86dafff608df49a609796a71a9b3315a
navigation:navigation-safe-args-generator:test
BUG: 141099045
M navigation/navigation-safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/java/JavaNavWriter.kt
M navigation/navigation-safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/java/JavaTypes.kt
M navigation/navigation-safe-args-generator/src/tests/test-data/expected/java_nav_writer_test/MainFragmentArgs.java
M navigation/navigation-safe-args-generator/src/tests/test-data/expected/java_nav_writer_test/MainFragmentDirections.java
M navigation/navigation-safe-args-generator/src/tests/test-data/expected/java_nav_writer_test/Next.java
M navigation/navigation-safe-args-generator/src/tests/test-data/expected/java_nav_writer_test/SanitizedMainFragmentDirections.java
M navigation/navigation-safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/SettingsDirections.java
M navigation/navigation-safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_same_action/SettingsDirections.java
M navigation/navigation-safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_same_action/SettingsFragmentDirections.java
https://android-review.googlesource.com/1133433
https://goto.google.com/android-sha1/2180ea57914af961d4f2bb43802b42ae0d1802e0
Branch: androidx-master-dev
commit 2180ea57914af961d4f2bb43802b42ae0d1802e0
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri Oct 04 16:02:03 2019
Generate default values for Directions safe_args in Java
Currently the safe args generation for java code does not contain
default Direction args values. The default directions arg values are
provided by the Kotlin safe args generation and we should be as
uniform as possible across both languages.
Test: ./gradlew --rerun-tasks navigation:navigation-safe-args-gradle-plugin:test
Change-Id: I07b67d9c86dafff608df49a609796a71a9b3315a
navigation:navigation-safe-args-generator:test
BUG: 141099045
M navigation/navigation-safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/java/JavaNavWriter.kt
M navigation/navigation-safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/java/JavaTypes.kt
M navigation/navigation-safe-args-generator/src/tests/test-data/expected/java_nav_writer_test/MainFragmentArgs.java
M navigation/navigation-safe-args-generator/src/tests/test-data/expected/java_nav_writer_test/MainFragmentDirections.java
M navigation/navigation-safe-args-generator/src/tests/test-data/expected/java_nav_writer_test/Next.java
M navigation/navigation-safe-args-generator/src/tests/test-data/expected/java_nav_writer_test/SanitizedMainFragmentDirections.java
M navigation/navigation-safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/SettingsDirections.java
M navigation/navigation-safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_same_action/SettingsDirections.java
M navigation/navigation-safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_same_action/SettingsFragmentDirections.java
jb...@google.com <jb...@google.com> #7
This has been fixed internally and will be available in the Navigation 2.2.0-beta01 release.
ra...@gmail.com <ra...@gmail.com> #8
Using '2.2.0-rc02'. Putting null as a default value for a string, returns a string "@null" when getting that parameter from navArgs
<argument
android:name="deepLinkToken"
android:defaultValue="@null"
app:argType="string"
app:nullable="true" />
And:
val args by navArgs<FragmentArgs>()
args.deepLinkToken // returns "@null"
<argument
android:name="deepLinkToken"
android:defaultValue="@null"
app:argType="string"
app:nullable="true" />
And:
val args by navArgs<FragmentArgs>()
args.deepLinkToken // returns "@null"
jb...@google.com <jb...@google.com> #9
Re #8 - please file a separate bugs with a project that reproduce your separate issue. If the issue you are mentioning is covered by https://issuetracker.google.com/issues/141613546 , feel free to +1.
Description
Version used: 2.0.0
Devices/Android versions reproduced on: during development; any IDE
SDK: Java
Summary:
I can't unit test any production code that tries navigating to an auto-generated Action class that has a default value. It seems (in version 2.0.0) that the default values are set by the NavController instead of baked into the auto-generated class. The result is that I get some NullPointerExceptions when trying to unit test navigation.
To reproduce:
1. In nav graph xml, add an argument having a default value to an action
<fragment
android:id="@id/screen1_fragment"
android:name="com.yourapp.yourpackage.Screen1Fragment"
<action
android:id="@+id/action_screen1_to_screen2"
app:destination="@id/screen2_fragment"
<argument
android:name="myBoolean"
app:argType="boolean"
android:defaultValue="false" />
</action>
</fragment>
2. In prod code, navigate using this action without overriding the default
NavController.navigate(Screen1FragmentDirections.actionScreen1ToScreen2());
3. In a unit test, try to verify that the screen1-to-screen2 navigation was invoked
verify(NavController).navigate(Screen1FragmentDirections.actionScreen1ToScreen2());
Expected: Unit test passes with flying colors
Actual: NullPointerException is thrown when the verify() does an equals() comparison. The auto-generated class does not contain default values, and so ActionScreen1ToScreen2.getMyBoolean() method attempts to cast a null value into a boolean, like so:
public boolean getMyBoolean() {
return (boolean) arguments.get("myBoolean");
}
Seems like a testability issue. If there's something I'm missing please let me know.
Related Issues (but not the same):
* SafeArg Builder classes doesn't contain the default values (