• 代码中设置布局


    1.

    RelativeLayout downloadRelativeLayout = new RelativeLayout(context);
            downloadRelativeLayout.setBackgroundColor(Color.WHITE);
            downloadRelativeLayout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
            downloadListView = new ListView(context);
            downloadListView.setPadding(10, 10, 10, 10);
            downloadListView.setDivider(getResources().getDrawable(R.drawable.line));
            LayoutParams listViewLayout = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
            downloadRelativeLayout.addView(downloadListView, listViewLayout);
  • 相关阅读:
    【hdu4035】Maze
    【bzoj2707】走迷宫
    【CF123E】Maze
    【CF113D】Museum
    【recording】gdoi2018
    最近公共祖先(LCA)(题目)
    回转寿司
    counting
    B
    A
  • 原文地址:https://www.cnblogs.com/niuxx-android/p/5509104.html
Copyright © 2020-2023  润新知