Search in sources :

Example 1 with OptionPanel

use of com.aviary.android.feather.effects.AbstractEffectPanel.OptionPanel in project mobile-android by photo.

the class FilterManager method prepareEffectPanel.

/**
	 * Prepare effect panel.
	 * 
	 * @param effect
	 *           the effect
	 * @param entry
	 *           the entry
	 */
private void prepareEffectPanel(final AbstractEffectPanel effect, final EffectEntry entry) {
    View option_child = null;
    View drawing_child = null;
    if (effect instanceof OptionPanel) {
        option_child = ((OptionPanel) effect).getOptionView(UIUtils.getLayoutInflater(), mContext.getOptionsPanelContainer());
        mContext.getOptionsPanelContainer().addView(option_child);
    }
    if (effect instanceof ContentPanel) {
        drawing_child = ((ContentPanel) effect).getContentView(UIUtils.getLayoutInflater());
        drawing_child.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
        mContext.getDrawingImageContainer().addView(drawing_child);
    }
    effect.onCreate(mBitmap);
}
Also used : LayoutParams(android.view.ViewGroup.LayoutParams) View(android.view.View) ToolbarView(com.aviary.android.feather.widget.ToolbarView) OptionPanel(com.aviary.android.feather.effects.AbstractEffectPanel.OptionPanel) ContentPanel(com.aviary.android.feather.effects.AbstractEffectPanel.ContentPanel)

Aggregations

View (android.view.View)1 LayoutParams (android.view.ViewGroup.LayoutParams)1 ContentPanel (com.aviary.android.feather.effects.AbstractEffectPanel.ContentPanel)1 OptionPanel (com.aviary.android.feather.effects.AbstractEffectPanel.OptionPanel)1 ToolbarView (com.aviary.android.feather.widget.ToolbarView)1