Android Paint.FontMetricsInt - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android Paint.FontMetricsInt class.

This code example shows how to use the following methods:
    private final Paint mTextBackgroundPaint;
    private final Paint mTextLevelPaint;
    private final Paint mPaint;
    private final Paint mTargetPaint;
    private final Paint mPathPaint;
    private final FontMetricsInt mTextMetrics = new FontMetricsInt();
    private int mHeaderBottom;
    private boolean mCurDown;
    private int mCurNumPointers;
    private int mMaxNumPointers;
    private final ArrayList<PointerState> mPointers
             = new ArrayList<PointerState>();
     
    private boolean mPrintCoords = true;
     
    public PointerLocationView(Context c) {
        super(c);
        setFocusable(true);
        mVC = ViewConfiguration.get(c);
        mTextPaint = new Paint();
5
CodeRank
This code example shows how to use the following methods:
		public ArrayList<VelocityTracker> mVelocityList = new ArrayList<VelocityTracker>();
		private int mHeaderBottom;
		private boolean mCurDown;
		private int mCurX;
		private int mCurY;
		private float mCurPressure;
		private int mCurWidth;
		private VelocityTracker mVelocity;
 
		public MyView(Context c) {
			super(c);
 
			DisplayMetrics dm = new DisplayMetrics();
			dm = TouchScreen_HandWriting.this.getApplicationContext()
					.getResources().getDisplayMetrics();
			int screenWidth = dm.widthPixels;
			int screenHeight = dm.heightPixels;
			if ((480 == screenWidth && 800 == screenHeight)
					|| (800 == screenWidth && 480 == screenHeight)) {
				mZoom = 2;
3
CodeRank
This code example shows how to use the following methods:
        private final Paint mTextPaint;
        private final Paint mTextBackgroundPaint;
        private final Paint mTextLevelPaint;
        private final Paint mPaint;
        private final Paint mTargetPaint;
        private final FontMetricsInt mTextMetrics = new FontMetricsInt();
        private final ArrayList<Float> mXs = new ArrayList<Float>();
        private final ArrayList<Float> mYs = new ArrayList<Float>();
        private int mHeaderBottom;
        private boolean mCurDown;
        private int mCurX;
        private int mCurY;
        private float mCurPressure;
        private float mCurSize;
        private int mCurWidth;
        private VelocityTracker mVelocity;
         
        public MyView(Context c) {
            super(c);
            mTextPaint = new Paint();
4
CodeRank
This code example shows how to use the following methods:
    private final Paint mTextBackgroundPaint;
    private final Paint mTextLevelPaint;
    private final Paint mPaint;
    private final Paint mTargetPaint;
    private final Paint mPathPaint;
    private final FontMetricsInt mTextMetrics = new FontMetricsInt();
    private int mHeaderBottom;
    private boolean mCurDown;
    private int mCurNumPointers;
    private int mMaxNumPointers;
    private final ArrayList<PointerState> mPointers
             = new ArrayList<PointerState>();
     
    private boolean mPrintCoords = true;
     
    public PointerLocationView(Context c) {
        super(c);
        setFocusable(true);
        mVC = ViewConfiguration.get(c);
        mTextPaint = new Paint();
3
CodeRank
This code example shows how to use the following methods:
 
    private static final int STATE_CHANGED = 0x00000001;
    private static final int STATE_COLLAPSED = 0x00000002;
    private static final int STATE_EXPANDED = 0x00000004;
 
    private FontMetricsInt mLabelFontMetrics = new FontMetricsInt();
 
    private TextPaint mTextPaint;
    private TextPaint mTextLabelPaint;
    private Layout mLayout;
 
    private CharSequence mText;
    private CharSequence mTextCut;
    private CharSequence mTextLabel;
 
    private int mStateFlags;
    private int mMaxLines;
    private int mEllipsizedWidth;
 
    private int mLabelWidth;
3
CodeRank
This code example shows how to use the following methods:
		private final Paint mTextPaint;
		private final Paint mTextBackgroundPaint;
		private final Paint mTextLevelPaint;
		private final Paint mPaint;
		private final Paint mTargetPaint;
		private final FontMetricsInt mTextMetrics = new FontMetricsInt();
		public ArrayList< ArrayList<PT> > mLines = new ArrayList< ArrayList<PT> >();
		ArrayList<PT> curLine;	
		public ArrayList<VelocityTracker> mVelocityList	= new ArrayList<VelocityTracker>();
		private int mHeaderBottom;
		private boolean mCurDown;
		private int mCurX;
		private int mCurY;
		private float mCurPressure;
		private int mCurWidth;
		private VelocityTracker mVelocity;
 
		public MyView(Context c) {
			super(c);
 
3
CodeRank
This code example shows how to use the following methods:
		Drawable mDrawable;
 
		public StickerSpan(Context context, Bitmap bitmap) {
			super(DynamicDrawableSpan.ALIGN_BASELINE);
			setBitmap(context, bitmap);
			mFontMetricsInt = new FontMetricsInt();
		} 
 
		public void setBitmap(Context context, Bitmap bitmap) {
			mDrawable = new BitmapDrawable(context.getResources(), bitmap);
			int width = mDrawable.getIntrinsicWidth();
	        int height = mDrawable.getIntrinsicHeight();
	        mDrawable.setBounds(0, 0, width > 0 ? width : 0, height > 0 ? height : 0); 
		} 
 
		@Override 
		public Drawable getDrawable() {
			return mDrawable;
		} 
 
3
CodeRank
This code example shows how to use the following methods:
 
    private static final int STATE_CHANGED = 0x00000001;
    private static final int STATE_COLLAPSED = 0x00000002;
    private static final int STATE_EXPANDED = 0x00000004;
 
    private FontMetricsInt mLabelFontMetrics = new FontMetricsInt();
 
    private TextPaint mTextPaint;
    private TextPaint mTextLabelPaint;
    private Layout mLayout;
 
    private CharSequence mText;
    private CharSequence mTextCut;
    private CharSequence mTextLabel;
 
    private int mStateFlags;
    private int mMaxLines;
    private int mEllipsizedWidth;
 
    private int mLabelWidth;
3
CodeRank

Related Android Paint.FontMetricsInt Questions & Answers:

See Code Examples for Android Paint.FontMetricsInt Methods: