Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 package edu.nimbus.glass.screens;
00017
00018 import android.graphics.Canvas;
00019 import android.text.TextPaint;
00020 import edu.nimbus.glass.TopicManager;
00021
00022
00027 public class AllTopics implements Screen{
00028
00029 public AllTopics(){
00030
00031 }
00032
00033 @Override
00034 public void draw(TopicManager tm, TextPaint mTopicPaint, Canvas canvas, int width, int height) {
00035 String text = tm.getText();
00036 String[] arr = text.split("\n");
00037
00038 double dist = height / (arr.length);
00039
00040 mTopicPaint.setTextSize((float)dist);
00041 for(int i=0;i< arr.length;i++){
00042 String val = "\t" + arr[i];
00043 canvas.drawText(TopicManager.performFormatting(val), 0, (float) ((i+1) * dist) , mTopicPaint);
00044 }
00045 }
00046 }