Thus, the space at the top of the TextView is a complement used for characters outside the English language, such as accents. To remove this space, you can either set the android:includeFontPadding to false in your XML, or do it programmatically using the setIncludeFontPadding(false) function.
See the SDK documentation for TextView if this is not yet clear.
SEPARATE RESPONSE
If setting the android:includeFontPadding does not do what you are trying to do, another solution is to override the onDraw(Canvas canvas) method of the used TextView so that it removes the extra top add-on that Android adds to each TextView. After writing my initial answer, I noticed that for some reason, TextView includes an additional addition in addition to filling the font. Removing the indentation of the font, as well as adding an additional addition, aligns the text at the top of the TextView. Take a look at the code snippet below.
public class TopAlignedTextView extends TextView {
Kachi Jul 04 '11 at 15:39 2011-07-04 15:39
source share