Android HorizontalScrollView - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android HorizontalScrollView class.

This code example shows how to use the following methods: scrollBy
            // For some reason we need to post this action, rather than call immediately. 
            // If we try immediately, it will not scroll. 
            new Handler().post(new Runnable() {
                @Override 
                public void run() { 
                    me.scrollBy(scrollToViewPos, 0);
                } 
            }); 
        } 
    } 
 
    /** 
     * Callback interface to interact with the HSV. 
     */ 
    public interface SizeCallback { 
        /** 
         * Used to allow clients to measure Views before re-adding them. 
         */ 
        public void onGlobalLayout(); 
 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setLayoutParams, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
		views = new ArrayList<View>();
		 
		if(isVertical){
			scroll = new ScrollView(this.getContext());
		} else { 
			scroll = new HorizontalScrollView(this.getContext());
		} 
		quilt = new QuiltViewBase(getContext(), isVertical);
		scroll.addView(quilt);
		this.addView(scroll);
		 
	} 
	 
	public void addPatchImages(ArrayList<ImageView> images){
		 
		for(ImageView image: images){
			FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT);
			image.setLayoutParams(params);
			 
			LinearLayout wrapper = new LinearLayout(this.getContext());
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
		HorizontalScrollView scrollView;
 
		if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
			scrollView = new InternalHorizontalScrollViewSDK9(context, attrs);
		} else { 
			scrollView = new HorizontalScrollView(context, attrs);
		} 
 
		scrollView.setId(R.id.scrollview);
		return scrollView;
	} 
 
	@Override 
	protected boolean isReadyForPullStart() { 
		return mRefreshableView.getScrollX() == 0; 
	} 
 
	@Override 
	protected boolean isReadyForPullEnd() { 
		View scrollViewChild = mRefreshableView.getChildAt(0);
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getWidth, postDelayed, setFillViewport, smoothScrollTo
            public void run() { 
                View tabView = widget.getChildAt(position);
                if (tabView != null) {
                    HorizontalScrollView scrollView = (HorizontalScrollView) widget.getParent();
                    assert scrollView != null;
                    scrollView.setFillViewport(true);
 
                    final int scrollPos = tabView.getLeft() - (scrollView.getWidth() - tabView.getWidth()) / 2;
                    scrollView.smoothScrollTo(scrollPos, 0);
                    scrollView.postDelayed(new Runnable() {
                        @Override 
                        public void run() { 
                            onTabPageSelected(position);
                        } 
                    }, 250); 
                } 
            } 
        }, 250); 
    } 
 
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Android HorizontalScrollView Questions & Answers:

See Code Examples for Android HorizontalScrollView Methods: