Android:LinearLayout,底部有2个按钮

瓦瓦诺普洛斯

我想在视图底部并排设置2个按钮来设置我的linearlayout。

今天,使用我的代码,线性布局位于顶部:(

我的错误在哪里?

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#0099CC"
    android:orientation="vertical"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingTop="@dimen/activity_vertical_margin" >

     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:gravity="bottom" >

         <LinearLayout
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginLeft="5dp"
             android:layout_marginRight="5dp"
             android:layout_weight="1"
             android:orientation="vertical" >

             <Button
                 android:id="@+id/startact_btn_connect"
                 style="?android:attr/borderlessButtonStyle"
                 android:layout_width="fill_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="10dp"
                 android:background="@drawable/bg_blue_button_login"
                 android:text="Se connecter"
                 android:textColor="@color/blanc" />

             <View
                 android:layout_width="fill_parent"
                 android:layout_height="3dp"
                 android:layout_marginBottom="10dp"
                 android:background="@color/blue_pressed" />
         </LinearLayout>

         <LinearLayout
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginLeft="5dp"
             android:layout_marginRight="5dp"
             android:layout_weight="1"
             android:orientation="vertical" >

             <Button
                 android:id="@+id/startact_btn_view_annonces"
                 style="?android:attr/borderlessButtonStyle"
                 android:layout_width="fill_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="10dp"
                 android:background="@drawable/bg_blue_dark_button_login"
                 android:text="Voir les annonces"
                 android:textColor="@color/blanc" />

             <View
                 android:layout_width="fill_parent"
                 android:layout_height="3dp"
                 android:layout_marginBottom="10dp"
                 android:background="@color/blue_dark_pressed" />
         </LinearLayout>

     </LinearLayout>

</LinearLayout>
沙布卢克

设置android:layout_height="match_parent"为LinearLayout的第一个孩子

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingTop="@dimen/activity_vertical_margin" >

     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:layout_gravity="top"
         android:gravity="bottom" >

         <!-- content -->

     </LinearLayout>

</LinearLayout>

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

LinearLayout 在底部推出按钮

来自分类Dev

Android 2底部按钮并排

来自分类Dev

Android 2底部按钮并排

来自分类Dev

Android:创建一个带有边框底部的按钮

来自分类Dev

屏幕底部的Android Lollipop LinearLayout

来自分类Dev

使用LinearLayout将按钮对齐到底部

来自分类Dev

android:NestedScrollview底部的两个按钮已附加

来自分类Dev

Android LinearLayout用按钮填充

来自分类Dev

如何在LinearLayout中对齐屏幕底部的按钮

来自分类Dev

滚动时,LinearLayout中的“显示按钮”始终位于屏幕底部

来自分类Dev

如何在LinearLayout中对齐屏幕底部的按钮

来自分类Dev

Android xml,2按钮在LinearLayout中使用minheight,而2按钮不在一行中

来自分类Dev

滚动视图底部的Android按钮

来自分类Dev

在顶部放置1个标签,在底部放置1个输入,并在左侧放置2个按钮

来自分类Dev

具有相同高度但内容长度不同且底部有一个按钮的列

来自分类Dev

Android-无法在LinearLayout中同时显示两个按钮

来自分类Dev

在linearLayout(android kotlin)中的工具栏顶部放置一个按钮

来自分类Dev

单击并在 LinearLayout android studio 中仅选择一个按钮

来自分类Dev

圆形可点击的配置文件图像,在css底部具有一个按钮

来自分类Dev

把按钮放在我最后一个底部的底部

来自分类Dev

对齐底部的两个按钮

来自分类Dev

div中有2个按钮的grails

来自分类Dev

div中有2个按钮的grails

来自分类Dev

java,带有2个按钮的窗口

来自分类Dev

只有 2 个角的按钮

来自分类Dev

Android-在LinearLayout外部添加按钮

来自分类Dev

Android:TableRow中的2个按钮

来自分类Dev

带有底部边距和 state_pressed 的 Android 按钮

来自分类Dev

BorderContainer dojo,顶部有2个ContentPane,底部有1个

Related 相关文章

  1. 1

    LinearLayout 在底部推出按钮

  2. 2

    Android 2底部按钮并排

  3. 3

    Android 2底部按钮并排

  4. 4

    Android:创建一个带有边框底部的按钮

  5. 5

    屏幕底部的Android Lollipop LinearLayout

  6. 6

    使用LinearLayout将按钮对齐到底部

  7. 7

    android:NestedScrollview底部的两个按钮已附加

  8. 8

    Android LinearLayout用按钮填充

  9. 9

    如何在LinearLayout中对齐屏幕底部的按钮

  10. 10

    滚动时,LinearLayout中的“显示按钮”始终位于屏幕底部

  11. 11

    如何在LinearLayout中对齐屏幕底部的按钮

  12. 12

    Android xml,2按钮在LinearLayout中使用minheight,而2按钮不在一行中

  13. 13

    滚动视图底部的Android按钮

  14. 14

    在顶部放置1个标签,在底部放置1个输入,并在左侧放置2个按钮

  15. 15

    具有相同高度但内容长度不同且底部有一个按钮的列

  16. 16

    Android-无法在LinearLayout中同时显示两个按钮

  17. 17

    在linearLayout(android kotlin)中的工具栏顶部放置一个按钮

  18. 18

    单击并在 LinearLayout android studio 中仅选择一个按钮

  19. 19

    圆形可点击的配置文件图像,在css底部具有一个按钮

  20. 20

    把按钮放在我最后一个底部的底部

  21. 21

    对齐底部的两个按钮

  22. 22

    div中有2个按钮的grails

  23. 23

    div中有2个按钮的grails

  24. 24

    java,带有2个按钮的窗口

  25. 25

    只有 2 个角的按钮

  26. 26

    Android-在LinearLayout外部添加按钮

  27. 27

    Android:TableRow中的2个按钮

  28. 28

    带有底部边距和 state_pressed 的 Android 按钮

  29. 29

    BorderContainer dojo,顶部有2个ContentPane,底部有1个

热门标签

归档