布局被点击按钮
后调整大小我创建了一个线性布局,其中i添加水平滚动视图和我添加几个按钮在上水平滚动视图的运行时间。最初看起来很好,但点击几个按钮后,当我点击类别按钮类别容器调整大小,如图像所示。
请帮助我为什么发生这种情况是什么问题 谢谢。
这里是布局文件
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/root_view_deals_screen"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/white" >
<RelativeLayout
android:id="@+id/RelativeLayout_category_panel_main"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/color_category_panel_bg"
android:visibility="gone" >
<ImageView
android:id="@+id/ImageView_previous"
android:layout_width="15dp"
android:layout_height="20dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:src="@drawable/arrow_left"
android:visibility="gone" />
<HorizontalScrollView
android:id="@+id/ScrollView_category_panel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/ImageView_next"
android:layout_toRightOf="@+id/ImageView_previous"
android:fadingEdgeLength="15dp"
android:scrollbars="none" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/Layout_category_panel_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
</LinearLayout>
</HorizontalScrollView>
<ImageView
android:id="@+id/ImageView_next"
android:layout_width="15dp"
android:layout_height="20dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/arrow_right"
android:visibility="gone" />
</RelativeLayout>
<com.techdeals.rest.ui.widget.IndexableListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/RelativeLayout_category_panel_main"
android:divider="@drawable/list_divider"
android:drawSelectorOnTop="false" />
<ImageView
android:id="@+id/ImageView_list_divider"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@android:id/list"
android:scaleType="fitXY"
android:src="@drawable/list_divider" />
不要发表这些很多次,你可以编辑原始帖子... – Pragnani 2013-02-26 11:22:17
所有的东西在relativeLayout->设置它的高度为25dp。然后你的设定去。 – 2013-02-26 11:28:13
@FahadIshaque感谢您的回答,但按钮上的文字来自底部 – 2013-02-26 11:53:54
Here is Button.xml file which i am inflating at runtime .
<?xml version="1.0" encoding="utf-8"?>
<Button xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/Button_category_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:paddingBottom="10dp"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:paddingTop="10dp"
android:textSize="16dp"
android:textStyle="bold" />
这里粘贴一些代码,这将有助于我们解决好模式 – 2013-02-26 11:04:34
你的问题是高度也在不断缩小?这只是话题转移的问题吗? – 2013-02-26 11:05:41
您可以发布布局的XML吗? – m0skit0 2013-02-26 11:07:01