mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-05 03:50:07 +00:00
Re-saved all projects.
This commit is contained in:
parent
72116171cc
commit
8116f36039
10 changed files with 350 additions and 10 deletions
|
|
@ -322,6 +322,32 @@ public class AnalyticsCollection extends Activity
|
|||
getApplicationInfo().dataDir);
|
||||
}
|
||||
|
||||
// Need to override this as the default implementation always finishes the activity.
|
||||
@Override
|
||||
public void onBackPressed()
|
||||
{
|
||||
ComponentPeerView focusedView = getViewWithFocusOrDefaultView();
|
||||
|
||||
if (focusedView == null)
|
||||
return;
|
||||
|
||||
focusedView.backButtonPressed();
|
||||
}
|
||||
|
||||
private ComponentPeerView getViewWithFocusOrDefaultView()
|
||||
{
|
||||
for (int i = 0; i < viewHolder.getChildCount(); ++i)
|
||||
{
|
||||
if (viewHolder.getChildAt (i).hasFocus())
|
||||
return (ComponentPeerView) viewHolder.getChildAt (i);
|
||||
}
|
||||
|
||||
if (viewHolder.getChildCount() > 0)
|
||||
return (ComponentPeerView) viewHolder.getChildAt (0);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
private void hideActionBar()
|
||||
{
|
||||
|
|
@ -777,6 +803,14 @@ public class AnalyticsCollection extends Activity
|
|||
}
|
||||
}
|
||||
|
||||
public void backButtonPressed()
|
||||
{
|
||||
if (host == 0)
|
||||
return;
|
||||
|
||||
handleBackButton (host);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown (int keyCode, KeyEvent event)
|
||||
{
|
||||
|
|
@ -790,7 +824,7 @@ public class AnalyticsCollection extends Activity
|
|||
return super.onKeyDown (keyCode, event);
|
||||
case KeyEvent.KEYCODE_BACK:
|
||||
{
|
||||
handleBackButton (host);
|
||||
((Activity) getContext()).onBackPressed();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue