• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Three questions about images

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I hope you people can share your knowlage about the fallowing questions.

1. I have a Linear Layout with a background image and an ImageView component in it.
is it possible to add a new image that will stand in front of the Image View?

2. I have a Grid Layout containing nine numeric images, each have a white background image behind it:

the problem here is how to scale the white background, but not the image with the number.
I can change the line imageView.setLayoutParams(new GridView.LayoutParams(28, 28));
to something like imageView.setLayoutParams(new GridView.LayoutParams(58, 28));
but this stretch both the number and the white background.
I attach a file with two screen shots. the top one is what I'm trying to achieve and the bottom is what I have now.

3. how do I set an application icon? android documentation says I have to add this line
to my manifest file: <application android:icon="@drawable/icon" >
where drawable/icon refer to a png file named "icon". well, I have that png file, put it in res/drawable
and add that line to the manifest. no result. I don't see my icon but that green default android icon.
what is missing here?

Thanks,
Dov
keypad.png
[Thumbnail for keypad.png]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

3. how do I set an application icon? android documentation says I have to add this line
to my manifest file: <application android:icon="@drawable/icon" >
where drawable/icon refer to a png file named "icon". well, I have that png file, put it in res/drawable and add that line to the manifest.


This sounds correct. Try uninstalling the app, and then install a clean build (do an ant clean before the actual build) - there could be some caching going on.
 
Dov Ezra
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Icon problem solved.
the problem is the way eclipse look for the icon file.
Although I had the icon.png in res/drawable, I didn't have it on res/drawable-hdp,
res/drawable-ldp and res/drawable-mdp. those folders contained only the default green icon.

now its working fine. :-)
 
it's a teeny, tiny, wafer thin ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic