Fixed
Status Update
Comments
il...@google.com <il...@google.com>
il...@google.com <il...@google.com> #2
Nested scrolling works partially (as per http://b/122818889 ). Let's discuss if we need full support and if so make sure it works.
ap...@google.com <ap...@google.com> #3
Hi!
What is 'partially' exactly?
How do I see it?
Thanks!
What is 'partially' exactly?
How do I see it?
Thanks!
mm...@commonsware.com <mm...@commonsware.com> #4
As of now:
- Nesting scroll views with a scroll direction perpendicular to the ViewPager2's orientation inside ViewPager2 works
- Nesting scroll views with a scroll direction parallel to the ViewPager2's orientation inside ViewPager2 does not work
- Nesting scroll views with a scroll direction perpendicular to the ViewPager2's orientation inside ViewPager2 works
- Nesting scroll views with a scroll direction parallel to the ViewPager2's orientation inside ViewPager2 does not work
il...@google.com <il...@google.com> #5
Horizontal ViewPager2 not correctly working into a vertical RecyclerView
Set a setNestedScrollingEnabled to the RecyclerView into the ViewPager2 (across reflection) resolves the problem
Set a setNestedScrollingEnabled to the RecyclerView into the ViewPager2 (across reflection) resolves the problem
Description
Version used: 2.0.0
Devices/Android versions reproduced on: n/a
Android Studio 3.3.2
Build #AI-182.5107.16.33.5314842, built on February 15, 2019
JRE: 1.8.0_152-release-1248-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-46-generic
com.android.tools.build:gradle:3.3.2
gradle-4.10.3-all
I have a destination with a nullable String argument:
<fragment
android:id="@+id/editFragment"
android:name="com.commonsware.todo.ui.edit.EditFragment"
android:label="@string/app_name" >
<argument
android:name="modelId"
app:argType="string"
app:nullable="true" />
</fragment>
I have an action that attempts to declare null as the default value:
<action
android:id="@+id/createModel"
app:destination="@id/editFragment" >
<argument
android:name="modelId"
android:defaultValue="@null" />
</action>
The generated SafeArgs code treats @null as a String:
private data class CreateModel(val modelId: String = "@null") : NavDirections {
override fun getActionId(): Int = R.id.createModel
override fun getArguments(): Bundle {
val result = Bundle()
result.putString("modelId", this.modelId)
return result
}
}
fun createModel(modelId: String = "@null"): NavDirections = CreateModel(modelId)
IOW, I am seeing similar symptoms to
If I remove the default value, the SafeArgs-generated code goes back to supporting null, just without a default null:
private data class CreateModel(val modelId: String?) : NavDirections {
override fun getActionId(): Int = R.id.createModel
override fun getArguments(): Bundle {
val result = Bundle()
result.putString("modelId", this.modelId)
return result
}
}
fun createModel(modelId: String?): NavDirections = CreateModel(modelId)
Let me know if you need additional information -- thanks!