[Android] Borderless button for 'DELETE' in info panel

Geoffrey Métais git at videolan.org
Fri Feb 20 17:22:06 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Feb 20 17:16:19 2015 +0100| [56da0db6a1ebb7923e6ba3d9e15794ec403c1f9f] | committer: Geoffrey Métais

Borderless button for 'DELETE' in info panel

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=56da0db6a1ebb7923e6ba3d9e15794ec403c1f9f
---

 vlc-android/res/layout-land/media_info.xml                      |    7 +++++--
 vlc-android/res/layout/media_info.xml                           |    7 +++++--
 .../src/org/videolan/vlc/gui/video/MediaInfoFragment.java       |    5 +++--
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/vlc-android/res/layout-land/media_info.xml b/vlc-android/res/layout-land/media_info.xml
index ca57d37..8da6bea 100644
--- a/vlc-android/res/layout-land/media_info.xml
+++ b/vlc-android/res/layout-land/media_info.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:baselineAligned="false"
@@ -86,7 +87,7 @@
             android:layout_toRightOf="@+id/size_value"
             android:src="@drawable/ic_audiosub_circle_normal_o"
             android:visibility="invisible"/>
-        <TextView
+        <Button
             android:id="@+id/info_delete"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
@@ -95,7 +96,9 @@
             android:clickable="true"
             android:text="@string/delete"
             android:textColor="@color/blue"
-            android:textAllCaps="true"/>
+            android:textAllCaps="true"
+            tools:targetApi="11"
+            style="?android:attr/borderlessButtonStyle"/>
     </RelativeLayout>
     <ListView
         android:id="@id/android:list"
diff --git a/vlc-android/res/layout/media_info.xml b/vlc-android/res/layout/media_info.xml
index 283b4e0..97c0b9d 100644
--- a/vlc-android/res/layout/media_info.xml
+++ b/vlc-android/res/layout/media_info.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:background="@color/white"
@@ -78,7 +79,7 @@
             android:layout_toRightOf="@+id/size_value"
             android:src="@drawable/ic_audiosub_circle_normal_o"
             android:visibility="invisible"/>
-        <TextView
+        <Button
             android:id="@+id/info_delete"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
@@ -88,7 +89,9 @@
             android:clickable="true"
             android:text="@string/delete"
             android:textColor="@color/blue"
-            android:textAllCaps="true"/>
+            android:textAllCaps="true"
+            tools:targetApi="11"
+            style="?android:attr/borderlessButtonStyle"/>
     </RelativeLayout>
 
     <ListView
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoFragment.java
index 9a7c524..17ffd3c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoFragment.java
@@ -55,6 +55,7 @@ import android.view.LayoutInflater;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.view.ViewGroup;
+import android.widget.Button;
 import android.widget.ImageButton;
 import android.widget.ImageView;
 import android.widget.TextView;
@@ -70,7 +71,7 @@ public class MediaInfoFragment extends ListFragment {
     private TextView mSizeView;
     private TextView mPathView;
     private ImageButton mPlayButton;
-    private TextView mDelete;
+    private Button mDelete;
     private ImageView mSubtitles;
     private Media mMedia;
     private MediaInfoAdapter mAdapter;
@@ -91,7 +92,7 @@ public class MediaInfoFragment extends ListFragment {
         mSizeView = (TextView) v.findViewById(R.id.size_value);
         mPathView = (TextView) v.findViewById(R.id.info_path);
         mPlayButton = (ImageButton) v.findViewById(R.id.play);
-        mDelete = (TextView) v.findViewById(R.id.info_delete);
+        mDelete = (Button) v.findViewById(R.id.info_delete);
         mSubtitles = (ImageView) v.findViewById(R.id.info_subtitles);
         if (!LibVlcUtil.isICSOrLater())
             mDelete.setText(getString(R.string.delete).toUpperCase(Locale.getDefault()));



More information about the Android mailing list