Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的应用程序中,我有一个文本视图,在产品旁边有很多行,但我需要具有正确外观的数据。是否可以动态对齐对齐?
Android 不支持完全对齐
但请检查此链接和此链接的所有答案。
这可能会帮助你
TextView tv = new TextView(context); tv.setWidth(45); tv.setGravity(Gravity.RIGHT); // attempt at justifying text tv.setMaxLines(1); tv.setText("Hellow"); this.addView(tv);
但可能 Android 不支持完整的理由。