Giter Club home page Giter Club logo

Comments (4)

TracyEminem avatar TracyEminem commented on May 28, 2024

ChatView 继承自RelativeLayout

from panelswitchhelper.

YummyLau avatar YummyLau commented on May 28, 2024

@TracyEminem 布局写的有些问题。ChatView 还包含着 ConstraintLayout,最后才包含这 PanelSwitchLayout。PanelSwitchLayout 写在最外层,其他内容写在ContentContainer就好,ContentContainer能确保不抬起。

from panelswitchhelper.

TracyEminem avatar TracyEminem commented on May 28, 2024

按照你说的改了一下,发现还是存在这个问题。

<com.effective.android.panel.view.PanelSwitchLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/panel_switch_layout"
android:background="@drawable/theme_backgrand"
xmlns:app="http://schemas.android.com/apk/res-auto"
>

<com.effective.android.panel.view.ContentContainer
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="vertical"
        app:empty_view="@id/empty_view"
        app:edit_view="@id/et_message"
        android:id="@+id/content_view"
        >

    <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
        <include layout="@layout/item_toolbar"
                android:id="@+id/toolbar"

                />

        <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/icon_more"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="@id/toolbar"
                app:layout_constraintBottom_toBottomOf="@id/toolbar"
                android:layout_marginRight="@dimen/margin"
                android:id="@+id/iv_more"
                />
    </androidx.constraintlayout.widget.ConstraintLayout>

    <tracyeminem.com.peipei.ui.chat.JChat.ChatView
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:id="@+id/chat_view"
            >

        <tracyeminem.com.peipei.ui.chat.JChat.DropDownListView
                android:id="@+id/lv_chat"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:cacheColorHint="#00000000"
                android:divider="@null"
                android:fadingEdge="none"
                android:fitsSystemWindows="true"
                android:listSelector="#00000000"
                android:scrollbarStyle="outsideOverlay"
                android:scrollingCache="false"
                android:smoothScrollbar="true"
                android:transcriptMode="normal"/>
        <com.effective.android.panel.view.EmptyView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:id="@+id/empty_view"
                />

        <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/icon_gift"
                android:layout_alignParentRight="true"
                android:layout_alignParentBottom="true"
                android:layout_margin="@dimen/margin"
                android:id="@+id/iv_gift"
                />

    </tracyeminem.com.peipei.ui.chat.JChat.ChatView>


    <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:minHeight="44dp"
            android:gravity="bottom"
            >
        <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                android:background="@color/fifty_percent_white"
                android:id="@+id/v_line"
                />

        <ImageView
                android:layout_width="23dp"
                android:layout_height="23dp"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                android:id="@+id/iv_func"
                android:layout_marginRight="@dimen/margin"
                android:background="@drawable/icon_keyboard_add"
                />

        <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="@color/white"
                android:textSize="@dimen/little_text"
                android:text="发送"
                android:id="@+id/tv_send"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                android:layout_marginRight="10dp"
                android:background="@drawable/shape_20white_rectangle_background"
                android:paddingLeft="5dp"
                android:paddingRight="5dp"
                android:paddingTop="5dp"
                android:paddingBottom="5dp"
                android:gravity="center"
                android:visibility="invisible"
                />

        <ImageView
                android:layout_width="23dp"
                android:layout_height="23dp"
                app:layout_constraintRight_toLeftOf="@id/iv_func"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                android:layout_marginRight="12dp"
                android:id="@+id/iv_voice"
                android:background="@drawable/icon_keyboard_voice"
                />

        <ImageView
                android:layout_width="23dp"
                android:layout_height="23dp"
                app:layout_constraintRight_toLeftOf="@id/iv_func"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                android:layout_marginRight="12dp"
                android:id="@+id/iv_keyboard"
                android:visibility="invisible"
                android:background="@drawable/icon_keyboard"
                />


        <tracyeminem.com.peipei.ui.chat.JChat.RecordVoiceButton
                android:layout_width="0dp"
                android:layout_height="0dp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toLeftOf="@id/iv_keyboard"
                android:layout_marginRight="11dp"
                android:layout_marginLeft="@dimen/margin"
                android:background="@drawable/shape_20white_rectangle_background"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                android:layout_marginTop="7dp"
                android:layout_marginBottom="7dp"
                android:textColor="@color/white"
                android:textSize="@dimen/little_text"
                android:text="按住发语音"
                android:id="@+id/tv_send_voice"
                android:gravity="center"
                android:visibility="invisible"
                />

        <EditText
                android:id="@+id/et_message"
                android:layout_width="0dp"
                android:layout_height="40dp"
                android:layout_marginLeft="@dimen/margin"
                android:layout_marginTop="7dp"
                android:layout_marginRight="11dp"
                android:paddingBottom="10dp"
                android:background="@null"
                android:hint="发消息"
                android:maxLines="4"
                android:minHeight="35dp"
                android:textColor="@color/fifty_percent_white"
                android:textColorHint="@color/fifty_percent_white"
                android:textSize="@dimen/little_text"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toLeftOf="@id/iv_keyboard"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintVertical_bias="0.0" />


    </androidx.constraintlayout.widget.ConstraintLayout>

</com.effective.android.panel.view.ContentContainer>

<!-- 面板区域,仅能包含PanelView-->
<com.effective.android.panel.view.PanelContainer
        android:id="@+id/panel_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

    <!-- 每一项面板 -->
    <!-- panel_layout 用于指定面板该 ID 对应的布局 ,必须项-->
    <!-- panel_trigger 用于用户点击该 ID 对应的 View 时切换到该面板 -->
    <!-- panel_toggle  用于当该面板显示时 ,用户再次点击 panel_trigger 对应的 View 时是否回切输入法-->
    <!--            <com.effective.android.panel.view.PanelView-->
    <!--                    android:id="@+id/panel_emotion"-->
    <!--                    android:layout_width="match_parent"-->
    <!--                    android:layout_height="match_parent"-->
    <!--                    app:panel_layout="@layout/panel_emotion_layout"-->
    <!--                    app:panel_trigger="@id/emotion_btn" />-->

    <com.effective.android.panel.view.PanelView
            android:id="@+id/panel_addition"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:panel_layout="@layout/view_keyboard_funclayout"
            app:panel_trigger="@id/iv_func" />

</com.effective.android.panel.view.PanelContainer>

</com.effective.android.panel.view.PanelSwitchLayout>

from panelswitchhelper.

TracyEminem avatar TracyEminem commented on May 28, 2024

搞定了,不是框架的问题,最后也没找到原因,重写了一遍就好了,有点迷。

from panelswitchhelper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.