[Android] UI : better hack to fix AlertDialog EditText color in 2.3
Alexandre Perraud
git at videolan.org
Tue Mar 17 16:36:38 CET 2015
vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Tue Mar 17 15:05:53 2015 +0100| [c2df5fbfd1b1aaff9f8b8c83d0171062733538f9] | committer: Alexandre Perraud
UI : better hack to fix AlertDialog EditText color in 2.3
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=c2df5fbfd1b1aaff9f8b8c83d0171062733538f9
---
vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java b/vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java
index 6f22bbc..0cee56a 100644
--- a/vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java
@@ -27,6 +27,8 @@ import java.util.Arrays;
import java.util.Locale;
import java.util.Stack;
+import org.videolan.libvlc.LibVLC;
+import org.videolan.libvlc.LibVlcUtil;
import org.videolan.vlc.MediaDatabase;
import org.videolan.vlc.MediaLibrary;
import org.videolan.vlc.R;
@@ -189,10 +191,12 @@ 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(new ContextThemeWrapper(this, R.style.Theme_VLC_Black));
+ AlertDialog.Builder b = new AlertDialog.Builder(this);
final EditText input = new EditText(this);
+ if (!LibVlcUtil.isHoneycombOrLater()) {
+ input.setTextColor(getResources().getColor(R.color.grey50));
+ }
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