Skip to main content

Posts

Showing posts with the label inflate

Inflate an xml in ANDROID

RelativeLayout mainLayout = (RelativeLayout)findViewById(R.id.relative); //create a view to inflate the layout_item ( the xml with the textView created before) View view = getLayoutInflater().inflate(R.layout.inflate,mainLayout,false); //add the view to the main layout mainLayout.addView(view);