I want to make an app with 2 html files at my asset folder:
one.html and two.html
Then when some body type in my edittext: one, it opens the one.html.
Is that possible and how can i do that.
I have this code but i don’t now what to do with it:
AssetManager assetManager = getAssets();
String[] files = null;
try {
files = assetManager.list("");
} catch (IOException e) {
Log.e("Error loading assets", e.getMessage());
}
for (String file : files) {
if (file.equals("one.html")) {
Open the html with webview
else if (file.equals("two.html")) {
Open the html with webview
}
}
So do you now how i can search trough my asset folder with an EditText?
create one edittext and one webview. if you write file name in edit text then your webview will load the file from assets folder and show it
Sudo code