[Android] Remove useless call and rename variable
Geoffrey Métais
git at videolan.org
Tue Mar 10 11:53:42 CET 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Mar 10 11:27:02 2015 +0100| [29ca166d8daa5de4ead5a20339a9bf23d988514a] | committer: Geoffrey Métais
Remove useless call and rename variable
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=29ca166d8daa5de4ead5a20339a9bf23d988514a
---
.../org/videolan/vlc/gui/network/NetworkFragment.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/network/NetworkFragment.java b/vlc-android/src/org/videolan/vlc/gui/network/NetworkFragment.java
index 7c8d736..9d0ade0 100644
--- a/vlc-android/src/org/videolan/vlc/gui/network/NetworkFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/network/NetworkFragment.java
@@ -70,7 +70,7 @@ public class NetworkFragment extends BrowserFragment implements IRefreshable, Me
private LinearLayoutManager mLayoutManager;
TextView mEmptyView;
public String mMrl;
- private int savedPosition = -1, mFavorites = 0;
+ private int mSavedPosition = -1, mFavorites = 0;
private boolean mRoot;
LibVLC mLibVLC = LibVLC.getExistingInstance();
@@ -80,7 +80,7 @@ public class NetworkFragment extends BrowserFragment implements IRefreshable, Me
bundle = getArguments();
if (bundle != null){
mMrl = bundle.getString(KEY_MRL);
- savedPosition = bundle.getInt(KEY_POSITION);
+ mSavedPosition = bundle.getInt(KEY_POSITION);
}
if (mMrl == null)
mMrl = SMB_ROOT;
@@ -109,8 +109,8 @@ public class NetworkFragment extends BrowserFragment implements IRefreshable, Me
super.onStop();
if (mMediaBrowser != null)
mMediaBrowser.release();
- savedPosition = mRecyclerView.getScrollY();
}
+
public void onStart(){
super.onStart();
@@ -169,16 +169,16 @@ public class NetworkFragment extends BrowserFragment implements IRefreshable, Me
public void onBrowseEnd() {
mAdapter.sortList();
mHandler.sendEmptyMessage(NetworkFragmentHandler.MSG_HIDE_LOADING);
- if (savedPosition > 0) {
- mLayoutManager.scrollToPositionWithOffset(savedPosition, 0);
- savedPosition = 0;
+ if (mSavedPosition > 0) {
+ mLayoutManager.scrollToPositionWithOffset(mSavedPosition, 0);
+ mSavedPosition = 0;
}
focusHelper(mAdapter.isEmpty());
}
@Override
public void onRefresh() {
- savedPosition = mLayoutManager.findFirstCompletelyVisibleItemPosition();
+ mSavedPosition = mLayoutManager.findFirstCompletelyVisibleItemPosition();
refresh();
}
More information about the Android
mailing list