Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development

Application Development Dev Lounge for the Coder Folks



Reply
 
LinkBack Thread Tools
Old March 9th, 2009, 10:57 PM   #1 (permalink)
New Member
 
Join Date: Mar 2009
Posts: 3
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help......clearing image from an ImageButton?

Hi All,

So I am toying around with a simple app which has an image on a ImageButton, and when clicked it uses the ImageButton.setImageResource() to set the image on the button...simple enough.

public void onClick(View view) {
myButton.setImageResource(R.Drawable.icon);
}

public void codeToClearImageButton(View view) {
/* help me!! */
}

My question is how do I remove the image from the ImageButton so it is blank like it was in its original state? I can't find anything like a unsetImageResource() or something like that. Anyone have any pointers?

Thanks.

stover is offline  
Reply With Quote
Sponsors
Reply

Bookmarks


Go Back   Android Forums > Android Development > Application Development User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ImageButton not displayed Tollas Application Development 4 June 27th, 2011 02:09 AM
How to get the position of the imageButton clicked, contained in the gridview control? fashaikh Introductions 1 December 6th, 2010 02:09 AM
Search - combine textview with imagebutton tanion Developer 101 2 October 8th, 2010 08:04 AM
combine image and text in an ImageButton KittyA Developer 101 1 August 31st, 2010 01:32 AM
ImageButton Issues manurules3 Application Development 0 April 30th, 2010 06:57 PM



All times are GMT -5. The time now is 02:16 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo