android动态添加控件,怎样指定位置
android动态添加控件,怎样指定位置
日期:2022-04-03 05:27:31 人气:1
参考如下
用LayoutParams:
RelativeLayout insertLayout = (RelativeLayout)view1.findViewById(R.id.screen);//screen是一个RelativeLayout 布局的id
ImageView imgApple2 = new ImageView(MainActivity.thi
用LayoutParams:
RelativeLayout insertLayout = (RelativeLayout)view1.findViewById(R.id.screen);//screen是一个RelativeLayout 布局的id
ImageView imgApple2 = new ImageView(MainActivity.thi