6.2.0 - 重新设计及编写项目文档; 新增多语言适配; 丰富控件选择器功能; 优化夜间模式适配等

This commit is contained in:
SuperMonster003
2023-01-21 22:17:16 +08:00
parent 069932c8d3
commit 10960ddbee
2139 changed files with 66316 additions and 41795 deletions

View File

@@ -0,0 +1,31 @@
package android.widget;
import java.lang.reflect.Field;
public class TextViewHelper {
private static final Field sSavedStateText;
static {
Field text = null;
try {
text = TextView.SavedState.class.getDeclaredField("text");
text.setAccessible(true);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
sSavedStateText = text;
}
public static void setText(TextView.SavedState state, CharSequence text) {
if (sSavedStateText == null) {
return;
}
try {
sSavedStateText.set(state, text);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}