1

however my text color will not change it's color to black.

I don't know what the problem could be... do you have any idea?

  <TextView
    android:id="@android:id/empty"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"

    android:textColor="#000000"
    android:textColorHint="#000000"
    android:textSize="14sp"
    android:color="#000000" >

EDIT:

My manifest is that:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.blabla.blabla"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="11" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"

     >
    <activity
        android:name=".blablabla"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

my styles.xml is empty

<resources>



</resources>

EDIT:

i think i solved my problem..

the solution: Android ListView Text Color

i aded a style:

<style name="ListFont" parent="@android:style/Widget.ListView"> <item name="android:textColor">#000000</item> <item name="android:typeface">sans</item> </style>

and added it in my manifest...

in my activity i used this:

ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(getActivity(), R.array.BlaBla, android.R.layout.simple_list_item_1);

i ask myself what exactly "android.R.layout.simple_list_item_1 does? - why my textColor did not worked and why it does work now with a seperate style - do i need to mention simple_list_item_1 then in my activity any more?

thx u guys

Community
  • 1
  • 1
Steve
  • 127
  • 1
  • 10
  • Did you set a custom theme for your TextView in your styles.xml? – JJ86 Nov 02 '14 at 16:00
  • Try changing android:id="@android:id/empty" to android:id="@+id/empty" – Shahzeb Nov 02 '14 at 16:00
  • why do you expect a different color ? – Blackbelt Nov 02 '14 at 16:22
  • @Steve `#000000` is black. – kiruwka Nov 02 '14 at 19:10
  • @JJ86 no, my styles.xml is full empty. – Steve Nov 02 '14 at 19:41
  • the current color shown is something like white -> grey but i want black - but somehow it does not do it... – Steve Nov 02 '14 at 19:47
  • i think its because of that layout, that uses font color white??: simple_list_item_1 ArrayAdapter adapter = ArrayAdapter.createFromResource(getActivity(), R.array.BlaBla, android.R.layout.simple_list_item_1); but does the textcolor not have to get changed when i set textcolor in my xml? but it does not^^ – Steve Nov 02 '14 at 19:54
  • yeah, i did it: http://stackoverflow.com/questions/4533440/android-listview-text-color - created a style, put it in manifest... – Steve Nov 02 '14 at 20:02
  • but what exactly does "android.R.layout.simple_list_item_1 do? - why my textColor did not worked and why it does work now with a seperate style - do i need to mention simple_list_item_1 then in my activity? when i use the style? – Steve Nov 02 '14 at 20:15

0 Answers0