ConstraintLayout 的使用

ConstraintLayout 是在 2016 年 Google 大会上推出的一个新的布局控件,众所周知,ConstraintLayout 有两个优势:使用 ConstraintLayout 编写布局性能更高,使用 ConstraintLayout 可以通过拖拽的形式更方便地编写布局文件。之前一直知道这个布局控件,但是一直没有详细地学习过,最近学习了它的使用,现在简单记录一下。

本文主要分为以下几个部分:


catalog.png

1. 背景介绍

在面试的时候经常会被问到有没有做过布局优化,都通过什么方式优化布局界面的?优化布局界面其中一种方式就是通过 ConstraintLayout 降低布局层级,从而避免过度测量和绘制。本篇文章重点讲解 ConstraintLayout 的用法,关于 ConstraintLayout 性能方面的优势,可以参考这篇文章:解析 ConstraintLayout 的性能优势

通过可视化拖拽的方式编写 ConstraintLayout 布局界面,个人是不太推崇的,虽然它确实很方便,但是即使通过可视化拖拽的方式编写布局之后,还是需要看懂 xml 文件中关于 ConstraintLayout 的属性,才可以更灵活的修改布局界面,所以本文主要讲解通过 xml 属性的方式编写 ConstraintLayout 布局界面,关于可视化拖拽的方式编写 ConstraintLayout 布局界面,可以参考郭霖写的这篇博客: Android 新特性介绍,ConstraintLayout 完全解析

好了,上面介绍了 ConstraintLayout 的两个优点,下面开始进入本文的正题,通过 xml 布局属性的方式编写 ConstraintLayout 布局。使用之前,需要在 build.gradle 文件中添加对 ConstraintLayout 的依赖:

dependencies {
    ...
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    ...
}

2. 详细使用

本节主要分为 7 点介绍 ConstraintLayout 的详细使用,那就开始吧~

2.1 相对位置

ConstraintLayout 和 RelativeLayout 是非常类似的布局控件,它们之间最大的相似之处在于都可以编写一个控件相对于其他控件或父控件的相对位置,比如下面这个样式的布局既可以通过
RelativeLayout 实现,也可以通过 ConstraintLayout 实现


relativepositioning.png

通过 ConstraintLayout 实现的代码如下所示:

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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"
    tools:context="com.lijiankun24.constraintlayoutpractice.RelativePositionActivity">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="@color/colorPrimary"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
        app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
        app:title="@string/relative_positioning"
        app:titleTextColor="@android:color/white"/>

    <TextView
        android:id="@+id/tv_a"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="30dp"
        android:background="@color/colorPrimary"
        android:padding="30dp"
        android:text="A"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toLeftOf="@+id/tv_b"
        app:layout_constraintTop_toBottomOf="@+id/toolbar"/>

    <TextView
        android:id="@+id/tv_b"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="30dp"
        android:background="@color/colorPrimary"
        android:padding="30dp"
        android:text="B"
        app:layout_constraintLeft_toRightOf="@+id/tv_a"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/toolbar"/>
</android.support.constraint.ConstraintLayout>

通过上面的代码,可以看到几个陌生的 xml 属性,它们都是 ConstraintLayout 的 xml 属性,比如:

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
    ...
    >

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        ...
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>

    <TextView
        android:id="@+id/tv_a"
        ...
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toLeftOf="@+id/tv_b"
        app:layout_constraintTop_toBottomOf="@+id/toolbar"/>

    <TextView
        android:id="@+id/tv_b"
        ...
        app:layout_constraintLeft_toRightOf="@+id/tv_a"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/toolbar"/>
</android.support.constraint.ConstraintLayout>

通过属性的名字就可以猜测出它们大概的意思,比如:

  • app:layout_constraintLeft_toLeftOf 是指该控件的左边缘和某个控件的左边缘对齐
  • app:layout_constraintRight_toRightOf 是指该控件的右边缘和某个控件的右边缘对齐
  • app:layout_constraintTop_toBottomOf 是指该控件的上边缘和某个控件的下边缘对齐

依次类推,同样含义的属性还有:

  • layout_constraintLeft_toLeftOf
  • layout_constraintLeft_toRightOf
  • layout_constraintRight_toLeftOf
  • layout_constraintRight_toRightOf
  • layout_constraintTop_toTopOf
  • layout_constraintTop_toBottomOf
  • layout_constraintBottom_toTopOf
  • layout_constraintBottom_toBottomOf
  • layout_constraintStart_toEndOf
  • layout_constraintStart_toStartOf
  • layout_constraintEnd_toStartOf
  • layout_constraintEnd_toEndOf
  • layout_constraintBaseline_toBaselineOf

