再也不要和產品經理吵架了——Android自定義單選按鈕

業務場景


興高采烈地前去一周一次的需求大會。為了更加精準的推送,需要采集用戶信息,于是乎產品設計了如下界面:


屏幕快照 2019-01-20 下午12.53.12.png

沒想到,在發版本的前一天,突然覺得采集粒度不夠細,希望將4個選項增加為6個。面對這突如其來,猝不及防的需求變化,設計和研發組都極力反對。

對于設計來說,不僅僅是加兩張圖,若沿用之前的布局設計,屏幕就放不下6個選項,所以需要重新設計布局。經過設計小姐姐的加班努力,最終設計圖改成這樣:

屏幕快照 2019-01-20 下午12.53.29.png

對于開發來說。。。
單選按鈕有兩個標題?
兩個標題還是不同顏色?
選中之后標題居然要變顏色?
不怕不怕,別說明天就要發版本,就是今天晚上發也可以。因為我自定義了一個單選控件,這次界面的改動,只需要換2個布局文件。(公司鼓勵擁抱變化的價值觀,對于開發來說寫出“擁抱變化”的代碼就是最好的回應

如何定義單選按鈕這個抽象?


在原生抽象中,單選控件包含兩個概念:

  1. 單選組RadioGroup
  2. 單選按鈕RadioButton

原生抽象的局限性在于RadioGroupRadioButton是父子關系,即RadioGroup必須是一個明確的ViewGroup類型,這樣就約束了RadioButton的布局方式。

如果單選組不是一個View,是不是就可以解放這層約束?

對于這個問題的答案留一個懸念,拋開單選組,先來看看單選按鈕是一個怎么樣的抽象。

單選按鈕應該包含如下基本特性:

  1. 是一個View,且可點擊
  2. 有兩種狀態(選中、未選中),且對應不同的視圖

只需要繼承View,并利用View.isSelected()就能實現這兩個特性。代碼如下:

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;

public abstract class Selector extends FrameLayout implements View.OnClickListener {

    public Selector(Context context) {
        super(context);
        initView(context, null);
    }

    public Selector(Context context, AttributeSet attrs) {
        super(context, attrs);
        initView(context, attrs);
    }

    public Selector(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initView(context, attrs);
    }

    private void initView(Context context, AttributeSet attrs) {
        //實現特性1:可點擊
        this.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        //實現特性2:點擊后改變選中狀態
        boolean isSelect = switchSelector();
    }

    //反轉選中狀態
    public boolean switchSelector() {
        boolean isSelect = this.isSelected();
        this.setSelected(!isSelect);
        return !isSelect;
    }
}

為滿足業務場景,需要新增一些附加特性:

  1. 可自定義按鈕內元素相對布局

附加特性會隨著業務需求變化而變化,所以應該由Selector提供能力,而讓其子類來實現。

  • 雖然這次業務場景中,單選按鈕元素的布局是:圖片在上,文字在下。下次換了咋辦?所以定義元素布局應該作為一個抽象函數交給Selector子類實現。
  • 為了實現選中的漸變效果,Selector需提供選中的時機。
  • 雖然Selector的子類可以定義不同的元素布局,但都必須包含一些基本元素,比如標題、圖片、標簽名。將這些元素及其屬性抽象成控件自定義屬性。代碼如下:
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;

public abstract class Selector extends FrameLayout implements View.OnClickListener {
    //單選按鈕唯一標示符
    private String tag;

    public Selector(Context context) {
        super(context);
        initView(context, null);
    }

    public Selector(Context context, AttributeSet attrs) {
        super(context, attrs);
        initView(context, attrs);
    }

    public Selector(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initView(context, attrs);
    }

    private void initView(Context context, AttributeSet attrs) {
        //將子類自定義View作為孩子添加進來
        View view = onCreateView();
        LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
        this.addView(view, params);
        this.setOnClickListener(this);

        //讀取自定義屬性
        if (attrs != null) {
            TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.Selector);
            String text = typedArray.getString(R.styleable.Selector_text);
            int iconResId = typedArray.getResourceId(R.styleable.Selector_img, 0);
            int selectorResId = typedArray.getResourceId(R.styleable.Selector_indicator, 0);
            int textColor = typedArray.getColor(R.styleable.Selector_text_color, Color.parseColor("#FF222222"));
            int textSize = typedArray.getInteger(R.styleable.Selector_text_size, 15);
            tag = typedArray.getString(R.styleable.Selector_tag);
            //將屬性傳遞給孩子
            onBindView(text, iconResId, selectorResId, textColor, textSize);
            typedArray.recycle();
        }
    }

    //父類讀取自定義屬性后通過該函數傳遞給子類
    protected abstract void onBindView(String text, int iconResId, int indicatorResId, int textColorResId, int textSize);

    //子類實現該函數以定義單選按鈕元素布局
    protected abstract View onCreateView();

    public String getTag() {
        return tag;
    }

    @Override
    public void onClick(View v) {
        boolean isSelect = switchSelector();
    }

    public boolean switchSelector() {
        boolean isSelect = this.isSelected();
        this.setSelected(!isSelect);
        onSwitchSelected(!isSelect);
        return !isSelect;
    }

    //選中時機
    protected abstract void onSwitchSelected(boolean isSelect);
}

