FoldingLayoutActivity.java 文件源码

java
阅读 29 收藏 0 点赞 0 评论 0

项目:buildAPKsSamples 作者:
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_fold);

    mImageView = (ImageView)findViewById(R.id.image_view);
    mImageView.setPadding(ANTIALIAS_PADDING, ANTIALIAS_PADDING, ANTIALIAS_PADDING,
            ANTIALIAS_PADDING);
    mImageView.setScaleType(ImageView.ScaleType.FIT_XY);
    mImageView.setImageDrawable(getResources().getDrawable(R.drawable.image));

    mTextureView = new TextureView(this);
    mTextureView.setSurfaceTextureListener(mSurfaceTextureListener);

    mAnchorSeekBar = (SeekBar)findViewById(R.id.anchor_seek_bar);
    mFoldLayout = (FoldingLayout)findViewById(R.id.fold_view);
    mFoldLayout.setBackgroundColor(Color.BLACK);
    mFoldLayout.setFoldListener(mOnFoldListener);

    mTouchSlop = ViewConfiguration.get(this).getScaledTouchSlop();

    mAnchorSeekBar.setOnSeekBarChangeListener(mSeekBarChangeListener);

    mScrollGestureDetector = new GestureDetector(this, new ScrollGestureDetector());
    mItemSelectedListener = new ItemSelectedListener();

    mDefaultPaint = new Paint();
    mSepiaPaint = new Paint();

    ColorMatrix m1 = new ColorMatrix();
    ColorMatrix m2 = new ColorMatrix();
    m1.setSaturation(0);
    m2.setScale(1f, .95f, .82f, 1.0f);
    m1.setConcat(m2, m1);
    mSepiaPaint.setColorFilter(new ColorMatrixColorFilter(m1));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号