1
API에 표시되지 :안드로이드는 FloatingActionButton 내가 내 레이아웃에 <code>FloatingActionButton</code>을 사용하고 16
favbtn = (FloatingActionButton) findViewById(R.id.floatingActionButton);
favbtn.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), btn_star_big_on));
가에서 테스트 때 : Activity
만들 때 내가 거기에 이미지를 넣어
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="61dp"
android:clickable="true"
app:fabSize="mini"
android:src="@android:drawable/btn_star_big_off"
android:id="@+id/floatingActionButton"
app:layout_anchor="@+id/container"
app:layout_anchorGravity="bottom|right"
android:layout_gravity="start"
android:layout_marginBottom="20dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
app:backgroundTint="@color/colorAccent"
/>
API 16과 같은 오래된 장치는 버튼이 보이지 않거나 보이지 않습니다. 이 문제를 해결할 수있는 방법이 있습니까?
[하위 버전 플로팅 작업 버튼 (가능 중복 http://stackoverflow.com/questions/24605116/floating-action-button-for-lower-version으로 수정) – shadygoneinsane
디자인 라이브러리의 버전은 무엇입니까? –
종속성 : 'dependencies { fileTree (dir : 'libs', 포함 : [ '* .jar'])를 컴파일하십시오. 'com.android.support:appcompat-v7:25.0.1'을 (를) 컴파일하십시오. 'com.android .support : 디자인 : 25.0.1 ' 'com.android.support : support-v4:25.0.1 ' 'com.google.android.gms : play-services-ads : 9.8.0 ' testCompile' junit : junit : 4.12 ' }' – adriankroeger