View 的工作原理(上)

View 的工作原理

4.1 初識 ViewRoot 和 DecorView


ViewRoot 對應于 ViewRootImpl 類,它是連接 WindowManager 和 DecorView 的紐帶,View 的三大流程均是通過 ViewRoot 來完成的。在 ActivityThread 中,當 Activity 對象被創(chuàng)建完畢后,會將 DecorView 添加到 Window 中,同時會創(chuàng)建 ViewRootImpl 對象,并將 ViewRootImpl 對象和 DecorView 建立關聯(lián)。

View 的繪制流程是從 ViewRoot 的 performTaversals 方法開始的,它經過 三個過程才能最終將一個 View 繪制出來。

  • measure: 測量 View 的寬和高,Measure 完成之后可以通過 getMeasureWidth 和 getMeasureHeight 來獲取 View 測量后的高寬。

  • layout: 確定 View 在父容器中的放置位置,四個頂點的坐標和實際View的寬高,完成之后,通過 getTop,getLeft,getRight,getBottom 獲得。

  • draw: 則負責將 View 繪制在屏幕上,只有 draw 方法完成了之后,View 才會顯示在屏幕上。

performTaversals 的工作流程圖
image.png

DecorView 作為頂級 View,DecorView其實是一個FrameLayout,其中包含了一個豎直方向的LinearLayout,上面是標題欄,下面是內容欄(id為android.R.id.content)。View層的事件都先經過DecorView,然后才傳給我們的View。

4.2 理解 MeasureSpec


4.2.1 MeasureSpec

MeasureSpec代表一個32位int值,高兩位代表SpecMode,低30位代表SpecSize,SpecMode是指測量模式,而SpecSize是指在某個測量模式下的規(guī)格大小,下面先看一下,MeasureSpec內部的一些常量定義,通過這些就不難理解MeasureSpec的工作原理了。

private static final int MODE_SHIFT = 30;
private static final int MODE_MASK  = 0x3 << MODE_SHIFT;
public static final int UNSPECIFIED = 0 << MODE_SHIFT;
public static final int EXACTLY     = 1 << MODE_SHIFT;
public static final int AT_MOST     = 2 << MODE_SHIFT;

     public static int makeMeasureSpec(@IntRange(from = 0, to = (1 << MeasureSpec.MODE_SHIFT) - 1) int size,
                                          @MeasureSpecMode int mode) {
            if (sUseBrokenMakeMeasureSpec) {
                return size + mode;
            } else {
                return (size & ~MODE_MASK) | (mode & MODE_MASK);
            }
        }

        @MeasureSpecMode
        public static int getMode(int measureSpec) {
            //noinspection ResourceType
            return (measureSpec & MODE_MASK);
        }

        public static int getSize(int measureSpec) {
            return (measureSpec & ~MODE_MASK);
        }

MeasureSpec 通過將 SpecMode 和 SpecSize 打包成一個int值來避免過多的內存分配,為了方便操作,其提供了打包和解包方法。SpecMode 和 SpecSize 也是一個int值,一組 SpecMode 和 SpecSize 可以打包為一個 MeasureSpec,而一個 MeasureSpec 可以通過解包的形式來得出其原始的 SpecMode 和 SpecSize。

MeasureSpec 包含了 size 和 mode

  • UNSPECIFIED
    父容器不對View有任何的限制,要多大給多大,這種情況一般用于系統(tǒng)內部,表示一種測量的狀態(tài)。
  • EXACTLY
    父容器已經檢測出View所需要的精度大小,這個時候View的最終大小就是 SpecSize 所指定的值,它對應于 LayoutParams 中的 match_parent,和具體的數值這兩種模式。
  • AT_MOST
    父容器指定了一個可用大小,即 SpecSize,view 的大小不能大于這個值,具體是什么值要看不同view的具體實現(xiàn),它對應于 LayoutParams 中 wrap_content。

4.2.2 MeasureSpec 和 LayoutParams 的對應關系

