Fixed
Status Update
Comments
di...@google.com <di...@google.com> #2
Thanks for the report.
Any layout we can use to quickly reproduce the issue?
Any layout we can use to quickly reproduce the issue?
br...@gmail.com <br...@gmail.com> #3
Hi,
you can try this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android "
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto ">
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="150dp"
app:cardBackgroundColor="#000000">
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="150dp"
app:cardBackgroundColor="#FF0000">
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="150dp"
app:cardBackgroundColor="#000000">
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="150dp"
app:cardBackgroundColor="#FF0000">
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="150dp"
app:cardBackgroundColor="#000000">
</android.support.v7.widget.CardView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabUlozitHraca"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_marginBottom="@dimen/activity_horizontal_margin"
android:layout_marginEnd="@dimen/activity_vertical_margin"
android:scaleType="center"
app:fabSize="auto" />
</android.support.design.widget.CoordinatorLayout>
</LinearLayout>
you can try this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="150dp"
app:cardBackgroundColor="#000000">
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="150dp"
app:cardBackgroundColor="#FF0000">
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="150dp"
app:cardBackgroundColor="#000000">
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="150dp"
app:cardBackgroundColor="#FF0000">
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="150dp"
app:cardBackgroundColor="#000000">
</android.support.v7.widget.CardView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabUlozitHraca"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_marginBottom="@dimen/activity_horizontal_margin"
android:layout_marginEnd="@dimen/activity_vertical_margin"
android:scaleType="center"
app:fabSize="auto" />
</android.support.design.widget.CoordinatorLayout>
</LinearLayout>
br...@gmail.com <br...@gmail.com> #4
Problem is only when NestedScrollView is in CoordinatorLayout. When there is no CoordinatorLayout, NestedScrollView is working alright
di...@google.com <di...@google.com> #5
Thanks for the repro layout!
Vadim, could you have a look? I suspect the CoordinatorLayoutHandler is intercepting the scroll event. We might need to special case a scrollable surface under a CoordinatorLayout
Vadim, could you have a look? I suspect the CoordinatorLayoutHandler is intercepting the scroll event. We might need to special case a scrollable surface under a CoordinatorLayout
am...@google.com <am...@google.com>
am...@google.com <am...@google.com> #6
Thanks for reporting the issue and providing a test layout. I've tried to repro it in newer versions of Android Studio (3.2.1 stable) and 3.4 Canary, and it seems to be fixed already. Can you please give it a shot in any of them?
I'm attaching two videos showing the layout you provided being rendered in both the designer and preview tabs. Please note I've added a green block that is not displayed unless you scroll.
I'm attaching two videos showing the layout you provided being rendered in both the designer and preview tabs. Please note I've added a green block that is not displayed unless you scroll.
Description
since I updated to AS 3.0, I have problem with rendering of layout, where I use NestedScrollView. A problem is that components, which are not visible without scrolling, they are not showing in preview. This problem is only in Preview/Design, in device it is showing alright.
My dependencies are:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.android.support:design:25.4.0'
compile 'com.android.support:support-vector-drawable:25.4.0'
compile 'com.android.support:cardview-v7:25.4.0'
compile 'com.android.support:recyclerview-v7:25.4.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.michaelmuenzer.android:ScrollableNumberPicker:0.2.2'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
testCompile 'junit:junit:4.12'
}
Thanks
Build: 3.0, AI-171.4408382, 201710201707,
AI-171.4408382, JRE 1.8.0_152-release-915-b01x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080, 1920x1080
IMPORTANT: Please read