[Android] remove useless argument in ArrayAdapter's constructor

Sébastien Toque git at videolan.org
Sat May 5 22:40:18 CEST 2012


android | branch: master | Sébastien Toque <xilasz at gmail.com> | Sat May  5 16:32:25 2012 +0200| [cf7fe1694256206f843aa9240881553a23851564] | committer: Sébastien Toque

remove useless argument in ArrayAdapter's constructor

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=cf7fe1694256206f843aa9240881553a23851564
---

 .../src/org/videolan/vlc/gui/BrowserActivity.java  |    2 +-
 .../src/org/videolan/vlc/gui/BrowserAdapter.java   |    4 ++--
 .../src/org/videolan/vlc/gui/SearchActivity.java   |    2 +-
 .../org/videolan/vlc/gui/SearchResultAdapter.java  |    4 ++--
 .../vlc/gui/audio/AudioBrowserActivity.java        |    2 +-
 .../videolan/vlc/gui/audio/AudioListActivity.java  |    2 +-
 .../vlc/gui/audio/AudioSongsListAdapter.java       |    4 ++--
 .../videolan/vlc/gui/video/MediaInfoActivity.java  |    2 +-
 .../videolan/vlc/gui/video/MediaInfoAdapter.java   |    4 ++--
 .../videolan/vlc/gui/video/VideoListActivity.java  |    2 +-
 .../videolan/vlc/gui/video/VideoListAdapter.java   |    4 ++--
 11 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java b/vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java
index 8a74d5a..b482555 100644
--- a/vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java
@@ -63,7 +63,7 @@ public class BrowserActivity extends ListActivity {
     protected void onCreate(Bundle savedInstanceState) {
         setContentView(R.layout.browser);
         super.onCreate(savedInstanceState);
-        mAdapter = new BrowserAdapter(this, R.layout.browser_item);
+        mAdapter = new BrowserAdapter(this);
         setListAdapter(mAdapter);
 
         //get the root from the settings
diff --git a/vlc-android/src/org/videolan/vlc/gui/BrowserAdapter.java b/vlc-android/src/org/videolan/vlc/gui/BrowserAdapter.java
index a128596..3beeb98 100644
--- a/vlc-android/src/org/videolan/vlc/gui/BrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/BrowserAdapter.java
@@ -42,8 +42,8 @@ public class BrowserAdapter extends ArrayAdapter<File>
                             implements Comparator<File> {
     public final static String TAG = "VLC/BrowserAdapter";
 
-    public BrowserAdapter(Context context, int textViewResourceId) {
-        super(context, textViewResourceId);
+    public BrowserAdapter(Context context) {
+        super(context, 0);
     }
 
     @Override
diff --git a/vlc-android/src/org/videolan/vlc/gui/SearchActivity.java b/vlc-android/src/org/videolan/vlc/gui/SearchActivity.java
index a5d86d8..32fdb54 100644
--- a/vlc-android/src/org/videolan/vlc/gui/SearchActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/SearchActivity.java
@@ -67,7 +67,7 @@ public class SearchActivity extends ListActivity {
         setContentView(R.layout.search);
 
         // TODO: create layout
-        mResultAdapter = new SearchResultAdapter(this, android.R.layout.simple_list_item_1);
+        mResultAdapter = new SearchResultAdapter(this);
 
         mSearchText = (EditText) findViewById(R.id.search_text);
         mSearchText.setOnEditorActionListener(searchTextListener);
diff --git a/vlc-android/src/org/videolan/vlc/gui/SearchResultAdapter.java b/vlc-android/src/org/videolan/vlc/gui/SearchResultAdapter.java
index dbf5612..1cf2e8e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/SearchResultAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/SearchResultAdapter.java
@@ -34,8 +34,8 @@ import android.widget.TextView;
 public class SearchResultAdapter extends ArrayAdapter<Media>
                                     implements Comparator<Media> {
 
-    public SearchResultAdapter(Context context, int textViewResourceId) {
-        super(context, textViewResourceId);
+    public SearchResultAdapter(Context context) {
+        super(context, 0);
     }
 
     @Override
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserActivity.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserActivity.java
index 166690d..4a32dc2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserActivity.java
@@ -97,7 +97,7 @@ public class AudioBrowserActivity extends Activity implements ISortable {
         mMediaLibrary = MediaLibrary.getInstance(this);
         mMediaLibrary.addUpdateHandler(mHandler);
 
-        mSongsAdapter = new AudioSongsListAdapter(this, R.layout.audio_browser_item);
+        mSongsAdapter = new AudioSongsListAdapter(this);
         mArtistsAdapter = new AudioPlaylistAdapter(this, R.plurals.albums, R.plurals.songs);
         mAlbumsAdapter = new AudioPlaylistAdapter(this, R.plurals.songs, R.plurals.songs);
         mGenresAdapter = new AudioPlaylistAdapter(this, R.plurals.albums, R.plurals.songs);
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioListActivity.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioListActivity.java
index 95e8bb0..b53e7f6 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioListActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioListActivity.java
@@ -74,7 +74,7 @@ public class AudioListActivity extends ListActivity {
 
         mTitle = (TextView) findViewById(R.id.title);
 
-        mSongsAdapter = new AudioSongsListAdapter(this, R.layout.audio_browser_item);
+        mSongsAdapter = new AudioSongsListAdapter(this);
         setListAdapter(mSongsAdapter);
         getListView().setOnCreateContextMenuListener(contextMenuListener);
 
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioSongsListAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioSongsListAdapter.java
index 98e0014..2c5b366 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioSongsListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioSongsListAdapter.java
@@ -39,8 +39,8 @@ public class AudioSongsListAdapter extends ArrayAdapter<Media> {
     private ArrayList<Media> mMediaList;
     private int mCurrentIndex;
 
-    public AudioSongsListAdapter(Context context, int textViewResourceId) {
-        super(context, textViewResourceId);
+    public AudioSongsListAdapter(Context context) {
+        super(context, 0);
         mMediaList = new ArrayList<Media>();
         mCurrentIndex = -1;
     }
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoActivity.java
index 05021ea..1c687fd 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoActivity.java
@@ -71,7 +71,7 @@ public class MediaInfoActivity extends ListActivity {
 
         mPlayButton = (ImageButton) findViewById(R.id.play);
 
-        mAdapter = new MediaInfoAdapter(MediaInfoActivity.this, R.layout.audio_browser_playlist);
+        mAdapter = new MediaInfoAdapter(MediaInfoActivity.this);
         setListAdapter(mAdapter);
 
         new Thread(mLoadImage).start();
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java b/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java
index 55fe509..e2bb707 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java
@@ -33,8 +33,8 @@ import android.widget.TextView;
 
 public class MediaInfoAdapter extends ArrayAdapter<TrackInfo> {
 
-    public MediaInfoAdapter(Context context, int textViewResourceId) {
-        super(context, textViewResourceId);
+    public MediaInfoAdapter(Context context) {
+        super(context, 0);
     }
 
     @Override
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoListActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoListActivity.java
index e567baf..3ae701e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoListActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoListActivity.java
@@ -64,7 +64,7 @@ public class VideoListActivity extends ListActivity implements ISortable {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.video_list);
 
-        mVideoAdapter = new VideoListAdapter(this, R.layout.video_list_item);
+        mVideoAdapter = new VideoListAdapter(this);
         mNoFileLayout = (LinearLayout) findViewById(R.id.video_list_empty_nofile);
         mLoadFileLayout = (LinearLayout) findViewById(R.id.video_list_empty_loadfile);
 
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
index 07f2b03..4ec1939 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
@@ -48,8 +48,8 @@ public class VideoListAdapter extends ArrayAdapter<Media>
     private int mSortBy = SORT_BY_TITLE;
     private String mLastMRL;
 
-    public VideoListAdapter(Context context, int textViewResourceId) {
-        super(context, textViewResourceId);
+    public VideoListAdapter(Context context) {
+        super(context, 0);
     }
 
     public final static String TAG = "VLC/MediaLibraryAdapter";



More information about the Android mailing list