MeasureSpec 流程圖
View 的 MeasureSpec 創(chuàng)建規(guī)則
  • LayoutParams.MATCH_PARENT: (EXACTLY)精確模式,大小就是窗口大小。
  • LayoutParams.WRAP_CONTENT:(AT_MOST)最大模式,大小不定,但是不能超過窗口的大小。
  • 固定大?。ū热?100dp):(EXACTLY )精確模式,大小為 LayoutParams 中指定的大小。

View 的 measure 過程由 ViewGroup 傳遞過來,請看源碼。

public abstract class ViewGroup ...{
...
//遍歷所有的子元素
protected void measureChildren(int widthMeasureSpec, int heightMeasureSpec) {
        final int size = mChildrenCount;
        final View[] children = mChildren;
        for (int i = 0; i < size; ++i) {
            final View child = children[i];
            if ((child.mViewFlags & VISIBILITY_MASK) != GONE) {
                measureChild(child, widthMeasureSpec, heightMeasureSpec);
            }
        }
    }
//調用子元素的 measure 方法
protected void measureChildWithMargins(View child,
            int parentWidthMeasureSpec, int widthUsed,
            int parentHeightMeasureSpec, int heightUsed) {
          //獲取子元素的 layoutParams
        final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams();
        //getChildMeasureSpec 此處獲取 getChildMeasureSpec
        final int childWidthMeasureSpec = getChildMeasureSpec(parentWidthMeasureSpec,
                mPaddingLeft + mPaddingRight + lp.leftMargin + lp.rightMargin
                        + widthUsed, lp.width);
        final int childHeightMeasureSpec = getChildMeasureSpec(parentHeightMeasureSpec,
                mPaddingTop + mPaddingBottom + lp.topMargin + lp.bottomMargin
                        + heightUsed, lp.height);
        //調用子元素的 measure 方法(子元素寬MeasureSpec,子元素高MeasureSpec)
        child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
    }
...
}

getChildMeasureSpec 源碼就不貼了,看上圖 View 的 MeasureSpec 創(chuàng)建規(guī)則,會更方便理解。

4.3 View 的工作流程


View的工作流程主要指:measure、layout、draw,即測量,布局和繪制。

4.3.1 measure

1.View 的 measure 過程
  ViewGroup 的 measureChildWithMargins 方法傳遞到 View 的 measure 方法。

