回答

3

我得到這個與版本23.0.0支持的lib工作:

<?xml version="1.0" encoding="utf-8"?> 
<android.support.percent.PercentRelativeLayout 
    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"> 

    <ImageView 
     android:src="@drawable/logo" 
     app:layout_widthPercent="50%" 
     android:layout_height="wrap_content" 
     android:adjustViewBounds="true" /> 

</android.support.percent.PercentRelativeLayout> 
+1

啊,我的錯誤是使用'背景=',而不是'SRC ='。謝謝。 –

+0

你能在這裏回答我的問題嗎? http://stackoverflow.com/questions/34112295/android-scrollview-and-android-support-percent-percentrelativelayout –