Skip to main content

Posts

Showing posts with the label layoutparams

Programmatically Position items in activity. NO XML

I have an Activity that has all the display elements added dynamically. Theres no xml for the acvtivity at all. The Activity consists of the following controls: RelativeLayout (Layout object that all the child views sit in) TextView (Title for the page, sits at top of the RelativeLayout) ScrollView (Scrollable area that holds all the data controls) LinearLayout (Layout object to hold the activity buttons) I want to know how it is possible to define that the ScrollView sits below the Title TextView and above the LinearLayout button holder where the LinearLayout is set to the Activity Page bottom I have tried using RelativeLayout.LayoutParams to set up rules but cannot seem to understand the way to do it. Any help or links to tutorials would be apreciated I have included my Code to see if someone can help // declare the items for display RelativeLayout baseLayout = new RelativeLayout(this); // add the customer name and number field. // NOTE: We wil