This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class ImageDownloadAndSave extends AsyncTask<String, Void, Bitmap> | |
{ | |
String img_URL = "http://upload.wikimedia.org/wikipedia/commons/thumb/5/51/Google.png/320px-Google.png"; | |
String sdCardPath; | |
private ProgressDialog dialog; | |
@Override | |
protected void onPreExecute() { | |
super.onPreExecute(); | |
dialog = new ProgressDialog(MainActivity.this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void copyAssets() { | |
AssetManager assetManager = getAssets(); | |
String[] files = null; | |
try { | |
files = assetManager.list("img"); | |
} catch (IOException e) { | |
Log.e("tag", "Failed to get asset file list.", e); | |
} | |
for(String filename : files) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.actionbartest2" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk | |
android:minSdkVersion="8" | |
android:targetSdkVersion="19" /> | |
<application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WebView webView = (WebView)findViewById(R.id.webview); | |
String url = ""; | |
ProgressDialog dialog = new ProgressDialog(this); | |
webView.setWebChromeClient(new WebChromeClient(){ | |
@Override | |
public void onProgressChanged(WebView view, int newProgress) { | |
dialog.setMessage("Loading"); | |
dialog.show(); |