mardi 8 avril 2014

texte - Android Custom Textview de dialogue et de la couleur d'arrière-plan - Stack Overflow


I have a custom DialogPreference Dialog that has its layout set out in a relativelayout that contains the following:



  • Checkbox

  • Textview

  • Text Field


This is fine in Android 4.0+, because the theme we are using is Theme.Light so the background color of the dialog is white and the default text is black for the Checkbox label and textview. However, in 2.3.3, the background color is dark grey so it becomes hard to see the text... the theme is still Theme.Light however.


I thought that making a custom dialog would be necessary for this because the checkbox enable/disables the text field. At the moment, I'm making the background color of the relativelayout for this Dialog white... but I don't really like this solution as there maybe cases where some other phones on 2.3.3 may not have white as the default dialog background...


Is there a cleaner way to fix this problem?


I notice this person has the same problem: Custom Support Dialog Fragment text is the wrong color


Another with the problem :Android: Issue with showing dialog from Theme.Light activity


EDIT: Attached screenshot. This is what it looks like on LG Optimus 2X running 2.3.3. On my co-worker's samsung galaxy which runs 2.3.3 also, the background is even darker so you can hardly see the text.


enter image description here



I have a custom DialogPreference Dialog that has its layout set out in a relativelayout that contains the following:



  • Checkbox

  • Textview

  • Text Field


This is fine in Android 4.0+, because the theme we are using is Theme.Light so the background color of the dialog is white and the default text is black for the Checkbox label and textview. However, in 2.3.3, the background color is dark grey so it becomes hard to see the text... the theme is still Theme.Light however.


I thought that making a custom dialog would be necessary for this because the checkbox enable/disables the text field. At the moment, I'm making the background color of the relativelayout for this Dialog white... but I don't really like this solution as there maybe cases where some other phones on 2.3.3 may not have white as the default dialog background...


Is there a cleaner way to fix this problem?


I notice this person has the same problem: Custom Support Dialog Fragment text is the wrong color


Another with the problem :Android: Issue with showing dialog from Theme.Light activity


EDIT: Attached screenshot. This is what it looks like on LG Optimus 2X running 2.3.3. On my co-worker's samsung galaxy which runs 2.3.3 also, the background is even darker so you can hardly see the text.


enter image description here


0 commentaires:

Enregistrer un commentaire