[Android] Revert "Audio browser: call requestLayout() in updateLists() to fix the the lists sometimes not updated when the fragment starts"
Adrien Maglo
git at videolan.org
Thu Nov 28 21:36:34 CET 2013
vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Thu Nov 28 20:20:56 2013 +0100| [7d07edf2b42711af89c46955af59bba5ad688e1e] | committer: Adrien Maglo
Revert "Audio browser: call requestLayout() in updateLists() to fix the the lists sometimes not updated when the fragment starts"
This reverts commit cdd195a2cf43d0e18805d3cc713a3529861844d6.
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=7d07edf2b42711af89c46955af59bba5ad688e1e
---
.../vlc/gui/audio/AudioBrowserFragment.java | 42 ++++++++------------
1 file changed, 16 insertions(+), 26 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
index f72b70d..04883ed 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -71,11 +71,6 @@ public class AudioBrowserFragment extends SherlockFragment implements ISortable
private AudioServiceController mAudioController;
private MediaLibrary mMediaLibrary;
- ListView mSongsList;
- ListView mArtistList;
- ListView mAlbumList;
- ListView mGenreList;
-
private AudioBrowserListAdapter mSongsAdapter;
private AudioBrowserListAdapter mArtistsAdapter;
private AudioBrowserListAdapter mAlbumsAdapter;
@@ -126,25 +121,25 @@ public class AudioBrowserFragment extends SherlockFragment implements ISortable
}
});
- mSongsList = (ListView)v.findViewById(R.id.songs_list);
- mArtistList = (ListView)v.findViewById(R.id.artists_list);
- mAlbumList = (ListView)v.findViewById(R.id.albums_list);
- mGenreList = (ListView)v.findViewById(R.id.genres_list);
+ ListView songsList = (ListView)v.findViewById(R.id.songs_list);
+ ListView artistList = (ListView)v.findViewById(R.id.artists_list);
+ ListView albumList = (ListView)v.findViewById(R.id.albums_list);
+ ListView genreList = (ListView)v.findViewById(R.id.genres_list);
- mSongsList.setAdapter(mSongsAdapter);
- mArtistList.setAdapter(mArtistsAdapter);
- mAlbumList.setAdapter(mAlbumsAdapter);
- mGenreList.setAdapter(mGenresAdapter);
+ songsList.setAdapter(mSongsAdapter);
+ artistList.setAdapter(mArtistsAdapter);
+ albumList.setAdapter(mAlbumsAdapter);
+ genreList.setAdapter(mGenresAdapter);
- mSongsList.setOnItemClickListener(songListener);
- mArtistList.setOnItemClickListener(artistListListener);
- mAlbumList.setOnItemClickListener(albumListListener);
- mGenreList.setOnItemClickListener(genreListListener);
+ songsList.setOnItemClickListener(songListener);
+ artistList.setOnItemClickListener(artistListListener);
+ albumList.setOnItemClickListener(albumListListener);
+ genreList.setOnItemClickListener(genreListListener);
- registerForContextMenu(mSongsList);
- registerForContextMenu(mArtistList);
- registerForContextMenu(mAlbumList);
- registerForContextMenu(mGenreList);
+ registerForContextMenu(songsList);
+ registerForContextMenu(artistList);
+ registerForContextMenu(albumList);
+ registerForContextMenu(genreList);
return v;
}
@@ -404,11 +399,6 @@ public class AudioBrowserFragment extends SherlockFragment implements ISortable
mArtistsAdapter.notifyDataSetChanged();
mAlbumsAdapter.notifyDataSetChanged();
mGenresAdapter.notifyDataSetChanged();
-
- mSongsList.requestLayout();
- mArtistList.requestLayout();
- mAlbumList.requestLayout();
- mGenreList.requestLayout();
}
@Override
More information about the Android
mailing list