I create a custom view com.way.customview.MagnetView,and use it in a layout XML:
<com.way.customview.MagnetView
android:id="@+id/c_joke"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:scaleType="matrix"
android:src="@drawable/magnet_bg_robot_left" />
And I add a namespase in the head:
xmlns:custom="http://ift.tt/GEGVYd"
But the attribution android:src="@drawable/magnet_bg_robot_left" can't load backgroud image. Anyone could tell me why?
Aucun commentaire:
Enregistrer un commentaire