Code example for DatePicker

Methods: setVisibility

0
		   dialog = ProgressDialog.show(EventView.this, "", 
                   "Checking Data. Please wait...", true); 
		   dialog.setCancelable(false);
		   dialog.setCanceledOnTouchOutside(false);
		   dialog.show();
		   event.setPropFromViews(date_picker, time_picker, location_text, details_text, alarmOnOffStatus);
		   TrySaveInBackground saveJob = new TrySaveInBackground();
		   saveJob.execute(this);
	   } 
	   if(v == set_date_btn || v == set_time_btn)
	   { 
		   boolean dateVisibility = v == set_date_btn;
		   setDateTimeBtns(dateVisibility, !dateVisibility);		   
	   } 
	    
	} 
    
   	private void setDateTimeBtns(boolean dateVisibility, boolean timeVisibility)
   	{ 
   			if (dateVisibility == true)
   			{ 
   			   	date_picker.setVisibility(View.VISIBLE);
   			   	time_picker.setVisibility(View.INVISIBLE);   				
   			} 
   			else 
   			{ 
   			   	date_picker.setVisibility(View.INVISIBLE);
   			   	time_picker.setVisibility(View.VISIBLE);   				
   			} 
   			 
		   	set_date_btn.setEnabled(!dateVisibility);
		   	set_time_btn.setEnabled(!timeVisibility);   		
Stop searching for code, let great code find you!  Add Codota to your java IDE