我使用具有动作条的自定义基础dialg布局...我有一个底部的按钮底部栏。如果最后一个按钮有两行,则完整TextView
可以在其父母LinearLayout
之外滑动......为什么会发生这种情况?水平线性布局 - 最后一个视图向外滑动
截图
我最后一次按下按钮显示的问题......最后一个按钮向下滑动...的屏幕截图显示从布局中llButtonBar
...
问题
布局
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1" >
<ScrollView
android:id="@+id/svContent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fillViewport="true" >
<View
android:id="@+id/vContent"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</ScrollView>
</LinearLayout>
<View
android:id="@+id/vDividerButtonBar"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="?android:attr/dividerHorizontal" />
<LinearLayout
android:id="@+id/llButtonBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/btNegative"
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<View
android:id="@+id/vVerticalDivider1"
android:layout_width="1dp"
android:layout_height="fill_parent"
android:background="?android:attr/dividerVertical" />
<Button
android:id="@+id/btNeutral"
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<View
android:id="@+id/vVerticalDivider2"
android:layout_width="1dp"
android:layout_height="fill_parent"
android:background="?android:attr/dividerVertical" />
<Button
android:id="@+id/btPositive"
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
呃,那是什么问题?你想让拉勒尔居中对齐吗? – 2014-11-25 12:39:35
我添加了第二个截图...希望现在更清晰... – prom85 2014-11-25 12:46:00