自定義屬性src/main/res/values/attrs.xml如下:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <declare-styleable name="Selector">
        <!--單選按鈕標題-->
        <attr name="text" format="string" />
        <!--單選按鈕圖片-->
        <attr name="img" format="reference" />
        <!--單選按鈕選中效果-->
        <attr name="indicator" format="reference" />
        <!--單選按鈕標題字體大小-->
        <attr name="text_size" format="integer" />
        <!--單選按鈕字體顏色-->
        <attr name="text_color" format="color" />
        <!--單選按鈕標簽-->
        <attr name="tag" format="string" />
    </declare-styleable>
</resources>

因為Selector是抽象類,所以必須由子類實現它的抽象,下面的代碼即是demo中年齡單選按鈕的實現:

import android.animation.ValueAnimator;
import android.content.Context;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.widget.ImageView;
import android.widget.TextView;

import taylor.com.selector2.Selector;

public class AgeSelector extends Selector {
    private TextView tvTitle;
    private ImageView ivIcon;
    private ImageView ivSelector;
    private ValueAnimator valueAnimator;

    public AgeSelector(Context context) {
        super(context);
    }

    public AgeSelector(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public AgeSelector(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onBindView(String text, int iconResId, int indicatorResId, int textColorResId, int textSize) {
        //在這里將自定義布局中的控件和自定義屬性值綁定
        if (tvTitle != null) {
            tvTitle.setText(text);
            tvTitle.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSize);
            tvTitle.setTextColor(textColorResId);
        }
        if (ivIcon != null) {
            ivIcon.setImageResource(iconResId);
        }
        if (ivSelector != null) {
            ivSelector.setImageResource(indicatorResId);
            ivSelector.setAlpha(0);
        }
    }

    @Override
    protected View onCreateView() {
        //在這里定義你想要的布局
        View view = LayoutInflater.from(this.getContext()).inflate(R.layout.selector, null);
        tvTitle = view.findViewById(R.id.tv_title);
        ivIcon = view.findViewById(R.id.iv_icon);
        ivSelector = view.findViewById(R.id.iv_selector);
        return view;
    }

    @Override
    protected void onSwitchSelected(boolean isSelect) {
        //單選按鈕狀態變化時做動畫
        if (isSelect) {
            playSelectedAnimation();
        } else {
            playUnselectedAnimation();
        }
    }

    private void playUnselectedAnimation() {
        if (ivSelector == null) {
            return;
        }
        if (valueAnimator != null) {
            valueAnimator.reverse();
        }
    }

    private void playSelectedAnimation() {
        if (ivSelector == null) {
            return;
        }
        valueAnimator = ValueAnimator.ofInt(0, 255);
        valueAnimator.setDuration(800);
        valueAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
        valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                ivSelector.setAlpha((int) animation.getAnimatedValue());
            }
        });
        valueAnimator.start();
    }
}

其中單選按鈕的布局文件如下:

<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ImageView
        android:id="@+id/iv_selector"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toTopOf="@id/tv_title"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_chainStyle="spread"
        app:layout_constraintVertical_weight="122" />

    <ImageView
        android:id="@+id/iv_icon"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.026"
        app:layout_constraintWidth_percent=".81" />

    <TextView
        android:id="@+id/tv_title"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:gravity="center_horizontal|bottom"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@id/iv_selector"
        app:layout_constraintVertical_chainStyle="spread"
        app:layout_constraintVertical_weight="28" />
