[Android] [PATCH] Fix layout size & emptyview position
Geoffrey Métais
geoffrey.metais at gmail.com
Mon Jul 6 00:15:52 CEST 2015
---
vlc-android/res/layout/file_picker_activity.xml | 10 ++++------
vlc-android/res/layout/file_picker_fragment.xml | 10 +++++-----
vlc-android/res/values-sw600dp/dimens.xml | 3 +++
vlc-android/res/values/dimens.xml | 3 ++-
4 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/vlc-android/res/layout/file_picker_activity.xml b/vlc-android/res/layout/file_picker_activity.xml
index 589e5b8..33deb98 100644
--- a/vlc-android/res/layout/file_picker_activity.xml
+++ b/vlc-android/res/layout/file_picker_activity.xml
@@ -1,14 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="800dp"
- android:layout_height="800dp">
+ android:orientation="vertical" android:layout_width="@dimen/file_picker_width"
+ android:layout_height="@dimen/file_picker_height">
<FrameLayout
android:id="@+id/fragment_placeholder"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:minWidth="@dimen/file_picker"
- android:minHeight="@dimen/file_picker"/>
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"/>
</LinearLayout>
\ No newline at end of file
diff --git a/vlc-android/res/layout/file_picker_fragment.xml b/vlc-android/res/layout/file_picker_fragment.xml
index e333c4b..121826f 100644
--- a/vlc-android/res/layout/file_picker_fragment.xml
+++ b/vlc-android/res/layout/file_picker_fragment.xml
@@ -3,8 +3,8 @@
<org.videolan.vlc.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipeLayout"
- android:layout_width="800dp"
- android:layout_height="800dp">
+ android:layout_width="@dimen/file_picker_width"
+ android:layout_height="@dimen/file_picker_height">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -15,9 +15,9 @@
android:visibility="gone"/>
<TextView
android:id="@+id/android:empty"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
android:text="@string/network_connection_needed"/>
</FrameLayout>
</org.videolan.vlc.widget.SwipeRefreshLayout>
\ No newline at end of file
diff --git a/vlc-android/res/values-sw600dp/dimens.xml b/vlc-android/res/values-sw600dp/dimens.xml
index a654209..a7deae5 100644
--- a/vlc-android/res/values-sw600dp/dimens.xml
+++ b/vlc-android/res/values-sw600dp/dimens.xml
@@ -10,4 +10,7 @@
<dimen name="media_ctrl_margin_top">30dp</dimen>
<dimen name="images_margin_sides">60dp</dimen>
<dimen name="overlay_margin">10dp</dimen>
+
+ <dimen name="file_picker_width">600dip</dimen>
+ <dimen name="file_picker_height">600dip</dimen>
</resources>
\ No newline at end of file
diff --git a/vlc-android/res/values/dimens.xml b/vlc-android/res/values/dimens.xml
index 7bc8a36..4c6519f 100644
--- a/vlc-android/res/values/dimens.xml
+++ b/vlc-android/res/values/dimens.xml
@@ -29,7 +29,8 @@
<dimen name="tv_overscan_vertical">0dp</dimen>
<dimen name="tv_overscan_horizontal">0dp</dimen>
- <dimen name="file_picker">600dip</dimen>
+ <dimen name="file_picker_width">300dip</dimen>
+ <dimen name="file_picker_height">400dip</dimen>
<!-- Default -->
<dimen name="default_margin">16dp</dimen>
--
2.1.4
More information about the Android
mailing list