开发者

Android Get xml from each class

开发者 https://www.devze.com 2023-03-16 22:19 出处:网络
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

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

精彩评论

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