how to use sp and dp for android web application -


i new android development. using px font size later after research come know need use sp , dp density independent pixels.

i have replaced px dp in css not getting expected output.it not @ affecting page. googled how use dp , sp not getting proper example.

can please let me know replacing px sp enough or else need done? should made changes in app or server side css changes enough?

dp , sp not css properties, native android controls. should consider using

font-size: medium; font-size: small; 

etc.

for level of device independence on webview's.

you'll have better success using points (e.g. "pt") vs. pixels.

also make sure you're aware of meta tag:

<meta name="viewport" content="width=device-width" /> 

and associated properties scaling.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -