I have an android studio activity that buffers a long string and then outputs the entire string to the phone screen when done. I'm using the following to buffer each line of my report using format() to format columns so they line up correctly left justified:
buffer.append(String.format("%-5s %-8s- %-8s%n",substring(startDay,2,5), lessonEndTime, ENDOFDAY));
After buffering the entire report I send it to the phone screen using the following method:
public void showMessage(String title, String message) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setCancelable(true);
builder.setTitle(title);
builder.setMessage(message);
builder.show();
return;
}
The output is in a variable spaced font which messes up the spacing of the columns. Is there a way to change the font that AlertDialog.Builder uses to a monospace font?