Colons and semicolons are two types of punctuation. Colons (:) are used in sentences to show that something is following, like a quotation, example, or list. Semicolons (;) are used to join two independent clauses, or two complete thoughts that could stand alone as complete sentences.
Solution. The / operator is used for division whereas % operator is used to find the remainder.
Answer: First of all, / is an assignment operator and // is a comparison operator. / operator is used to assign value to a variable and //operator is used to compare two-variable or constants.
There is no difference at runtime. The only difference between the two types of quotes is the one you have already pointed out: Single quotes need to be escaped inside single quoted string literals but not inside double-quoted string literals.
These are density-independent resources. The system does not scale resources tagged with this qualifier, regardless of the current screen's density.
For instance:
The dot will appear small on xxhdpi, big on ldpi.
However, the resource resolver will match a specific qualifier if it exists.
For instance
On a Lollipop (API 21) hdpi device, the bitmap is used.
On a Lollipop (API 21) xhdpi device, the vector is used.
These resources take precedence in any dpi.
For instance
On a Lollipop (API 21) hdpi device, the vector is used.
On a Lollipop (API 21) xhdpi device, the vector is used.
Note: anydpi was added in change Ic3288d0236fe0bff20bb1599aba2582c25b0db32.
I use drawable-nodpi for everything, including plenty of large graphics for my game. An undocumented consequence of scaling up your graphics with -anydpi is that it increases memory use exponentially. So if you have a 1MB graphic in drawable, it will get scaled to 4MB, 16MB, 64MB, or more depending on the resolution of the user device. And device resolutions keep going up. That scaling up doesn't actually increase the sharpness of the graphic, of course. The drawing actions can direct how large each graphic should be in relation to screen size anyway, no need to bloat the app. Nor with multiple resolution specific draw folders.
The source code contains the following comments (line 639):
/**
* Value for {@link #densityDpi} for resources that scale to any density (vector drawables).
* {@hide}
*/
public static final int DENSITY_DPI_ANY = 0xfffe;
/**
* Value for {@link #densityDpi} for resources that are not meant to be scaled.
* {@hide}
*/
public static final int DENSITY_DPI_NONE = 0xffff;
Hope this clears out the confusion.
nodpi
: Resources for all densities. These are density-independent resources. The system does not scale resources tagged with this qualifier, regardless of the current screen's density.
anydpi
: This qualifier matches all screen densities and takes precedence over other qualifiers. This is useful for vector drawables. Added in API Level 21.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With