默认搜索栏显示奇怪;拇指漂浮在搜索栏上方

时间:2013-08-15 05:51:00

标签: android

我已尝试更改活动中每个项目的边距设置,但此问题仍然存在:

显然我没有发布图片所需的代表,所以在此截图:https://picasaweb.google.com/lh/photo/i5VUcPbVGwxOLc8TEjedKf71rd-Gd83gxbHnJBkd_MY?feat=directlink

搜索条的拇指部分浮在进度部分上方。这是XML:

            <LinearLayout
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_alignParentTop="true"
                android:layout_centerHorizontal="true"
                android:layout_marginBottom="85dp"
                android:layout_marginTop="15dp"
                android:orientation="vertical" >

                <Spinner
                    android:id="@+id/spinner1"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_marginBottom="25dp"
                    android:layout_weight="1" />

                <TextView
                    android:id="@+id/kessilBrightText"
                    android:layout_width="fill_parent"
                    android:layout_height="0dp"
                    android:layout_weight="1"
                    android:text="Brightness"
                    android:textSize="@dimen/LargeText" />

                <SeekBar
                    android:id="@+id/kessilBrightSeek"
                    android:layout_width="fill_parent"
                    android:layout_height="0dp"
                    android:layout_below="@+id/kessilBrightText"
                    android:layout_weight="1" />

                <TextView
                    android:id="@+id/kessilColorText"
                    android:layout_width="fill_parent"
                    android:layout_height="0dp"
                    android:layout_weight="1"
                    android:text="Color"
                    android:textSize="@dimen/LargeText" />

                <SeekBar
                    android:id="@+id/kessilColorSeek"
                    android:layout_width="fill_parent"
                    android:layout_height="0dp"
                    android:layout_weight="1" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_weight="1" >

                    <Button
                        android:id="@+id/showSettings"
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:layout_margin="10dp"
                        android:layout_weight="1"
                        android:background="@drawable/btn_blue_outline"
                        android:onClick="showSettings"
                        android:text="Settings" />

                    <Button
                        android:id="@+id/playButton"
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:layout_margin="10dp"
                        android:layout_weight="3"
                        android:background="@drawable/btn_blue_outline"
                        android:onClick="playorstopScene"
                        android:text="Play Scene" />
                </LinearLayout>
            </LinearLayout>

            <ImageView
                android:id="@+id/imageView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:layout_alignParentLeft="true"
                android:src="@drawable/logo_bg" />


                            <com.pheelicks.visualizer.VisualizerView
            android:id="@+id/visualizerView"
            android:layout_width="100dp"
            android:layout_height="75dp"
            android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true" />

有人可以为此提供修复吗?我曾多次尝试在Eclipse中清理和重建项目。感谢

1 个答案:

答案 0 :(得分:0)

您的搜索栏layout_height应大于零。使用wrap_content,似乎没有必要为这种标准布局设置权重的原因。一般来说,重新考虑布局结构。