많은 시간을 물어보고 있지만이 모든 것을 시도했지만 아무 것도 내 요구 사항을 충족하지 않습니다. android:drawableLeft
XML 파일의 버튼에 벡터 이미지를 표시하고 해당 API 21에서 실행중인 속성을 사용했지만 동일한 코드에서 실행중인 경우 아래의 API (21)에 다음 응용 프로그램이 충돌있어 19처럼, 나는 이미 vectorDrawables.useSupportLibrary = true
및 AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
를 추가하지만 내가 하나가이 밖으로 나를 도울 수 모두 작동하지, 내 XML 코드는 다음과 같습니다
<android.support.v7.widget.AppCompatButton
android:id="@+id/shduleSms"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_shedule_sms"
android:drawablePadding="5dip"
app:layout_constraintTop_toBottomOf="@+id/textConCount"
android:padding="15dp"
android:layout_marginEnd="30dp"
android:layout_marginRight="30dp"
app:layout_constraintRight_toRightOf="@+id/textConCount"
android:layout_marginTop="15dp"
android:text="@string/sendlater"
android:textColor="@color/white"
android:theme="@style/MyButtonTwo"
/>
여기에 gradle 코드를 넣을 수 있습니까 –
벡터 인 경우 ic_shedule_sms 파일의 코드를 공유하십시오. EDIT : ic_shedule_sms를 drawableLeft로 사용했지만 ic_paper_plane 오류가 발생했습니다. 오류가이 'shduleSms'요소와 관련이 있습니까? – Ram
예 이것은 동일한 요소입니다 두 번째 버튼은 여기에 두 번째 요소 코드를 넣었습니다 – ashish