我(显然)是Symfony / Sonata的新手,我有一个问题,Sonata管理员将我的日期选择包装到3行。
PHP:
$form = $this->createFormBuilder($statsForm)
->add('startDate', 'date', array('years' => range(2015, date('Y')), 'format' => 'y-M-d', 'widget' => 'choice'))
->add('endDate', 'date', array('years' => range(2015, date('Y')), 'format' => 'y-M-d', 'widget' => 'choice'))
->getForm();
树枝:
{{ form_start(form) }}
<div class="col-md-3">
{{ form_widget(form) }}
</div>
{{ form_end(form) }}
屏幕:
答案 0 :(得分:2)
在您的情况下,您必须在表单中选择 ImageView imageViewz = (ImageView) findViewById(R.id.imageView6);
Picasso.with(context).load(background).into(imageViewz);
LinearLayout layout = new LinearLayout(Download.this);
layout.setId(R.id.download);
LayoutParams layoutParams
= new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
layout.setLayoutParams(layoutParams);
layout.setOrientation(LinearLayout.VERTICAL);
LayoutParams imageViewLayoutParams
= new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
imageViewz.setLayoutParams(imageViewLayoutParams);
layout.removeAllViews();
layout.addView(imageViewz);
setContentView(layout);
类型:
sonata_type_date_picker
文档参考:
https://sonata-project.org/bundles/core/master/doc/reference/form_types.html