@Override public void addSecondHSLChildViews( List childList, float showCount, View.OnClickListener onClickListener) { PGEditBaseHoriScrollItemAdapter baseHoriScrollItemAdapter = new PGEditHSLHoriScrollItemAdapter(); baseHoriScrollItemAdapter.setContext(mActivity); baseHoriScrollItemAdapter.setData(childList); mSecondHorizontalLayout.setItemCountOnScreen(showCount); baseHoriScrollItemAdapter.setOnItemViewClickListener(onClickListener); mSecondHorizontalLayout.setAdapter(baseHoriScrollItemAdapter); }
@Override public void showFirstImageViewPhoto( List mPGEditMenusBeanList, float showCount, View.OnClickListener onClickListener) { mActivity.findViewById(R.id.step_layout).setVisibility(View.VISIBLE); mActivity.findViewById(R.id.first_top).setVisibility(View.VISIBLE); PGEditBaseHoriScrollItemAdapter baseHoriScrollItemAdapter = new PGEditBaseHoriScrollItemAdapter(); baseHoriScrollItemAdapter.setContext(mActivity); baseHoriScrollItemAdapter.setData(mPGEditMenusBeanList); mFirstHorizontalLayout.setItemCountOnScreen(showCount); baseHoriScrollItemAdapter.setOnItemViewClickListener(onClickListener); mFirstHorizontalLayout.setAdapter(baseHoriScrollItemAdapter); }
@Override public void addSecondFrameChildViews( List effectList, float v, View.OnClickListener mThirdClickListener, String pg_sdk_edit_effect_check, int color) { PGEditEffectHoriScrollItemAdapter baseHoriScrollItemAdapter = new PGEditEffectHoriScrollItemAdapter(mSecondHorizontalLayout, -1); baseHoriScrollItemAdapter.setContext(mActivity); baseHoriScrollItemAdapter.setMaskResource(pg_sdk_edit_effect_check); baseHoriScrollItemAdapter.hideFirstPosition(); mSecondHorizontalLayout.setItemCountOnScreen(v); baseHoriScrollItemAdapter.setData(effectList); baseHoriScrollItemAdapter.setOnItemViewClickListener(mThirdClickListener); mSecondHorizontalLayout.setAdapter(baseHoriScrollItemAdapter); }
@Override public void addThirdEffectChildViews( List list, float showCount, View.OnClickListener onThirdClickListener, View.OnClickListener onScrollClickListener, String maskIcon, View view, View lastSelectedView) { PGEditEffectHoriScrollItemAdapter baseHoriScrollItemAdapter = new PGEditEffectHoriScrollItemAdapter(mThirdHorizontalLayout, -1); baseHoriScrollItemAdapter.setOnItemViewClickListener(onThirdClickListener); baseHoriScrollItemAdapter.setOnScrollClickListener(onScrollClickListener); baseHoriScrollItemAdapter.setMaskResource(maskIcon); baseHoriScrollItemAdapter.setData(list); baseHoriScrollItemAdapter.setContext(mActivity); baseHoriScrollItemAdapter.setLastSelectedView(lastSelectedView); mThirdHorizontalLayout.setItemCountOnScreen(showCount); mThirdHorizontalLayout.setAdapter(baseHoriScrollItemAdapter); mThirdHorizontalLayout.setVisibility(View.VISIBLE); mSecondHorizontalLayout.hide(true); final int position = mSecondHorizontalLayout.getLinearContainer().indexOfChild(view); final int itemWidth = getEffectTypeItem(view).getWidth(); mThirdHorizontalLayout .getViewTreeObserver() .addOnGlobalLayoutListener( new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { int scroll = mSecondHorizontalLayout.getScrollX() - mThirdHorizontalLayout.getScrollX(); mThirdHorizontalLayout.startExpandAnim(position * itemWidth - scroll); mThirdHorizontalLayout.getViewTreeObserver().removeGlobalOnLayoutListener(this); } }); }
@Override public void addSecondEffectChildViews( List list, float showCount, View.OnClickListener onThirdClickListener, View.OnClickListener onScrollClickListener, String maskIcon, View lastSelectedView) { PGEditEffectHoriScrollItemAdapter baseHoriScrollItemAdapter = new PGEditEffectHoriScrollItemAdapter(mSecondHorizontalLayout, -1); baseHoriScrollItemAdapter.setOnItemViewClickListener(onThirdClickListener); baseHoriScrollItemAdapter.setOnScrollClickListener(onScrollClickListener); baseHoriScrollItemAdapter.hideFirstPosition(); baseHoriScrollItemAdapter.setMaskResource(maskIcon); baseHoriScrollItemAdapter.setData(list); baseHoriScrollItemAdapter.setContext(mActivity); baseHoriScrollItemAdapter.setLastSelectedView(lastSelectedView); mSecondHorizontalLayout.setItemCountOnScreen(showCount); mSecondHorizontalLayout.setAdapter(baseHoriScrollItemAdapter); }