Skip to main content

Posts

Showing posts with the label dynamic

Divide Layouts into Two Parts Programmatically(without using xml)

For this we just need a class and we will programmatically create the Layouts. And after this we will add Buttons in each layout. package com.AndroidDevelopmentGuru.progmatic; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.view.Gravity; import android.widget.Button; import android.widget.LinearLayout; import android.widget.LinearLayout.LayoutParams; public class progmmatic extends Activity {     @Override     protected void onCreate(Bundle savedInstanceState) {         // TODO Auto-generated method stub         super.onCreate(savedInstanceState);                 //creating a Linear Layout         LinearLayout parent_layout = new LinearLayout(this);