this is my code so far, i don't think it accepts the variable 'count' from the other class, but it keeps coming up with this error under
setTypeFace.
package com.example; import java.text.SimpleDateFormat; import java.util.Date; import android.graphics.Typeface; import android.view.View; public class Message extends ChatApplication{ @Override public String toString() { return timeFormat.format(time) + "\n" + sender + text + count; } Date time = new Date(); SimpleDateFormat timeFormat = new SimpleDateFormat ("HH:mm"); private String text; private String sender = "Carla: "; public int count; public void button(){ if(count==0){ text.setTypeface(Typeface.DEFAULT,Typeface.NORMAL); } else if (count == 1){ text.setTypeface(Typeface.DEFAULT,Typeface.ITALIC); } else if (count == 2){ text.setTypeface(Typeface.DEFAULT,Typeface.BOLD); } } public Message(String text) { super(); this.text = text; } public String getText() { return text; } public Message(int count) { super(); this.count = count; } public int getCount() { return count; } }