Code example for ImageButton

Methods: setImageDrawable

0
				// Cas de cartes diferents 
				else { 
					card1.postDelayed(new Runnable() { 
						public void run() { 
							card1.setImageDrawable(backImage);
							card2.setImageDrawable(backImage);
							firstCard = -1;
							secondCard = -1;
							Log.v("Thread diferent cards", "awake");
						} 
					}, 2000); 
				} 
 
				tries++; 
			} 
			((TextView) findViewById(R.id.tries)).setText("Intents: " + tries); 
			Log.v(tag, "firstID: " + firstCard + " | secondID: " + secondCard); 
		} 
 
	} 
}