怎么能让item中的按钮置底

解决方案 »

  1.   

    <LinearLayout
            android:id="@+id/logout"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/item_lin"
            android:orientation="horizontal">        <Button
                android:id="@+id/exitbtn"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:layout_gravity="bottom"
                android:background="@color/button_exit"
                android:text="退出"
                android:textColor="@color/white" />
        </LinearLayout></RelativeLayout>
      

  2.   

    不能置底的原因 : 
    你的 LinearLayout 的高度 是 wrap_content, 那么其高度 与 Button 高度是一样的; 
    累死  也 无法 在 LinearLayout 中 置底; Button 中设置一个 margin_top 20dip 属性 那么 看起来就置底了
    想实现啥效果 给个草图 我帮你设计下
      

  3.   

    使用 RelativeLayout LinearLayout 无法 置底
      

  4.   

    使用 RelativeLayout 就行了
      

  5.   

    我的就是RelativeLayout中的LinearLayout 
      

  6.   

     android:layout_alignParentBottom="true" 这个属性应该写在linearlayout里面
      

  7.   

    android:layout_alignParentBottom="true"  这个我加上了  不过这个只能将退出的button置底于当前RelativeLayout或者LinearLayout的整个类似panel的底下 不是整个页面的底下。后来我想着用一个  RelativeLayout或者一个LinearLayout把中间的地方给撑起来 ,但是这个要区分手机的屏幕大小,不能适配全部机型大小。所以还是没有好的解决方法