2016-09-15 2 views
1
<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout 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="match_parent" 
android:orientation="vertical"> 
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:id="@+id/toolbar" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:background="@color/colorPrimary" 
    android:minHeight="56dp" 
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" 
    app:popupTheme="@style/ThemeOverlay.AppCompat.Light" 
    app:titleTextAppearance="@style/ToolbarTitle" > 
</android.support.v7.widget.Toolbar> 
<RelativeLayout 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 
    <android.support.design.widget.FloatingActionButton 
     android:id="@+id/myFAB" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentRight="true" 
     android:layout_alignParentBottom="true" 
     android:layout_marginRight="8dp" 
     android:clickable="true" 
     android:layout_marginBottom="8dp" 
     android:src="@drawable/ic_fab_star" 
     app:borderWidth="0dp" 
     app:elevation="10dp" 
     /> 
    <RelativeLayout 
     android:id="@+id/relative6" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content"> 
    </RelativeLayout> 
    <LinearLayout 
     android:layout_width="wrap_content" 
     android:layout_height="match_parent" 
     android:layout_below="@id/relative6" 
     android:orientation="vertical"> 
     <ListView 
      android:id="@+id/list_history" 
      android:layout_width="match_parent" 
      android:layout_height="0dip" 
      android:layout_gravity="start" 
      android:layout_weight="1" 
      android:clickable="false" 
      android:cacheColorHint="@android:color/transparent" 
      android:choiceMode="singleChoice" 
      android:divider="@null" 
      android:dividerHeight="0dp" /> 
    </LinearLayout> 
</RelativeLayout> 
</LinearLayout> 

을 작동하지 않는, 고도 사전 롤리팝 장치에 대한 작동하지 않습니다.FloatingActionButton 상승 사전 롤리팝 장치에 내 XML 그게 전부

새로운 기기에서 완벽하게 작동합니다. nexus 5, 6을 테스트했습니다.

그러나 키트 캣을 실행하는 이전 장치에서는 작동하지 않았습니다.

도움이되고 유익한 정보를 보내 주셔서 감사합니다.

+0

에 대한

의 작업은 코드 응용 프로그램이 줄을 추가 : fabSize는 = "정상"은 나를 위해 해결 나던 –

답변

0

간단히 app:borderWidth="0dp"을 설정하면이 문제가 해결됩니다.

참고 : 루트 레이아웃에 xmlns:app="http://schemas.android.com/apk/res-auto"을 추가하는 것을 잊지 마십시오. 나

<android.support.design.widget.FloatingActionButton 
     xmlns:app="http://schemas.android.com/apk/res-auto" 
     android:id="@+id/your_id" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:layout_alignParentRight="true" 
     android:layout_marginBottom="@dimen/floating_button_margin_bottom" 
     android:layout_marginRight="@dimen/floating_button_margin_right" 
     app:elevation="@dimen/floating_button_elevation" 
     app:borderWidth="0dp" 
     app:rippleColor="@color/your_ripple_color" 
     app:backgroundTint="@color/your_bg_color" /> 
+0

, 난 이미 그 일을했다. 내 코드를 확인하십시오. –

+0

floatingbutton이 여전히 내 목록보기에 있습니다. –

+0

상위 레이아웃을 ** RelativeLayout **으로 변경해보십시오. –

관련 문제