Lines Matching refs:dp
256 // dp/sp = (px/sp) / (px/dp) = (1/sp) / (1/dp)
305 // Convert Android device-independent-pixels (dp) to HTML size.
306 private String dp(int dp) {
307 // HTML px's are scaled just like dp's, so just add "px" suffix.
308 return Integer.toString(dp) + "px";
313 // Convert sp to dp's.
314 float dp = sp * mDpPerSp;
316 dp *= 1.3;
317 // Convert dp's to HTML size.
318 return dp((int)dp);
323 "body { margin-left:" + dp(48) + "; margin-right:" + dp(48) + "; " +
324 "margin-top:" + dp(96) + "; background-color:#fafafa; }" +
325 "img { width:" + dp(48) + "; height:" + dp(48) + "; }" +
326 "div.warn { font-size:" + sp(16) + "; margin-top:" + dp(16) + "; " +
328 "div.example { font-size:" + sp(14) + "; margin-top:" + dp(16) + "; " +
331 " margin-top:" + dp(24) + "; display:inline-block; color:#4285F4; " +
332 " height:" + dp(48) + "; font-weight:bold; }" +