开发者社区 问答 正文

java如何添加一个新object到layout中

比如,有一个ImageView:
screenshot
不知道应该怎么添加到layout中?

展开
收起
蛮大人123 2016-02-15 14:32:08 2030 分享 版权
1 条回答
写回答
取消 提交回答
  • 我说我不帅他们就打我,还说我虚伪

    public void addView (View child)
    Adds a child view. If no layout parameters are already set on the child, the default parameters for this ViewGroup are set on the child.
    Note: do not invoke this method from draw(android.graphics.Canvas), onDraw(android.graphics.Canvas), dispatchDraw(android.graphics.Canvas) or any related method.
    Parameters
    child the child view to add

    2019-07-17 18:43:15
    赞同 展开评论
问答分类:
问答标签:
问答地址: