private void init() { mMyDrawer = new MyDrawer(this); mDrawerLayout = mMyDrawer.getDrawerLayout(); // getActionBar().setDisplayHomeAsUpEnabled(false); LayoutInflater inflater = getLayoutInflater(); RelativeLayout container = (RelativeLayout) findViewById(R.id.frame_container); inflater.inflate(R.layout.activity_main_two_way_grid, container); horzGridView = (TwoWayGridView) findViewById(R.id.horz_gridview); horzGridView.setPadding(0, 0, 0, 0); List<DataObject> horzData = generateGridViewObjects(); horzGridViewAdapter = new TelepadGridViewAdapter(mContext, horzData); mList = (ListView) findViewById(R.id.list_slidermenu); horzGridView.setAdapter(horzGridViewAdapter); horzGridView.setOnItemClickListener(this); // horzGridView.requestFocus(); mDrawerLayout.getChildAt(0).requestFocus(); }
@Override protected void onDestroy() { if (mMyDrawer != null) mMyDrawer.finalize(); super.onDestroy(); }