Android????????????????л?
???????????? ???????[ 2015/8/18 10:49:11 ] ??????????????? ???????
???????????layoutInflater.inflate(R.layout.main?? null??false)?????????????R.layout.main???id?????????????????????????????????μ??????洢??sd???У??????????????????????????LayoutInflater??api??????????inflate(XmlPullParser parser?? ViewGroup root??boolean attachToRoot)?????????????????·???????????xmlPullParser:
????public XmlPullParser getXmlPullParser(String resource) {
????XmlPullParser parser = Xml.newPullParser();
????try {
????// InputStream is=mContext.getAssets().open("transfer_main.xml");
????FileInputStream is = new FileInputStream(resource);
????parser.setInput(is?? "utf-8");
????} catch (Exception e) {
????e.printStackTrace();
????}
????return parser;
????}
???????????????????????????????????????????????demo???????????????????????????????????
????????????????????????????????????????res/layout/xxx.xml??????????????????id?????????е???????????????????id???text??????drawble????????????R????????????????????????????????????????????????????????????о???apk???????????????????????????????????id????????????????View???????????
????protected View onCreateView(String name?? AttributeSet attrs)
????throws ClassNotFoundException {
????// return createView(name?? "android.view."?? attrs);
????return createView(name?? "com.xxx.xxxx.viewanalysis.view.VA"?? attrs); //????com.xx.view.VATextView ??????????view ?????TextView
????}
?????????е????????д????????TextView???????????????????????????TextView??????????????????????????????????????????巽????????????????View????????????????????????view?????????????????????????????????????????9???????Button??GridView??RelativeLayout????????ж????view???????????У????±???????ClassNotFoundException????
????VAButton??????
????public class VAButton extends android.widget.Button {
????public VAButton(Context context?? AttributeSet attrs) {
????super(context);
????setAttributeSet(attrs);
????}
????@SuppressWarnings("deprecation")
????public void setAttributeSet(AttributeSet attrs) {
????HashMap<String?? ParamValue> map = YDResource.getInstance().getViewMap();
????int count = attrs.getAttributeCount();
????for (int i = 0; i < count; i++) {
????ParamValue key = map.get(attrs.getAttributeName(i));
????if (key == null) {
????continue;
????}
????switch (key) {
????case id:
????this.setTag(attrs.getAttributeValue(i));
????break;
????case text:
????String value = YDResource.getInstance().getString(
????attrs.getAttributeValue(i));
????this.setText(value);
????break;
????//case...
????default:
????break;
????}
????}
????}
????Ps: view id????????????????????????????????demo??
??????????????????????????????????????????????????????
????demoЧ?????
????????е?Ч?????
??????????????demo?е???????
????????????????????YDLayoutInflater??ParamValue?????????9???????view??
????YDLayoutInflater????????LayoutInflater??????????Щ????????????????????????????????
??????????????????
?????????????????·???????????????У?Ч??????????????Щ????淶??????????????????????????????????????????????£?????д????и??????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Android???????????????Щ???????????Android????????????????????????Щ??Android ??????????????????????????APP?????android???????????????Android App ?????????Android Unit Test ?????Android?????????Robolectric3.0????(?)Android??????????????Android Studio???????????Android????MySQL????????????????Android MVP???????Android ?????????ActiveAndroid??дAndroid??????????????????????Android????????Java??????????Android????????Java8Java / Android ????????????????Щ??
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????