上述属性的属性值可以是某个控件的 id,也可以是 parent,比如:

app:layout_constraintLeft_toRightOf="@+id/tv_a"

app:layout_constraintRight_toRightOf="parent"

对于相对位置,官方给出的示意图如下所示:


relativepositioning1.png

2.2 边距(Margins)

假如现在有如下这样一个界面:TextViewA 上边距离 Toolbar 30dp,在屏幕最左边,TextViewB 上边距离 Toolbar 30dp,左边距离 TextView A 也是 30dp,该如何编写布局文件呢?


margin.png

该布局 xml 关键代码如下所示:

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
    ...
    >

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        ...
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>

    <TextView
        android:id="@+id/tv_a"
        ...
        android:layout_marginTop="30dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toLeftOf="@+id/tv_b"
        app:layout_constraintTop_toBottomOf="@+id/toolbar"/>

    <TextView
        android:id="@+id/tv_b"
        ...
        android:layout_marginLeft="30dp"
        android:layout_marginTop="30dp"
        app:layout_constraintLeft_toRightOf="@+id/tv_a"
        app:layout_constraintTop_toBottomOf="@+id/toolbar"/>
</android.support.constraint.ConstraintLayout>

在 ConstraintLayout 布局中,下面几个 Margin 相关的属性依然是有效的

  • android:layout_marginStart
  • android:layout_marginEnd
  • android:layout_marginLeft
  • android:layout_marginTop
  • android:layout_marginRight
  • android:layout_marginBottom

注意:在 ConstraintLayout 中,上述属性值只可以是正数或者0,不可以是负数。

假如现在有这样的一个需求,当 TextViewA 显示的时候,TextViewB 距离左边是 20dp;当 TextViewA 可见性为 Gone 的时候,TextViewB 距离左边是 30dp,使用 ConstraintLayout 可以很容易的实现这样的需求。

在 ConstraintLayout 中如下这些边距属性就是当依据的控件变为 Gone 的时候就会生效

  • layout_goneMarginStart
  • layout_goneMarginEnd
  • layout_goneMarginLeft
  • layout_goneMarginTop
  • layout_goneMarginRight
  • layout_goneMarginBottom

2.3 居中显示

假如说有如下图所示的一个界面,TextViewA 在布局的正中间,如果用 RelativeLayout 和 LinearLayout 实现是很方便的,但是用 ConstraintLayout 怎么实现呢?


centerposition.png

其实也很简单,代码如下:

<android.support.constraint.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"
    tools:context="com.lijiankun24.constraintlayoutpractice.RelativePositionActivity">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="@color/colorPrimary"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
        app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
        app:title="@string/centering_positioning"
        app:titleTextColor="@android:color/white"/>

    <TextView
        android:id="@+id/tv_a"
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:background="@color/colorPrimary"
        android:gravity="center"
        android:paddingBottom="10dp"
        android:paddingTop="10dp"
        android:text="A"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/toolbar"/>
</android.support.constraint.ConstraintLayout>

在 ConstraintLayout 中并不像 LinearLayout 和 RelativeLayout 是通过 android:gravity="center"android:layout_gravity="center"android:layout_centerVertical="true"android:layout_centerHorizontal="true" 设置居中位置的,而是通过 app:layout_constraintBottom_toBottomOfapp:layout_constraintLeft_toLeftOfapp:layout_constraintRight_toRightOfapp:layout_constraintTop_toBottomOf 设置该控件上下左右分别依附于指定的控件即可。

在 ConstraintLayout 中有一个非常重要的概念 ---- constraint(约束):当控件有自己的大小时,例如:wrap_content 和具体的数值时,我们为控件添加的都是 constraint (约束),这个约束有点像橡皮筋一样会有一个拉力拉着控件,但是并不会改变控件的大小。

例如上例,在居中显示中,TextViewA 宽度为 100dp,左边有 app:layout_constraintLeft_toLeftOf="parent" 约束,右边有 app:layout_constraintRight_toRightOf="parent" 约束,左边和右边分别有一个同样大小的力拉着 TextViewA 控件,所以 TextViewA 会水平居中,竖直方向也是一样的。

如果想让上述例子中的 TextViewA 水平方向撑满整个父控件,即如下图所示,那该怎么做呢?


centerposition1.png

首先我们想到的是使用 android:layout_width="match_parent" 实现,这样设置之后确实也会实现这样的效果,但是查看 ConstraintLayout 的官方文档发现,在 ConstraintLayout 中 match_parent 已经被 match_constraint 所取代,所以使用 android:layout_width="0dp" 更为合适(在 xml 中并没有 match_constraint 这个属性值,0dp 即代码 match_constraint 值)。

