Code example for Dialog

Methods: setTitle, show

0
		Dialog dialog;
 
		@Override 
		protected void onPreExecute() { 
			super.onPreExecute(); 
			dialog = new Dialog(getActivity());
			dialog.setTitle("Posting status update...");
			dialog.show();
		} 
 
		/** Task that happens on a separate thread. */ 
		@Override 
		protected String doInBackground(String... params) {
			try { 
				SharedPreferences prefs = PreferenceManager
						.getDefaultSharedPreferences(getActivity());
				String username = prefs.getString("username", null);
				String password = prefs.getString("password", null);
				String server = prefs.getString("server", null);
				YambaClient yambaClient = new YambaClient(username, password);
				if (server != null && server.length() > 0)