SlidingUpPanelLayout库的Android绝对高度

时间:2017-05-29 21:17:29

标签: android

我正在我的项目中使用SlidingUpPanelLayout库,我希望在面板上有简单的EditText,问题是当我在editText上输入多行时,SlidingUpPanelLayout面板高度不调整大小和我的编辑文本高度只是修复,我如何解决这个问题,使库的绝对高度在编辑文本上有多行?

<com.sothree.slidinguppanel.SlidingUpPanelLayout
    android:id="@+id/slidingUpPanelLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="bottom"
    sothree:umanoPanelHeight="50dp"
    sothree:umanoShadowHeight="3dp">

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/content_background"
        android:orientation="vertical">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/messagesView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="55dp"/>
    </FrameLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clickable="true"
        android:focusable="false"
        android:orientation="vertical">

        <LinearLayout
            android:id="@+id/message_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:gravity="center_vertical"
            android:minHeight="50dp"
            android:orientation="horizontal"
            android:paddingLeft="5dp"
            android:paddingRight="5dp"
            android:visibility="visible">

            <TextView
                android:id="@+id/iconPostMessage"
                fontPath="fonts/fontawesome.ttf"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_marginLeft="5dp"
                android:layout_marginRight="5dp"
                android:gravity="center|right"
                android:paddingLeft="5dp"
                android:paddingRight="5dp"
                android:shadowColor="#22000000"
                android:text="&#xf060;"
                android:textColor="@color/gray_text_color"
                android:textSize="22sp"
                tools:ignore="MissingPrefix"/>

            <EditText
                android:id="@+id/channelMessageBox"
                fontPath="fonts/shabnam_bold.ttf"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginRight="10dp"
                android:layout_weight="1"
                android:background="@drawable/shape_normal_editbox_style"
                android:focusable="true"
                android:hint="@string/please_enter_message_or_attach"
                android:maxHeight="90dp"
                android:minHeight="40dp"
                android:maxLines="1"
                android:minLines="1"
                android:textColor="@color/gray_text_color"
                android:textColorHint="@color/gray_text_color"
                android:textSize="12sp"
                tools:ignore="MissingPrefix"/>

            <TextView
                android:id="@+id/iconNotifyPostMessage"
                fontPath="fonts/fontawesome.ttf"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_marginRight="5dp"
                android:gravity="center|right"
                android:paddingLeft="5dp"
                android:paddingRight="15dp"
                android:shadowColor="#22000000"
                android:text="&#xf0f3;"
                android:textColor="@color/gray_text_color"
                android:textSize="22sp"
                tools:ignore="MissingPrefix"/>

            <TextView
                android:id="@+id/iconBigTextContainer"
                fontPath="fonts/fontawesome.ttf"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_marginRight="5dp"
                android:gravity="center|right"
                android:paddingLeft="5dp"
                android:paddingRight="15dp"
                android:shadowColor="#22000000"
                android:text="&#xf034;"
                android:textColor="@color/gray_text_color"
                android:textSize="22sp"
                tools:ignore="MissingPrefix"/>

            <TextView
                android:id="@+id/iconAttachment"
                fontPath="fonts/fontawesome.ttf"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_marginRight="15dp"
                android:gravity="center|right"
                android:paddingLeft="5dp"
                android:shadowColor="#22000000"
                android:text="&#xf0c6;"
                android:textColor="@color/gray_text_color"
                android:textSize="22sp"
                tools:ignore="MissingPrefix"/>
        </LinearLayout>

    </LinearLayout>

</com.sothree.slidinguppanel.SlidingUpPanelLayout>

0 个答案:

没有答案