Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
packages_apps_Browser
Commits
1eb7d122
Commit
1eb7d122
authored
13 years ago
by
Michael Kolb
Committed by
Android (Google) Code Review
13 years ago
Browse files
Options
Download
Plain Diff
Merge "Fix fullscreen mode" into ics-mr0
parents
ad52bc77
c5675ad4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
src/com/android/browser/BaseUi.java
src/com/android/browser/BaseUi.java
+19
-5
No files found.
src/com/android/browser/BaseUi.java
View file @
1eb7d122
...
...
@@ -42,6 +42,7 @@ import android.view.View;
import
android.view.View.OnClickListener
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup.LayoutParams
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
android.view.inputmethod.InputMethodManager
;
import
android.webkit.WebChromeClient
;
...
...
@@ -523,6 +524,7 @@ public abstract class BaseUi implements UI {
mFullscreenContainer
.
addView
(
view
,
COVER_SCREEN_PARAMS
);
decor
.
addView
(
mFullscreenContainer
,
COVER_SCREEN_PARAMS
);
mCustomView
=
view
;
setFullscreen
(
true
);
mCustomViewCallback
=
callback
;
mActivity
.
setRequestedOrientation
(
requestedOrientation
);
}
...
...
@@ -531,6 +533,7 @@ public abstract class BaseUi implements UI {
public
void
onHideCustomView
()
{
if
(
mCustomView
==
null
)
return
;
setFullscreen
(
false
);
FrameLayout
decor
=
(
FrameLayout
)
mActivity
.
getWindow
().
getDecorView
();
decor
.
removeView
(
mFullscreenContainer
);
mFullscreenContainer
=
null
;
...
...
@@ -749,14 +752,25 @@ public abstract class BaseUi implements UI {
}
public
void
setFullscreen
(
boolean
enabled
)
{
Window
win
=
mActivity
.
getWindow
();
WindowManager
.
LayoutParams
winParams
=
win
.
getAttributes
();
final
int
bits
=
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
;
if
(
enabled
)
{
mActivity
.
getWindow
().
setFlags
(
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
,
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
);
winParams
.
flags
|=
bits
;
if
(
mCustomView
!=
null
)
{
mCustomView
.
setSystemUiVisibility
(
View
.
SYSTEM_UI_FLAG_LOW_PROFILE
);
}
else
{
mContentView
.
setSystemUiVisibility
(
View
.
SYSTEM_UI_FLAG_LOW_PROFILE
);
}
}
else
{
mActivity
.
getWindow
().
clearFlags
(
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
);
winParams
.
flags
&=
~
bits
;
if
(
mCustomView
!=
null
)
{
mCustomView
.
setSystemUiVisibility
(
View
.
SYSTEM_UI_FLAG_VISIBLE
);
}
else
{
mContentView
.
setSystemUiVisibility
(
View
.
SYSTEM_UI_FLAG_VISIBLE
);
}
}
win
.
setAttributes
(
winParams
);
}
public
Drawable
getFaviconDrawable
(
Bitmap
icon
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment