package com.android.gallery3d.filtershow.editors;
import android.content.Context;
+import android.content.res.Configuration;
import android.util.AttributeSet;
+import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
mEditTitle = editTitle;
mFilterTitle = stateButton;
mButton = editTitle;
- MasterImage.getImage().resetGeometryImages();
- setMenuIcon(true);
+ MasterImage.getImage().resetGeometryImages(false);
setUtilityPanelUI(actionButton, editControl);
}
public boolean showsPopupIndicator() {
- return true;
+ return false;
}
/**
R.layout.filtershow_seekbar, (ViewGroup) editControl, true);
mSeekBar = (SeekBar) lp.findViewById(R.id.primarySeekBar);
mSeekBar.setOnSeekBarChangeListener(this);
-
- if (showsSeekBar()) {
- mSeekBar.setOnSeekBarChangeListener(this);
- mSeekBar.setVisibility(View.VISIBLE);
- } else {
- mSeekBar.setVisibility(View.INVISIBLE);
+ mSeekBar.setVisibility(View.GONE);
+ if (context.getResources().getConfiguration().orientation
+ == Configuration.ORIENTATION_PORTRAIT) {
+ if (showsSeekBar()) {
+ mSeekBar.setVisibility(View.VISIBLE);
+ }
}
if (mButton != null) {
- if (showsPopupIndicator()) {
- mButton.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0,
- R.drawable.filtershow_menu_marker, 0);
- } else {
- mButton.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, 0, 0);
- }
+ setMenuIcon(showsPopupIndicator());
}
}
}
if (mChangesGeometry) {
// Regenerate both the filtered and the geometry-only bitmaps
- MasterImage.getImage().resetGeometryImages();
+ MasterImage.getImage().resetGeometryImages(true);
}
// Regenerate the filtered bitmap.
MasterImage.getImage().invalidateFiltersOnly();
}
public void openUtilityPanel(LinearLayout mAccessoryViewList) {
- setMenuIcon(false);
+ setMenuIcon(showsPopupIndicator());
if (mImageShow != null) {
mImageShow.openUtilityPanel(mAccessoryViewList);
}
protected void setMenuIcon(boolean on) {
mEditTitle.setCompoundDrawablesRelativeWithIntrinsicBounds(
- 0, 0, on ? R.drawable.filtershow_menu_marker : 0, 0);
+ 0, 0, on ? R.drawable.filtershow_menu_marker_rtl : 0, 0);
}
protected void createMenu(int[] strId, View button) {
}
public void detach() {
+ if (mImageShow != null) {
+ mImageShow.detach();
+ }
}
}