package de.evosec.fotilo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.KeyEvent;

public class MainActivity extends FragmentActivity {

	private static final Logger LOG =
	        LoggerFactory.getLogger(MainActivity.class);

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		if (savedInstanceState == null) {
			startCameraFragment();
		}
	}

	private void startCameraFragment() {
		LOG.info("start Fragment");
		getSupportFragmentManager().beginTransaction()
		    .add(R.id.rootView, CamFragment.newInstance(), "CamFragment")
		    .commitAllowingStateLoss();
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		try {
			((CamFragment) getSupportFragmentManager()
			    .findFragmentByTag("CamFragment")).onKeyDown(keyCode);
		} catch (Exception e) {
			LOG.debug("onKeyDown() : " + e);
		}
		return super.onKeyDown(keyCode, event);
	}

}

@@ -132,21 +132,22 @@
 rt.v
-4
+7
 .app.
-Fragmen
+AppCompa
 tAct
@@ -218,23 +218,24 @@
 extends 
-Fragmen
+AppCompa
 tActivit

Use AppCompatActivity