Android TV控件--長(zhǎng)圖片展示控件

如何在TV中展示一張長(zhǎng)長(zhǎng)的圖片,考慮到內(nèi)存問題,肯定不能把圖片一次性加載到內(nèi)存中,這個(gè)時(shí)候就要用到BitmapRegionDecoder纸颜,借助這個(gè)類可以實(shí)現(xiàn)只截取圖片中需要的區(qū)域生成Bitmap來(lái)展示。BitmapRegionDecoder是實(shí)現(xiàn)這個(gè)UI控件的基礎(chǔ)绎橘,接下來(lái)的實(shí)現(xiàn)過程都是圍繞它來(lái)完成的胁孙。

最終效果演示:


VerticalScrollImageView.gif
  • BitmapRegionDecoder的基礎(chǔ)用法
    BitmapRegionDecoder是通過 newInstance方法來(lái)實(shí)例化的。
 public static BitmapRegionDecoder newInstance(InputStream is,
            boolean isShareable) throws IOException {
        if (is instanceof AssetManager.AssetInputStream) {
            return nativeNewInstance(
                    ((AssetManager.AssetInputStream) is).getNativeAsset(),
                    isShareable);
        } else {
            // pass some temp storage down to the native code. 1024 is made up,
            // but should be large enough to avoid too many small calls back
            // into is.read(...).
            byte [] tempStorage = new byte[16 * 1024];
            return nativeNewInstance(is, tempStorage, isShareable);
        }
    }

還有與之類似的幾個(gè)多態(tài)

 public static BitmapRegionDecoder newInstance(FileDescriptor fd, boolean isShareable) 
public static BitmapRegionDecoder newInstance(String pathName, boolean isShareable)
 public static BitmapRegionDecoder newInstance(byte[] data,int offset, int length, boolean isShareable)

根據(jù)你的需求可選擇具體使用哪個(gè)方法來(lái)實(shí)例化BitmapRegionDecoder
截取部分區(qū)域生成Bitmap的方法

 /**
     * Decodes a rectangle region in the image specified by rect.
     *
     * @param rect The rectangle that specified the region to be decode.
     * @param options null-ok; Options that control downsampling.
     *             inPurgeable is not supported.
     * @return The decoded bitmap, or null if the image data could not be
     *         decoded.
     */
    public Bitmap decodeRegion(Rect rect, BitmapFactory.Options options) {
        synchronized (mNativeLock) {
            checkRecycled("decodeRegion called on recycled region decoder");
            if (rect.right <= 0 || rect.bottom <= 0 || rect.left >= getWidth()
                    || rect.top >= getHeight())
                throw new IllegalArgumentException("rectangle is outside the image");
            return nativeDecodeRegion(mNativeBitmapRegionDecoder, rect.left, rect.top,
                    rect.right - rect.left, rect.bottom - rect.top, options);
        }
    }

