<View id="35" did="0" type="ScrollView">
<ppt>width=-1
height=-1</ppt>
<event></event>
</View>
<View id="1" did="35" type="LinearLayout">
<ppt>width=-1
height=-1
orientation=vertical
padding=10dp
background=white</ppt>
<event></event>
</View>
<View id="2" did="1" type="LinearLayout">
<ppt>width=-1
height=30dp
orientation=vertical
gravity=center</ppt>
<event></event>
</View>
<View id="3" did="2" type="TextView">
<ppt>width=-2
height=-2
text=注册账号
textColor=#ff242424
textStyle=bold
textSize=20sp
typeface=@Puhuitis.ttf</ppt>
<event></event>
</View>
<View id="4" did="1" type="LinearLayout">
<ppt>width=-1
height=-2
orientation=vertical
padding=20dp</ppt>
<event></event>
</View>
<View id="5" did="4" type="TextView">
<ppt>width=-2
height=-2
text=账号
textStyle=bold
textSize=18sp
textStyle=bold
typeface=@Puhuitis.ttf
textColor=#ff151515</ppt>
<event></event>
</View>
<View id="6" did="4" type="CardView">
<ppt>width=-1
height=-2
app_CardBackgroundColor=#FFF8F8F8
app_CardcornerRadius=15dp
app_CardElevation=0
layout_marginTop=5dp</ppt>
<event></event>
</View>
<View id="7" did="6" type="LinearLayout">
<ppt>width=-1
height=-2
orientation=vertical
padding=5dp</ppt>
<event></event>
</View>
<View id="8" did="7" type="EditText">
<ppt>width=-1
height=-2
text=
layout_marginRight=5dp
layout_marginLeft=5dp
textStyle=bold
textSize=18sp
typeface=@Puhuitis.ttf
singleLine=true
digits=1234567890
background=
imeOptions=actionnext</ppt>
<event></event>
</View>
<View id="9" did="4" type="TextView">
<ppt>width=-2
height=-2
text=密码
textStyle=bold
textSize=18sp
textStyle=bold
typeface=@Puhuitis.ttf
textColor=#ff151515
layout_marginTop=10dp</ppt>
<event></event>
</View>
<View id="10" did="4" type="CardView">
<ppt>width=-1
height=-2
app_CardBackgroundColor=#FFF8F8F8
app_CardcornerRadius=15dp
app_CardElevation=0
layout_marginTop=5dp</ppt>
<event></event>
</View>
<View id="11" did="10" type="LinearLayout">
<ppt>width=-1
height=-2
orientation=vertical
padding=5dp</ppt>
<event></event>
</View>
<View id="12" did="11" type="EditText">
<ppt>width=-1
height=-2
text=
layout_marginRight=5dp
layout_marginLeft=5dp
textStyle=bold
textSize=18sp
typeface=@Puhuitis.ttf
singleLine=true
digits=1234567890zxcvbnmasdfghjklqwertyuiopZXCVBNMASDFGHJKLQWERTYUIOP
background=</ppt>
<event></event>
</View>
<View id="13" did="4" type="TextView">
<ppt>width=-2
height=-2
text=QQ
textStyle=bold
textSize=18sp
textStyle=bold
typeface=@Puhuitis.ttf
textColor=#ff151515
layout_marginTop=10dp</ppt>
<event></event>
</View>
<View id="14" did="4" type="CardView">
<ppt>width=-1
height=-2
app_CardBackgroundColor=#FFF8F8F8
app_CardcornerRadius=15dp
app_CardElevation=0
layout_marginTop=5dp</ppt>
<event></event>
</View>
<View id="15" did="14" type="LinearLayout">
<ppt>width=-1
height=-2
orientation=vertical
padding=5dp</ppt>
<event></event>
</View>
<View id="16" did="15" type="EditText">
<ppt>width=-1
height=-2
text=
layout_marginRight=5dp
layout_marginLeft=5dp
textStyle=bold
textSize=18sp
typeface=@Puhuitis.ttf
singleLine=true
digits=1234567890
background=</ppt>
<event></event>
</View>
<View id="17" did="4" type="TextView">
<ppt>width=-2
height=-2
text=邮箱
textStyle=bold
textSize=18sp
textStyle=bold
typeface=@Puhuitis.ttf
textColor=#ff151515
layout_marginTop=10dp</ppt>
<event></event>
</View>
<View id="18" did="4" type="CardView">
<ppt>width=-1
height=-2
app_CardBackgroundColor=#FFF8F8F8
app_CardcornerRadius=15dp
app_CardElevation=0
layout_marginTop=5dp</ppt>
<event></event>
</View>
<View id="19" did="18" type="LinearLayout">
<ppt>width=-1
height=-2
orientation=vertical
padding=5dp</ppt>
<event></event>
</View>
<View id="21" did="19" type="RelativeLayout">
<ppt>width=-1
height=-2</ppt>
<event></event>
</View>
<View id="20" did="21" type="EditText">
<ppt>width=-1
height=-2
text=
layout_marginRight=5dp
layout_marginLeft=5dp
textStyle=bold
textSize=18sp
typeface=@Puhuitis.ttf
singleLine=true
imeOptions=actionsend
background=</ppt>
<event></event>
</View>
<View id="22" did="21" type="CardView">
<ppt>width=-2
height=-2
app_CardBackgroundColor=#266A2E
app_CardcornerRadius=15dp
app_CardElevation=0
ut_centerVertical=true
ut_alignParentRight=true
layout_marginRight=10dp
</ppt>
<event></event>
</View>
<View id="23" did="22" type="LinearLayout">
<ppt>width=-2
height=-2
orientation=vertical
padding=5dp</ppt>
<event><eventItme type="clicki">ug(20,"text",email)
utw(null,"","加载.iyu",false,loal)
{
}
gvs(loal,2,qsh)
gvs(loal,3,dd)
dhr(dh, 0, 720, 1, 0.5, 1, 0.5)
dh(dh, "duration", 3000)
us(qsh, "dh", dh)
dhon(dh)
{
us(qsh, "dh", dh)
}
us(dd,"text","正在发送验证码...")
t()
{
hs(sss.wz+"yzm.php","email="+email,"utf-8",wz)
syso(wz)
json(wz,wz)
json(wz,"get","code",信息)
json(wz,"get","msg",内容)
ufnsui()
{
endutw()
tw(信息+","+内容)
}
}</eventItme></event>
</View>
<View id="24" did="23" type="TextView">
<ppt>width=-2
height=-2
text=获取验证码
textStyle=bold
textSize=14sp
textColor=#ffffffff
typeface=@Puhuitis.ttf
layout_marginRight=3dp
layout_marginLeft=3dp
layout_marginTop=2dp
layout_marginBottom=2dp</ppt>
<event></event>
</View>
<View id="25" did="4" type="TextView">
<ppt>width=-2
height=-2
text=验证码
textStyle=bold
textSize=18sp
textStyle=bold
typeface=@Puhuitis.ttf
textColor=#ff151515
layout_marginTop=10dp</ppt>
<event></event>
</View>
<View id="26" did="4" type="CardView">
<ppt>width=-1
height=-2
app_CardBackgroundColor=#FFF8F8F8
app_CardcornerRadius=15dp
app_CardElevation=0
layout_marginTop=5dp</ppt>
<event></event>
</View>
<View id="27" did="26" type="LinearLayout">
<ppt>width=-1
height=-2
orientation=vertical
padding=5dp</ppt>
<event></event>
</View>
<View id="28" did="27" type="EditText">
<ppt>width=-1
height=-2
text=
layout_marginRight=5dp
layout_marginLeft=5dp
textStyle=bold
textSize=18sp
typeface=@Puhuitis.ttf
singleLine=true
digits=1234567890zxcvbnmasdfghjklqwertyuiopZXCVBNMASDFGHJKLQWERTYUIOP
background=</ppt>
<event></event>
</View>
<View id="29" did="4" type="CardView">
<ppt>width=-1
height=55dp
layout_marginTop=20dp
app_CardcornerRadius=15dp
app_CardBackgroundColor=#6B78B4
app_CardElevation=0</ppt>
<event></event>
</View>
<View id="30" did="29" type="LinearLayout">
<ppt>width=-1
height=-1
orientation=vertical
gravity=center</ppt>
<event><eventItme type="clicki">utw(null,"","加载.iyu",false,loal)
{
}
gvs(loal,2,qsh)
gvs(loal,3,dd)
dhr(dh, 0, 720, 1, 0.5, 1, 0.5)
dh(dh, "duration", 3000)
us(qsh, "dh", dh)
dhon(dh)
{
us(qsh, "dh", dh)
}
us(dd,"text","正在注册账号...")
ug(8,"text",user)
ug(12,"text",pass)
ug(16,"text",QQ)
ug(20,"text",email)
ug(28,"text",yzm)
t()
{
hs(sss.wz+"zc.php","user="+user+"&pass="+pass+"&QQ="+QQ+"&email="+email+"&yzm="+yzm,"utf-8",wz)
syso(wz)
json(wz,wz)
json(wz,"get","code",信息)
json(wz,"get","msg",内容)
ufnsui()
{
endutw()
tw(信息+","+内容)
f(信息=="注册成功")
{
end()
fw("$user.txt",user)
fw("$pass.txt",pass)
}
}
}</eventItme></event>
</View>
<View id="31" did="30" type="TextView">
<ppt>width=-2
height=-2
text=注册
textStyle=bold
textColor=#ffffffff
textSize=18sp
typeface=@Puhuitis.ttf</ppt>
<event></event>
</View>
<View id="32" did="1" type="LinearLayout">
<ppt>width=-1
height=150dp
orientation=horizontal
gravity=center</ppt>
<event></event>
</View>
<View id="33" did="32" type="TextView">
<ppt>width=-2
height=-2
text=已有账号去
textStyle=bold
textSize=15sp
typeface=@Puhuitis.ttf
textColor=#ff101010</ppt>
<event></event>
</View>
<View id="34" did="32" type="TextView">
<ppt>width=-2
height=-2
text=登录
textColor=#79BEDB
textStyle=bold
textSize=15sp
typeface=@Puhuitis.ttf
layout_marginLeft=3dp</ppt>
<event><eventItme type="clicki">end()</eventItme></event>
</View>
<UIEventset><eventItme type="loading">uycl("#ffffffff",true)
java(cs,activity,"android.app.Activity.getWindow")
java(cs2,cs,"android.view.Window.getDecorView")
//8192改成1024为白色
java(null,cs2,"android.view.View.setSystemUiVisibility","int","8192")
//设置状态栏为透明(沉浸式)
java(window,activity,"android.app.Activity.getWindow")
java(null,window,"android.view.Window.setSoftInputMode","int",50)
</eventItme></UIEventset><View id="35" did="0" type="ScrollView">
<ppt>width=-1
height=-1</ppt>
<event></event>
</View>
<View id="1" did="35" type="LinearLayout">
<ppt>width=-1
height=-1
orientation=vertical
padding=10dp
background=white</ppt>
<event></event>
</View>
<View id="2" did="1" type="LinearLayout">
<ppt>width=-1
height=30dp
orientation=vertical
gravity=center</ppt>
<event></event>
</View>
<View id="3" did="2" type="TextView">
<ppt>width=-2
height=-2
text=注册账号
textColor=#ff242424
textStyle=bold
textSize=20sp
typeface=@Puhuitis.ttf</ppt>
<event></event>
</View>
<View id="4" did="1" type="LinearLayout">
<ppt>width=-1
height=-2
orientation=vertical
padding=20dp</ppt>
<event></event>
</View>
<View id="5" did="4" type="TextView">
<ppt>width=-2
height=-2
text=账号
textStyle=bold
textSize=18sp
textStyle=bold
typeface=@Puhuitis.ttf
textColor=#ff151515</ppt>
<event></event>
</View>
<View id="6" did="4" type="CardView">
<ppt>width=-1
height=-2
app_CardBackgroundColor=#FFF8F8F8
app_CardcornerRadius=15dp
app_CardElevation=0
layout_marginTop=5dp</ppt>
<event></event>
</View>
<View id="7" did="6" type="LinearLayout">
<ppt>width=-1
height=-2
orientation=vertical
padding=5dp</ppt>
<event></event>
</View>
<View id="8" did="7" type="EditText">
<ppt>width=-1
height=-2
text=
layout_marginRight=5dp
layout_marginLeft=5dp
textStyle=bold
textSize=18sp
typeface=@Puhuitis.ttf
singleLine=true
digits=1234567890
background=
imeOptions=actionnext</ppt>
<event></event>
</View>
<View id="9" did="4" type="TextView">
<ppt>width=-2
height=-2
text=密码
textStyle=bold
textSize=18sp
textStyle=bold
typeface=@Puhuitis.ttf
textColor=#ff151515
layout_marginTop=10dp</ppt>
<event></event>
</View>
<View id="10" did="4" type="CardView">
<ppt>width=-1
height=-2
app_CardBackgroundColor=#FFF8F8F8
app_CardcornerRadius=15dp
app_CardElevation=0
layout_marginTop=5dp</ppt>
<event></event>
</View>
<View id="11" did="10" type="LinearLayout">
<ppt>width=-1
height=-2
orientation=vertical
padding=5dp</ppt>
<event></event>
</View>
<View id="12" did="11" type="EditText">
<ppt>width=-1
height=-2
text=
layout_marginRight=5dp
layout_marginLeft=5dp
textStyle=bold
textSize=18sp
typeface=@Puhuitis.ttf
singleLine=true
digits=1234567890zxcvbnmasdfghjklqwertyuiopZXCVBNMASDFGHJKLQWERTYUIOP
background=</ppt>
<event></event>
</View>
<View id="13" did="4" type="TextView">
<ppt>width=-2
height=-2
text=QQ
textStyle=bold
textSize=18sp
textStyle=bold
typeface=@Puhuitis.ttf
textColor=#ff151515
layout_marginTop=10dp</ppt>
<event></event>
</View>
<View id="14" did="4" type="CardView">
<ppt>width=-1
height=-2
app_CardBackgroundColor=#FFF8F8F8
app_CardcornerRadius=15dp
app_CardElevation=0
layout_marginTop=5dp</ppt>
<event></event>
</View>
<View id="15" did="14" type="LinearLayout">
<ppt>width=-1
height=-2
orientation=vertical
padding=5dp</ppt>
<event></event>
</View>
<View id="16" did="15" type="EditText">
<ppt>width=-1
height=-2
text=
layout_marginRight=5dp
layout_marginLeft=5dp
textStyle=bold
textSize=18sp
typeface=@Puhuitis.ttf
singleLine=true
digits=1234567890
background=</ppt>
<event></event>
</View>
<View id="17" did="4" type="TextView">
<ppt>width=-2
height=-2
text=邮箱
textStyle=bold
textSize=18sp
textStyle=bold
typeface=@Puhuitis.ttf
textColor=#ff151515
layout_marginTop=10dp</ppt>
<event></event>
</View>
<View id="18" did="4" type="CardView">
<ppt>width=-1
height=-2
app_CardBackgroundColor=#FFF8F8F8
app_CardcornerRadius=15dp
app_CardElevation=0
layout_marginTop=5dp</ppt>
<event></event>
</View>
<View id="19" did="18" type="LinearLayout">
<ppt>width=-1
height=-2
orientation=vertical
padding=5dp</ppt>
<event></event>
</View>
<View id="21" did="19" type="RelativeLayout">
<ppt>width=-1
height=-2</ppt>
<event></event>
</View>
<View id="20" did="21" type="EditText">
<ppt>width=-1
height=-2
text=
layout_marginRight=5dp
layout_marginLeft=5dp
textStyle=bold
textSize=18sp
typeface=@Puhuitis.ttf
singleLine=true
imeOptions=actionsend
background=</ppt>
<event></event>
</View>
<View id="22" did="21" type="CardView">
<ppt>width=-2
height=-2
app_CardBackgroundColor=#266A2E
app_CardcornerRadius=15dp
app_CardElevation=0
ut_centerVertical=true
ut_alignParentRight=true
layout_marginRight=10dp
</ppt>
<event></event>
</View>
<View id="23" did="22" type="LinearLayout">
<ppt>width=-2
height=-2
orientation=vertical
padding=5dp</ppt>
<event><eventItme type="clicki">ug(20,"text",email)
utw(null,"","加载.iyu",false,loal)
{
}
gvs(loal,2,qsh)
gvs(loal,3,dd)
dhr(dh, 0, 720, 1, 0.5, 1, 0.5)
dh(dh, "duration", 3000)
us(qsh, "dh", dh)
dhon(dh)
{
us(qsh, "dh", dh)
}
us(dd,"text","正在发送验证码...")
t()
{
hs(sss.wz+"yzm.php","email="+email,"utf-8",wz)
syso(wz)
json(wz,wz)
json(wz,"get","code",信息)
json(wz,"get","msg",内容)
ufnsui()
{
endutw()
tw(信息+","+内容)
}
}</eventItme></event>
</View>
<View id="24" did="23" type="TextView">
<ppt>width=-2
height=-2
text=获取验证码
textStyle=bold
textSize=14sp
textColor=#ffffffff
typeface=@Puhuitis.ttf
layout_marginRight=3dp
layout_marginLeft=3dp
layout_marginTop=2dp
layout_marginBottom=2dp</ppt>
<event></event>
</View>
<View id="25" did="4" type="TextView">
<ppt>width=-2
height=-2
text=验证码
textStyle=bold
textSize=18sp
textStyle=bold
typeface=@Puhuitis.ttf
textColor=#ff151515
layout_marginTop=10dp</ppt>
<event></event>
</View>
<View id="26" did="4" type="CardView">
<ppt>width=-1
height=-2
app_CardBackgroundColor=#FFF8F8F8
app_CardcornerRadius=15dp
app_CardElevation=0
layout_marginTop=5dp</ppt>
<event></event>
</View>
<View id="27" did="26" type="LinearLayout">
<ppt>width=-1
height=-2
orientation=vertical
padding=5dp</ppt>
<event></event>
</View>
<View id="28" did="27" type="EditText">
<ppt>width=-1
height=-2
text=
layout_marginRight=5dp
layout_marginLeft=5dp
textStyle=bold
textSize=18sp
typeface=@Puhuitis.ttf
singleLine=true
digits=1234567890zxcvbnmasdfghjklqwertyuiopZXCVBNMASDFGHJKLQWERTYUIOP
background=</ppt>
<event></event>
</View>
<View id="29" did="4" type="CardView">
<ppt>width=-1
height=55dp
layout_marginTop=20dp
app_CardcornerRadius=15dp
app_CardBackgroundColor=#6B78B4
app_CardElevation=0</ppt>
<event></event>
</View>
<View id="30" did="29" type="LinearLayout">
<ppt>width=-1
height=-1
orientation=vertical
gravity=center</ppt>
<event><eventItme type="clicki">utw(null,"","加载.iyu",false,loal)
{
}
gvs(loal,2,qsh)
gvs(loal,3,dd)
dhr(dh, 0, 720, 1, 0.5, 1, 0.5)
dh(dh, "duration", 3000)
us(qsh, "dh", dh)
dhon(dh)
{
us(qsh, "dh", dh)
}
us(dd,"text","正在注册账号...")
ug(8,"text",user)
ug(12,"text",pass)
ug(16,"text",QQ)
ug(20,"text",email)
ug(28,"text",yzm)
t()
{
hs(sss.wz+"zc.php","user="+user+"&pass="+pass+"&QQ="+QQ+"&email="+email+"&yzm="+yzm,"utf-8",wz)
syso(wz)
json(wz,wz)
json(wz,"get","code",信息)
json(wz,"get","msg",内容)
ufnsui()
{
endutw()
tw(信息+","+内容)
f(信息=="注册成功")
{
end()
fw("$user.txt",user)
fw("$pass.txt",pass)
}
}
}</eventItme></event>
</View>
<View id="31" did="30" type="TextView">
<ppt>width=-2
height=-2
text=注册
textStyle=bold
textColor=#ffffffff
textSize=18sp
typeface=@Puhuitis.ttf</ppt>
<event></event>
</View>
<View id="32" did="1" type="LinearLayout">
<ppt>width=-1
height=150dp
orientation=horizontal
gravity=center</ppt>
<event></event>
</View>
<View id="33" did="32" type="TextView">
<ppt>width=-2
height=-2
text=已有账号去
textStyle=bold
textSize=15sp
typeface=@Puhuitis.ttf
textColor=#ff101010</ppt>
<event></event>
</View>
<View id="34" did="32" type="TextView">
<ppt>width=-2
height=-2
text=登录
textColor=#79BEDB
textStyle=bold
textSize=15sp
typeface=@Puhuitis.ttf
layout_marginLeft=3dp</ppt>
<event><eventItme type="clicki">end()</eventItme></event>
</View>
<UIEventset><eventItme type="loading">uycl("#ffffffff",true)
java(cs,activity,"android.app.Activity.getWindow")
java(cs2,cs,"android.view.Window.getDecorView")
//8192改成1024为白色
java(null,cs2,"android.view.View.setSystemUiVisibility","int","8192")
//设置状态栏为透明(沉浸式)
java(window,activity,"android.app.Activity.getWindow")
java(null,window,"android.view.Window.setSoftInputMode","int",50)
</eventItme></UIEventset>
这个代码有问题吗,为什么用不了,来一个私反感指知道的就行了
什么问题?
基于new bing部分指引作答:
这段代码存在一些问题。首先,XML布局中的每个元素需要有一个唯一的id,但是在提供的代码中,有些元素的id重复了,如id="1"、id="2"、id="4"等。
此外,代码中存在一些拼写错误,如"did"应该是"android:id","ppt"应该是"android:layout_params"。
另外,有一些属性值缺失或错误。例如,"background=" 后面的值没有提供,"background=" 属性需要提供一个背景资源的引用。
最后,代码中的事件处理部分是针对某种特定的开发框架或库编写的,无法直接在代码中运行。
You might currently have some code similar to this; 您当前可能有一些与此类似的代码;
function getWidthOfImage(src) {
var outerScopeVar;
var img = document.createElement('img');
img.onload = function() {
outerScopeVar = this.width;
};
img.src = src;
return outerScopeVar;
}
var width = getWidthOfImage('lolcat.png');
alert(width);
However, we now know that the return outerScopeVar
happens immediately; 但是,我们现在知道return outerScopeVar
立即发生。 before the onload
callback function has updated the variable. 在onload
回调函数更新变量之前。 This leads to getWidthOfImage()
returning undefined
, and undefined
being alerted. 这将导致getWidthOfImage()
返回undefined
,并且将向undefined
发出警报。
To fix this, we need to allow the function calling getWidthOfImage()
to register a callback, then move the alert'ing of the width to be within that callback; 为了解决这个问题,我们需要允许调用getWidthOfImage()
的函数注册一个回调,然后将宽度的警报移到该回调内;
function getWidthOfImage(src, cb) {
var img = document.createElement('img');
img.onload = function() {
cb(this.width);
};
img.src = src;
}
getWidthOfImage('lolcat.png', function (width) {
alert(width);
});
... as before, note that we've been able to remove the global variables (in this case width
). ...与以前一样,请注意,我们已经能够删除全局变量(在本例中为width
)。
这段代码是一个React组件,根据传入的数据源dataSource
来生成多个复选框和展示数据。从代码中看,可能有以下问题:
listStyles
在引入样式文件时不存在,可能会导致样式无法生效。onChange
事件处理函数中使用了this.state.selectedIds
和setState
来更新状态,但代码中没有展示该组件的构造函数和状态初始化操作,可能会导致运行时错误。.map()
方法来遍历dataSource
并生成多个组件。以下是可能的解决方案:
listStyles
是正确引入样式文件生成的变量,或相应地修改引入的语句。selectedIds
状态,并确保onChange
事件处理函数中使用的setState
方法可以正确更新状态。.map()
方法遍历dataSource
并生成组件:{
dataSource.map((obj) => (
<div key={obj.id}>
{/* 复选框 */}
<label>
<input
name="checkInput"
type="checkbox"
className={listStyles.visibleInput}
checked={this.state.selectedIds.includes(obj.id)}
onChange={() => {
const newSelectedIds = this.state.selectedIds.slice();
const idIndex = this.state.selectedIds.indexOf(obj.id);
(idIndex === -1)
? newSelectedIds.push(obj.id)
: newSelectedIds.splice(idIndex, 1);
this.setState({ selectedIds: newSelectedIds });
}}
/>
<span className={listStyles.labelStyle} />
</label>
<div>
{/* 这里放你用来展示的数据结果 */}
</div>
</div>
))
}
请注意,以上只是对可能的问题和解决方案的分析和推测,如果仍然无法正常运行,请提供更多信息以便更准确地定位和解决问题。