use of com.cyrilmottier.android.translucentactionbar.NotifyingScrollView in project GlassActionBar by ManuelPeinado.
the class GlassActionBarHelper method createView.
public View createView(Context context) {
int[] attrs = { android.R.attr.windowBackground };
// Need to get resource id of style pointed to from actionBarStyle
TypedValue outValue = new TypedValue();
context.getTheme().resolveAttribute(android.R.attr.windowBackground, outValue, true);
TypedArray style = context.getTheme().obtainStyledAttributes(outValue.resourceId, attrs);
windowBackground = style.getDrawable(0);
style.recycle();
LayoutInflater inflater = LayoutInflater.from(context);
frame = (FrameLayout) inflater.inflate(R.layout.gab__frame, null);
content = inflater.inflate(contentLayout, (ViewGroup) frame, false);
frame.addView(content, 0);
frame.getViewTreeObserver().addOnGlobalLayoutListener(this);
blurredOverlay = (ImageView) frame.findViewById(R.id.blurredOverlay);
if (content instanceof NotifyingScrollView) {
if (verbose)
Log.v(TAG, "ScrollView content!");
scrollView = (NotifyingScrollView) content;
scrollView.setOnScrollChangedListener(this);
} else if (content instanceof ListView) {
if (verbose)
Log.v(TAG, "ListView content!");
listView = (ListView) content;
listView.setAdapter(adapter);
ListViewScrollObserver observer = new ListViewScrollObserver(listView);
observer.setOnScrollUpAndDownListener(this);
}
actionBarHeight = getActionBarHeight(context);
return frame;
}
use of com.cyrilmottier.android.translucentactionbar.NotifyingScrollView in project FadingActionBar-Native by ManuelPeinado.
the class FadingActionBarHelper method createScrollView.
private View createScrollView() {
mScrollView = (ViewGroup) mInflater.inflate(R.layout.fab__scrollview_container, null);
NotifyingScrollView scrollView = (NotifyingScrollView) mScrollView.findViewById(R.id.fab__scroll_view);
scrollView.setOnScrollChangedListener(mOnScrollChangedListener);
mContentContainer = (ViewGroup) mScrollView.findViewById(R.id.fab__container);
mContentContainer.addView(mContentView);
mHeaderContainer = (FrameLayout) mScrollView.findViewById(R.id.fab__header_container);
initializeGradient(mHeaderContainer);
mHeaderContainer.addView(mHeaderView, 0);
mMarginView = mContentContainer.findViewById(R.id.fab__content_top_margin);
return mScrollView;
}
Aggregations