我正在尝试切换一个我已经静态的字符串类型值.但是,我无法弄清楚如何把它放入一个switch语句我以前使用'if else'语句,但由于我要切换的项目数量不起作用.
对于if else我使用`
if (item.ActivityFeedType.equals("Comment"))
Run Code Online (Sandbox Code Playgroud)
对于开关I;我试图使用
case (item.ActivityFeedType.equals("Comment")):
Run Code Online (Sandbox Code Playgroud)
有什么我想念的吗?
嗨,我想用语音气泡作为我的应用程序的背景图像.我在这里发布了这个帖子
这个例子从正确的方向开始,我想在我试过的相反方向实现这一目标
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:top="30dp">
<rotate
android:fromDegrees="-45"
android:pivotX="0%"
android:pivotY="0%"
android:toDegrees="0" >
<shape android:shape="rectangle" >
<solid android:color="#CCC" />
</shape>
</rotate>
</item>
<item android:right="10dp">
<shape android:shape="rectangle" >
<solid android:color="#CCC" />
<corners android:radius="5dp" />
</shape>
</item>
</layer-list>
Run Code Online (Sandbox Code Playgroud)
但我无法让它工作,任何帮助将不胜感激!
android ×2