【发布时间】:2012-03-28 15:51:15
【问题描述】:
我有一个字符串输入,其中包含一个带有字符串 Fromat 的 Layout.xml。
// String that contains the Layout.xml :
String concat ;
// Create the XmlPullParser from the String format
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
factory.setNamespaceAware(true);
XmlPullParser xpp = factory.newPullParser();
xpp.setInput( new StringReader (concat) );
// create le The LayoutInflater
LayoutInflater inflater = (LayoutInflater)this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View myView = inflater.inflate(xpp, null);
我遇到了这个错误:
03-12 08:23:12.876: W/System.err(937): android.view.InflateException: START_TAG http://schemas.android.com/apk/res/android}android:orientation='vertical' {http://schemas.android.com/apk/res/android}android:layout_width='fill_parent' {http://schemas.android.com/apk/res/android}android:layout_height='fill_parent'>@1:226 在 java.io.StringReader@44f50508 中:膨胀类时出错
请帮忙?
【问题讨论】:
标签: android layout-inflater xmlpullparser