Search in sources :

Example 1 with ObservableScrollView

use of com.marshalchen.common.uimodule.fadingactionbar.view.ObservableScrollView in project UltimateAndroid by cymcsg.

the class FadingActionBarHelperBase method createScrollView.

private View createScrollView() {
    ViewGroup scrollViewContainer = (ViewGroup) mInflater.inflate(R.layout.fab__scrollview_container, null);
    ObservableScrollView scrollView = (ObservableScrollView) scrollViewContainer.findViewById(R.id.fab__scroll_view);
    scrollView.setOnScrollChangedCallback(mOnScrollChangedListener);
    ViewGroup contentContainer = (ViewGroup) scrollViewContainer.findViewById(R.id.fab__container);
    LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
    mContentView.setLayoutParams(layoutParams);
    contentContainer.addView(mContentView);
    mHeaderContainer = (FrameLayout) scrollViewContainer.findViewById(R.id.fab__header_container);
    initializeGradient(mHeaderContainer);
    mHeaderContainer.addView(mHeaderView, 0);
    mMarginView = (FrameLayout) contentContainer.findViewById(R.id.fab__content_top_margin);
    return scrollViewContainer;
}
Also used : LayoutParams(android.view.ViewGroup.LayoutParams) ViewGroup(android.view.ViewGroup) ObservableScrollView(com.marshalchen.common.uimodule.fadingactionbar.view.ObservableScrollView) LinearLayout(android.widget.LinearLayout)

Aggregations

ViewGroup (android.view.ViewGroup)1 LayoutParams (android.view.ViewGroup.LayoutParams)1 LinearLayout (android.widget.LinearLayout)1 ObservableScrollView (com.marshalchen.common.uimodule.fadingactionbar.view.ObservableScrollView)1