Bias属性

可以在上下和左右分别有约束的时候加上偏移率,属性如下所示:

app:layout_constraintHorizontal_bias="0.1"
app:layout_constraintVertical_bias="0.8"
  • layout_constraintHorizontal_bias 取值范围是[0.0 ~ 1.0],从左向右
  • layout_constraintVertical_bias 取值范围是[0.0 ~ 1.0],从上到下
    centerposition2.png

2.4 可见性对布局的影响

在 2.1 节中提到过几个特殊的属性:

  • layout_goneMarginStart
  • layout_goneMarginEnd
  • layout_goneMarginLeft
  • layout_goneMarginTop
  • layout_goneMarginRight
  • layout_goneMarginBottom

这些属性是配合着 layout_marginStart 等属性使用的,当控件的约束所依附的 target 控件的 visibility 不为 GONE 的时候,layout_marginStart 等属性起作用,当 target 控件的 visibility 为 GONE 的时候,layout_goneMarginStart 属性起作用

2.5 尺寸约束

ConstraintLayout 的最小尺寸

当 ConstraintLayout 的宽度或者高度为 wrap_content 时,可以通过如下属性为 ConstraintLayout 设置最小尺寸或最大尺寸

  • android:minWidth:最小宽度
  • android:minHeight:最小高度
  • android:maxWidth:最大宽度
  • android:maxHeight:最大高度

控件的尺寸约束

ConstraintLayout 中,设置控件的大小总共有三种方式,分别是:

  • 一个具体的属性值,比如:123dp 或者一个 Dimension 引用
  • 使用 wrap_content,根据自身大小决定
  • 0dpmatch_constraint

控件按宽高比设置大小

ConstraintLayout 中,其中的控件可以按照宽高比设置其大小,前提是控件的宽或者高的尺寸至少有一个是 0dp,然后通过 layout_constraintDimensionRatio 设置控件的宽高比,显示出来的控件的宽和高即是设置的比例的大小,如下所示:

<!-- 此 Button 的宽和高相等-->
<Button
  android:layout_width="wrap_content"
  android:layout_height="0dp"
  app:layout_constraintDimensionRatio="1:1" />

在上面 xml 代码中,Button 的宽度是一个特定值:wrap_content,高度是一个可变值:0dp,宽:高 = 1 :1,则高度也就是和宽度相同的值

通过 layout_constraintDimensionRatio 设置的参数可以是:

  • 一个浮点数,代表 宽/高 的比例
  • 也可以是上述例子中的形式:宽:高

当控件宽和高的值都是 0dp 时,也可以通过 layout_constraintDimensionRatio 设置宽和高的比例,比如:

<Button
  android:layout_width="0dp"
  android:layout_height="0dp"
  app:layout_constraintDimensionRatio="H,16:9"
  app:layout_constraintBottom_toBottomOf="parent"
  app:layout_constraintTop_toTopOf="parent"/>

在上面 xml 代码中,Button 的宽是可变值:0dp,高也是可变值:0dp,高:宽 = 16:9,但是 Button 有上下两个约束:高顶到父控件的上边缘,底顶到父控件的下边缘,这样 Button 的高度就固定了,再通过比例,即可得到宽 = 高 * 9/16.

2.5 链(Chains)

在 ConstraintLayout 中有一个非常重要的概念:链(Chains)

那什么才是链呢?在下图所示的界面中即存在一个链:


chains.png

上图中 TextViewA、TextViewB 和 TextViewC 形成了一个链,上图对应的 xml 代码是:

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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"
    tools:context="com.lijiankun24.constraintlayoutpractice.RelativePositionActivity">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="@color/colorPrimary"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
        app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
        app:title="@string/chains"
        app:titleTextColor="@android:color/white"/>

    <TextView
        android:id="@+id/tv_a"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="30dp"
        android:background="@color/colorPrimary"
        android:padding="20dp"
        android:text="A"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toLeftOf="@+id/tv_b"
        app:layout_constraintTop_toBottomOf="@+id/toolbar"/>

    <TextView
        android:id="@+id/tv_b"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="30dp"
        android:background="@color/colorPrimary"
        android:padding="20dp"
        android:text="B"
        app:layout_constraintLeft_toRightOf="@+id/tv_a"
        app:layout_constraintRight_toLeftOf="@+id/tv_c"
        app:layout_constraintTop_toBottomOf="@+id/toolbar"/>


    <TextView
        android:id="@+id/tv_c"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="30dp"
        android:background="@color/colorPrimary"
        android:padding="20dp"
        android:text="C"
        app:layout_constraintLeft_toRightOf="@+id/tv_b"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/toolbar"/>
