Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • 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
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

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: 43076
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. :-)
 
Getting married means "We're in love, so let's tell the police!" - and invite this tiny ad to the wedding:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic