use of com.android.gallery3d.filtershow.state.StatePanel in project android_packages_apps_Gallery2 by LineageOS.
the class MainPanel method showImageStatePanel.
public void showImageStatePanel(boolean show) {
View container = mMainView.findViewById(R.id.state_panel_container);
FragmentTransaction transaction = null;
if (container == null) {
FilterShowActivity activity = (FilterShowActivity) getActivity();
container = activity.getMainStatePanelContainer(R.id.state_panel_container);
} else {
transaction = getChildFragmentManager().beginTransaction();
}
if (container == null) {
return;
} else {
transaction = getFragmentManager().beginTransaction();
}
int currentPanel = mCurrentSelected;
if (show) {
container.setVisibility(View.VISIBLE);
StatePanel statePanel = new StatePanel();
statePanel.setMainPanel(this);
FilterShowActivity activity = (FilterShowActivity) getActivity();
activity.updateVersions();
transaction.replace(R.id.state_panel_container, statePanel, StatePanel.FRAGMENT_TAG);
} else {
container.setVisibility(View.GONE);
Fragment statePanel = getChildFragmentManager().findFragmentByTag(StatePanel.FRAGMENT_TAG);
if (statePanel != null) {
transaction.remove(statePanel);
}
if (currentPanel == VERSIONS) {
currentPanel = LOOKS;
}
}
mCurrentSelected = -1;
showPanel(currentPanel);
transaction.commit();
}
use of com.android.gallery3d.filtershow.state.StatePanel in project android_packages_apps_Gallery2 by LineageOS.
the class EditorPanel method showImageStatePanel.
public void showImageStatePanel(boolean show) {
View container = mMainView.findViewById(R.id.state_panel_container);
FragmentTransaction transaction = null;
boolean child = false;
if (container == null) {
FilterShowActivity activity = (FilterShowActivity) getActivity();
container = activity.getMainStatePanelContainer(R.id.state_panel_container);
} else {
transaction = getChildFragmentManager().beginTransaction();
child = true;
}
if (container == null) {
return;
} else {
transaction = getFragmentManager().beginTransaction();
}
Fragment panel = getActivity().getSupportFragmentManager().findFragmentByTag(MainPanel.FRAGMENT_TAG);
if (panel == null || panel instanceof MainPanel) {
transaction.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out);
}
if (show) {
container.setVisibility(View.VISIBLE);
StatePanel statePanel = new StatePanel();
transaction.replace(R.id.state_panel_container, statePanel, StatePanel.FRAGMENT_TAG);
} else {
Fragment statePanel = getChildFragmentManager().findFragmentByTag(StatePanel.FRAGMENT_TAG);
if (child) {
statePanel = getFragmentManager().findFragmentByTag(StatePanel.FRAGMENT_TAG);
}
if (statePanel != null) {
transaction.remove(statePanel);
}
}
transaction.commit();
}
Aggregations