DMI*_*DMI 5 android android-layout android-support-library material-design android-5.0-lollipop
我有一个应用程序,我正在使用Android支持库更新为Material Design样式.在应用程序中,我有一些实际上是Buttons的元素,但样式看起来像Spinners.单击时,它们会弹出日期或时间选择器,并在选择完成后更新文本.
创建这些元素的布局XML片段是:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/start_date"
style="?android:attr/spinnerStyle"
android:layout_width="0dp"
android:layout_weight="3"
android:hint="@string/hint_start_date"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/start_time"
style="?android:attr/spinnerStyle"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/end_date"
style="?android:attr/spinnerStyle"
android:hint="@string/hint_end_date"
android:layout_width="0dp"
android:layout_weight="3"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/end_time"
style="?android:attr/spinnerStyle"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
这与以前的版本相比没有变化,它可以正常工作.从棒棒糖开始,不是像我期望的那样渲染,而是出现一个奇怪的灰色边框(例如在Nexus 6上):

当按压并保持元件时,内部形状的底部收缩,因此灰色三角形变宽.
我已经尝试重写该样式以使用我自己的(略微修改过的)原始AppCompat Library drawables的副本作为背景.我试图强制背景@null,并且工件仍在那里.Android Studio中呈现的预览在元素的左侧显示灰色边框,我也无法删除:

我真的不知道这是从哪里来的.有什么建议?或者也许想要使用不同的UI模式?