I am setting custom trur type font of my TextView and set text size; then using setText() method i set text to the TextView. It shows perfect text. But when i try to get baseline of this TextView it shows 1 or -1. Why is it??
I am doing like this;
TextView tv;
tv.setTypeface(Typeface.createFromAsset(getAssets(),"customFont.ttf"));
tv.setTextSize(20);
tv.setText("My name is Tahir");
tv.getBaseline();
//this returns -1. (if i set Height and width of tv suppose 100 the getBaseline() retruns 1)
tv.getTop();
tv.getBottom();
Please help me what may be the problem???