zoukankan      html  css  js  c++  java
  • android:layout_weight属性的简单使用

    效果:

    style.xml

    <style name="etStyle2">
            <item name="android:layout_width">match_parent</item>
            <item name="android:layout_height">wrap_content</item>
            <item name="android:background">@drawable/corner_edit</item>
        </style>

    activity_test.xml

            <LinearLayout 
                    android:layout_marginTop="5dp"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:gravity="center_vertical">
                    <TextView 
                        android:layout_width="98dp"
                        android:layout_height="wrap_content"
                        android:text="税款所属期"/>
                    <EditText 
                        style="@style/etStyle2"
                        android:layout_weight="0.5"/>
                    <TextView 
                        style="@style/tvStyle"
                        android:text="至"/>
                    <EditText 
                        style="@style/etStyle2"
                        android:layout_weight="0.5"/>
                </LinearLayout>
  • 相关阅读:
    Redis 分布式锁
    Angular VS Blzaor
    Chorme 跨域的快捷解决
    旋转3角形
    .Netcore AD 操作
    .Netcore 2.2 和3.1 的模板
    Command3
    CSS Selector
    弹性盒子
    Label_strange_labels
  • 原文地址:https://www.cnblogs.com/yshyee/p/3410833.html
Copyright © 2011-2022 走看看