Reputation: 1
When I tried to use the options
of the BitmapFactory
as follows:
BitmapFactory.Options options = new BitmapFactory().Options();
eclipse underscores the options()
on the right hand side with red squiggle, despite all the required packages are imported. How to solve it?
Upvotes: 0
Views: 59
Reputation: 76468
You where so close:
BitmapFactory.Options options = new BitmapFactory.Options();
You want to instantiate the Options not the Factory
If if helps you make sense of it, you could also import the options
import static android.graphics.BitmapFactory.Options;
Options options = new Options();
Upvotes: 2
Reputation: 2693
BitmapFactory.Options options = new BitmapFactory.Options();
Not
BitmapFactory.Options options = new BitmapFactory().Options();
Upvotes: 2