प्रदान करना होगा मैं एक PercentFrameLayout इस्तेमाल करने की कोशिश, लेकिन मैं इस त्रुटि संदेश मिलता है:PercentFrameLayout: आप एक layout_width विशेषता
Binary XML file line #: You must supply a layout_width attribute.
इस एक्सएमएल मैं का उपयोग करें:
<android.support.percent.PercentFrameLayout
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
app:layout_heightPercent="50%"
app:layout_marginLeftPercent="25%"
app:layout_marginTopPercent="25%"
app:layout_widthPercent="50%"/>
</android.support.percent.PercentFrameLayout>
है यह एक बग या क्या यह मेरी गलती है?
यह पैरामीटर के क्रम के अलावा http://developer.android.com/reference/android/support/percent/PercentFrameLayout.html पर उदाहरण जैसा दिखता है, इसलिए मुझे लगता है कि यह सही है। क्या आप वाकई समस्या के साथ विचार हैं? यदि आप उन विचारों को हटाते हैं तो आपका लेआउट सही तरीके से लोड होता है? –
@CoryCharlton हाँ यह डॉक्टर से है और हाँ यह समस्या के साथ दृश्य है। एंड्रॉइड स्टूडियो इसे एक समस्या के रूप में भी हाइलाइट करता है। –