Android设计库FAB no shadow
出于某种原因,我的晶圆厂没有显示阴影,尽管我已经将标高和边框宽度设置为0,就像许多博客中描述的那样。这应该可以解决问题。我将晶圆厂放在工具栏上方,以获得材料设计指南的外观 这是我的密码:Android设计库FAB no shadow,android,android-actionbar,android-toolbar,floating-action-button,androiddesignsupport,Android,Android Actionbar,Android Toolbar,Floating Action Button,Androiddesignsupport,出于某种原因,我的晶圆厂没有显示阴影,尽管我已经将标高和边框宽度设置为0,就像许多博客中描述的那样。这应该可以解决问题。我将晶圆厂放在工具栏上方,以获得材料设计指南的外观 这是我的密码: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" xmlns:ap
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include android:id="@+id/toolbar" layout="@layout/toolbar_extended" />
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_navigate"
android:layout_alignParentRight="true"
android:layout_marginTop="88dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:layout_marginLeft="16dp"
app:backgroundTint="@color/accent_yellow"
app:borderWidth="0dp"
app:elevation="8dp"
app:pressedTranslationZ="12dp"
app:fabSize="normal"
app:rippleColor="@color/accent_dark_yellow" />
</RelativeLayout>
工具栏:
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="116dp"
android:background="?attr/colorPrimary"
android:elevation="4dp"
android:fitsSystemWindows="true"
android:minHeight="?android:attr/actionBarSize"
app:navigationIcon="@drawable/abc_ic_ab_back_mtrl_am_alpha"/>
更改xmlns:app=”http://schemas.android.com/tools“
至xmlns:app=”http://schemas.android.com/apk/res-auto“
设置
应用程序:borderWidth=“0dp”
除了添加名称空间之外
xmlns:app=”http://schemas.android.com/apk/res-auto"