Search in sources :

Example 11 with FilterShowActivity

use of com.android.gallery3d.filtershow.FilterShowActivity in project android_packages_apps_Gallery2 by LineageOS.

the class BasicGeometryPanel method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    FilterShowActivity activity = (FilterShowActivity) getActivity();
    if (isLandscape() && activity.isShowEditCropPanel()) {
        mMainView = inflater.inflate(R.layout.filtershow_editor_crop_landscape, container, false);
    } else {
        mMainView = inflater.inflate(R.layout.filtershow_category_geometry_panel, container, false);
        mEditorName = (TextView) mMainView.findViewById(R.id.editor_name);
    }
    initButtons();
    initTexts();
    initPanels();
    mBottomPanel = mMainView.findViewById(R.id.bottom_panel);
    mExitButton = (ImageButton) mMainView.findViewById(R.id.cancel);
    mApplyButton = (ImageButton) mMainView.findViewById(R.id.done);
    return mMainView;
}
Also used : FilterShowActivity(com.android.gallery3d.filtershow.FilterShowActivity)

Example 12 with FilterShowActivity

use of com.android.gallery3d.filtershow.FilterShowActivity in project android_packages_apps_Gallery2 by LineageOS.

the class CategoryAdapter method remove.

@Override
public void remove(Action action) {
    if (!(mCategory == MainPanel.VERSIONS || mCategory == MainPanel.LOOKS)) {
        return;
    }
    super.remove(action);
    FilterShowActivity activity = (FilterShowActivity) getContext();
    if (mCategory == MainPanel.LOOKS) {
        if ((FilterPresetRepresentation) action.getRepresentation() != null) {
            activity.removePreset(action);
        } else {
            activity.removeLook(action);
        }
    } else if (mCategory == MainPanel.VERSIONS) {
        activity.removeVersion(action);
    }
}
Also used : FilterShowActivity(com.android.gallery3d.filtershow.FilterShowActivity)

Example 13 with FilterShowActivity

use of com.android.gallery3d.filtershow.FilterShowActivity in project android_packages_apps_Gallery2 by LineageOS.

the class CategoryPanelLevelTwo method loadAdapter.

@Override
public void loadAdapter(int adapter) {
    super.loadAdapter(adapter);
    FilterShowActivity activity = (FilterShowActivity) getActivity();
    switch(adapter) {
        case FilterWatermarkRepresentation.LOCATION:
            {
                mAdapter = activity.getCategoryLocationAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.WATERMARK);
                }
                break;
            }
        case FilterWatermarkRepresentation.TIME:
            {
                mAdapter = activity.getCategoryTimeAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.WATERMARK);
                }
                break;
            }
        case FilterWatermarkRepresentation.WEATHER:
            {
                mAdapter = activity.getCategoryWeatherAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.WATERMARK);
                }
                break;
            }
        case FilterWatermarkRepresentation.EMOTIONS:
            {
                mAdapter = activity.getCategoryEmotionAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.WATERMARK);
                }
                break;
            }
        case FilterWatermarkRepresentation.FOOD:
            {
                mAdapter = activity.getCategoryFoodAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.WATERMARK);
                }
                break;
            }
    }
}
Also used : FilterShowActivity(com.android.gallery3d.filtershow.FilterShowActivity)

Example 14 with FilterShowActivity

use of com.android.gallery3d.filtershow.FilterShowActivity in project android_packages_apps_Gallery2 by LineageOS.

the class CategoryPanel method loadAdapter.

public void loadAdapter(int adapter) {
    FilterShowActivity activity = (FilterShowActivity) getActivity();
    switch(adapter) {
        case MainPanel.LOOKS:
            {
                mAdapter = activity.getCategoryLooksAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.LOOKS);
                }
                activity.updateCategories();
                break;
            }
        case MainPanel.BORDERS:
            {
                mAdapter = activity.getCategoryBordersAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.BORDERS);
                }
                activity.updateCategories();
                break;
            }
        case MainPanel.GEOMETRY:
            {
                mAdapter = activity.getCategoryGeometryAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.GEOMETRY);
                }
                break;
            }
        case MainPanel.FILTERS:
            {
                mAdapter = activity.getCategoryFiltersAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.FILTERS);
                }
                break;
            }
        case MainPanel.DUALCAM:
            {
                mAdapter = activity.getCategoryDualCamAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.DUALCAM);
                }
                activity.updateCategories();
                break;
            }
        case MainPanel.TRUEPORTRAIT:
            {
                mAdapter = activity.getCategoryTruePortraitAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.TRUEPORTRAIT);
                }
                activity.updateCategories();
                break;
            }
        case MainPanel.TRUESCANNER:
            {
                mAdapter = activity.getCategoryTrueScannerAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.TRUESCANNER);
                }
                break;
            }
        case MainPanel.HAZEBUSTER:
            {
                mAdapter = activity.getCategoryHazeBusterAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.HAZEBUSTER);
                }
                break;
            }
        case MainPanel.SEESTRAIGHT:
            {
                mAdapter = activity.getCategorySeeStraightAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.SEESTRAIGHT);
                }
                break;
            }
        case MainPanel.VERSIONS:
            {
                mAdapter = activity.getCategoryVersionsAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.VERSIONS);
                }
                break;
            }
        case MainPanel.MAKEUP:
            {
                mAdapter = activity.getCategoryMakeupAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.MAKEUP);
                }
                break;
            }
        case MainPanel.WATERMARK:
            {
                mAdapter = activity.getCategoryWatermarkAdapter();
                if (mAdapter != null) {
                    mAdapter.initializeSelection(MainPanel.WATERMARK);
                }
                break;
            }
    }
    updateAddButtonVisibility();
}
Also used : FilterShowActivity(com.android.gallery3d.filtershow.FilterShowActivity)

Example 15 with FilterShowActivity

use of com.android.gallery3d.filtershow.FilterShowActivity in project android_packages_apps_Gallery2 by LineageOS.

the class TrueScannerPanel method onAttach.

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    FilterShowActivity filterShowActivity = (FilterShowActivity) activity;
    mTrueScannerEditor = (TrueScannerEditor) filterShowActivity.getEditor(TrueScannerEditor.ID);
}
Also used : FilterShowActivity(com.android.gallery3d.filtershow.FilterShowActivity)

Aggregations

FilterShowActivity (com.android.gallery3d.filtershow.FilterShowActivity)48 View (android.view.View)11 Button (android.widget.Button)6 FragmentTransaction (android.support.v4.app.FragmentTransaction)5 TextView (android.widget.TextView)5 FilterRepresentation (com.android.gallery3d.filtershow.filters.FilterRepresentation)5 MenuItem (android.view.MenuItem)4 PopupMenu (android.widget.PopupMenu)4 DialogInterface (android.content.DialogInterface)3 LayoutInflater (android.view.LayoutInflater)3 ViewGroup (android.view.ViewGroup)3 Point (android.graphics.Point)2 Fragment (android.support.v4.app.Fragment)2 FragmentManager (android.support.v4.app.FragmentManager)2 OnClickListener (android.view.View.OnClickListener)2 ImageButton (android.widget.ImageButton)2 MasterImage (com.android.gallery3d.filtershow.imageshow.MasterImage)2 StatePanel (com.android.gallery3d.filtershow.state.StatePanel)2 DoNotShowAgainDialog (com.android.gallery3d.filtershow.ui.DoNotShowAgainDialog)2 AlertDialog (android.app.AlertDialog)1