</android.support.constraint.ConstraintLayout>

如何定義單選組這個抽象?


等等,好像有點不太對勁!如果運行上述代碼,你會發現每個Selector都運行良好(選中狀態發生變化時有漸變動畫),但多個Selector可以同時被選中,他們并沒有實現互斥選中。。。

定神一想,發現原因是Selector這個抽象只關心自己的選中狀態,它并不知道其他Selector的狀態。

所以原生控件需要RadioGroup這個角色,它作為父親,了解每個孩子的動向!

但我們不想要一個ViewGroup類型的父親,因為它管的太多,孩子不能隨意布局,局限性大。

那就造一個看不見的父親!其實父親做的事情不就是“在一個孩子選中的時候,通知另一個孩子取消選中”嗎?

有了思路動手就干,代碼如下:

import java.util.HashSet;
import java.util.Set;

public class SelectorGroup {
    //處于同一組的單選按鈕都被保存在這個Set中
    private Set<Selector> selectors = new HashSet<>();

    public void addSelector(Selector selector) {
        selectors.add(selector);
    }

    public void setSelected(String tag) {
        for (Selector s : selectors) {
            if (s.getTag().equals(tag)) {
                s.switchSelector();
            }
        }
    }

    //當一個按鈕選中時,遍歷其他按鈕并取消他們的選中狀態
    public void setSelected(Selector selector) {
        cancelPreSelector(selector);
    }

    private void cancelPreSelector(Selector selector) {
        for (Selector s : selectors) {
            if (!s.equals(selector) && s.isSelected()) {
                s.switchSelector();
            }
        }
    }

    public Selector getSelected() {
        for (Selector s : selectors) {
            if (s.isSelected()) {
                return s;
            }
        }
        return null;
    }

    public void clear() {
        if (selectors != null) {
            selectors.clear();
        }
    }
}

為了保證單選組中單選按鈕的唯一性,用Set作為容器,單選按鈕需要實現equals()hashCode以供Set進行散列定位。完整版的單選按鈕代碼如下:

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;

public abstract class Selector extends FrameLayout implements View.OnClickListener {
    private OnSelectorStateListener stateListener;
    private String tag;
    private SelectorGroup selectorGroup;

    public Selector(Context context) {
        super(context);
        initView(context, null);
    }

    public Selector(Context context, AttributeSet attrs) {
        super(context, attrs);
        initView(context, attrs);
    }

    public Selector(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initView(context, attrs);
    }

    private void initView(Context context, AttributeSet attrs) {
        View view = onCreateView();
        LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
        this.addView(view, params);
        this.setOnClickListener(this);

        if (attrs != null) {
            TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.Selector);
            String text = typedArray.getString(R.styleable.Selector_text);
            int iconResId = typedArray.getResourceId(R.styleable.Selector_img, 0);
            int selectorResId = typedArray.getResourceId(R.styleable.Selector_indicator, 0);
            int textColor = typedArray.getColor(R.styleable.Selector_text_color, Color.parseColor("#FF222222"));
            int textSize = typedArray.getInteger(R.styleable.Selector_text_size, 15);
            tag = typedArray.getString(R.styleable.Selector_tag);
            onBindView(text, iconResId, selectorResId, textColor, textSize);
            typedArray.recycle();
        }
    }

    public Selector setSelectorGroup(SelectorGroup selectorGroup) {
        this.selectorGroup = selectorGroup;
        selectorGroup.addSelector(this);
        return this;
    }

    protected abstract void onBindView(String text, int iconResId, int indicatorResId, int textColorResId, int textSize);

    protected abstract View onCreateView();

    public String getTag() {
        return tag;
    }

    public Selector setOnSelectorStateListener(OnSelectorStateListener stateListener) {
        this.stateListener = stateListener;
        return this;
    }

    @Override
    public void onClick(View v) {
        boolean isSelect = switchSelector();
        //單選按鈕將選中狀態告訴單選組
        if (selectorGroup != null) {
            selectorGroup.setSelected(this);
        }
        if (stateListener != null) {
            stateListener.onStateChange(this, isSelect);
        }
    }

    public boolean switchSelector() {
        boolean isSelect = this.isSelected();
        this.setSelected(!isSelect);
        onSwitchSelected(!isSelect);
        return !isSelect;
    }

    protected abstract void onSwitchSelected(boolean isSelect);

    //利用tag生成哈希碼,遂每個單選按鈕的tag需保證唯一
    @Override
    public int hashCode() {
        return this.tag.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof Selector) {
            return ((Selector) obj).tag.equals(this.tag);
        }
        return false;
    }

    public interface OnSelectorStateListener {
        void onStateChange(Selector selector, boolean isSelect);
    }
}

