12
Tôi cần đặt src của ImageView trong phong cách của mình, nhưng tôi không thể tìm thấy một ví dụ hay về bất kỳ ai làm điều này và khi tôi thử mã bên dưới, nó sẽ treo ứng dụng.Android Set ImageView image src trong Style
<ImageView android:src="@style/TitleBarImage"></ImageView>
<style name="TitleBarImage">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:src">@drawable/whiteButton</item>
</style>
Điều này phải đơn giản. Đưa cái gì?