[Android] UI : hack to fix AlertDialog EditText color in 2.3

Alexandre Perraud git at videolan.org
Tue Mar 17 14:47:59 CET 2015


vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Tue Mar 17 14:43:40 2015 +0100| [a2968c9bac6bcd72e3bbe4243b2904287f7b339f] | committer: Alexandre Perraud

UI : hack to fix AlertDialog EditText color in 2.3

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

 vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java b/vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java
index f843334..6f22bbc 100644
--- a/vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java
@@ -47,6 +47,7 @@ import android.preference.PreferenceManager;
 import android.text.InputType;
 import android.view.ContextMenu;
 import android.view.ContextMenu.ContextMenuInfo;
+import android.view.ContextThemeWrapper;
 import android.view.KeyEvent;
 import android.view.MenuItem;
 import android.view.View;
@@ -188,9 +189,10 @@ public class BrowserActivity extends ListActivity {
     protected void onListItemClick(ListView l, View v, int position, long id) {
         File file = mAdapter.getItem(position);
         if(file.getPath().equals(BrowserAdapter.ADD_ITEM_PATH)) {
-            AlertDialog.Builder b = new AlertDialog.Builder(this);
+            AlertDialog.Builder b = new AlertDialog.Builder(new ContextThemeWrapper(this, R.style.Theme_VLC_Black));
             final EditText input = new EditText(this);
             input.setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
+            input.setTextColor(getResources().getColor(R.color.grey50));
             b.setTitle(R.string.add_custom_path);
             b.setMessage(R.string.add_custom_path_description);
             b.setView(input);



More information about the Android mailing list