[Android] Remove focus helper
Geoffrey Métais
git at videolan.org
Wed Apr 27 15:21:46 CEST 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Apr 27 15:20:08 2016 +0200| [8f616e50278549551201f270898cae2c84c41b19] | committer: Geoffrey Métais
Remove focus helper
> https://code.videolan.org/videolan/vlc-android/commit/8f616e50278549551201f270898cae2c84c41b19
---
vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index d6cc05b..462df44 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -131,7 +131,6 @@ public class MainActivity extends AudioPlayerContainerActivity implements Filter
private boolean mScanNeeded = false;
private Handler mHandler = new MainActivityHandler(this);
- private int mFocusedPrior = 0;
private int mActionBarIconId = -1;
Menu mMenu;
private SearchView mSearchView;
@@ -417,8 +416,6 @@ public class MainActivity extends AudioPlayerContainerActivity implements Filter
SharedPreferences.Editor editor = mSettings.edit();
editor.putInt("fragment_id", mCurrentFragmentId);
Util.commitPreferences(editor);
-
- mFocusedPrior = 0;
}
protected void onSaveInstanceState(Bundle outState) {
@@ -437,8 +434,6 @@ public class MainActivity extends AudioPlayerContainerActivity implements Filter
public void onBackPressed() {
/* Close the menu first */
if(mDrawerLayout.isDrawerOpen(mNavigationView)) {
- if (mFocusedPrior != 0)
- requestFocusOnSearch();
mDrawerLayout.closeDrawer(mNavigationView);
return;
}
@@ -741,8 +736,6 @@ public class MainActivity extends AudioPlayerContainerActivity implements Filter
(Build.MANUFACTURER.compareTo("LGE") == 0)) {
return true;
}
- if (getCurrentFocus() != null)
- mFocusedPrior = getCurrentFocus().getId();
return super.onKeyDown(keyCode, event);
}
@@ -906,9 +899,6 @@ public class MainActivity extends AudioPlayerContainerActivity implements Filter
ft.addToBackStack(getTag(mCurrentFragmentId));
ft.commit();
mCurrentFragmentId = id;
-
- if (mFocusedPrior != 0)
- requestFocusOnSearch();
}
}
mNavigationView.setCheckedItem(mCurrentFragmentId);
@@ -947,10 +937,4 @@ public class MainActivity extends AudioPlayerContainerActivity implements Filter
return ID_VIDEO;
}
}
-
- private void requestFocusOnSearch() {
- View search = findViewById(R.id.ml_menu_search);
- if (search != null)
- search.requestFocus();
- }
}
More information about the Android
mailing list