scrollview

Reduce speed of smooth scroll in scroll view

℡╲_俬逩灬. 提交于 2019-12-31 11:04:31
问题 I have a scroll View. I performed smooth-scroll.using smoothScrollBy().It all works fine, but I want to change the duration of the smooth-scroll. Smooth-scroll happens very fast and user is not understanding what happened.Please help me reduce smooth-scroll speed? 回答1: Here is a solution with a timer which uses scrollTo but you can also use scrollBy Android: HorizontalScrollView smoothScroll animation time 回答2: The simple answer is just to replace scrollView.smoothScrollTo(0, scrollTo); with

Android: Listview inside ScrollView

久未见 提交于 2019-12-31 03:56:10
问题 I want to have a layout that can scroll and a listview inside it. The listview will expand it's height base on how many items in it. Only the ScrollView outside is scrollable. This is my code: <ScrollView android:id="@+id/layout_box" android:layout_width="fill_parent" android:layout_height="fill_parent" > <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > <RelativeLayout android:layout_width="match_parent" android:layout

ScrollView distrubing ListView inside of LinearLayout

孤人 提交于 2019-12-31 00:29:49
问题 I have LinearLayout whcih contains Buttons and ListViews. After getting many buttons and I decide to put that LinearLayout into ScrollView but after putting ScrollView my ListViews are showing only one Item. Following is the code before ScrollView <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:paddingBottom="

Xamarin Forms Listview in Scrollview doesn't scroll

白昼怎懂夜的黑 提交于 2019-12-30 23:49:13
问题 <?xml version="1.0" encoding="UTF-8"?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Dh.ListPage"> <ContentPage.Content> <ScrollView> <StackLayout Style="{StaticResource MainStackLayoutWhenLoggedInStyle}"> <Frame Style="{StaticResource FrameStyle2}"> <StackLayout> <Label Text="Vragenlijsten" Style="{StaticResource TitelLabelStyle}" /> </StackLayout> </Frame> <Frame Style="{StaticResource FrameStyle2}"> <StackLayout>

onInterceptTouchEvent, onTouchEvent only see ACTION_DOWN

北城余情 提交于 2019-12-30 18:36:37
问题 I have a top level ViewGroup, which I call SliderView, in which I want to detect swiping. This is mostly working, but one weird failure persists. The essence of SliderView is to override onInterceptTouchEvent and, once the user is actually swiping, return "true" to prevent other views from seing the MotionEvent. Here is a snip of code: public class SliderView extends ViewGroup { enum MoveState { MS_NONE, MS_HSCROLL, MS_VSCROLL }; private MoveState moveState = MoveState.MS_NONE; ... other code

How a change the content size of a webview in android?

☆樱花仙子☆ 提交于 2019-12-30 18:26:08
问题 I have a webview control in a scrollview. when i load a long html document into it, it resizes to accommodate it. this is correct. however, when i use the same control again afterwards and put less space-consuming html into it, the content size doesn't shrink. this is a problem because the user is able to still scroll a short document into white space. any ideas on how to resolve this? 回答1: I had a similar problem and resolved it by clearing the view and re-measuring with a small size prior

How a change the content size of a webview in android?

亡梦爱人 提交于 2019-12-30 18:25:41
问题 I have a webview control in a scrollview. when i load a long html document into it, it resizes to accommodate it. this is correct. however, when i use the same control again afterwards and put less space-consuming html into it, the content size doesn't shrink. this is a problem because the user is able to still scroll a short document into white space. any ideas on how to resolve this? 回答1: I had a similar problem and resolved it by clearing the view and re-measuring with a small size prior

android scrollto does not work in onResume method

假如想象 提交于 2019-12-30 12:22:24
问题 I would like to scroll a screen to a particular position when the screen is displayed so i did this code in Onresume function of my fragment scrollView.post(new Runnable() { @Override public void run () { scrollView.scrollTo(0, -200); Log.d(TAG, "x: " + scrollView.getScrollX() + " " + "y: " + scrollView.getScrollY()); } } ); but the scrollview doesn 't scroll 回答1: I've encountered the same problem with scrolling fragment to the previous position when returning to it. No scrolling possible in

android scrollto does not work in onResume method

允我心安 提交于 2019-12-30 12:22:04
问题 I would like to scroll a screen to a particular position when the screen is displayed so i did this code in Onresume function of my fragment scrollView.post(new Runnable() { @Override public void run () { scrollView.scrollTo(0, -200); Log.d(TAG, "x: " + scrollView.getScrollX() + " " + "y: " + scrollView.getScrollY()); } } ); but the scrollview doesn 't scroll 回答1: I've encountered the same problem with scrolling fragment to the previous position when returning to it. No scrolling possible in

PDF Generation From UIScrollView + iphone

本小妞迷上赌 提交于 2019-12-30 05:15:35
问题 I want to generate a pdf of UIScrollView whose content size is near about 320*2000. If I use current graphic image context to capture the scroll view layer, then it only captures the visible part of the scroll view not the whole layer of that scroll view. I am using the below code: -(void)CreatePdf:(id)sender { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *saveDirectory = [paths objectAtIndex:0]; NSString *saveFileName = @"myPDF