I want to make a new layout file at run time (via source code) and save it into res/layout. I tried may ways for this but not successful.
One of the way I tried:
getApplicationContext().getResources().getString(R.layout.activity_main);
File src = new File(src);
FileInputStream stream = null;
try {
stream = new FileInputStream(src);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
But I am getting FileNotFoundException.
Please help me .