Search in sources :

Example 1 with FiltersManager

use of com.android.gallery3d.filtershow.filters.FiltersManager 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 FiltersManager

use of com.android.gallery3d.filtershow.filters.FiltersManager 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 FiltersManager

use of com.android.gallery3d.filtershow.filters.FiltersManager 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 FiltersManager

use of com.android.gallery3d.filtershow.filters.FiltersManager 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 FiltersManager

use of com.android.gallery3d.filtershow.filters.FiltersManager 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

FiltersManager (com.android.gallery3d.filtershow.filters.FiltersManager)15 Action (com.android.gallery3d.filtershow.category.Action)12 FilterRepresentation (com.android.gallery3d.filtershow.filters.FilterRepresentation)12 CategoryAdapter (com.android.gallery3d.filtershow.category.CategoryAdapter)11 Point (android.graphics.Point)4 ArrayList (java.util.ArrayList)2 Resources (android.content.res.Resources)1 Uri (android.net.Uri)1 DialogFragment (android.support.v4.app.DialogFragment)1 Fragment (android.support.v4.app.Fragment)1 View (android.view.View)1 LinearLayout (android.widget.LinearLayout)1 TextView (android.widget.TextView)1 FilterShowActivity (com.android.gallery3d.filtershow.FilterShowActivity)1 MainPanel (com.android.gallery3d.filtershow.category.MainPanel)1 SaveOption (com.android.gallery3d.filtershow.data.FilterPresetSource.SaveOption)1 FilterPresetRepresentation (com.android.gallery3d.filtershow.filters.FilterPresetRepresentation)1 MediaPickerFragment (com.android.gallery3d.filtershow.mediapicker.MediaPickerFragment)1