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;
}
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);
}
}
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;
}
}
}
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();
}
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);
}
Aggregations