src/jpm/dg/HomeScreen.java
/**
	 * Generate an options menu based on input.
	 * @param hide True when user has clicked "hide data".
	 */
Generate an options menu based on input.
@param hide True when user has clicked "hide data".
Generate an options menu based on input . @param hide True when user has clicked " hide data " .
private void options(boolean hide) {
		String title;
		android.content.DialogInterface.OnClickListener listener;
		final MediaActivity base = this;
		if (hide) {
			title = "What do you want to hide?";
			listener = new DialogInterface.OnClickListener() {
				public void onClick(DialogInterface dialog, int item) {
					if (item == 0) {
						base.selectionOptions(HIDE_TEXT, "Select a cover image");
					} else {
						startActivity(new Intent(getApplicationContext(),
								ImageHideScreen.class));
					}
				}
			};
		} else {
			title = "What do you want to retrieve?";
			listener = new DialogInterface.OnClickListener() {
				public void onClick(DialogInterface dialog, int item) {
					if (item == 0) {
						base.getImageFromGallery(RETRIEVE_TEXT);
					} else {
						base.getImageFromGallery(RETRIEVE_IMAGE);
					}
				}
			};
		}
		Dialogs.showAdapterDialog(this, title, typeAdapter, listener);
	}
private void options ( boolean hide ) { String title ; android . content . DialogInterface . OnClickListener listener ; final MediaActivity base = this ; if ( hide ) { title = "What do you want to hide?" ; listener = new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int item ) { if ( item == 0 ) { base . selectionOptions ( HIDE_TEXT , "Select a cover image" ) ; } else { startActivity ( new Intent ( getApplicationContext ( ) , ImageHideScreen . class ) ) ; } } } ; } else { title = "What do you want to retrieve?" ; listener = new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int item ) { if ( item == 0 ) { base . getImageFromGallery ( RETRIEVE_TEXT ) ; } else { base . getImageFromGallery ( RETRIEVE_IMAGE ) ; } } } ; } Dialogs . showAdapterDialog ( this , title , typeAdapter , listener ) ; }
Generate an options menu based on input.
Generate an options menu based on input .