GroupActivity 加载时出现横线
LayoutInflater inflater = LayoutInflater.from(getContext());
View view=inflater.inflate(R.layout.locate, null); 直接加载xml没问题,不会出现线
加载center.addView(getLocalActivityManager().startActivity("locate",
new Intent(getContext(),LocateMainActivity.class)
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP))
.getDecorView());
主界面和 LocateMainActivity 中间出现条线 应该不是我布局的问题 怎么去除这条线啊
[解决办法]
GroupActivity是你自己写的类?。。。写反了吧
contentLinearLayout.removeAllViews();
//Start activity,Set Size
View view=getLocalActivityManager().startActivity(
arrGroup[index],
new Intent(InfoActivityGroup.this, Class.forName(arrGroup[index]))
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView();
view.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.MATCH_PARENT));
contentLinearLayout.addView(view);
你可以试试在addview之前先设置一下LayoutParams