布局代码:
注意:下面的包名记得替换成自己的哦
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="vertical">
<com.example.mytest.myselfView.PaintTest.BasisView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
java代码:
public class TestMyselfViewActivity extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentVie