【发布时间】:2020-12-06 15:36:46
【问题描述】:
我的 Main-Activity 中有以下代码:
LinearesLayout = (LinearLayout) findViewById(R.id.linearlayout);
TextView textView = new TextView(this);
textView.setBackgroundResource(R.color.colorPrimary);
LinearesLayout.addView(textView);
如何将 TextView 的角设置为圆形?
【问题讨论】:
-
您应该首先尝试自己找到一种方法,然后向我们展示您尝试过的方法,如果它不起作用并且您需要帮助了解原因。不要让别人为你工作
-
@TalMantelmakher 我已经尝试在 Internet 上找到它的命令。但是,如果我不知道该使用哪个命令,我该如何向您展示一些东西呢?
-
它应该看起来像这样:textView.setradius="5dp"。但我找不到这样的想法......