我收到消息错误 - 强制关闭 - 当我努力删除RelativeLayout中的视图(动态)时.
添加视图:(布局是relativelayout,Sunanim的扩展视图)
SunAnim rotateImg = new SunAnim(this);
rotateImg.setTag("imgsun");
layout.addView(rotateImg);
Run Code Online (Sandbox Code Playgroud)
删除视图:(CloudAnim <=> SunAnim)
class CountDownRunner implements Runnable{
// @Override
public void run() {
while(!Thread.currentThread().isInterrupted()){
try {
Thread.sleep(1000);
delAnim ++;
SunAnim rotateImg = (SunAnim)layout.findViewWithTag("imgsun");
CloundAnim cl = (CloundAnim)layout.findViewWithTag("imgcl");
if (rotateImg != null && delAnim == 15) {
((RelativeLayout)rotateImg.getParent()).removeView(rotateImg);
layout.invalidate();
delAnim = 0;
Log.d("Rotate","Deleted");
}
if (cl != null && delAnim == 15) {
((RelativeLayout)cl.getParent()).removeView(cl);
layout.invalidate();
delAnim = 0;
Log.d("CL","Deleted");
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}catch(Exception e){ …Run Code Online (Sandbox Code Playgroud) 在这个标题之后,在我的web.config中,它由VS 2012生成.
现在,我不知道我把下面的代码放在web.config中我看到有人把它放进去<system.web>但是在我的web.config中它只有<system.web.webPages.razor>和<system.webServer>.当我把这个代码放在web.config中的某处时,我收到一个错误<authentication mode="Forms">:
有代码:
<authentication mode="Forms">
<forms loginurl="~/Comfirm/Login" timeout="2880"></forms>
</authentication>
Run Code Online (Sandbox Code Playgroud)