//Animation in recyclerview private void setAnimation ( View view){ Animation animation = AnimationUtils . loadAnimation ( context , android.R . anim . slide_in_left ); view.setAnimation( animation ); }
public AlertDialog . Builder builDialog ( Context context){ final AlertDialog . Builder builder = new AlertDialog .Builder(context); builder .setTitle( "No Internet Connection" ); builder .setCancelable( false ); builder .setMessage( "Dear user you are not connected to Internet." ); builder .setPositiveButton( "Ok" , new DialogInterface . OnClickListener () { @Override public void onClick ( DialogInterface dialog, int which) { } }); builder .setNegativeButton( "Cancel" , new DialogInterface . OnClickListener () { @Override public void onClick ( DialogInterface dialog, int which) { builder .setCancelable( true ); } }); return builder ; }