Code example for Layout

Methods: getLineBottom

	   * Get how many lines of text we can display so their full height is visible. 
	  private int getFullyVisibleLinesCount() { 
	    Layout layout = createWorkingLayout("");
	    int height = getHeight() - getPaddingTop() - getPaddingBottom();
	    int lineHeight = layout.getLineBottom(0);
	    return height / lineHeight;
	  private Layout createWorkingLayout(String workingText) {
	    return new StaticLayout(workingText, getPaint(),
	        getWidth() - getPaddingLeft() - getPaddingRight(),
	        Alignment.ALIGN_NORMAL, lineSpacingMultiplier,
	        lineAdditionalVerticalPadding, false /* includepad */);
	  public void setEllipsize(TruncateAt where) {
Stop searching for code, let great code find you!  Add Codota to your java IDE