Last active
May 5, 2016 19:04
-
-
Save dlemures/d54f9ca82a00a8ceeb6bc65b74d97f6f to your computer and use it in GitHub Desktop.
DealActivity V1 for Henson article
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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