package com.example.a11561.demo; import android.annotation.SuppressLint; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Matrix; import android.graphics.Paint; import android.net.Uri; import android.os.Environment; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.MotionEvent; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.Toast; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.OutputStream; import java.text.SimpleDateFormat; import java.util.Date; public class MainActivity extends AppCompatActivity { private ImageView imageView; private Bitmap bmcopy; private Canvas mcanvas; private int startx; private int starty; private Paint paint; private Button red,bule,shua,save; private Bitmap bitmap; @SuppressLint("ClickableViewAccessibility") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); imageView=findViewById(R.id.image); red=findViewById(R.id.
用自定义view实现画图并保存到SDk
最新推荐文章于 2021-05-27 09:31:36 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)