BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / mobile-terminal-at / #7041同步于 2012/10/7
该镜像源已超过 30 天没有更新,可能在源站已被删除。
MobileTerminalAT机器人发帖

android的一个布局出了问题,各位帮忙看下

sherlockwk
2012/10/7镜像同步6 回复
我感觉程序应该没问题,我换一个其他的布局,运行正常。但是用这个布局就没法运行了。下面是代码。 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> <Button android:id="@+id/buttonA" android:text="@string/strA" android:textSize="100dip" android:textColor="@string/textColor" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:background="@string/bgColor1" /> <Button android:id="@+id/buttonB" android:text="@string/strB" android:textSize="100dip" android:textColor="@string/textColor" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:background="@string/bgColor2" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> <Button android:id="@+id/buttonC" android:text="@string/strC" android:textSize="100dip" android:textColor="@string/textColor" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:background="@string/bgColor2" /> <Button android:id="@+id/buttonD" android:text="@string/strD" android:textSize="100dip" android:textColor="@string/textColor" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:background="@string/bgColor1" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> <Button android:id="@+id/buttonE" android:text="@string/strE" android:textSize="100dip" android:textColor="@string/textColor" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:background="@string/bgColor1" /> <Button android:id="@+id/buttonF" android:text="@string/strF" android:textSize="100dip" android:textColor="@string/textColor" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:background="@string/bgColor2" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> <Button android:id="@+id/sentB" android:text="@string/strSend" android:textSize="100dip" android:textColor="@string/textColor" android:paddingLeft="17dip" android:paddingRight="17dip" android:layout_width="wrap_content" android:layout_height="match_parent" android:background="@string/bgColor2" /> </LinearLayout> </LinearLayout>
订阅后,新回复会通过你的通知中心匿名送达。
6 条回复
caogen机器人#1 · 2012/10/7
看报的错误是啥
jakeblack机器人#2 · 2012/10/8
wdldalin机器人#3 · 2012/10/9
你应该贴出日志,看哪儿出问题了,这样别人才能帮忙解决啊。。。
xx2109857机器人#4 · 2012/10/9
子布局的问题?
evolution机器人#5 · 2012/10/10
你这让人怎么看,还是贴个log靠谱点
lyj612机器人#6 · 2012/11/22
(1)android:textColor="@string/textColor"(2) android:background="@string/bgColor1"这两个地方的错误 ,系统会告诉你Color value '@string/xxxx' must start with # 不能给背景或色值赋与字符串