充电桩app代码

fragment_chat_content_common.xml 15KB

    <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/statusBar" android:layout_width="match_parent" android:layout_height="20dp" tools:background="#76daff" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <!-- 导航栏 --> <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/navBar" android:layout_width="match_parent" android:layout_height="44dp" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toBottomOf="@+id/statusBar" tools:background="#DC7633"> <ImageView android:id="@+id/backIcon" android:layout_width="wrap_content" android:layout_height="match_parent" android:paddingLeft="20dp" android:paddingRight="20dp" android:src="@drawable/app_white_back_icon" app:layout_constraintLeft_toLeftOf="parent" /> <ImageView android:id="@+id/moreIcon" android:layout_width="wrap_content" android:layout_height="match_parent" android:paddingLeft="20dp" android:paddingRight="20dp" android:src="@drawable/app_header_more_icon" app:layout_constraintRight_toRightOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> <!-- 底部视图 --> <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/bottomView" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="-40dp" app:layout_constraintBottom_toBottomOf="parent" tools:background="#f38654"> <!-- 主题信息及关闭按钮 --> <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="52dp" app:layout_constraintBottom_toTopOf="@+id/userInfo" tools:background="#39bd00"> <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/topicInfo" android:layout_width="wrap_content" android:layout_height="30dp" android:layout_marginLeft="15dp" android:background="@drawable/topic_shape" android:paddingLeft="12dp" android:paddingRight="12dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent" tools:background="#ff967d"> <ImageView android:id="@+id/topicIcon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/topic_icon" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/topicTitle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="5dp" android:textColor="#ffffff" android:textSize="11sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toRightOf="@+id/topicIcon" app:layout_constraintTop_toTopOf="parent" tools:text="#新能源#" /> </androidx.constraintlayout.widget.ConstraintLayout> <ImageView android:id="@+id/closeUnfold" android:layout_width="22dp" android:layout_height="22dp" android:layout_margin="15dp" android:src="@drawable/icon_close" android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" tools:background="#013369" tools:visibility="visible" /> </androidx.constraintlayout.widget.ConstraintLayout> <!-- 用户信息 --> <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/userInfo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="5dp" android:paddingLeft="15dp" app:layout_constraintBottom_toTopOf="@+id/msgContainer" app:layout_constraintLeft_toLeftOf="parent" tools:background="#33ccff"> <ImageView android:id="@+id/headImage" android:layout_width="20dp" android:layout_height="20dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent" tools:srcCompat="@tools:sample/avatars[1]" /> <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="5dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toRightOf="@+id/headImage" app:layout_constraintTop_toTopOf="parent"> <TextView android:id="@+id/nickName" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#ffffff" android:textSize="12sp" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent" tools:text="小电" /> <TextView android:id="@+id/addDate" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#888888" android:textSize="12sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toBottomOf="@+id/nickName" tools:text="2019-05-29 16:28" /> </androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout> <!-- 信息 --> <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/msgContainer" android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_constraintBottom_toTopOf="@+id/progressBar"> <TextView android:id="@+id/msg" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginRight="30dp" android:ellipsize="end" android:paddingLeft="40dp" android:paddingRight="10dp" android:paddingBottom="25dp" android:scrollbarStyle="outsideOverlay" android:scrollbars="vertical" android:textColor="#e2e2e2" android:textSize="14sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" tools:text="迪克啥看来当减肥考虑送到,迪克啥看来当减肥考虑送到迪克啥看来当减肥考虑送到" /> <ImageView android:id="@+id/fold" android:layout_width="42dp" android:layout_height="62dp" android:paddingLeft="15dp" android:paddingTop="25dp" android:paddingRight="15dp" android:paddingBottom="25dp" android:src="@drawable/unfold_icon" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toRightOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> <!-- 自定义进度条 --> <ProgressBar android:id="@+id/progressBar" style="@android:style/Widget.ProgressBar.Horizontal" android:layout_width="match_parent" android:layout_height="1dp" android:max="100" android:progressDrawable="@drawable/video_player_progressbar" app:layout_constraintBottom_toTopOf="@+id/toolBar" tools:progress="50" /> <!-- 底部工具栏 --> <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/toolBar" android:layout_width="match_parent" android:layout_height="50dp" app:layout_constraintBottom_toBottomOf="parent" tools:background="#00aee6"> <!-- 写评论--> <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/writeComment" android:layout_width="wrap_content" android:layout_height="match_parent" android:paddingLeft="15dp" android:paddingRight="15dp" app:layout_constraintLeft_toLeftOf="parent"> <ImageView android:id="@+id/WriteCommentIcon" android:layout_width="wrap_content" android:layout_height="wrap_content" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent" app:srcCompat="@drawable/write_comment_icon" /> <TextView android:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center" android:paddingLeft="3dp" android:text="写评论" android:textColor="#c2c2c2" android:textSize="12sp" app:layout_constraintLeft_toRightOf="@+id/WriteCommentIcon" /> </androidx.constraintlayout.widget.ConstraintLayout> <!-- 转发 --> <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/transmit" android:layout_width="wrap_content" android:layout_height="match_parent" android:paddingLeft="15dp" android:paddingRight="15dp" app:layout_constraintRight_toRightOf="parent"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingRight="3dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toLeftOf="@+id/transmitLabel" app:layout_constraintTop_toTopOf="parent" app:srcCompat="@drawable/transmit_icon" /> <TextView android:id="@+id/transmitLabel" android:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center" android:paddingLeft="3dp" android:text="转发" android:textColor="#888888" android:textSize="12sp" app:layout_constraintRight_toRightOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> <!-- 评论列表 --> <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/comment" android:layout_width="wrap_content" android:layout_height="match_parent" android:paddingLeft="15dp" android:paddingRight="15dp" app:layout_constraintRight_toLeftOf="@+id/transmit"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/comment_icon" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toLeftOf="@+id/commentNumber" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/commentNumber" android:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center" android:paddingLeft="3dp" android:textColor="#888888" android:textSize="12sp" app:layout_constraintRight_toRightOf="parent" tools:text="123" /> </androidx.constraintlayout.widget.ConstraintLayout> <!-- 点赞 --> <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/like" android:layout_width="wrap_content" android:layout_height="match_parent" app:layout_constraintRight_toLeftOf="@+id/comment"> <ImageView android:id="@+id/likeIcon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/like_icon" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toLeftOf="@+id/likeLabel" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/likeLabel" android:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center" android:paddingLeft="3dp" android:textColor="#888888" android:textSize="12sp" app:layout_constraintRight_toRightOf="parent" tools:text="999+" /> </androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>