问题描述
- OpenGLRenderer GL_INVALID_OPERATION错误求解决
-
我有个activity继承于fragmentActivity用来管理两个fragment。当我从这个activity启动另外一个activity,自身finish退出时,就会报错OpenGLRenderer GL_INVALID_OPERATION ,整个屏幕就变得没法看了。以下是部分代码,问题就出在最后哪里
public class DisplayParksActivity extends FragmentActivity implements OnClickListener{
private LogManager LOGGER= new LogManager("DisplayParksActivity");
private LinearLayout llyBack,llySet;
private TextView txtSearch,txtMapShow,txtListShow;
private FrameLayout flyContent;
private ParksOnMapFragment onMapFragment;
private ParksOnListFragment onListFragment;
private FragmentManager fragmentManager; //用于对Fragment进行管理
private FragmentTransaction transaction;private double lat,lng;
private int scope;
private String searchCenterName;
private int radius =1;
private boolean isShowOnList = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.search_parks_by_center_map);
EParkApplication.addActivity(this);
System.gc();
initView();
processIntentData();
fragmentManager = getSupportFragmentManager();
// 第一次启动时默认地图显示
showParks(0);
}@Override public void onClick(View v) { switch(v.getId()){ case R.id.parks_onmap_llayout_back: //退出 DisplayParksActivity.this.finish(); break; case R.id.parks_onmap_more: //设置搜索范围,重新搜索 setScope(v); break; case R.id.search_txt: Intent intent=new Intent(DisplayParksActivity.this,SearchActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); DisplayParksActivity.this.startActivity(intent); DisplayParksActivity.this.finish(); break;
时间: 2024-12-10 11:15:45