![]() tTextSize(TypedValue.COMPLEX_UNIT_SP, 18 ) setText ( "programmatically created TextView2" ) tMargins( 10, 10, 10, 10 ) // (left, top, right, bottom) tLayoutParams(layoutParams) LayoutParams layoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT, TextView textView2 = new TextView ( this ) tBackgroundColor( 0xff66ff66 ) // hex color 0xAARRGGBB tPadding( 20, 20, 20, 20 ) // in pixels (left, top, right, bottom) linearLayout. setText ( "programmatically created TextView1" ) tLayoutParams( new LayoutParams(LayoutParams.WRAP_CONTENT, TextView textView1 = new TextView ( this ) setLayoutParams ( new LayoutParams(LayoutParams.MATCH_PARENT, LinearLayout linearLayout = new LinearLayout ( this ) LinearLayout.LayoutParams txtParams = new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT) tLayoutParams( new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT)) tDivider( new ColorDrawable( 0xFFDDDDDD )) ListView listView = new ListView(activity) ![]() setLayoutParams ( new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT)) LinearLayout rootLayout = new LinearLayout (activity)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |