[Solved] Adding multiple views to a view [duplicate]

See this is sample code, this might helpful for you. Instaed of LockView you can mention other views.. lockLayout = (LinearLayout) findViewById(R.id.quick_lock_layout); private void renderLockLayout() { lockLayout.removeAllViews(); lockLayout.invalidate(); lockLayout.setLayoutParams(new LinearLayout.LayoutParams( lockLayoutWidth + 7, (height / 6))); /* * Toast.makeText(ApplicationContext.getContext(), “Num count is :” + * _totalLocks, Toast.LENGTH_SHORT).show(); */ Log.i(getClass().getSimpleName(), “Total :” + _totalLocks); lockViewArray = … Read more