@@ -0,0 +1,1592 @@
+package edu.ptucustomviewordrawable.customDrawLine;%0A%0Aimport android.content.Context;%0Aimport android.graphics.Canvas;%0Aimport android.graphics.Paint;%0Aimport android.graphics.drawable.BitmapDrawable;%0Aimport android.os.Build;%0Aimport android.support.annotation.AttrRes;%0Aimport android.support.annotation.NonNull;%0Aimport android.support.annotation.Nullable;%0Aimport android.support.annotation.RequiresApi;%0Aimport android.support.annotation.StyleRes;%0Aimport android.util.AttributeSet;%0Aimport android.view.ViewGroup;%0Aimport android.widget.FrameLayout;%0Aimport android.widget.LinearLayout;%0A%0Aimport edu.ptucustomviewordrawable.R;%0A%0A/**%0A * Created by rick.wang on 2017/8/1.%0A */%0A%0Apublic class DrawNum extends LinearLayout%7B%0A%0A    public DrawNum(@NonNull Context context) %7B%0A        super(context);%0A    %7D%0A%0A    public DrawNum(@NonNull Context context, @Nullable AttributeSet attrs) %7B%0A        super(context, attrs);%0A    %7D%0A%0A    public DrawNum(@NonNull Context context, @Nullable AttributeSet attrs, @AttrRes int defStyleAttr) %7B%0A        super(context, attrs, defStyleAttr);%0A    %7D%0A%0A    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)%0A    public DrawNum(@NonNull Context context, @Nullable AttributeSet attrs, @AttrRes int defStyleAttr, @StyleRes int defStyleRes) %7B%0A        super(context, attrs, defStyleAttr, defStyleRes);%0A    %7D%0A    public boolean isDraw=false;%0A    @Override%0A    protected void dispatchDraw(Canvas canvas) %7B%0A        super.dispatchDraw(canvas);%0A        if (isDraw)%0A        canvas.drawBitmap(((BitmapDrawable)getResources().getDrawable(R.mipmap.ic_launcher)).getBitmap(),200,20,new Paint());%0A    %7D%0A%7D%0A

添加slide Tablayout