public class View...{
...
    public final void measure(int widthMeasureSpec, int heightMeasureSpec) {
    ...
    if (cacheIndex < 0 || sIgnoreMeasureCache) {
                // 測量自己
                onMeasure(widthMeasureSpec, heightMeasureSpec);
                mPrivateFlags3 &= ~PFLAG3_MEASURE_NEEDED_BEFORE_LAYOUT;
            } else {
    ...
    }

看方法 onMeasure:

public class View...{
...//開始測量自己
      protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        setMeasuredDimension(getDefaultSize(getSuggestedMinimumWidth(), widthMeasureSpec),
                getDefaultSize(getSuggestedMinimumHeight(), heightMeasureSpec));
    }
}

再看方法 getDefaultSize:

public static int getDefaultSize(int size, int measureSpec) {
        int result = size;
        int specMode = MeasureSpec.getMode(measureSpec);
        int specSize = MeasureSpec.getSize(measureSpec);

        switch (specMode) {
        case MeasureSpec.UNSPECIFIED:
            result = size;
            break;
        case MeasureSpec.AT_MOST:
        case MeasureSpec.EXACTLY:
            result = specSize;
            break;
        }
        return result;
    }

getDefaultSize 這個方法邏輯很簡單,對于我們來說,只要考慮 AT_MOST 和 EXACTLY 這兩種情況。其實 getDefaultSize 返回的大小就是 measureSpec 中的 specSize,而這種 specSize 就是 View 測量后的大小,這里提到測量后的大小,因為 View 最終的大小是 layout 階段確定的,但是幾乎所有情況下 View 的測量大小就是最終大小。
  至于 UNSPECIFIED 這種情況,一般用于系統(tǒng)內部的測量過程,我們來看 getSuggestedMinimumWidth 方法。

public class View...{
...  
       protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        setMeasuredDimension(getDefaultSize(getSuggestedMinimumWidth(), widthMeasureSpec),
                getDefaultSize(getSuggestedMinimumHeight(), heightMeasureSpec));
    }
      protected int getSuggestedMinimumWidth() {
        return (mBackground == null) ? mMinWidth : max(mMinWidth, mBackground.getMinimumWidth());
    }

從 getSuggestedMinimumWidth 的代碼可以看出,如果 View 沒有設置背景,那么 View 的寬度微 mMinWidth,而 mMinWidth 對應于 android:minWidth 這個屬性設定的指(xml),默認為0,;如果指定了背景,再看 getMinimumWidth 方法。

public abstract class Drawable {
...
    public int getMinimumWidth() {
        final int intrinsicWidth = getIntrinsicWidth();
        return intrinsicWidth > 0 ? intrinsicWidth : 0;
    }

getMinimumWidth 返回的就是 Drawable 的原始寬度,默認為0,說明一下 ShapeDrawable 無原始寬/高,而 BitmapDrawable 有原始寬/高(圖片的尺寸),詳細書中第 6章會介紹。

從 getDefaultSize 方法的實現(xiàn)來看,View 的寬高由 specSize 決定,所以我們可以得出如下結論:直接繼承 View 的自定義控件需要重寫 onMeasure 方法并設置 wrap_content 時的自身大小,否則在布局中使用 wrap_content 就相當于使用了 match_parent,這一問題需要結合上述代碼和表 4-1 才能更好的理解,這里直接給出解決代碼。

public class MyView extends View {
   ...
    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        //獲取測量過的 MeasureSpec 的 size 和 mode
        int widthSize = MeasureSpec.getSize(widthMeasureSpec);
        int heightSize = MeasureSpec.getSize(heightMeasureSpec);
        int widthMode = MeasureSpec.getMode(widthMeasureSpec);
        int heightMode = MeasureSpec.getMode(heightMeasureSpec);
        //setMeasuredDimension 重新設置 view 的寬高  
        // xml 中設定 wrap_content 就等于 AT_MOST
        //情況1:寬高都是 wrap_content 
        if (widthMode == MeasureSpec.AT_MOST && heightMeasureSpec == MeasureSpec.AT_MOST) {
            setMeasuredDimension(200, 200);
        //情況2:只有寬設置了wrap_content 
        } else if (widthMode == MeasureSpec.AT_MOST) {
            setMeasuredDimension(200, heightSize);
        //情況3:只有高設置了wrap_content 
        } else if (heightMode == MeasureSpec.AT_MOST) {
            setMeasuredDimension(widthSize, 200);
        }
    }
}

解決方法很簡單,只要判斷是否使用了 wrap_content 屬性,如果使用了就重新設置一下 size,這里給出一個默認的尺寸 200(實際操作盡量不要固定寫死,否則萬一父容器尺寸不到200 就 GG了),當寬高都是 wrap_content 時,view 的尺寸就為 200*200。

2.ViewGroup 的 measure 過程
  ViewGroup 是一個抽象類,其測量過程的 onMeasure 方法需要各個子類去具體實現(xiàn),下面看LinearLayout 的 onMeasure 。

@Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        if (mOrientation == VERTICAL) {
            measureVertical(widthMeasureSpec, heightMeasureSpec);
        } else {
            measureHorizontal(widthMeasureSpec, heightMeasureSpec);
        }
    }