兩個(gè)參數(shù),rect是截取圖片的目標(biāo)區(qū)域,options可用配置生成的Bitmap

  • 長(zhǎng)圖片展示控件代碼實(shí)現(xiàn)
    新建一個(gè)控件類VerticalScrollImageView繼承自View,覆寫其onDraw方法襟雷,在此方法中實(shí)現(xiàn)繪制圖片
     @Override
    protected void onDraw(Canvas canvas) {
        Log.e(getClass().getSimpleName(), "draw start " + getWidth() + "  " + getHeight());
        canvas.save();
        int sr = canvas.saveLayer(0, 0, getWidth(), getHeight(), null, Canvas.ALL_SAVE_FLAG);

        Paint paint = new Paint();
        paint.setAntiAlias(true);

        if (bitmapRegionDecoder != null) {

            int targetHeight = viewHeight2ImageHeight(getHeight());//根據(jù)控件的高度獲取需要在原始圖片上截取的高度
            Log.e(getClass().getSimpleName(), "targetHeight  " + targetHeight);

            Log.e(getClass().getSimpleName(), "draw resource "
                    + "  " + imgWidth + "  " + imgHeight
                    + "  " + mTargetY + "    " + targetHeight);

            imgBitmap = null;
            if (imgHeight - mTargetY >= targetHeight) {//剩余區(qū)域大于 當(dāng)前控件高度
                imgBitmap = bitmapRegionDecoder.decodeRegion(new Rect(0, mTargetY
                                , imgWidth, mTargetY + targetHeight)
                        , scaleOptions);
            } else {//剩余區(qū)域小于 當(dāng)前控件高度
                imgBitmap = bitmapRegionDecoder.decodeRegion(new Rect(0, imgHeight - targetHeight
                                , imgWidth, imgHeight)
                        , scaleOptions);
            }

            if (imgBitmap != null) {
                //繪制需要展示的圖片
                canvas.drawBitmap(imgBitmap
                        , new Rect(0, 0, imgBitmap.getWidth(), imgBitmap.getHeight())
                        , new Rect(0, 0, getWidth(), getHeight())
                        , paint);
            }
            imgBitmap = null;
            holderBitmap = null;

        } else {
            if (holderBitmap != null) {//繪制占位圖
                canvas.drawBitmap(holderBitmap
                        , new Rect(0, 0, holderBitmap.getWidth(), holderBitmap.getHeight())
                        , new Rect(0, 0, getWidth(), getHeight())
                        , paint);
            }
        }

        canvas.restoreToCount(sr);
        canvas.restore();
        Log.e(getClass().getSimpleName(), "draw end");

    }

最最關(guān)鍵的代碼就是這里了。如果要實(shí)現(xiàn)圖片的滑動(dòng)效果狂票,只需要一個(gè)簡(jiǎn)單的屬性動(dòng)畫來(lái)逐漸修改mTargetY的值即可

/**
  * targetY 為滾動(dòng)的目標(biāo)位置
*/
private void startScroll(int targetY) {

        targetY = Math.max(0, Math.min(targetY, imgHeight - viewHeight2ImageHeight(getHeight())));

        ValueAnimator valueAnimator = ValueAnimator.ofInt(mTargetY, targetY);
        valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                mTargetY = (int) animation.getAnimatedValue();
                invalidate();
            }
        });
        valueAnimator.addListener(new Animator.AnimatorListener() {
            @Override
            public void onAnimationStart(Animator animation) {
                isScrolling = true;
            }

            @Override
            public void onAnimationEnd(Animator animation) {
                isScrolling = false;
            }

            @Override
            public void onAnimationCancel(Animator animation) {
                isScrolling = false;
            }

            @Override
            public void onAnimationRepeat(Animator animation) {

            }
        });
        valueAnimator.setInterpolator(new LinearInterpolator());
        valueAnimator.setDuration(250);
        valueAnimator.start();
    }

再接著只需要監(jiān)聽遙控器的按鍵,完成滑動(dòng)即可

private void init() {
       //響應(yīng)遙控器事件
        setOnKeyListener(new OnKeyListener() {
            @Override
            public boolean onKey(View v, int keyCode, KeyEvent event) {

                scrollDistance = scrollDistance <= 0 ? getHeight() : scrollDistance;
                if (event.getAction() == KeyEvent.ACTION_DOWN && !isScrolling) {
                    switch (event.getKeyCode()) {
                        case KeyEvent.KEYCODE_DPAD_UP:
                            scrollBy(0 - viewHeight2ImageHeight(scrollDistance));
                            break;
                        case KeyEvent.KEYCODE_DPAD_DOWN:
                            scrollBy(viewHeight2ImageHeight(scrollDistance));
                            break;
                    }
                }

                return false;
            }
        });

        //響應(yīng)空鼠拖拽(手指也可以)
        setOnTouchListener(new OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                switch (event.getAction()) {
                    case MotionEvent.ACTION_DOWN:
//                        Log.e(TAG, " touch down");
                        startY = event.getRawY();
                        mStartTargetY = mTargetY;
                        break;
                    case MotionEvent.ACTION_MOVE:

                        float currentY = event.getRawY();
                        mTargetY = mStartTargetY + (int) (viewHeight2ImageHeight((int) (startY - currentY)) * 1f);
                        mTargetY = Math.max(0, Math.min(mTargetY, imgHeight - viewHeight2ImageHeight(getHeight())));
//                        Log.e(TAG, " touch move  " + mTargetY);
                        invalidate();
                        break;
                    case MotionEvent.ACTION_UP:
//                        Log.e(TAG, " touch up");
                        startY = -1;
                        break;
                }
                return true;
            }
        });
}
    /**
       * 滑動(dòng)到具體的位置
       * @param targetY
     */
    private void scrollTo(int targetY) {
        startScroll(targetY);
    }

    /**
     * 設(shè)置相對(duì)于當(dāng)前,繼續(xù)滑動(dòng)的距離熙暴。小于0 向上滑動(dòng)闺属,大于0向下滑動(dòng)
     * @param distance
     */
    private void scrollBy(int distance) {
        startScroll(mTargetY + distance);
    }

    /**
     * 設(shè)置每次滑動(dòng)的距離
     * @param scrollDistance
     */
    public void setScrollDistance(int scrollDistance) {
        this.scrollDistance = scrollDistance;
    }

