[Solved] How to add hints in a game?


In android studios go to res/drawable and add the photos you want to use there.
Here’s how to do that : How to add an image to the “drawable” folder in Android Studio?

Then you initialize the photos with :

private ImageView schoolPhoto;
schoolPhoto = (ImageView) findViewById(R.id.imageViewId);
schoolPhoto.setImageResource(R.drawable.imageFileId);

Then you can create a method with toast which is often used for hints:

public static displayHint( ImageView imageHint) {
Toast toast = new Toast(this);
    toast.setView(imageHint);
    toast.show();}

And run that method as displayHint(schoolPhoto) when you show the string.

3

solved How to add hints in a game?