Code example for TableLayout

Methods: addView

0
        super.onCreate(savedInstanceState);
         
        mApp = (AppState) getApplication();
         
        // layout 
        mLayout = new TableLayout(this);
        mScroll = new ScrollView(this);
        mContent = new TableLayout(this);
 
        // back btn 
        mBtnBack = new Button(this);
        mBtnBack.setText("back");
        mBtnBack.setOnClickListener(new View.OnClickListener() {
			@Override 
			public void onClick(View v) {
				finish();
			} 
		}); 
         
        mLayout.addView(mScroll);
        mLayout.addView(mBtnBack);
        mScroll.addView(mContent);
         
        setContentView(mLayout);
         
        _addDatabase(mApp.mDbCell);
Stop searching for code, let great code find you!  Add Codota to your java IDE