在线性布局问题之上的FrameLayout

时间:2017-02-21 00:28:27

标签: android layout android-framelayout

伙计们,我有一个问题,由于我在Android布局中缺乏XP,我还没能解决问题,目前我有一个相对布局,在线性布局顶部有一个滑块布局,信息我需要在底部显示一个包含FAB的FrameLayout。问题是,当我运行应用程序时,线性布局的内容会在Framelayout后面,因此FAB按钮不会让用户看到它背后的文本,实际文本(LL内部)应位于按钮顶部。

以下是截图.. enter image description here

正如您所看到的,当我运行应用程序时,Imovel Codigo这个词落后于我的FAB,我已经在framelayout中设置了以下内容:

    <?xml version="1.0" encoding="utf-8"?>

<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:fab="http://schemas.android.com/apk/res-auto"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">



<LinearLayout
    android:orientation="vertical"
    android:layout_below="@+id/toolbar_info"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:weightSum="1"
    android:layout_weight="0.9">


        android:scaleType="centerCrop" />-->

    <com.daimajia.slider.library.SliderLayout
        android:id="@+id/product_detail_img_slider"
        android:layout_width="match_parent"
        android:layout_height="170dp"/>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">

         <LinearLayout
            android:layout_width="match_parent"
            android:orientation="vertical"
            android:layout_height="wrap_content"
            android:id="@+id/LL_prod_detail_main">


                <LinearLayout
                   android:orientation="horizontal"
                   android:layout_width="match_parent"
                   android:id="@+id/LL_product_Value"
                   android:layout_height="wrap_content"
                   android:layout_marginTop="15dp"
                   android:layout_marginLeft="15dp"
                   android:layout_marginRight="15dp">



                   <TextView
                       android:layout_width="wrap_content"
                       android:text="Preço:"
                       android:layout_height="wrap_content"
                       android:layout_marginTop="2dp"
                       android:layout_marginRight="15dp" />

                   <TextView
                       android:layout_width="match_parent"
                       android:id="@+id/txtProductValue"
                       android:hint="Product Valor"
                       android:layout_height="match_parent"
                       android:layout_marginTop="2dp"
                       android:gravity="right" />
            </LinearLayout>


        <View
            android:layout_width="fill_parent"
            android:layout_marginTop="10dp"
            android:layout_height="5dp"
            android:background="#c0c0c0"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp" />


        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:id="@+id/LL_product_address"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp">



            <TextView
                android:layout_width="wrap_content"
                android:text="Endereço:"
                android:layout_height="wrap_content"
                android:layout_marginTop="2dp"
                android:layout_marginRight="15dp" />



            <TextView
                android:layout_width="match_parent"
                android:id="@+id/txtProductAdd"
                android:gravity="right"
                android:hint="Product Endereço"
                android:layout_height="match_parent"
                android:layout_marginTop="2dp" />
        </LinearLayout>

        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:id="@+id/LL_product_city"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp">



            <TextView
                android:layout_width="wrap_content"
                android:text="Cidade:"
                android:layout_height="wrap_content"
                android:layout_marginTop="2dp"
                android:layout_marginRight="15dp" />


            <TextView
                android:layout_width="match_parent"
                android:id="@+id/txtProductCity"
                android:gravity="right"
                android:hint="Product Cidade"
                android:layout_height="match_parent"
                android:layout_marginTop="2dp" />
        </LinearLayout>


        <View
                android:layout_width="fill_parent"
                android:layout_marginTop="10dp"
                android:layout_height="5dp"
                android:background="#c0c0c0"
                android:layout_marginLeft="15dp"
                android:layout_marginRight="15dp" />

        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:id="@+id/LL_product_tipo_imovel"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp">


            <TextView
                android:layout_width="wrap_content"
                android:text="Tipo de Imovel:"
                android:layout_height="wrap_content"
                android:layout_marginTop="2dp"
                android:layout_marginRight="15dp" />


            <TextView
                android:layout_width="match_parent"
                android:id="@+id/txtProductType"
                android:gravity="right"
                android:hint="Product Tipo"
                android:layout_height="match_parent"
                android:layout_marginTop="2dp" />
        </LinearLayout>

        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:id="@+id/LL_product_info"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:layout_marginLeft="15dp"
            android:weightSum="1"
            android:layout_marginRight="15dp">



                <LinearLayout
                    android:layout_width="wrap_content"
                    android:orientation="horizontal"
                    android:layout_height="wrap_content"
                    android:layout_weight="0.3"
                    android:id="@+id/LL_suites">



                    <TextView
                        android:layout_width="wrap_content"
                        android:text="Quartos:"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="2dp"
                        android:layout_marginRight="15dp" />


                        <TextView
                            android:layout_width="match_parent"
                            android:id="@+id/txtProductRooms"
                            android:hint="1"
                            android:layout_height="match_parent"
                            android:layout_marginTop="2dp" />
                </LinearLayout>

            <LinearLayout
                android:layout_width="wrap_content"
                android:orientation="horizontal"
                android:layout_height="wrap_content"
                android:layout_weight="0.3"
                android:id="@+id/LL_baths">

                <TextView
                    android:layout_width="wrap_content"
                    android:text="Banheiros:"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="2dp"
                    android:layout_marginRight="15dp" />

                <TextView
                    android:layout_height="wrap_content"
                    android:layout_width="match_parent"
                    android:id="@+id/txtProductBath"
                    android:hint="2"
                    android:layout_marginTop="2dp" />

             </LinearLayout>

            <LinearLayout
                android:layout_width="wrap_content"
                android:orientation="horizontal"
                android:layout_height="wrap_content"
                android:layout_weight="0.3"
                android:id="@+id/LL_garage">


                <TextView
                    android:layout_width="wrap_content"
                    android:text="Garagem:"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="2dp"
                    android:layout_marginRight="10dp" />


                <TextView
                    android:layout_height="wrap_content"
                    android:layout_width="match_parent"
                    android:id="@+id/txtProductGarage"
                    android:hint="3"
                    android:layout_marginTop="2dp"
                    android:gravity="right" />

                </LinearLayout>

            </LinearLayout>


        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:id="@+id/LL_product_area"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp">



            <TextView
                android:layout_width="wrap_content"
                android:text="Area:"
                android:layout_height="wrap_content"
                android:layout_marginTop="2dp"
                android:layout_marginRight="15dp" />


            <TextView
                android:layout_height="wrap_content"
                android:layout_width="match_parent"
                android:id="@+id/txtProductArea"
                android:gravity="right"
                android:hint="Product Area"
                android:layout_marginTop="2dp" />
        </LinearLayout>

        <View
                android:layout_width="fill_parent"
                android:layout_marginTop="10dp"
                android:layout_height="5dp"
                android:background="#c0c0c0"
                android:layout_marginLeft="15dp"
                android:layout_marginRight="15dp" />


        <LinearLayout
                android:orientation="horizontal"
                android:layout_width="match_parent"
                android:id="@+id/LL_product_codigoSeller"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:layout_marginLeft="15dp"
                android:layout_marginRight="15dp">



                <TextView
                    android:layout_width="wrap_content"
                    android:text="Nome do Anunciante:"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="2dp"
                    android:layout_marginRight="15dp" />

                    <TextView
                        android:layout_height="wrap_content"
                        android:layout_width="match_parent"
                        android:gravity="right"
                        android:id="@+id/txtProductSeller"
                        android:hint="Product Vendedor"
                        android:layout_marginTop="2dp" />
             </LinearLayout>

        <LinearLayout
                android:orientation="horizontal"
                android:layout_width="match_parent"
                android:id="@+id/LL_product_codigoproduto"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:layout_marginLeft="15dp"
                android:layout_marginRight="15dp">



                <TextView
                    android:layout_width="wrap_content"
                    android:text="Código do Imóvel:"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="2dp"
                    android:layout_marginRight="15dp" />

                <TextView
                    android:layout_height="wrap_content"
                    android:layout_width="match_parent"
                    android:gravity="right"
                    android:id="@+id/txtProductCode"
                    android:hint="Imovel Codigo"
                    android:layout_marginTop="2dp" />
            </LinearLayout>






        </LinearLayout>

    </ScrollView>


</LinearLayout>



<FrameLayout
    android:layout_width="match_parent"
    android:layout_below="@id/LL_prod_detail_main"
    android:layout_gravity="bottom"
    android:layout_height="wrap_content">

    <com.getbase.floatingactionbutton.FloatingActionsMenu
        android:id="@+id/fabmenu_info_multiple_actions"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|right"
        fab:fab_labelStyle="@style/menu_labels_style"
        android:gravity="right"
        app:fab_addButtonColorNormal="@android:color/darker_gray"
        app:fab_addButtonColorPressed="@android:color/holo_orange_light"
        app:fab_addButtonPlusIconColor="@android:color/holo_orange_light"
        android:layout_marginBottom="16dp"
        android:layout_marginRight="16dp"
        android:layout_marginEnd="16dp">

    </com.getbase.floatingactionbutton.FloatingActionsMenu>

</FrameLayout>




</android.support.design.widget.CoordinatorLayout>

但它不起作用,SliderLayout是一个图像滑块

0 个答案:

没有答案