• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting width and height must be >0

 
Ranch Hand
Posts: 92
Android
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am capturing the view of the scroll view and create the bimap object and then saving the image into the device

while doing so i am facing error

Caused by: java.lang.IllegalArgumentException: width and height must be > 0

can anyone fix the issue ! what i am doing wrong






 
Bartender
Posts: 1868
81
Android IntelliJ IDE MySQL Database Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you double checked to see the values to make sure that they are greater then zero?
You could find this out using LogCat to print the values to the log for native_resit.getChildAt(0).getHeight() and native_resit.getChildAt(0).getWidth() before calling
Just a thought,
Pete
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic