Fixed
Status Update
Comments
il...@google.com <il...@google.com>
il...@google.com <il...@google.com>
da...@google.com <da...@google.com> #2
A couple of questions:
1. Have you saw crash in real device or only in simulators?
2. Do you use dynamic feature for language ID?
1. Have you saw crash in real device or only in simulators?
2. Do you use dynamic feature for language ID?
Description
Version used: android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0-alpha01
As the title says, the safe args plugin generates invalid code when argument names contain a period. I would argue that the plugin should generate valid code for periods. I've seen codebases that use class package names as part of the bundle key. Sanitizing the names to replace period with an underscore would allow for easier migration to the Navigation Component.
Some code samples:
```
<fragment
android:id="@+id/firstController"
android:name="com.bluelinelabs.conductor.demo.controllers.ArchNavigationDemoController"
android:label="ArchNavigationDemoController1">
<argument android:name="NavigationDemoController.index" android:defaultValue="0" app:type="integer"/>
</fragment>
```
```
public int getNavigationDemoController.index() {
return NavigationDemoController.index;
}
```
```
public static ArchNavigationDemoControllerArgs fromBundle(Bundle bundle) {
ArchNavigationDemoControllerArgs result = new ArchNavigationDemoControllerArgs();
if (bundle.containsKey("NavigationDemoController.index")) {
result.NavigationDemoController.index = bundle.getInt("NavigationDemoController.index");
}
}
```