Skip to content

Instantly share code, notes, and snippets.

@dlemures
Last active May 5, 2016 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlemures/d54f9ca82a00a8ceeb6bc65b74d97f6f to your computer and use it in GitHub Desktop.
Save dlemures/d54f9ca82a00a8ceeb6bc65b74d97f6f to your computer and use it in GitHub Desktop.
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;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(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