private void displayMessage(String message){
  Toast toast=Toast.makeText(getBaseContext(),message,Toast.LENGTH_LONG);
  toast.setGravity(Gravity.CENTER,0,0);
  LinearLayout toastLayout=(LinearLayout)toast.getView();
  TextView toastTV=(TextView)toastLayout.getChildAt(0);
  if (toastTV != null) {
    toastTV.setTextSize(20);
    toastTV.setGravity(Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL);
  }
  toast.show();
}

private void displayMessage ( String message ) { Toast toast = Toast . makeText ( getBaseContext ( ) , message , Toast . LENGTH_LONG ) ; toast . setGravity ( Gravity . CENTER , 0 , 0 ) ; LinearLayout toastLayout = ( LinearLayout ) toast . getView ( ) ; TextView toastTV = ( TextView ) toastLayout . getChildAt ( 0 ) ; if ( toastTV != null ) { toastTV . setTextSize ( 20 ) ; toastTV . setGravity ( Gravity . CENTER_VERTICAL | Gravity . CENTER_HORIZONTAL ) ; } toast . show ( ) ; }
launches a pop up message