完整代碼

package com.hpplay.happyott.view;

import android.animation.Animator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapRegionDecoder;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.animation.LinearInterpolator;

import java.io.File;
import java.io.InputStream;

/**
 * Created by DON on 2017/6/19.
 */

public class VerticalScrollImageView extends View {

    private String TAG = getClass().getSimpleName();

    private int mTargetY = 0;
    private int scrollDistance = 0;

    private int imgWidth = 0, imgHeight = 0;

    private Bitmap imgBitmap = null;
    private Bitmap holderBitmap;
    private BitmapRegionDecoder bitmapRegionDecoder;

    private boolean isScrolling = false;
    private float startY = -1;
    private int mStartTargetY = -1;

    private BitmapFactory.Options scaleOptions = new BitmapFactory.Options();

    public VerticalScrollImageView(Context context) {
        super(context);
        init();
    }

    public VerticalScrollImageView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    public VerticalScrollImageView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init();
    }

    private void init() {


        //相應(yīng)遙控器事件
        setOnKeyListener(new OnKeyListener() {
            @Override
            public boolean onKey(View v, int keyCode, KeyEvent event) {

                scrollDistance = scrollDistance <= 0 ? getHeight() : scrollDistance;
                if (event.getAction() == KeyEvent.ACTION_DOWN && !isScrolling) {
                    switch (event.getKeyCode()) {
                        case KeyEvent.KEYCODE_DPAD_UP:
                            scrollBy(0 - viewHeight2ImageHeight(scrollDistance));
                            break;
                        case KeyEvent.KEYCODE_DPAD_DOWN:
                            scrollBy(viewHeight2ImageHeight(scrollDistance));
                            break;
                    }
                }

                return false;
            }
        });

        //響應(yīng)空鼠拖拽(手指也可以)
        setOnTouchListener(new OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                switch (event.getAction()) {
                    case MotionEvent.ACTION_DOWN:
//                        Log.e(TAG, " touch down");
                        startY = event.getRawY();
                        mStartTargetY = mTargetY;
                        break;
                    case MotionEvent.ACTION_MOVE:

                        float currentY = event.getRawY();
                        mTargetY = mStartTargetY + (int) (viewHeight2ImageHeight((int) (startY - currentY)) * 1f);
                        mTargetY = Math.max(0, Math.min(mTargetY, imgHeight - viewHeight2ImageHeight(getHeight())));
//                        Log.e(TAG, " touch move  " + mTargetY);
                        invalidate();
                        break;
                    case MotionEvent.ACTION_UP:
//                        Log.e(TAG, " touch up");
                        startY = -1;
                        break;
                }
                return true;
            }
        });
    }

    private void startScroll(int targetY) {

        targetY = Math.max(0, Math.min(targetY, imgHeight - viewHeight2ImageHeight(getHeight())));

        ValueAnimator valueAnimator = ValueAnimator.ofInt(mTargetY, targetY);
        valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                mTargetY = (int) animation.getAnimatedValue();
                invalidate();
            }
        });
        valueAnimator.addListener(new Animator.AnimatorListener() {
            @Override
            public void onAnimationStart(Animator animation) {
                isScrolling = true;
            }

            @Override
            public void onAnimationEnd(Animator animation) {
                isScrolling = false;
            }

            @Override
            public void onAnimationCancel(Animator animation) {
                isScrolling = false;
            }

            @Override
            public void onAnimationRepeat(Animator animation) {

            }
        });
        valueAnimator.setInterpolator(new LinearInterpolator());
        valueAnimator.setDuration(250);
        valueAnimator.start();
    }


    /**
     * 根據(jù)InputStream 生成 BitmapRegionDecoder
     * @param imgStream
     */
    public void setImageStream(InputStream imgStream) {
        try {
            BitmapFactory.Options options = new BitmapFactory.Options();
            options.inJustDecodeBounds = true;
            BitmapFactory.decodeStream(imgStream, new Rect(0, 0, 0, 0), options);
            imgWidth = options.outWidth;
            imgHeight = options.outHeight;

            //尋找最佳的縮放比例
            int viewHeight2ImageHeight = viewHeight2ImageHeight(getHeight());
            int scale = getScaleValue(imgWidth, viewHeight2ImageHeight, 1);
            scaleOptions.inSampleSize = scale;

        } catch (Exception e) {
            e.printStackTrace();
        }
        try {
            bitmapRegionDecoder = BitmapRegionDecoder.newInstance(imgStream, false);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * 根據(jù)圖片文件 生成 BitmapRegionDecoder
     * @param imgFile
     */
    public void setImageFile(File imgFile) {
        try {
            BitmapFactory.Options options = new BitmapFactory.Options();
            options.inJustDecodeBounds = true;
            BitmapFactory.decodeFile(imgFile.getAbsolutePath(), options);
            imgWidth = options.outWidth;
            imgHeight = options.outHeight;

            //尋找最佳的縮放比例
            int viewHeight2ImageHeight = viewHeight2ImageHeight(getHeight());
            int scale = getScaleValue(imgWidth, viewHeight2ImageHeight, 1);
            scaleOptions.inSampleSize = scale;

        } catch (Exception e) {
            e.printStackTrace();
        }
        try {
            bitmapRegionDecoder = BitmapRegionDecoder.newInstance(imgFile.getAbsolutePath(), false);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

    private int getScaleValue(int imgWidth, int imgHeight, int scaleValue) {
        long memory = Runtime.getRuntime().maxMemory() / 4;
        if (memory > 0) {
            if (imgWidth * imgHeight * 4 > memory) {
                scaleValue += 1;
                return getScaleValue(imgWidth, imgHeight, scaleValue);
            }
        }
        return scaleValue;
    }


    /**
     * 根據(jù)圖片Id 生成 BitmapRegionDecoder
     * @param resourceId
     */
    public void setImageResource(int resourceId) {
        InputStream imgStream = getResources().openRawResource(resourceId);
        setImageStream(imgStream);

    }

    /**
     * 設(shè)置占位圖
     * @param holderId
     */
    public void setPlaceHolder(int holderId) {
        holderBitmap = BitmapFactory.decodeResource(getResources(), holderId);
    }

    /**
     * 滑動(dòng)到具體的位置
     * @param targetY
     */
    private void scrollTo(int targetY) {
        startScroll(targetY);
    }

    /**
     * 設(shè)置相對(duì)于當(dāng)前慌盯,繼續(xù)滑動(dòng)的距離。小于0 向上滑動(dòng)掂器,大于0向下滑動(dòng)
     * @param distance
     */
    private void scrollBy(int distance) {
        startScroll(mTargetY + distance);
    }

    /**
     * 設(shè)置每次滑動(dòng)的距離
     * @param scrollDistance
     */
    public void setScrollDistance(int scrollDistance) {
        this.scrollDistance = scrollDistance;
    }


    @Override
    protected void onDraw(Canvas canvas) {
        Log.e(getClass().getSimpleName(), "draw start " + getWidth() + "  " + getHeight());
        canvas.save();
        int sr = canvas.saveLayer(0, 0, getWidth(), getHeight(), null, Canvas.ALL_SAVE_FLAG);

        Paint paint = new Paint();
        paint.setAntiAlias(true);

        if (bitmapRegionDecoder != null) {

            int targetHeight = viewHeight2ImageHeight(getHeight());//根據(jù)控件的高度獲取需要在原始圖片上截取的高度
            Log.e(getClass().getSimpleName(), "targetHeight  " + targetHeight);

            Log.e(getClass().getSimpleName(), "draw resource "
                    + "  " + imgWidth + "  " + imgHeight
                    + "  " + mTargetY + "    " + targetHeight);

            imgBitmap = null;
            if (imgHeight - mTargetY >= targetHeight) {//剩余區(qū)域大于 當(dāng)前控件高度
                imgBitmap = bitmapRegionDecoder.decodeRegion(new Rect(0, mTargetY
                                , imgWidth, mTargetY + targetHeight)
                        , scaleOptions);
            } else {//剩余區(qū)域小于 當(dāng)前控件高度
                imgBitmap = bitmapRegionDecoder.decodeRegion(new Rect(0, imgHeight - targetHeight
                                , imgWidth, imgHeight)
                        , scaleOptions);
            }

            if (imgBitmap != null) {
                //繪制需要展示的圖片
                canvas.drawBitmap(imgBitmap
                        , new Rect(0, 0, imgBitmap.getWidth(), imgBitmap.getHeight())
                        , new Rect(0, 0, getWidth(), getHeight())
                        , paint);
            }
            imgBitmap = null;
            holderBitmap = null;

        } else {
            if (holderBitmap != null) {//繪制占位圖
                canvas.drawBitmap(holderBitmap
                        , new Rect(0, 0, holderBitmap.getWidth(), holderBitmap.getHeight())
                        , new Rect(0, 0, getWidth(), getHeight())
                        , paint);
            }
        }

        canvas.restoreToCount(sr);
        canvas.restore();
        Log.e(getClass().getSimpleName(), "draw end");

    }

    /**
     *  圖片高度轉(zhuǎn)為相對(duì)于控件的高度
     * @param imgHeight
     * @return
     */
    private int imageHeight2ViewHeight(int imgHeight) {
        if (this.imgHeight <= 0) {
            return 0;
        }
        return (int) (imgHeight / ((float) getWidth() / imgWidth * imgHeight) * getHeight());
    }

    /**
     * 控件高度轉(zhuǎn)為相對(duì)于圖片高度
     * @param viewHeight
     * @return
     */
    private int viewHeight2ImageHeight(int viewHeight) {
        if (getHeight() <= 0) {
            return 0;
        }
        return (int) (viewHeight / ((float) getWidth() / imgWidth * imgHeight) * imgHeight);
    }

    @Override
    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        imgBitmap = null;
        holderBitmap = null;
        System.gc();
    }
}

畢其功于一類亚皂,做到簡(jiǎn)單好用,不依賴其他文件

  • 用法

布局文件

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <com.hpplay.happyott.view.VerticalScrollImageView
        android:id="@+id/scrollImageView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

</LinearLayout>
        VerticalScrollImageView mImageView = (VerticalScrollImageView) view.findViewById(R.id.scrollImageView);
        mImageView.setScrollDistance((int) ((float) Utils.getScreenHeight(getActivity()) / 3 * 2));
        mImageView.setFocusable(true);
        mImageView.setFocusableInTouchMode(true);
        mImageView.requestFocus();
        Glide.with(getActivity())
                .load(mImgUrl)
                .downloadOnly(new SimpleTarget<File>() {
                    @Override
                    public void onResourceReady(File resource, GlideAnimation<? super File> glideAnimation) {
                        mImageView.setImageFile(resource);
                    }

                    @Override
                    public void onLoadFailed(Exception e, Drawable errorDrawable) {
                        super.onLoadFailed(e, errorDrawable);
                    }
                });
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末国瓮,一起剝皮案震驚了整個(gè)濱河市灭必,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌乃摹,老刑警劉巖禁漓,帶你破解...
    沈念sama閱讀 217,509評(píng)論 6 504
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異峡懈,居然都是意外死亡璃饱,警方通過查閱死者的電腦和手機(jī)与斤,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,806評(píng)論 3 394
  • 文/潘曉璐 我一進(jìn)店門肪康,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái),“玉大人撩穿,你說(shuō)我怎么就攤上這事磷支。” “怎么了食寡?”我有些...
    開封第一講書人閱讀 163,875評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵雾狈,是天一觀的道長(zhǎng)。 經(jīng)常有香客問我抵皱,道長(zhǎng)善榛,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,441評(píng)論 1 293
  • 正文 為了忘掉前任呻畸,我火速辦了婚禮移盆,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘伤为。我一直安慰自己咒循,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,488評(píng)論 6 392
  • 文/花漫 我一把揭開白布绞愚。 她就那樣靜靜地躺著叙甸,像睡著了一般。 火紅的嫁衣襯著肌膚如雪位衩。 梳的紋絲不亂的頭發(fā)上裆蒸,一...
    開封第一講書人閱讀 51,365評(píng)論 1 302
  • 那天,我揣著相機(jī)與錄音糖驴,去河邊找鬼僚祷。 笑死哪痰,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的久妆。 我是一名探鬼主播晌杰,決...
    沈念sama閱讀 40,190評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼筷弦!你這毒婦竟也來(lái)了肋演?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 39,062評(píng)論 0 276
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤烂琴,失蹤者是張志新(化名)和其女友劉穎爹殊,沒想到半個(gè)月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體奸绷,經(jīng)...
    沈念sama閱讀 45,500評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡梗夸,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,706評(píng)論 3 335
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了号醉。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片反症。...
    茶點(diǎn)故事閱讀 39,834評(píng)論 1 347
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖畔派,靈堂內(nèi)的尸體忽然破棺而出铅碍,到底是詐尸還是另有隱情,我是刑警寧澤线椰,帶...
    沈念sama閱讀 35,559評(píng)論 5 345
  • 正文 年R本政府宣布胞谈,位于F島的核電站,受9級(jí)特大地震影響憨愉,放射性物質(zhì)發(fā)生泄漏烦绳。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,167評(píng)論 3 328
  • 文/蒙蒙 一配紫、第九天 我趴在偏房一處隱蔽的房頂上張望径密。 院中可真熱鬧,春花似錦笨蚁、人聲如沸睹晒。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,779評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)伪很。三九已至,卻和暖如春奋单,著一層夾襖步出監(jiān)牢的瞬間锉试,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 32,912評(píng)論 1 269
  • 我被黑心中介騙來(lái)泰國(guó)打工览濒, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留呆盖,地道東北人拖云。 一個(gè)月前我還...
    沈念sama閱讀 47,958評(píng)論 2 370
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像应又,于是被迫代替她去往敵國(guó)和親宙项。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,779評(píng)論 2 354

推薦閱讀更多精彩內(nèi)容

  • Android 自定義View的各種姿勢(shì)1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 172,111評(píng)論 25 707
  • 內(nèi)容抽屜菜單ListViewWebViewSwitchButton按鈕點(diǎn)贊按鈕進(jìn)度條TabLayout圖標(biāo)下拉刷新...
    皇小弟閱讀 46,759評(píng)論 22 665
  • ¥開啟¥ 【iAPP實(shí)現(xiàn)進(jìn)入界面執(zhí)行逐一顯】 〖2017-08-25 15:22:14〗 《//首先開一個(gè)線程株扛,因...
    小菜c閱讀 6,409評(píng)論 0 17
  • 發(fā)現(xiàn) 關(guān)注 消息 iOS 第三方庫(kù)尤筐、插件、知名博客總結(jié) 作者大灰狼的小綿羊哥哥關(guān)注 2017.06.26 09:4...
    肇東周閱讀 12,102評(píng)論 4 62
  • 人類都有保護(hù)自尊的天性洞就,總會(huì)與別人作比較盆繁,然后找到一個(gè)不如自己的點(diǎn)然后去噴。硬件軟件方面等旬蟋。
    gaomingm閱讀 126評(píng)論 0 0