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
@Override | |
public boolean onOptionsItemSelected(MenuItem item) { | |
Log.d(TAG, "onOptionsItemSelected"); | |
switch (item.getItemId()) { | |
case R.id.menu_rotate: | |
Log.i(TAG, "onOptionsItemSelected: rotate menu item selected"); | |
// This menu option is only provided to phone layouts, since | |
// tablet layouts show the image rotator at all times |
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
@Override | |
public void onImageSelected(ImageItem imageItem, int position) { | |
// Only inform the other fragments if the selected position is new | |
if (mCurImagePosition != position) { | |
Log.d(TAG, "onImageSelected: title = " + imageItem.getTitle() + " position = " + position); | |
// Keep track of the selected image | |
mCurImageResourceId = imageItem.getImageResId(); |
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
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:id="@+id/activity_main_root_container"> | |
<FrameLayout | |
android:id="@+id/activity_main_image_selector_container" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"/> |