FrameLayout layout_frame=(LinearLayout)findViewById(R.id.layout_frame);FrameLayout 和 LinearLayout ,你编译都通不过
解决方案 »
- dialog遮挡后面的activity问题
- 关于APP的问题
- android桌面快捷方式,有没办法不重复创建进程?
- 新手_运行问题
- 想做android开发,大家给推荐个调试用的手机呗
- android中怎么把imageview转化成bitmap啊
- android UI设计
- 小白提问关于包的设计问题
- listview+checkbox +下拉刷新 焦点问题
- Android下listview每个Item中包含有按钮,为什么在点击某一行按钮的时候,同时有多行button触发了响应事件?
- android SoundPool播放没声音 还总是报SocketStream readFully错误
- [android]使用线控耳机来操控应用功能
<LinearLayout android:id="@+id/layout_linear"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="center"
android:background="@color/cl_beige" >
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitCenter"
android:id="@+id/imageview_background" />
</LinearLayout><FrameLayout android:id="@+id/layout_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="center"
android:background="@color/cl_beige" >
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitCenter"
android:id="@+id/imageview_background" />
</FrameLayout>
(1)
LinearLayout layout_linear=(LinearLayout)findViewById(R.id.layout_linear);
layout_linear.setLayoutParams(new LinearLayout.LayoutParams(200,200);(2)
FrameLayout layout_frame=(FrameLayout )findViewById(R.id.layout_frame);
layout_frame.setLayoutParams(new LinearLayout.LayoutParams(200,200);为什么运行(2)程序会错误自动退出,而运行(1)程序却正常使用?
FrameLayout layout_frame=(FrameLayout )findViewById(R.id.layout_frame);
layout_frame.setLayoutParams(new FrameLayout .LayoutParams(200,200);