java - Check BitmapDescriptor for null -


i want check bitmapdescriptor null.

the documentation bitmapdescriptorfactory.fromasset states that:

returns bitmapdescriptor loaded asset or null if failed load.

    bitmapdescriptor bd = bitmapdescriptorfactory.fromasset("markerimages/filename.png");     if (bd == null) {         // dosomething...     } 

despite this, unable catch bitmapdescriptor in null state - when pass filename not exist, fromasset method not return null.

it may fromasset method doesn't return null, perhaps returns same defaultmarker() returns. (i.e. documentation wrong)

i'd check whether value (presumably non-existent) asset either '==' or .equals defaultmarker(). how detect non-existent asset.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -