thrownCardsImgs[thrownCardIndex].setImageBitmap(null) this will clear the image from your ImageView (card).
On May 8, 1:33 pm, Sheepz <[email protected]> wrote: > can you elaborate on that? > > On Apr 7, 6:51 pm, Streets Of Boston <[email protected]> wrote: > > > > > Try to do setImageBitmap(null) instead. > > > On Apr 7, 6:10 pm, Sheepz <[email protected]> wrote: > > > > anyone? any ideas? please?! > > > > On Apr 4, 12:34 pm, Sheepz <[email protected]> wrote: > > > > > Hi all, i'm making a little card game in order to learn the more > > > > interesting stuff of the UI and I have a question: > > > > i want to show 5 cards on the table, for that i have made 5 imageviews > > > > in the xml: > > > > <AbsoluteLayout > > > > android:id="@+id/cardsThrown" > > > > android:layout_height="wrap_content" > > > > android:layout_width="wrap_content" > > > > > android:layout_toRightOf="@+id/deck"> > > > > > <ImageView > > > > android:layout_width="72px" > > > > android:layout_height="96px" > > > > > android:id="@+id/card5" > > > > android:layout_x="0px" > > > > android:layout_y="0px" > > > > /> > > > > <ImageView > > > > android:layout_width="72px" > > > > android:layout_height="96px" > > > > > android:id="@+id/card4" > > > > android:layout_x="12px" > > > > android:layout_y="0px" > > > > /> > > > > <ImageView > > > > android:layout_width="72px" > > > > android:layout_height="96px" > > > > android:id="@+id/card3" > > > > android:layout_x="24px" > > > > android:layout_y="0px" > > > > /> > > > > <ImageView > > > > android:layout_width="72px" > > > > android:layout_height="96px" > > > > > android:id="@+id/card2" > > > > android:layout_x="36px" > > > > android:layout_y="0px" > > > > /> > > > > <ImageView > > > > android:layout_width="72px" > > > > android:layout_height="96px" > > > > > android:id="@+id/card1" > > > > android:layout_x="48px" > > > > android:layout_y="0px" > > > > /> > > > > > </AbsoluteLayout> > > > > </RelativeLayout> > > > > > as you might notice here, i'm doing them with an overlap since the uer > > > > should be able to pick up the last card and should therefore see it, > > > > but the other 4 are just so he'll know what was thrown lastly. > > > > my problem is: > > > > in the begining the imageviews have no src, but once i give them an > > > > image source (using code: > > > > thrownCardsImgs[thrownCardIndex]. > > > > > > > > setImageResource(cards[thrownCardIndex].getImageResourceId()); > > > > ) i dont know how i can undo it - i can't set the imageResourceId to > > > > null since it is an int type so is there something like -1 or some > > > > constant value that means null? > > > > P.s., i know about visibility, i'd rather not use it here unless i > > > > really have to, since it'll require a bunch or refactoring that i > > > > prefer to avoid... > > > > Thanks, > > > > Sh- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

