Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Android Custom Tab linked to Activity -


how can class below create tabs link activities. worrking way tabs not linked activity. need tabs load different activities?

import android.app.tabactivity; import android.content.context; import android.os.bundle; import android.view.layoutinflater; import android.view.view; import android.widget.tabhost; import android.widget.tabhost.tabspec; import android.widget.textview; import android.widget.tabhost.tabcontentfactory;  public class customtabactivity extends tabactivity {     tabhost mtabhost = null;      @override     public void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.main);         mtabhost = (tabhost) findviewbyid(android.r.id.tabhost);         // mtabhost.gettabwidget().setdividerdrawable(r.drawable.tab_divider);         setuptab(new textview(this), "tab 1");         setuptab(new textview(this), "tab 2");         setuptab(new textview(this), "tab 3");     }      private void setuptab(final view view, final string tag) {         view tabview = createtabview(mtabhost.getcontext(), tag);         tabspec setcontent = mtabhost.newtabspec(tag).setindicator(tabview)                 .setcontent(new tabcontentfactory() {                      public view createtabcontent(string tag) {                         return view;                     }                 });         mtabhost.addtab(setcontent);     }      private static view createtabview(final context context, final string text) {         view view = layoutinflater.from(context)                 .inflate(r.layout.tabs_bg, null);         textview tv = (textview) view.findviewbyid(r.id.tabstext);         tv.settext(text);         return view;     } } 

i need setconent activities , not views

no, not. gain nothing having tabs populated activities. in fact, doing causes more harm -- waste heap space, stack space, , cpu time no added value.

now, not have define tab content @ runtime if not want. example, here sample project defines tab content in same layout tabhost itself.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -