[Android] simplify video list layout, loading message doesn't belong there
Sébastien Toque
git at videolan.org
Thu Jun 28 00:14:35 CEST 2012
android | branch: master | Sébastien Toque <xilasz at gmail.com> | Thu Jun 28 00:14:27 2012 +0200| [c059cbed77ba34c4e5ba0ab8a2f91e6bf979ee70] | committer: Sébastien Toque
simplify video list layout, loading message doesn't belong there
> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=c059cbed77ba34c4e5ba0ab8a2f91e6bf979ee70
---
vlc-android/res/layout/video_list.xml | 39 ++++----------------
.../videolan/vlc/gui/video/VideoListFragment.java | 8 ----
2 files changed, 7 insertions(+), 40 deletions(-)
diff --git a/vlc-android/res/layout/video_list.xml b/vlc-android/res/layout/video_list.xml
index b8105e7..6d21c7f 100644
--- a/vlc-android/res/layout/video_list.xml
+++ b/vlc-android/res/layout/video_list.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
+<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
@@ -11,36 +11,11 @@
android:divider="@color/item_common"
android:dividerHeight="1dp"
android:fastScrollEnabled="true" />
- <FrameLayout
+ <TextView
android:id="@id/android:empty"
android:layout_width="fill_parent"
- android:layout_height="fill_parent">
- <LinearLayout
- android:id="@+id/video_list_empty_loadfile"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:gravity="center">
- <ProgressBar
- android:layout_width="20dip"
- android:layout_height="20dip"
- android:layout_margin="11dip" />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/loading"
- android:textSize="20dip" />
- </LinearLayout>
- <LinearLayout
- android:id="@+id/video_list_empty_nofile"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:gravity="center"
- android:visibility="invisible">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/nomedia"
- android:textSize="20dip" />
- </LinearLayout>
- </FrameLayout>
-</LinearLayout>
+ android:layout_height="fill_parent"
+ android:gravity="center"
+ android:text="@string/nomedia"
+ android:textSize="20dip" />
+</FrameLayout>
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java
index 11f3462..a3878e2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java
@@ -51,7 +51,6 @@ import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView.AdapterContextMenuInfo;
-import android.widget.LinearLayout;
import android.widget.ListView;
import com.actionbarsherlock.app.SherlockListFragment;
@@ -59,8 +58,6 @@ import com.actionbarsherlock.app.SherlockListFragment;
public class VideoListFragment extends SherlockListFragment implements ISortable {
public final static String TAG = "VLC/VideoListFragment";
- private LinearLayout mNoFileLayout;
- private LinearLayout mLoadFileLayout;
private VideoListAdapter mVideoAdapter;
protected Media mItemToUpdate;
@@ -89,8 +86,6 @@ public class VideoListFragment extends SherlockListFragment implements ISortable
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View v = inflater.inflate(R.layout.video_list, container, false);
- mNoFileLayout = (LinearLayout) v.findViewById(R.id.video_list_empty_nofile);
- mLoadFileLayout = (LinearLayout) v.findViewById(R.id.video_list_empty_loadfile);
return v;
}
@@ -240,9 +235,6 @@ public class VideoListFragment extends SherlockListFragment implements ISortable
}
}
mVideoAdapter.sort();
- } else {
- mLoadFileLayout.setVisibility(View.INVISIBLE);
- mNoFileLayout.setVisibility(View.VISIBLE);
}
}
More information about the Android
mailing list