</android.support.constraint.ConstraintLayout>

从代码中可以看到形成链的三个控件有以下特点:

  • TextViewA 和 TextViewB 通过 app:layout_constraintRight_toLeftOf="@+id/tv_b"app:layout_constraintLeft_toRightOf="@+id/tv_a" 相互依赖
  • TextViewB 和 TextViewC 通过 app:layout_constraintRight_toLeftOf="@+id/tv_c"app:layout_constraintLeft_toRightOf="@+id/tv_b" 相互依赖

这样便形成了一个链,在此链中最左边的控件称为链头。同样的也可以通过上下相互依赖形成上下的链,最上面的控件称为链头。

在链头中通过 layout_constraintHorizontal_chainStylelayout_constraintVertical_chainStyle 可以设置链的样式。
链的样式总共有三种:

  • CHAIN_SPREAD:默认样式
  • CHAIN_SPREAD_INSIDE
  • CHAIN_PACKED

用一张官方的图解释上面几个属性的含义,如下图所示:


chainsStyle.png

这里需要强调下比重链(Weighted chain)样式:在 CHAIN_SPREAD 样式的链中,如果其中的控件的宽度或高度为 0dp,即可以通过 layout_constraintHorizontal_weightlayout_constraintVertical_weight 设置该控件在水平或者竖直方向的比例,类似于 LinearLayout 中的 weight 属性的作用

2.6 Guideline

在 ConstraintLayout 中有一个特殊的辅助类:android.support.constraint.Guideline,主要用于辅助布局,可以把它看做是一个辅助线,但是不会绘制到界面上,有水平的和垂直的。

Guideline 有以下几个属性:

  • android:orientationverticalhorizontal,表示此 Guideline 是水平的还是垂直的
  • app:layout_constraintGuide_begin:表示 Guideline 的距离左边或上边的距离,根据方向决定是距离哪边的
  • app:layout_constraintGuide_begin:表示 Guideline 的距离右边或下边的距离,根据方向决定是距离哪边的
  • app:layout_constraintGuide_percent:表示 Guideline 距离左边或上边的百分比,根据方向决定是距离哪边的

用一张效果图展示 Guideline 的作用,一个 TextView 在中线的左边 32dp 位置处,另一个 TextView 在中线右边 32dp 处


guideline.png

上图代码如下:

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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"
    tools:context="com.lijiankun24.constraintlayoutpractice.VirtualHelpersActivity">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="@color/colorPrimary"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
        app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
        app:title="@string/virtual_helpers_objects"
        app:titleTextColor="@android:color/white"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginRight="32dp"
        android:background="@android:color/holo_blue_light"
        android:text="@string/virtual_helpers_objects"
        android:textColor="@android:color/white"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintRight_toLeftOf="@+id/guide_line"
        app:layout_constraintTop_toBottomOf="@+id/toolbar"
        app:layout_constraintVertical_bias="0.502"/>

    <android.support.constraint.Guideline
        android:id="@+id/guide_line"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.5"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="32dp"
        android:background="@android:color/holo_blue_light"
        android:text="@string/virtual_helpers_objects"
        android:textColor="@android:color/white"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toRightOf="@+id/guide_line"
        app:layout_constraintTop_toBottomOf="@+id/toolbar"
        app:layout_constraintVertical_bias="0.502"/>
</android.support.constraint.ConstraintLayout>

好啦,至此关于 ConstraintLayout 的使用就基本全部介绍完毕,是不是觉得很好用呢?那就赶快在项目中使用起来的!文中涉及的代码都在这儿:ConstraintLayoutPractic


参考资料:

ConstraintLayout 官方文档

ConstraintLayout 完全解析 快来优化你的布局吧 -- Hongyang

Android ConstraintLayout 约束布局 -- 打鱼还是晒网 —— stone

ConstraintLayout约束布局使用教程难点理解 -- yueding

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 200,667评论 5 472
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 84,361评论 2 377
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 147,700评论 0 333
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,027评论 1 272
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 62,988评论 5 361
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,230评论 1 277
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,705评论 3 393
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,366评论 0 255
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,496评论 1 294
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,405评论 2 317
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,453评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,126评论 3 315
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,725评论 3 303
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,803评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,015评论 1 255
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,514评论 2 346
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,111评论 2 341

推荐阅读更多精彩内容