TextView.setAllCaps() 从 API 14 开始。旧 API(例如 13 和更低版本)的等效项是什么?
我在较低的 API 上找不到这种方法。可能 setTransformationMethod() 对旧 API 负责吗?如果是,我应该如何使用它?TextView.setTransformationMethod(new TransformationMethod() {...
有点混乱。
尝试这个:
textView.setText(textToBeSet.toUpperCase());
oldskoolstrtoupper()
呢?
底线是toUpperCase()
解决方案。我不能反对。如果您更喜欢这样做setAllCaps()
,TransformationMethod
请查看我的回答。