-1

Could you please help me with the coding?

So, I want to change Text witch is below Image every time when I select new image.

For example:

my app is like in Travis's Wallpaper App tutorial. -> http://www.youtube.com/watch?v=oiCKnevQLWU And I want to change text every time the new image is selected.

Thank you, for your assistance!

Part of the code:

 public void onClick(View v) {
            // TODO Auto-generated method stub
            switch (v.getId()){

            case R.id.image1:
                display.setImageResource(R.drawable.image1);
                toPhone = R.drawable.image1;

                break;
            case R.id.image2:
                display.setImageResource(R.drawable.image2);
                toPhone = R.drawable.image2;
                break;
androider
  • 1
  • 2
  • 3

1 Answers1

0

it would work better this way. use setOnClickListener for each of your image..

your_image.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub

            }
        });
ashish.n
  • 1,234
  • 14
  • 30
  • Thanks, but my code work fine and qiuckly changes images. But what I need assistance for is, how to change text in TextView below image. How can I do it? – androider May 15 '12 at 11:18