每周一博

HTML和Android简单对比

2018-05-29  本文已影响2人  健身营养爱好者

前言

HI,欢迎来到裴智飞的《每周一博》。今天是十一月第四周,我给大家简单对比一下HTML和Android的区别。

html android
h1~h6,p TextView
a,button,input[type=button] Button
img ImageView
video VideView(基本上很少用,采用第三方控件)
div,header,section… LinearLayout,FrameLayout,RelativeLayout中的一个
ul RecyclerView,ListView
input[type=checkbox] CheckBox,Switch
input[type=radio] RadioButton
input[type=range] SeekBar
input[type=select] Spinner(基本上用第三方)
input autocomplete="on" AutoCompleteTextView
textarea EditText
iframe WebView
css android
color textColor
font-weight textstyle="bold" 不能直接设置多粗
font-size textSize
text-align:center gravity="center_horizontal" center是水平垂直都居中
margin:0 auto layout_gravity="center_horizontal"(FrameLayout和LinearLayout中);layout_centerHorizontal="true" (RelativeLayout中)
transition animateLayoutChanges="true" 部分有效果
position:absolute;
left: 5px;
<b>FrameLayout和LinearLayout中:</b>
layout_gravity="left";
margin_left="5px";
<b>RelativeLayout中:</b>
align_parentLeft="true";
margin_left="5px";
background-image background="@drawable/xxx"
text-overflow:ellipsis android:maxEms="12";
android:singleLine="true";
android:ellipsize="end";
vertical-align: middle gravity="center_vertical"

结尾:

本周给大家简单介绍了HTML和Android的区别。感谢大家的阅读,我们下周再见。

上一篇 下一篇

猜你喜欢

热点阅读