scrollview

RecyclerView inside a ScrollView/NestedScrollView does not scroll properly

百般思念 提交于 2020-01-12 08:40:07
问题 I have a layout which has a CardView and a FloatingActionButton associated with it. There is a list of replies below the CardView (which is a RecyclerView ). Sometimes the CardViews' height is greater than the screen, so I have used layout_height="wrap_content" for the CardView and wrapped the whole LinearLayout inside a ScrollView . However, this causes a problem(since it is a scrolling view inside a ScrollView ) while scrolling the items of the RecyclerView . As suggested in some of the

Determine if a view is on screen - Android

孤街浪徒 提交于 2020-01-11 17:04:50
问题 I'm a little bit stuck with this one - first and foremost, the following link has been useful however I've come up with a bit of an issue with visibility: The link: Check view visibility I have a scroll view (parent) and a number of sub-views ( LinearLayout -> TableLayout ) etc. There are a number of items I set to View.GONE within the XML ( android:visibility="gone" ). I have some simple code to determine whether it is visible or not using getVisibility() however when I set the item to View

Getting force close while scrolling down the list View in Android

♀尐吖头ヾ 提交于 2020-01-11 13:04:12
问题 I am getting force close errors while I try to scroll down my list View in fragment activity, which has 1 image View and 2 text view. I am beginner in android, so don't have that much knowledge except basic scenario in mostly used components of android. No bitmap OOM error is there, as I checked without images too. I am retrieving images from sd card from the path. Here, is my logcat out put with errors. 04-05 18:07:02.868: E/AndroidRuntime(3257): FATAL EXCEPTION: main 04-05 18:07:02.868: E

Getting force close while scrolling down the list View in Android

女生的网名这么多〃 提交于 2020-01-11 13:04:07
问题 I am getting force close errors while I try to scroll down my list View in fragment activity, which has 1 image View and 2 text view. I am beginner in android, so don't have that much knowledge except basic scenario in mostly used components of android. No bitmap OOM error is there, as I checked without images too. I am retrieving images from sd card from the path. Here, is my logcat out put with errors. 04-05 18:07:02.868: E/AndroidRuntime(3257): FATAL EXCEPTION: main 04-05 18:07:02.868: E

How to disable RecyclerView scrolling to make the layout listen its ScrollView parent?

非 Y 不嫁゛ 提交于 2020-01-11 06:51:49
问题 I'm trying to put a RecyclerView , inside a ScrollView . But the ScrollView doesn't scrolls and the RecyclerView does but I don't want it to... What can I do? I tried with this class https://stackoverflow.com/a/30222721/4864104 and in fact the RecyclerView doesn't scroll anymore, but neither does the ScrollView . Any help to make the ScrollView work even with the disabled RecyclerView ? Thanks in advance. This is my layout: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res

Android TV ScrollView选中子控件居中并且平滑滚动

杀马特。学长 韩版系。学妹 提交于 2020-01-11 04:28:43
Android TV ScrollView选中子控件居中并且平滑滚动 第一次写,不会上传视频,直接上代码了 NestedScrollView package com.gfsoftware.launcher.view; import android.content.Context; import android.graphics.Rect; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.widget.NestedScrollView; import android.util.AttributeSet; import android.util.Log; import android.view.FocusFinder; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; import android.widget.FrameLayout; import com.gfsoftware.launcher.listener.ScrollViewListener; import com

ScrollView vs RecyclerView for dissimilar children on Android

风格不统一 提交于 2020-01-10 14:08:07
问题 I have a mix of 10-15 custom views and fragments to be shown in a vertical list. I am not sure if RecyclerView has any advantage in scenarios where all views are dissimilar. RecyclerView seems to add lot of boiler-plate code, and I think the only advantage I would get is easier enter/exit animation. My custom views/fragment also make web-service call on being created. We don't cache web-requests for business reasons. My understanding is that RecyclerView would trigger these web-service calls

Swift: how to make a ScrollView work with PageControl?

风流意气都作罢 提交于 2020-01-10 04:26:06
问题 Strctly following this tutorial, in section Paging with UIScrollView , I have just implemented a ScrollView to use as a slideshow with downloaded photos from a previous UICollectionViewController . When scroll view is loaded, it does not work well because I see these ones: Instead, when I slide back the images they are displayed in the correct way, one for each page. Or better, this problem disappears when I get the 4-th image in the slideshow, and only at that point all the following ones

Android, How to add ScrollView into screen which has some list items?

大憨熊 提交于 2020-01-10 04:24:26
问题 in my activity, i have three lists. after running the application, the screen is not scroll-able. i can scroll the list which is on top of others but i can't scroll the whole of page. I tried to add ScrollView into my xml layout but lint says that "The vertically scrolling ScrollView should not contain another vertically scrolling widget (ListView)". How to make my screen scrollable? 回答1: Try this way <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width=

Get reference to my WPF ListBox's ScrollViewer in C#?

流过昼夜 提交于 2020-01-10 04:20:07
问题 I think this should be easy but I'm having a tough time with it. How can I get a reference to my ListBox's scrollviewer in C#? I've tried pretty much everything I can think of. The ListBox is in a WPF Custom Control so we use Template.FindName to get references to all our controls. My ListBox looks like this: <ListBox x:Name="PART_SoundList" ScrollViewer.CanContentScroll="False" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Hidden" Focusable=