2
런타임에 Misc widgets for Android platform에서 패널을 만들고 싶습니다.AttributeSet에 대한 XML을 올바르게 작성하는 방법은 무엇입니까?
XmlPullParser parser = getResources().getXml(R.xml.panel_attribute);
AttributeSet attributes = Xml.asAttributeSet(parser);
Panel panel = (Panel) new Panel(getActivity(),attributes);
panel_attribute.xml은 무엇이되어야합니까?
패널은 레이아웃 내부에서와 마찬가지로 당신이 유사하게 XML 폴더 (리소스 폴더의 하위 폴더) 내부에 단일 파일 .XML의 XML 속성을 정의해야합니다 모든이
<org.miscwidgets.widget.Panel
xmlns:panel="http://schemas.android.com/apk/res/org.miscwidgets"
android:id="@+id/topPanel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingBottom="4dip"
panel:animationDuration="1000"
panel:closedHandle="@drawable/sliding_drawer_handle_minimized"
panel:content="@+id/searchparams_layout"
panel:handle="@+id/handle"
panel:linearFlying="true"
panel:openedHandle="@drawable/sliding_drawer_handle_minimized"
panel:position="top" />