【发布时间】:2016-12-27 21:25:21
【问题描述】:
我在 Android Studio 中,我设置了这样的微调器:
<com.weiwangcn.betterspinner.library.material.MaterialBetterSpinner
android:id="@+id/android_material_design_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Material Design Spinner"
android:textColorHint="#05ab9a"
app:met_floatingLabel="normal" />
取自this站点
它可以正常工作,但我无法更改颜色。我需要改变: - 提示颜色 - 单击微调器时显示的面板的背景颜色 - 点击的小箭头的颜色
最后一行我也有错误:“未知属性app:met_floatingLabel”,它与我的gradle构建有关吗? 这里是:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.myname.myapp"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
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:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.jakewharton:butterknife:6.1.0'
compile 'com.weiwangcn.betterspinner:library-material:1.1.0'
compile 'com.weiwangcn.betterspinner:library:1.1.0'
testCompile 'junit:junit:4.12'
}
完整的xmlhere
对不起,代码的布局很糟糕
//编辑 不知道有没有说清楚,但是我的意思是即使我改变了xml fil中的颜色,它也不会在布局中应用它们
【问题讨论】:
-
你能包含完整的xml文件吗?
-
当然,我正在修改@IsaacPayne
-
唐,我添加了一个链接,因为我在添加代码时遇到问题@IsaacPayne
标签: java android android-layout android-studio material-design