imageView = new ImageView(NavigationActivity.this); imageView.setLayoutParams(new LayoutParams(12,12)); imageView.setPadding(20, 0, 20, 0); 设置ImageView的setPadding(20, 0, 20, 0); 不起作用 改为 LinearLayout.LayoutParams params = new LinearLayout.LayoutParams…