package de.j4velin.picturechooser;

import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;

public class Main extends Activity {
	@Override
	protected void onCreate(final Bundle b) {
		super.onCreate(b);

		// Create new fragment and transaction
		Fragment newFragment = new BucketsFragment();
		FragmentTransaction transaction = getFragmentManager().beginTransaction();

		// Replace whatever is in the fragment_container view with this
		// fragment,
		// and add the transaction to the back stack
		transaction.replace(android.R.id.content, newFragment);

		// Commit the transaction
		transaction.commit();
	}

	void showBucket(final int bucketId) {
		Bundle b = new Bundle();
		b.putInt("bucket", bucketId);
		Fragment f = new ImagesFragment();
		f.setArguments(b);
		getFragmentManager().beginTransaction().replace(android.R.id.content, f).addToBackStack(null).commit();
	}
	
	void imageSelected(final String imgPath) {
		Intent result = new Intent();
		result.putExtra("imgPath", imgPath);
		setResult(RESULT_OK, result);
		finish();
	}
}

@@ -31,16 +31,57 @@
 ser;%0D%0A%0D%0A
+import android.annotation.SuppressLint;%0D%0A
 import a
@@ -102,16 +102,16 @@
 ivity;%0D%0A
-
 import a
@@ -272,16 +272,46 @@
 vity %7B%0D%0A
+%09@SuppressLint(%22InlinedApi%22)%0D%0A
 %09@Overri
@@ -358,16 +358,16 @@
 e b) %7B%0D%0A
-
 %09%09super.
@@ -378,24 +378,285 @@
 eate(b);%0D%0A%0D%0A
+%09%09setResult(RESULT_CANCELED);%0D%0A%0D%0A%09%09if (android.os.Build.VERSION.SDK_INT %3E= android.os.Build.VERSION_CODES.KITKAT) %7B%0D%0A%09%09%09setTheme(android.R.style.Theme_Holo_NoActionBar_TranslucentDecor);%0D%0A%09%09%7D else %7B%0D%0A%09%09%09setTheme(android.R.style.Theme_Holo_NoActionBar);%0D%0A%09%09%7D%0D%0A%0D%0A
 %09%09// Create 
@@ -1338,17 +1338,16 @@
 );%0D%0A%09%7D%0D%0A
-%09
 %0D%0A%09void 

set NoTitle theme