游戏王中国 2022-04-19 23:49 采纳率: 53.3%
浏览 70
已结题

安卓 如何设置边框 tableRow

问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
 tableRow.LayoutParameters = new TableLayout.LayoutParams(TableLayout.LayoutParams.FillParent,
                TableLayout.LayoutParams.WrapContent);
 public Button AddButton(Context context, string text,Android.Graphics.Color 背景色 ,EventHandler clickAction = null)
        {
            var btn = new Button(context);
            btn.SetBackgroundColor(背景色);
            btn.SetText(text, TextView.BufferType.Normal);
            btn.SetPadding(5, 5, 5, 5);
            btn.SetHeight(40);
            if (clickAction != null)
            {
                btn.Click += clickAction;
            }

            return btn;
        }

        public TextView NewText(Context context, string str, Android.Graphics.Color 字体颜色, Android.Graphics.Color 背景色)
        {
            var textView = new TextView(context);
            textView.SetHeight(88);
            if (字体颜色 != null)
            {
                textView.SetBackgroundColor(背景色);
                textView.SetTextColor(字体颜色);
                textView.SetPadding(5, 5, 5, 5);
            }
            textView.SetText(str, TextView.BufferType.Normal);

            return textView;
        }

    tableRow.AddView(_dynaControl.AddButton(this, string.Format("{0}  ", "编辑订单"), Android.Graphics.Color.Red, Bt_编辑Click));
            tableRow.AddView(_dynaControl.AddButton(this, string.Format("{0}  ", "删除订单"), Android.Graphics.Color.Gold, Bt_删除Click));
            tableRow.AddView(_dynaControl.AddButton(this, string.Format("{0}  ", "删除订单"), Android.Graphics.Color.White, Bt_删除Click));
运行结果及报错内容
我的解答思路和尝试过的方法
我想要达到的结果

如何设置边框

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 4月27日
    • 创建了问题 4月19日

    悬赏问题

    • ¥20 找能定制Python脚本的
    • ¥15 odoo17的分包重新供应路线如何设置?可从销售订单中实时直接触发采购订单或相关单据
    • ¥15 用C语言怎么判断字符串的输入是否符合设定?
    • ¥15 通信专业本科生论文选这两个哪个方向好研究呀
    • ¥50 我在一个购物网站的排队系统排队,这个排队到号后重新定向到目标网站进行购物,但是有技术牛通过技术方法直接跳过排队系统进入目标网址购物,有没有什么软件或者脚本可以用
    • ¥15 ios可以实现ymodem-1k协议 1024字节传输吗?
    • ¥300 寻抓云闪付tn组成网页付款链接
    • ¥15 请问Ubuntu要怎么安装chrome呀?
    • ¥15 视频编码 十六进制问题
    • ¥15 unity terrain打包后地形错位,跟建筑不在同一个位置,怎么办