这个错误我搜了下,都说是布局问题,我就在main.xml作了如下布局
JAVA代码中是没有的,请问问题在哪
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" > <Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
<TextView
android:id="@+id/textView1"
android:layout_width="304dp"
android:layout_height="90dp"
android:text="TextView" /> <Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" /> <ImageSwitcher
android:id="@+id/imageSwitcher1"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_weight="0.41" >
</ImageSwitcher></LinearLayout>
JAVA代码中是没有的,请问问题在哪
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" > <Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
<TextView
android:id="@+id/textView1"
android:layout_width="304dp"
android:layout_height="90dp"
android:text="TextView" /> <Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" /> <ImageSwitcher
android:id="@+id/imageSwitcher1"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_weight="0.41" >
</ImageSwitcher></LinearLayout>
解决方案 »
- 100分求->如何在android手机上折线图,横轴为时间,纵轴为数字
- Android操作Excel文件的问题。。求解。
- (新手求救)关于MapActivity的使用问题,困扰几天了
- 如何在onCreate中获取TextView的宽度
- 导入外部工程,运行发现问题,求指导
- 【求助】★★★★★难题!自定义Android的相机预览界面。
- Android中如何让运行中的应用不能被进程管理器关闭,而且不能卸载
- 关于android中植入广告的问题
- View.OnClickListener没反应求指点
- Android 广播收不到
- 关于android异步加载数据!
- android 平台下编译二进制程序报线程函数问题
java代码中没布局
刚接触android
还有哪里可能会有布局?
在java代码中TextView tv = (TextView)findViewById(R.id.textView1);
tv竟然是null
求指教我需要android常用控件EditText,TextView,2个Button,ImageView
谁能给个示例