FileDocCategorySizeDatePackage
TextOnPathActivity.javaAPI DocAndroid 5.1 API5144Thu Mar 12 22:22:44 GMT 2015com.android.test.hwui

TextOnPathActivity

public class TextOnPathActivity extends android.app.Activity

Fields Summary
private android.graphics.Path
mPath
private android.graphics.Path
mStraightPath
Constructors Summary
Methods Summary
private static voidbuildPath(android.graphics.Path path)

        path.moveTo(0.0f, 0.0f);
        path.cubicTo(0.0f, 0.0f, 100.0f, 150.0f, 100.0f, 200.0f);
        path.cubicTo(100.0f, 200.0f, 50.0f, 300.0f, -80.0f, 200.0f);
        path.cubicTo(-80.0f, 200.0f, 100.0f, 200.0f, 200.0f, 0.0f);
    
private static voidbuildStraightPath(android.graphics.Path path)

        path.moveTo(0.0f, 0.0f);
        path.lineTo(400.0f, 0.0f);
    
private static android.graphics.PathmakePath()

        Path path = new Path();
        buildPath(path);
        return path;
    
private static android.graphics.PathmakeStraightPath()

        Path path = new Path();
        buildStraightPath(path);
        return path;
    
protected voidonCreate(android.os.Bundle savedInstanceState)

        super.onCreate(savedInstanceState);

        mPath = makePath();
        mStraightPath = makeStraightPath();

        final TextOnPathView view = new TextOnPathView(this);
        setContentView(view);