And this also broke another image. Fixing that one by changing the name broke a 3rd image. Fixing that broke a 4th. Changed all 4 image names and now all work properly.
On Jun 6, 8:11 pm, Tollas <tolla...@gmail.com> wrote: > I have no idea why, but changing the file name to anything that > doesn't begin with the letter "a" seems to work. I had tried different > file names, but all of them began with a. > I don't have any idea why this would affect anything. I have other > files the same size (both in pixels and in kb) that begin with "a" > that work just fine. > > I guess since as a user the file name doesn't matter, it's not that > big of a deal, but it would be nice to know why! > > On Jun 5, 5:55 pm, Tollas <tolla...@gmail.com> wrote: > > > Yes, I have tried that. Same result. > > I've also tried making it an ImageButton and ImageView with the same > > result. > > > On Jun 5, 3:48 pm, Gubatron <gubat...@gmail.com> wrote: > > > > Did you try passing the drawable on the Button XML? > > > > ... android:background="@drawable/attack_any" /> > > > > or you can only obtain the drawable at runtime? (dynamic drawable) > > > > On May 28, 1:43 pm, Tollas <tolla...@gmail.com> wrote: > > > > > <Button > > > > android:id="@+id/attack_ability_button" > > > > android:layout_width="52dp" > > > > android:layout_height="52dp" > > > > android:layout_x="10dp" > > > > android:layout_y="70dp"/> > > > > > final Button attack_ability_button = > > > > (Button)findViewById(R.id.attack_ability_button); > > > > attack_ability_button.setBackgroundDrawable(getResources().getDrawable(R.drawable.attack_any)); > > > > > My problem is that when I use the attack_any drawable to create the > > > > button, it just isn't there. > > > > If I change to another image of the same size, the button shows up > > > > just fine. > > > > I've tried replacing the image file, renaming it, resizing it. Always > > > > with the same results. > > > > I tried using the attack_any drawable for another button and it > > > > disappears as well. > > > > I've also tried moving the button and changing its size, but the > > > > problem persists. > > > > I've even tried drawing the background in XML rather than java and it > > > > still will not show up. > > > > > attack_any.png is a 60x60px image 1kb in size. > > > > > Scroll View > > > > -----Absolute Layout -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en