开发者

Android Get xml from each class

I need a adapter for getting a UI veiw and putting it to each tab classes.

My target is to put the fixed UI in a xml and i dont want to copy them for each xml. Onl开发者_开发百科y i want to get this view from each class. This is the logo part of my application!


ok... give this a try.... hope this helps

LayoutInflater li = this.getLayoutInflater();   
      View v = li.inflate(R.layout.neededxml,null);
      LinearLayout logoView = new LinearLayout(this);
      LinearLayout vgr=(LinearLayotu)li.inflate(R.layout.mainxml,null);
      vgr.addView(logoView);
      vgr.addView(v);
      this.setContentView(vgr);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