¡@

Home 

2014/10/16 ¤W¤È 08:22:07

android Programming Glossary: r.layout.shownumberlayout

How to inflate XML-Layout-File correctly inside Custom ViewGroup?

http://stackoverflow.com/questions/4448779/how-to-inflate-xml-layout-file-correctly-inside-custom-viewgroup

inflater LayoutInflater getSystemService Context.LAYOUT_INFLATER_SERVICE ViewGroup vg ViewGroup inflater.inflate R.layout.shownumberlayout null setContentView vg This shows a White Background with the black Text œTest centered. Now the Version inflating the xml.. Context context inflater LayoutInflater context.getSystemService Context.LAYOUT_INFLATER_SERVICE inflater.inflate R.layout.shownumberlayout null @Override protected void onLayout boolean changed int l int t int r int b TODO Auto generated method stub ShowNumber.class.. Context context inflater LayoutInflater context.getSystemService Context.LAYOUT_INFLATER_SERVICE inflater.inflate R.layout.shownumberlayout null View.inflate context R.layout.shownumberlayout this Log.v ViewNumber Number of Child this.getChildCount output is 1..