Skip to content

Commit

Permalink
Release 1.2.6: Added onFocusChangeListener to help maintain immersive…
Browse files Browse the repository at this point in the history
… mode
  • Loading branch information
neilrackett committed Sep 9, 2014
1 parent 0028557 commit 4a68ba4
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 1 deletion.
Binary file modified fullscreen-ane-build/AndroidFullScreen.ane
Binary file not shown.
Binary file modified fullscreen-ane-build/android/fullscreen-ane-jar.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion fullscreen-ane-build/extension.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<extension xmlns="http://ns.adobe.com/air/extension/14.0">
<id>com.mesmotronic.ane.fullscreen</id>
<versionNumber>1.2.5</versionNumber>
<versionNumber>1.2.6</versionNumber>
<platforms>
<platform name="Android-ARM">
<applicationDeployment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public FREObject call(FREContext context, FREObject[] args)
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN;

decorView.setOnFocusChangeListener(null);
decorView.setOnSystemUiVisibilityChangeListener(null);
decorView.setSystemUiVisibility(uiOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public FREObject call(FREContext context, FREObject[] args)
| View.SYSTEM_UI_FLAG_FULLSCREEN
| immersive;

decorView.setOnFocusChangeListener(null);
decorView.setOnSystemUiVisibilityChangeListener(null);
decorView.setSystemUiVisibility(uiOptions);

Expand All @@ -80,6 +81,18 @@ public FREObject call(FREContext context, FREObject[] args)
*/
if (isSticky)
{
decorView.setOnFocusChangeListener(new View.OnFocusChangeListener()
{
@Override
public void onFocusChange(View v, boolean hasFocus)
{
if (hasFocus)
{
decorView.setSystemUiVisibility(uiOptions);
}
}
});

decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener()
{
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public FREObject call(FREContext context, FREObject[] args)

View decorView = window.getDecorView();

decorView.setOnFocusChangeListener(null);
decorView.setOnSystemUiVisibilityChangeListener(null);
decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public FREObject call(FREContext context, FREObject[] args)
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;

decorView.setOnFocusChangeListener(null);
decorView.setOnSystemUiVisibilityChangeListener(null);
decorView.setSystemUiVisibility(uiOptions);
}
Expand Down

0 comments on commit 4a68ba4

Please sign in to comment.