我有一个吐司,它显示文本为居中对齐,我想让它左对齐怎么做。生成 toast 的代码如下。
Toast test;
String final_status = titles[status_index];
String final_equipment = EquipmentNamePartial[equipment_index];
test = Toast.makeText(SalesBar.this, "Status: " + final_status + '\n'
+ " Equipment: " + final_equipment + '\n'
+ " Duration: " + duration_value + " hours", Toast.LENGTH_SHORT);
test.setGravity(Gravity.TOP|Gravity.LEFT, xx, yy);
test.show();