Image Clickable

All your problems with Audio, Video and Images.

Image Clickable

Postby dkkundudolan » Tue Nov 18, 2008 9:01 am

Hi All,

How to make an image clickable? I had created two images in same LinearLayout, on which when i will click on one image(Right one) it will go to the next page and when actions have finished on the next page i will come back to the previous page by clicking on back button. so when i will come back to the previous page in which two images are there, the 2nd image(left one) will change its color as the 1st image did its work.
can anybody tell me how to do that? :(
I am keeping here the Image Screen-shot .
Attachments
image1.doc
(117 KiB) Downloaded 87 times
dkkundudolan
Experienced Developer
Experienced Developer
 
Posts: 83
Joined: Mon Mar 03, 2008 12:50 pm

Top

Changing the Image-color

Postby dkkundudolan » Wed Nov 26, 2008 7:33 am

Hi,

Now i can click the Images . Now i want to change the color of the Image.
Here in the 1st page i have the Image, textView and Button in same LinearLayout. (1st Screen-Shot in attachment). when i will click the "arrow" button in the right side of the screen, it will move to the next page (2nd screen-shot in attachment). In teh 2nd screen, when i will click the checkbox and after that when i will click on "Done" button, it will come back to the 1st screen.
Here on this screen, the Image color will be changed as i selected the checkbox and also with thatit will display with Implants that "one " or "two" items are selected. (The Implants will be like this : "Implants(1/2)", if one check box selected."Implants(2/2)", if two checkboxes are selected).
and for the color change, i kept two ImageButton with different colors. So by selecting the checkbox, the Image color will be changed.

Please can anybody give a little suggestion how to do that? :roll:
Hope a reply.

Thanks in advance.
Attachments
img2.pdf
(27.75 KiB) Downloaded 94 times
Img1.pdf
(25.35 KiB) Downloaded 87 times
dkkundudolan
Experienced Developer
Experienced Developer
 
Posts: 83
Joined: Mon Mar 03, 2008 12:50 pm

Postby andmol » Thu Dec 04, 2008 11:25 am

Hi,

you say that you have the different colored versions of the picture. So set up for example two buttons, each with a different picture. Then you can just make the one on the first screenshot invisible and display the button with the different pic when you came back from the second screen. Make sense?

I hope I understand you right.

Regards
andmol
Junior Developer
Junior Developer
 
Posts: 21
Joined: Tue Sep 30, 2008 5:34 pm

Postby dkkundudolan » Mon Dec 08, 2008 10:19 am

Hi andmol,

How its possible by making invisible of picture.? it will not be invisible . it will be overlaped.

Thanks,
dkkundudolan
Experienced Developer
Experienced Developer
 
Posts: 83
Joined: Mon Mar 03, 2008 12:50 pm

Postby andmol » Mon Dec 08, 2008 1:43 pm

Hi dkkundudolan,

I was actually talking about ImageButtons. So you say that these things are still overlapping? Even if you do this:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. ImageButton btn = (ImageButton) findViewById(R.id.btn);
  3.  
  4. btn.setVisibility(View.INVISIBLE);
  5.  
  6.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


Please clarify,
Thx and regads
andmol
Junior Developer
Junior Developer
 
Posts: 21
Joined: Tue Sep 30, 2008 5:34 pm

Postby dkkundudolan » Wed Dec 10, 2008 10:37 am

Hi andmol

u said to make it by using INVISIBLE. see, i have two imageButtons. but in the 1st page it will disply only one. both the image button will not display at a time. And if i make one ImageButton INVISIBlE, that means i have to keep two ImageButton together. in this case i dont want to keep two ImageButton together.

In the 1st page only red button(as i ahve two buttons, red and green) and when i will go to the next page and click the check box, and afterthat when i will come back to the 1st page again , that time the RED BUTTON will changes to green.

Anyway i did that.

I have another problem. how can i set teh TextView that i selected "ONE" or "TWO" checkbox.?
In the 2nd page i kept two checkBoxes. so when i will click one CheckBox and come back to the 1st page, the text will display as "Implants(1/2)". if i click the two checkBox and come back to the 2nd page, it will display "Implants(2/2)". Here Toast is not needed.

Can you give some suggestions? Please, its urgent.

Thanks.
dkkundudolan
Experienced Developer
Experienced Developer
 
Posts: 83
Joined: Mon Mar 03, 2008 12:50 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 16 guests