Galaxy s6中的文字颜色没有变化

时间:2017-01-31 15:44:57

标签: android textview

我使用textColor="@color/red"属性来更改TextView的颜色。文字的颜色在模拟器中变为红色,而某些手机如Galaxy s3,...... 但在星系S6中的颜色是黑色。

我尝试使用AppCompatTextView代替TextView,改变了Java代码中的颜色但问题并没有解决。

我在gradle文件中使用这个库。

 compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.android.support:recyclerview-v7:23.1.1'
    compile 'com.android.support:cardview-v7:23.1.1'
    compile 'com.android.support:support-v4:23.1.1'
    compile 'com.android.support:support-vector-drawable:23.1.1'
    compile 'com.google.firebase:firebase-messaging:9.6.1'
    compile 'com.google.firebase:firebase-crash:9.6.1'
    compile 'com.google.firebase:firebase-core:9.6.1'
//    compile 'com.github.QuadFlask:colorpicker:0.0.12'
    compile 'com.amitshekhar.android:android-networking:0.1.0'
    compile 'uk.co.chrisjenx:calligraphy:2.2.0'

    compile 'com.thebluealliance:spectrum:0.7.1'

    compile('com.mikepenz:aboutlibraries:5.9.1@aar') {
        transitive = true
    }
    compile 'com.l4digital.fastscroll:fastscroll:1.0.1'

为什么呢? 什么解决方案?

1 个答案:

答案 0 :(得分:0)

尝试使用内联十六进制颜色代码,例如#000000 而不是参考。