豎直布局的測量過程 measureHorizontal,源碼太長,只選看一段。

 void measureHorizontal(int widthMeasureSpec, int heightMeasureSpec) {
...
          //獲取豎直子元素的數量,并進行遍歷
          final int count = getVirtualChildCount();
          for (int i = 0; i < count; ++i) {
            final View child = getVirtualChildAt(i);
            ...
              measureChildBeforeLayout(child, i, widthMeasureSpec,
                        totalWeight == 0 ? mTotalLength : 0,
                        heightMeasureSpec, 0);

                if (oldWidth != Integer.MIN_VALUE) {
                    lp.width = oldWidth;
                }

                final int childWidth = child.getMeasuredWidth();
                if (isExactly) {
                    mTotalLength += childWidth + lp.leftMargin + lp.rightMargin +
                            getNextLocationOffset(child);
                } else {
                    final int totalLength = mTotalLength;
                    mTotalLength = Math.max(totalLength, totalLength + childWidth + lp.leftMargin +
                           lp.rightMargin + getNextLocationOffset(child));
                }
...
        //測量 LinearLayout 自己的大小
        mTotalLength += mPaddingTop + mPaddingBottom;

        int heightSize = mTotalLength;

        // Check against our minimum height
        heightSize = Math.max(heightSize, getSuggestedMinimumHeight());
        
        // Reconcile our calculated size with the heightMeasureSpec
        int heightSizeAndState = resolveSizeAndState(heightSize, heightMeasureSpec, 0);
        heightSize = heightSizeAndState & MEASURED_SIZE_MASK;
...
         setMeasuredDimension(resolveSizeAndState(maxWidth, widthMeasureSpec, childState),
                heightSizeAndState);
...

系統(tǒng)會遍歷子元素對每個元素執(zhí)行 measureChildBeforeLayout 方法,點進去這個方法,最后會進入到 ViewGroup 類中,然后各個子元素就開始依次進入 measure 過程,前面都有講過。mTotalLength 這個變量用來儲存 LinearLayout 在豎直方向所有子元素的高度,包括margin 等,最后LinearLayout 會測量自己的大小。

View 的measure 是三大流程中最復雜的一個,measure 完成以后,用過 getMeasureWidth/Height 方法就可以獲取到 View 的寬高,在某些極端情況下,可能要多次measure 才能最終確定,一個比較好的習慣是在 onLayout 中獲取 View 的最終寬高。

問題:如何在 Activity 中獲取一個 View 的寬高,View 的 measure 過程和 Activity 的生命周期是不同步的,有時獲取可能為0,解決方法有四種:

(1)Activity / View # onWindowFocusChanged。
  onWindowFocusChanged 含義是:View 初始化完畢,當 Activity 調用 onResume 和 onPuse,該方法會被多次調用。

 @Override
    public void onWindowFocusChanged(boolean hasFocus) {
        //onResume 對應 hasFocus = true,onPuse對應 hasFocus = false
        super.onWindowFocusChanged(hasFocus);
    }

(2)*** view.post(runnable)***

通過 post 可以將一個 runnable 投遞到消息隊列的尾部,然后等待 Looper 調用此 runnable 的時候,View 也已經初始化好了。

    @Override
    protected void onStart() {
        super.onStart();
        view.post(new Runnable() {
            @Override
            public void run() {
                int width = view.getMeasuredWidth();
                int height = view.getMeasuredHeight();
            }
        });
    }

(3)ViewTreeObserver

使用 ViewTreeObserver 的 OnGlobaLayoutListener 接口,當 View 樹的狀態(tài)改變或者 View 樹內部的 View 可見性發(fā)生改變時,onGlobaLayout 方法都將被回調。

@Override
    protected void onStart() {
        super.onStart();
        ViewTreeObserver observer = view.getViewTreeObserver();
        observer.addOnGlobalLayoutListener(new OnGlobalLayoutListener() {

            @SuppressWarnings("deprecation")
            @Override
            public void onGlobalLayout() {
                view.getViewTreeObserver().removeGlobalOnLayoutListener(this);
                int width = view.getMeasuredWidth();
                int height = view.getMeasuredHeight();
            }
        });
    }

(4)view.measure
  
  通過手動對 View 進行 measure 來得到 View 的寬 / 高,這種方法相當復雜,個人感覺沒必要,忽略之。

 private void measureView() {
        int widthMeasureSpec = MeasureSpec.makeMeasureSpec((1 << 30) - 1, MeasureSpec.AT_MOST);
        int heightMeasureSpec = MeasureSpec.makeMeasureSpec(100, MeasureSpec.EXACTLY);
        view.measure(widthMeasureSpec, heightMeasureSpec);
        Log.d(TAG, "measureView, width= " + view.getMeasuredWidth() + " height= " + view.getMeasuredHeight());
    }

4.3.2 layout 過程

當 ViewGroup 的位置被確定后,它在 onLayout 中遍歷所有的子元素調用其 layout 方法。

public class View{
...
@SuppressWarnings({"unchecked"})
    public void layout(int l, int t, int r, int b) {
        if ((mPrivateFlags3 & PFLAG3_MEASURE_NEEDED_BEFORE_LAYOUT) != 0) {
            onMeasure(mOldWidthMeasureSpec, mOldHeightMeasureSpec);
            mPrivateFlags3 &= ~PFLAG3_MEASURE_NEEDED_BEFORE_LAYOUT;
        }

        int oldL = mLeft;
        int oldT = mTop;
        int oldB = mBottom;
        int oldR = mRight;

        boolean changed = isLayoutModeOptical(mParent) ?
                setOpticalFrame(l, t, r, b) : setFrame(l, t, r, b);

        if (changed || (mPrivateFlags & PFLAG_LAYOUT_REQUIRED) == PFLAG_LAYOUT_REQUIRED) {
            onLayout(changed, l, t, r, b);

            ...
    }

layout 方法大致流程如下:首先通過 setFrame 方法來設定 View 的四個頂點位置;接著會調用 onLayout 方法,確定子元素的位置,onLayout 是抽象方法,需要子類來實現(xiàn)。

public class LinearLayout extends ViewGroup {
...
 @Override
    protected void onLayout(boolean changed, int l, int t, int r, int b) {
        if (mOrientation == VERTICAL) {
            layoutVertical(l, t, r, b);
        } else {
            layoutHorizontal(l, t, r, b);
        }
    }
...
void layoutVertical(int left, int top, int right, int bottom) {
       ...//獲取豎向子元素的數量
        final int count = getVirtualChildCount();
        ...
        for (int i = 0; i < count; i++) {
            final View child = getVirtualChildAt(i);
            if (child == null) {
                childTop += measureNullChild(i);
            } else if (child.getVisibility() != GONE) {
                final int childWidth = child.getMeasuredWidth();
                final int childHeight = child.getMeasuredHeight();
                
                final LinearLayout.LayoutParams lp =
                        (LinearLayout.LayoutParams) child.getLayoutParams();

                if (hasDividerBeforeChildAt(i)) {
                    childTop += mDividerHeight;
                }
                //childTop 變大,往下排序
                childTop += lp.topMargin;
                setChildFrame(child, childLeft, childTop + getLocationOffset(child),childWidth, childHeight);
                childTop += childHeight + lp.bottomMargin + getNextLocationOffset(child);

                i += getChildrenSkipCount(child, i);
            }
        }
    }
...//調用子元素的layout
private void setChildFrame(View child, int left, int top, int width, int height) {        
        child.layout(left, top, left + width, top + height);
    }

此方法會遍歷所有的子元素并調用 setChildFrame 方法來指定子元素位置,childTop 會疊加,子元素就往下排序,setChildFrame 會調用子元素的layout,這樣父元素在 layout 方法中完成自己的定位以后,通過 onLayout 方法去調用子元素的 layout 方法,子元素有會通過自己的layout 方法來確定自己的位置,這樣一層層傳遞下去就完成了整個 View 樹的 layout 過程。

問題:View 的測量寬高和最終的寬高有什么區(qū)別?這個問題可以具體為:View 的getMeasureWidth 和 getWidth 有什么區(qū)別。

這種情況只會在特殊情況下出現(xiàn),因為測量的 measure 過程時機比 layout 過程稍微早點。

public class MyView extends View {
...
@Override
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        super.onLayout(changed, left, top, right+100, bottom+100);
    }

上述代碼會導致在任何情況下 View 的最終寬高總是比測量寬高大 100 px,雖然這會導致 View 顯示不正常也沒有實際意義。在日常開發(fā)中基本不會出現(xiàn)這個問題。

4.3.3 draw 過程

Draw 就是將 View 繪制到屏幕上。

(1)繪制背景 background(canvas)
?。?)繪制自己(onDraw)
 (3)繪制children(dispatchDraw)
 (4)繪制裝飾(onDrawScrollBars)

public void draw(Canvas canvas) {
        final int privateFlags = mPrivateFlags;
        final boolean dirtyOpaque = (privateFlags & PFLAG_DIRTY_MASK) == PFLAG_DIRTY_OPAQUE &&
                (mAttachInfo == null || !mAttachInfo.mIgnoreDirtyState);
        mPrivateFlags = (privateFlags & ~PFLAG_DIRTY_MASK) | PFLAG_DRAWN;

        /*
         * 繪制遍歷執(zhí)行幾個繪圖步驟,必須按照適當的順序執(zhí)行:(渣百度翻譯。。。)
         *
         *      1. Draw the background 畫背景
         *      2. If necessary, save the canvas' layers to prepare for fading 如果有必要,保存畫布圖層以備褪色
         *      3. Draw view's content 繪制視圖內容
         *      4. Draw children 繪制子元素
         *      5. If necessary, draw the fading edges and restore layers 如有必要,繪制衰減邊并恢復圖層
         *      6. Draw decorations (scrollbars for instance) 畫裝飾(滾動條為例)
         */

        // Step 1, draw the background, if needed
        int saveCount;

        if (!dirtyOpaque) {
            drawBackground(canvas);
        }

        // skip step 2 & 5 if possible (common case)
        final int viewFlags = mViewFlags;
        boolean horizontalEdges = (viewFlags & FADING_EDGE_HORIZONTAL) != 0;
        boolean verticalEdges = (viewFlags & FADING_EDGE_VERTICAL) != 0;
        if (!verticalEdges && !horizontalEdges) {
            // Step 3, draw the content
            if (!dirtyOpaque) onDraw(canvas);

            // Step 4, draw the children 繪制子元素
            dispatchDraw(canvas);

            // Overlay is part of the content and draws beneath Foreground
            if (mOverlay != null && !mOverlay.isEmpty()) {
                mOverlay.getOverlayView().dispatchDraw(canvas);
            }

            // Step 6, draw decorations (foreground, scrollbars)
            onDrawForeground(canvas);

            // we're done...
            return;
        }

View 繪制過程的傳遞是通過 dispatchDraw 來實現(xiàn)的,dispatchDraw 會遍歷所有的子元素的 draw 方法,View 沒有具體的實現(xiàn) dispatchDraw ,子類需要重寫 dispatchDraw 。

View 中的有一個特殊的方法,setWillNotDraw,如果一個 View 不需要繪制任何內容,那么設置這個標記位為 true,系統(tǒng)會進行響應的優(yōu)化。(此處就不學了,以后用到再來看書)

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 230,321評論 6 543
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 99,559評論 3 429
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人,你說我怎么就攤上這事?!?“怎么了?”我有些...
    開封第一講書人閱讀 178,442評論 0 383
  • 文/不壞的土叔 我叫張陵,是天一觀的道長。 經常有香客問我,道長,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 63,835評論 1 317
  • 正文 為了忘掉前任,我火速辦了婚禮,結果婚禮上,老公的妹妹穿的比我還像新娘。我一直安慰自己,他們只是感情好,可當我...
    茶點故事閱讀 72,581評論 6 412
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著,像睡著了一般。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 55,922評論 1 328
  • 那天,我揣著相機與錄音,去河邊找鬼。 笑死,一個胖子當著我的面吹牛,可吹牛的內容都是我干的。 我是一名探鬼主播,決...
    沈念sama閱讀 43,931評論 3 447
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側響起,我...
    開封第一講書人閱讀 43,096評論 0 290
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后,有當地人在樹林里發(fā)現(xiàn)了一具尸體,經...
    沈念sama閱讀 49,639評論 1 336
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 41,374評論 3 358
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 43,591評論 1 374
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖,靈堂內的尸體忽然破棺而出,到底是詐尸還是另有隱情,我是刑警寧澤,帶...
    沈念sama閱讀 39,104評論 5 364
  • 正文 年R本政府宣布,位于F島的核電站,受9級特大地震影響,放射性物質發(fā)生泄漏。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 44,789評論 3 349
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 35,196評論 0 28
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 36,524評論 1 295
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人。 一個月前我還...
    沈念sama閱讀 52,322評論 3 400
  • 正文 我出身青樓,卻偏偏與公主長得像,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 48,554評論 2 379

推薦閱讀更多精彩內容