Android 浮动操作按钮在pre-L设备上未正确显示
我已经实现了一个布局,它有一个封面图像,下面的布局是ImageView和Textview。在这两个视图的中心,我有一个浮动操作按钮。看那两个深绿色的图标,那是我的工厂。是的,Kitkat设备上未正确显示这两个图标。如何在pre-L设备上正确设置 但在棒棒糖设备和更高的设备上,它对晶圆厂的工作很好,并且显示得很好 layout.xmlAndroid 浮动操作按钮在pre-L设备上未正确显示,android,floating-action-button,Android,Floating Action Button,我已经实现了一个布局,它有一个封面图像,下面的布局是ImageView和Textview。在这两个视图的中心,我有一个浮动操作按钮。看那两个深绿色的图标,那是我的工厂。是的,Kitkat设备上未正确显示这两个图标。如何在pre-L设备上正确设置 但在棒棒糖设备和更高的设备上,它对晶圆厂的工作很好,并且显示得很好 layout.xml <?xml version="1.0" encoding="utf-8"?> <com.test.example.view.Observabl
<?xml version="1.0" encoding="utf-8"?>
<com.test.example.view.ObservableParallaxScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/layout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/cover"
android:layout_width="match_parent"
android:layout_height="268dp"
android:layout_marginTop="104.9dp"
android:background="@drawable/image_cover"
android:scaleType="centerCrop" />
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/icon1"
android:layout_alignParentEnd="true"
android:layout_below="@+id/cover"
android:src="@drawable/ic_icon2"
android:clickable="true"
android:layout_marginRight="145dp"
android:layout_marginTop="-28dp"
android:adjustViewBounds="false"
app:backgroundTint="@color/colorAccent"/>
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/icon2"
android:layout_alignParentEnd="true"
android:layout_below="@+id/cover"
android:src="@drawable/ic_icon2"
android:layout_marginRight="80dp"
android:layout_marginTop="-28dp"
android:clickable="true"
android:adjustViewBounds="false"
app:backgroundTint="@color/colorAccent"/>
<LinearLayout
android:id="@+id/layout2"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_alignParentEnd="false"
android:layout_alignParentStart="false"
android:layout_below="@+id/cover"
android:background="@color/gray"
android:orientation="horizontal"
android:paddingBottom="20dp"
android:paddingLeft="21dp"
android:paddingRight="30dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/image2"
android:layout_width="100dp"
android:layout_height="146dp"
android:layout_marginTop="25dp"
android:src="@drawable/placeholder" />
</LinearLayout
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="13dp"
android:layout_marginTop="18dp"
android:orientation="vertical">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/gray"
android:textSize="20sp" />
</LinearLayout
</LinearLayout
</RelativeLayout
</com.test.example.view.ObservableParallaxScrollView>
比较图像很有用。问题是晶圆厂不是浮动的,它们被剪裁到包含它们的视图的边界上。我认为晶圆厂需要包含在一个协调的布局中,这样它们就可以被画在其他视图的上方。比较图像很有帮助。问题是晶圆厂不是浮动的,它们被剪裁到包含它们的视图的边界上。我认为晶圆厂需要包含在一个协调的布局中,以便它们可以被绘制在其他视图之上。
dependencies {
compile 'com.android.support:design:25.1.0'
}