【发布时间】:2021-06-09 19:14:02
【问题描述】:
我是 Android 工作室的新手。我正在尝试为片段中的 TextView 设置样式,但出现错误。 “膨胀类片段时出错”“二进制 XML 文件第 21 行”。感谢您的帮助!
TextView textview= (TextView) root.findViewById(R.id.textview);
EmbossMaskFilter embossmaskfilter = new EmbossMaskFilter(new float[]{1,5,1}, // direction of the light source
0.5f, // ambient light between 0 to 1
10, // specular highlights
7.5f); // blur before applying lighting);
textview.setLayerType(View.LAYER_TYPE_SOFTWARE,null);
textview.getPaint().setMaskFilter(embossmaskfilter);
【问题讨论】:
标签: java android android-fragments