</LinearLayout>
+ <LinearLayout
+ android:id="@+id/historyPanel"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_weight="1"
+ android:visibility="gone" >
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@android:color/transparent"
+ android:gravity="center"
+ android:padding="2dip"
+ android:text="@string/history"
+ android:textColor="@android:color/white"
+ android:textSize="24sp"
+ android:textStyle="bold" />
+
+ <ListView
+ android:id="@+id/operationsList"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1" >
+ </ListView>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal" >
+
+ <Button
+ android:id="@+id/resetOperationsButton"
+ style="@style/FilterShowHistoryButton"
+ android:gravity="center"
+ android:text="@string/reset" />
+
+ <Button
+ android:id="@+id/saveOperationsButton"
+ style="@style/FilterShowHistoryButton"
+ android:text="@string/save"
+ android:visibility="gone" />
+ </LinearLayout>
+ </LinearLayout>
+
<FrameLayout
android:layout_gravity="bottom"
</LinearLayout>
- <LinearLayout
- android:id="@+id/historyPanel"
- android:layout_width="200dip"
- android:layout_height="match_parent"
- android:layout_gravity="right"
- android:orientation="vertical"
- android:visibility="invisible" >
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@android:color/transparent"
- android:gravity="center"
- android:padding="2dip"
- android:text="@string/history"
- android:textColor="@android:color/white"
- android:textSize="24sp"
- android:textStyle="bold" />
-
- <ListView
- android:id="@+id/operationsList"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
- </ListView>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal" >
-
- <Button
- android:id="@+id/resetOperationsButton"
- style="@style/FilterShowHistoryButton"
- android:gravity="center"
- android:text="@string/reset" />
-
- <Button
- android:id="@+id/saveOperationsButton"
- style="@style/FilterShowHistoryButton"
- android:text="@string/save"
- android:visibility="gone" />
- </LinearLayout>
- </LinearLayout>
-
</FrameLayout>
fillEditors();
loadXML();
+ if (getResources().getConfiguration().orientation
+ == Configuration.ORIENTATION_LANDSCAPE) {
+ mShowingImageStatePanel = true;
+ }
+
setDefaultPreset();
processIntent();
final View viewList = findViewById(R.id.imageStatePanel);
if (mShowingHistoryPanel) {
- findViewById(R.id.historyPanel).setVisibility(View.INVISIBLE);
+ findViewById(R.id.historyPanel).setVisibility(View.GONE);
mShowingHistoryPanel = false;
}
super.onConfigurationChanged(newConfig);
setDefaultValues();
loadXML();
+ mShowingImageStatePanel = true;
if (mShowingHistoryPanel) {
toggleHistoryPanel();
}
final View viewList = findViewById(R.id.historyPanel);
if (mShowingImageStatePanel) {
- findViewById(R.id.imageStatePanel).setVisibility(View.INVISIBLE);
+ findViewById(R.id.imageStatePanel).setVisibility(View.GONE);
mShowingImageStatePanel = false;
}
int translate = translateMainPanel(viewList);
if (!mShowingHistoryPanel) {
mShowingHistoryPanel = true;
- if (PanelController.useAnimations()) {
- view.animate().setDuration(200).x(translate)
- .withLayer().withEndAction(new Runnable() {
+ if (getResources().getConfiguration().orientation
+ == Configuration.ORIENTATION_PORTRAIT) {
+ if (PanelController.useAnimations()) {
+ view.animate().setDuration(200).x(translate)
+ .withLayer().withEndAction(new Runnable() {
@Override
public void run() {
viewList.setAlpha(0);
.alpha(1.0f).start();
}
}).start();
+ } else {
+ view.setX(translate);
+ viewList.setAlpha(0);
+ viewList.setVisibility(View.VISIBLE);
+ viewList.animate().setDuration(100)
+ .alpha(1.0f).start();
+ }
} else {
- view.setX(translate);
- viewList.setAlpha(0);
viewList.setVisibility(View.VISIBLE);
- viewList.animate().setDuration(100)
- .alpha(1.0f).start();
}
} else {
mShowingHistoryPanel = false;
- viewList.setVisibility(View.INVISIBLE);
- if (PanelController.useAnimations()) {
- view.animate().setDuration(200).x(0).withLayer()
- .start();
+ if (getResources().getConfiguration().orientation
+ == Configuration.ORIENTATION_PORTRAIT) {
+ viewList.setVisibility(View.INVISIBLE);
+ if (PanelController.useAnimations()) {
+ view.animate().setDuration(200).x(0).withLayer()
+ .start();
+ } else {
+ view.setX(0);
+ }
} else {
- view.setX(0);
+ viewList.setVisibility(View.GONE);
}
}
invalidateOptionsMenu();