解决方案 »
- 请帮忙用android的XmlPullParser解析xml中的节点
- 当真机和模拟器一起调试程序时,为什么真机有日志信息输出,而模拟器的日志信息却没有输出
- surfaceview的事件响应
- SharedBufferStack(126): waitForCondition(LockCondition) timed out.
- 【求问】如何在Android平台读取网络图片并滚动显示
- 程序联网失败,一般是怎么处理的!
- 打开电脑会有没有文件扩展名的提示
- Android的问题
- 关于android-support-v4.jar 问题
- 小白求问
- 新手求解android线程问题、望大神解答,不盛感激
- android代码如何用命令把raw文件里的文件复制到system/app里面(已经root)
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
> <TextView
android:id="@+id/cd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cds" />
<EditText
android:inputType="number"
android:id="@+id/put_num"
android:layout_below="@+id/cd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/er"
android:layout_below="@+id/put_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/ee"
/>
<EditText
android:inputType="text"
android:id="@+id/put_word"
android:layout_below="@+id/er"
android:layout_width="match_parent"
android:layout_height="150dp"
/>
<Button
android:id="@+id/bu"
android:layout_below="@+id/put_word"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/by"
/>
</RelativeLayout>
这里改成
android:layout_below="@id/put_word"
+1 在@后面使用“+”,表示当修改完某个布局文件并保存后,系统会自动在R.java文件中
生成相应的int类型变量。变量名就是“/”后面的值
@后面没有+的就是直接引用这个ID