Instantly share code, notes, and snippets.

What would you like to do?
DealActivity V1 for Henson article
public class DetailActivity extends Activity {
public static final String EXTRA_ITEM_ID = "extra.item_id";
public static final String EXTRA_SHOW_MAP = "extra.show_map";
private String itemId;
private boolean shouldShowMap;
public void onCreate(Bundle savedInstanceState) {
itemId = getIntent().getStringExtra(EXTRA_ITEM_ID);
shouldShowMap = getIntent().getBooleanExtra(EXTRA_SHOW_MAP, false);
if (itemId == null) {
throw new IllegalArgumentException("Item Id is required");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment