这可能听起来很愚蠢,但我认真对待Android编程新手.我在互联网上看了这个,但看起来没有人遇到过这个问题.我正在为我们学校的Android项目制作一个软键盘.我打算为这个键盘制作自己的背景,但我无法弄清楚如何更改键盘的背景.我在drawable目录中创建了一个buttonbgselector.xml文件:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/button" />
<item
android:state_pressed="true"
android:drawable="@drawable/buttonpressed" />
<item
android:state_checkable="true"
android:drawable="@drawable/button" />
<item
android:state_checkable="true"
android:state_pressed="true"
android:drawable="@drawable/buttonpressed" />
<item
android:state_checkable="true"
android:state_checked="true"
android:drawable="@drawable/button" />
<item
android:state_checkable="true"
android:state_checked="true"
android:state_pressed="true"
android:drawable="@drawable/buttonpressed" />
</selector>
Run Code Online (Sandbox Code Playgroud)
我尝试在这里设置背景:
@Override public View onCreateInputView() {
mInputView = (KeyboardView) getLayoutInflater().inflate(
R.layout.input, null);
mInputView.setBackgroundResource(R.drawable.buttonbgselector);
mInputView.setOnKeyboardActionListener(this);
mInputView.setKeyboard(mQwertyKeyboard);
return mInputView;
}
Run Code Online (Sandbox Code Playgroud)
钥匙仍然是一样的,没有任何改变.
我正在尝试使用NUnit Runners 2.6.4在我的测试文件夹中运行所有测试程序集.我当前的命令如下所示:
/nologo /noshadow /framework:net-4.0 /xml:.\test\TestResults.xml .\test\*.Test.dll
Run Code Online (Sandbox Code Playgroud)
不幸的是,Nunit只抛出一个System.ArgumentException:路径中的非法字符.
无论如何我能做到这一点吗?