Android布局方式及 xml容器

-- Android LinearLayout中实现水平方向控件居右
<LinearLayout android:layout_width="match_parent"
            android:layout_height="50dp"
            android:background="@color/white"
            android:orientation="horizontal" >

            <EditText
                android:id="@+id/phonetext"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:layout_marginLeft="15dp"
                android:layout_gravity="center_vertical"
                android:inputType="number"
                android:hint="请输入短信验证码"
                android:background="@null"/>

            <Button
                android:layout_width="wrap_content"
                android:layout_height="30dp"
                android:layout_marginRight="15dp"
                android:layout_marginTop="10dp"
                android:textSize="16dp"
                android:background="@drawable/tv_timemessage_bg"
                android:text="57秒"
                />

        </LinearLayout>

猜你喜欢

转载自blog.csdn.net/ShareUs/article/details/88748307
今日推荐