Search in sources :

Example 1 with CategoryAdapter

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

the class FilterShowActivity method fillTruePortrait.

private void fillTruePortrait() {
    FiltersManager filtersManager = FiltersManager.getManager();
    ArrayList<FilterRepresentation> filtersRepresentations = filtersManager.getTruePortrait();
    if (mCategoryTruePortraitAdapter != null) {
        mCategoryTruePortraitAdapter.clear();
    }
    mCategoryTruePortraitAdapter = new CategoryAdapter(this);
    for (FilterRepresentation representation : filtersRepresentations) {
        if (representation.getTextId() != 0) {
            representation.setName(getString(representation.getTextId()));
        }
        mCategoryTruePortraitAdapter.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 2 with CategoryAdapter

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

the class FilterShowActivity method fillTrueScanner.

private void fillTrueScanner() {
    FiltersManager filtersManager = FiltersManager.getManager();
    ArrayList<FilterRepresentation> trueScannerRepresentations = filtersManager.getTrueScanner();
    if (mCategoryTrueScannerAdapter != null) {
        mCategoryTrueScannerAdapter.clear();
    }
    mCategoryTrueScannerAdapter = new CategoryAdapter(this);
    for (FilterRepresentation representation : trueScannerRepresentations) {
        if (representation.getTextId() != 0) {
            representation.setName(getString(representation.getTextId()));
        }
        mCategoryTrueScannerAdapter.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 3 with CategoryAdapter

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

the class FilterShowActivity method fillEffects.

private void fillEffects() {
    FiltersManager filtersManager = FiltersManager.getManager();
    ArrayList<FilterRepresentation> filtersRepresentations = filtersManager.getEffects();
    if (mCategoryFiltersAdapter != null) {
        mCategoryFiltersAdapter.clear();
    }
    mCategoryFiltersAdapter = new CategoryAdapter(this);
    for (FilterRepresentation representation : filtersRepresentations) {
        if (representation.getTextId() != 0) {
            representation.setName(getString(representation.getTextId()));
        }
        mCategoryFiltersAdapter.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 4 with CategoryAdapter

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

the class FilterShowActivity method fillSeeStraight.

private void fillSeeStraight() {
    FiltersManager filtersManager = FiltersManager.getManager();
    ArrayList<FilterRepresentation> hazeBusterRepresentations = filtersManager.getSeeStraight();
    if (mCategorySeeStraightAdapter != null) {
        mCategorySeeStraightAdapter.clear();
    }
    mCategorySeeStraightAdapter = new CategoryAdapter(this);
    for (FilterRepresentation representation : hazeBusterRepresentations) {
        if (representation.getTextId() != 0) {
            representation.setName(getString(representation.getTextId()));
        }
        mCategorySeeStraightAdapter.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 5 with CategoryAdapter

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

the class FilterShowActivity method fillBorders.

private void fillBorders() {
    FiltersManager filtersManager = FiltersManager.getManager();
    ArrayList<FilterRepresentation> borders = filtersManager.getBorders();
    mCategoryBordersAdapter = new CategoryAdapter(this);
    for (int i = 0; i < borders.size(); i++) {
        FilterRepresentation filter = borders.get(i);
        filter.setName(getString(R.string.frame, i));
        if (i == 0) {
            filter.setName(getString(R.string.none));
        }
        mCategoryBordersAdapter.add(new Action(this, filter, Action.FULL_VIEW));
    }
}
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) Point(android.graphics.Point)

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