diff --git a/mobile/res/drawable-hdpi/ic_action_return_from_full_screen.png b/mobile/res/drawable-hdpi/ic_action_return_from_full_screen.png new file mode 100644 index 00000000..d9436e52 Binary files /dev/null and b/mobile/res/drawable-hdpi/ic_action_return_from_full_screen.png differ diff --git a/mobile/res/drawable-mdpi/ic_action_return_from_full_screen.png b/mobile/res/drawable-mdpi/ic_action_return_from_full_screen.png new file mode 100644 index 00000000..f5c80f00 Binary files /dev/null and b/mobile/res/drawable-mdpi/ic_action_return_from_full_screen.png differ diff --git a/mobile/res/drawable-xhdpi/ic_action_return_from_full_screen.png b/mobile/res/drawable-xhdpi/ic_action_return_from_full_screen.png new file mode 100644 index 00000000..a773b342 Binary files /dev/null and b/mobile/res/drawable-xhdpi/ic_action_return_from_full_screen.png differ diff --git a/mobile/res/drawable-xxhdpi/ic_action_return_from_full_screen.png b/mobile/res/drawable-xxhdpi/ic_action_return_from_full_screen.png new file mode 100644 index 00000000..cda85087 Binary files /dev/null and b/mobile/res/drawable-xxhdpi/ic_action_return_from_full_screen.png differ diff --git a/mobile/res/menu/main.xml b/mobile/res/menu/main.xml index 28edf143..2a98c18f 100644 --- a/mobile/res/menu/main.xml +++ b/mobile/res/menu/main.xml @@ -22,6 +22,7 @@ android:title="@string/menu_layer_chooser"/> Reload IITC - Toggle fullscreen + Fullscreen Layer Chooser Get Location Clear Cookies diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java b/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java index 9653dbc5..447f0fda 100644 --- a/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java +++ b/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java @@ -535,6 +535,13 @@ public class IITC_Mobile extends Activity item.setVisible(true); break; + case R.id.toggle_fullscreen: + item.setChecked(mIitcWebView.isInFullscreen()); + item.setIcon(mIitcWebView.isInFullscreen() + ? R.drawable.ic_action_return_from_full_screen + : R.drawable.ic_action_full_screen); + break; + case R.id.locate: item.setVisible(enabled && visible); item.setEnabled(!mIsLoading); diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_WebView.java b/mobile/src/com/cradle/iitc_mobile/IITC_WebView.java index 95615f3c..e64b4ad6 100644 --- a/mobile/src/com/cradle/iitc_mobile/IITC_WebView.java +++ b/mobile/src/com/cradle/iitc_mobile/IITC_WebView.java @@ -221,6 +221,7 @@ public class IITC_WebView extends WebView { loadUrl("javascript: $('#updatestatus').show();"); } mIitc.getWindow().setAttributes(attrs); + mIitc.invalidateOptionsMenu(); } void updateFullscreenStatus() {