android - Convert dp values to px values usable inside WebView (dp to CSS px) -
I am creating an HTML page from scratch and dynamically inserting it into a value, a I am trying to replicate the I also know the text of the I like ... and by placing them in the html file's CSS. My problem is that the values above are really big. The height of the action bar and the size of the text are very large, the same Then ... I'm converting If so, then value I got it i.e. < code> res.getDimensionPixelSize (R.dimen.actionbar_height) / res.getDisplayMetrics (). Density ... and the value as Was set. WebView .
WebView (inside html) in the
actionbar and its title inside.
dimens such a folder ...
mTitleSize = res.getDimensionPixelSize (R.dimen.actionbar_title_text); // 50dp mActionbarH = res.getDimensionPixelSize (R.dimen.actionbar_height); // 25sp
dimens values are used to display the actionbars in the rest of the app (not webview, but original Android
see inside a
relative layout ) and they look great.
50dp and
25sp values into pixels, not within a single country, see
Inside and
WebView ? Is the webpage provided in a different way than the original page?
dp in
px
webview and still seeing as the rest of the application ?
CSS in
px
Comments
Post a Comment