Posts

Showing posts with the label edittext programatically

Create Form Programmatically in Android

Image
Step: 1 create a new xml layout with scrollview and LinearLayout . We create child view dynamically through code , added to the LinearLayout. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 <? xml version = "1.0" encoding = "utf-8" ?> < ScrollView xmlns: android = "http://schemas.android.com/apk/res/android" android: id = "@+id/scrollView" android: layout_width = "match_parent" android: layout_height = "match_parent" android: fillViewport = "false" android: scrollbars = "none" android: layout_margin = "16dp" > < LinearLayout android: id = "@+id/layout1" android: layout_width = "match_parent" android: layout_height = "match_parent" android: orientation = "vertical" ></ LinearLayout > </ ScrollView > Step: 2 create new Activity class 1 2 3 4 5 6 7