Search in sources :

Example 11 with CategoryAdapter

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

the class FilterShowActivity method fillDualCamera.

private void fillDualCamera() {
    FiltersManager filtersManager = FiltersManager.getManager();
    ArrayList<FilterRepresentation> filtersRepresentations = filtersManager.getDualCamera();
    if (mCategoryDualCamAdapter != null) {
        mCategoryDualCamAdapter.clear();
    }
    mCategoryDualCamAdapter = new CategoryAdapter(this);
    for (FilterRepresentation representation : filtersRepresentations) {
        if (representation.getTextId() != 0) {
            representation.setName(getString(representation.getTextId()));
        }
        mCategoryDualCamAdapter.add(new Action(this, representation));
    }
}
Also used : Action(com.android.gallery3d.filtershow.category.Action) FiltersManager(com.android.gallery3d.filtershow.filters.FiltersManager) CategoryAdapter(com.android.gallery3d.filtershow.category.CategoryAdapter) FilterRepresentation(com.android.gallery3d.filtershow.filters.FilterRepresentation)

Example 12 with CategoryAdapter

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

the class FilterShowActivity method fillMakeup.

private void fillMakeup() {
    if (!SimpleMakeupImageFilter.HAS_TS_MAKEUP) {
        return;
    }
    FiltersManager filtersManager = FiltersManager.getManager();
    ArrayList<FilterRepresentation> makeups = filtersManager.getMakeup();
    if (mCategoryMakeupAdapter != null) {
        mCategoryMakeupAdapter.clear();
    }
    mCategoryMakeupAdapter = new CategoryAdapter(this);
    for (FilterRepresentation makeup : makeups) {
        if (makeup.getTextId() != 0) {
            makeup.setName(getString(makeup.getTextId()));
        }
        mCategoryMakeupAdapter.add(new Action(this, makeup));
    }
}
Also used : Action(com.android.gallery3d.filtershow.category.Action) FiltersManager(com.android.gallery3d.filtershow.filters.FiltersManager) CategoryAdapter(com.android.gallery3d.filtershow.category.CategoryAdapter) FilterRepresentation(com.android.gallery3d.filtershow.filters.FilterRepresentation)

Aggregations

CategoryAdapter (com.android.gallery3d.filtershow.category.CategoryAdapter)12 Action (com.android.gallery3d.filtershow.category.Action)11 FilterRepresentation (com.android.gallery3d.filtershow.filters.FilterRepresentation)11 FiltersManager (com.android.gallery3d.filtershow.filters.FiltersManager)11 Point (android.graphics.Point)3 DialogFragment (android.support.v4.app.DialogFragment)1 Fragment (android.support.v4.app.Fragment)1 MainPanel (com.android.gallery3d.filtershow.category.MainPanel)1 MediaPickerFragment (com.android.gallery3d.filtershow.mediapicker.MediaPickerFragment)1 ArrayList (java.util.ArrayList)1