use of com.android.gallery3d.filtershow.filters.FiltersManager in project android_packages_apps_Gallery2 by LineageOS.
the class FilterShowActivity method fillHazeBuster.
private void fillHazeBuster() {
FiltersManager filtersManager = FiltersManager.getManager();
ArrayList<FilterRepresentation> hazeBusterRepresentations = filtersManager.getHazeBuster();
if (mCategoryHazeBusterAdapter != null) {
mCategoryHazeBusterAdapter.clear();
}
mCategoryHazeBusterAdapter = new CategoryAdapter(this);
for (FilterRepresentation representation : hazeBusterRepresentations) {
if (representation.getTextId() != 0) {
representation.setName(getString(representation.getTextId()));
}
mCategoryHazeBusterAdapter.add(new Action(this, representation));
}
}
use of com.android.gallery3d.filtershow.filters.FiltersManager 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));
}
}
use of com.android.gallery3d.filtershow.filters.FiltersManager 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));
}
}
use of com.android.gallery3d.filtershow.filters.FiltersManager in project android_packages_apps_Gallery2 by LineageOS.
the class GeometryPanel method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
FiltersManager filtersManager = FiltersManager.getManager();
mFiltersRepresentations = filtersManager.getTools();
return super.onCreateView(inflater, container, savedInstanceState);
}
use of com.android.gallery3d.filtershow.filters.FiltersManager in project android_packages_apps_Gallery2 by LineageOS.
the class CategoryPanelLevelTwo method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
LinearLayout main = (LinearLayout) inflater.inflate(R.layout.filtershow_category_panel_two, container, false);
FiltersManager filtersManager = FiltersManager.getManager();
mFiltersRepresentations = filtersManager.getWaterMarks();
mBottomPanel = main.findViewById(R.id.bottom_panel);
mExitButton = (ImageButton) main.findViewById(R.id.cancel);
mApplyButton = (ImageButton) main.findViewById(R.id.done);
final FilterShowActivity activity = (FilterShowActivity) getActivity();
mApplyButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Todo xukd add watermark to bufferimage
activity.disableTouchEvent();
activity.backToMain();
activity.setActionBar();
}
});
mExitButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
activity.cancelCurrentFilter();
activity.backToMain();
activity.setActionBar();
}
});
mEditName = (TextView) main.findViewById(R.id.editor_name);
int adapterId = mCurrentAdapter % FilterWatermarkRepresentation.LOCATION;
if (adapterId >= 0 && adapterId < mFiltersRepresentations.size()) {
mEditName.setText(mFiltersRepresentations.get(adapterId).getTextId());
} else {
mEditName.setText(DEFAULT_NAME);
}
View panelView = main.findViewById(R.id.listItems);
if (panelView instanceof CategoryTrack) {
CategoryTrack panel = (CategoryTrack) panelView;
if (mAdapter != null) {
mAdapter.setOrientation(CategoryView.HORIZONTAL);
panel.setAdapter(mAdapter);
mAdapter.setContainer(panel);
}
}
mAddButton = (IconView) main.findViewById(R.id.addButton);
if (mAddButton != null) {
mAddButton.setOnClickListener(this);
updateAddButtonVisibility();
}
return main;
}
Aggregations