現在就可以像這樣使用自定義單選按鈕了:

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Toast;

import taylor.com.selector2.Selector;
import taylor.com.selector2.SelectorGroup;

public class MainActivity extends AppCompatActivity implements Selector.OnSelectorStateListener {
    private SelectorGroup selectorGroup = new SelectorGroup();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }

    private void initView() {
        Selector teenageSelector = findViewById(R.id.selector_10);
        Selector manSelector = findViewById(R.id.selector_20);
        Selector oldManSelector = findViewById(R.id.selector_30);

        teenageSelector.setOnSelectorStateListener(this).setSelectorGroup(selectorGroup);
        manSelector.setOnSelectorStateListener(this).setSelectorGroup(selectorGroup);
        oldManSelector.setOnSelectorStateListener(this).setSelectorGroup(selectorGroup);
    }

    @Override
    public void onStateChange(Selector selector, boolean isSelect) {
        String tag = selector.getTag();
        if (isSelect) {
            Toast.makeText(this, tag + " is selected", Toast.LENGTH_SHORT).show();
        } else {
            Toast.makeText(this, tag + " is unselected", Toast.LENGTH_SHORT).show();
        }
    }
}

其中布局文件如下,你可以任布局多個單選按鈕:

<?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=".MainActivity">

    <android.support.constraint.Guideline
        android:id="@+id/gl_center"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintGuide_percent=".5" />

    <TextView
        android:id="@+id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="30dp"
        android:text="Selector age"
        android:textSize="30sp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <taylor.com.selector.AgeSelector
        android:id="@+id/selector_10"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:img="@mipmap/teenage"
        app:indicator="@drawable/age_selctor_shape"
        app:layout_constraintBottom_toTopOf="@id/gl_center"
        app:layout_constraintDimensionRatio="122:150"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintWidth_percent=".338"
        app:tag="teenage"
        app:text="teenage"
        app:text_color="#FF222222"
        app:text_size="16" />

    <taylor.com.selector.AgeSelector
        android:id="@+id/selector_20"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:img="@mipmap/man"
        app:indicator="@drawable/age_selctor_shape"
        app:layout_constraintDimensionRatio="122:150"
        app:layout_constraintEnd_toStartOf="@id/selector_30"
        app:layout_constraintHorizontal_chainStyle="spread"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/gl_center"
        app:layout_constraintWidth_percent=".338"
        app:tag="man"
        app:text="man"
        app:text_color="#FF222222"
        app:text_size="16" />

    <taylor.com.selector.AgeSelector
        android:id="@+id/selector_30"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:img="@mipmap/old_man"
        app:indicator="@drawable/age_selctor_shape"
        app:layout_constraintDimensionRatio="122:150"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_chainStyle="spread"
        app:layout_constraintStart_toEndOf="@id/selector_20"
        app:layout_constraintTop_toBottomOf="@id/gl_center"
        app:layout_constraintWidth_percent=".338"
        app:tag="old man"
        app:text="old man"
        app:text_color="#FF222222"
        app:text_size="16" />
</android.support.constraint.ConstraintLayout>

更多


除了能快速響應需求變化外,Selector還可以實現更多自定義效果。如下圖是個三選一單選組件,選項分居兩行形成三角形,且帶有漸變選中效果。

selector.gif

  • 原生控件RadioButton的局限

    1. 不能自定義按鈕選中動畫效果
    2. 不能自定義按鈕相對布局
      RadioGroup繼承自LinearLayout,所以RadioButton的排列方式只能是橫向或縱向一字排開。
  • 用本文中的Selector就可以輕而易舉的實現這個效果。

talk is cheap ,show me the code

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