Skip to content

Commit

Permalink
Fixed some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFinestArtist committed Oct 3, 2013
1 parent 883d967 commit 6d7598d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
Binary file modified TheFinestArtist/TheFinestArtist.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions TheFinestArtist/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.utopia.thefinestartist"
android:versionCode="1"
android:versionName="1.0" >
android:versionCode="2"
android:versionName="1.0.1" >

<uses-sdk
android:minSdkVersion="7"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
mWebview.setWebChromeClient(new MyWebChromeClient());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO)
mWebview.getSettings().setPluginState(PluginState.ON);
mWebview.getSettings().setUseWideViewPort(true);
mWebview.getSettings().setUseWideViewPort(false);
mWebview.getSettings().setDefaultZoom(ZoomDensity.FAR);
mWebview.getSettings().setBuiltInZoomControls(true);
mWebview.getSettings().setSupportZoom(true);
Expand Down Expand Up @@ -208,8 +208,10 @@ public void onProgressChanged(WebView view, int progress) {

if (progress == 100) {
mPbar.setVisibility(ProgressBar.GONE);
if (!errored)
if (!errored) {
mReload.setVisibility(View.INVISIBLE);
errorCount = 0;
}
}
}
}
Expand All @@ -221,6 +223,7 @@ public void onPageStarted(WebView view, String url, Bitmap favicon) {
mRefreshPbar.setVisibility(View.VISIBLE);
mRefreshBtn.setVisibility(View.INVISIBLE);
mReloadBtn.setClickable(false);
mReloadBtn.setTextColor(getResources().getColor(R.color.white_overlay));
updateActionView();
}

Expand All @@ -234,6 +237,7 @@ public void onPageFinished(WebView view, String url) {
mRefreshPbar.setVisibility(View.INVISIBLE);
mRefreshBtn.setVisibility(View.VISIBLE);
mReloadBtn.setClickable(true);
mReloadBtn.setTextColor(getResources().getColor(android.R.color.white));
updateActionView();

mLbar.setVisibility(View.INVISIBLE);
Expand All @@ -254,7 +258,7 @@ public boolean shouldOverrideUrlLoading(WebView view, String url) {
@Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
errored = true;
if (errorCount == 0)
if (errorCount < 2)
view.reload();
else {
mReload.setVisibility(View.VISIBLE);
Expand Down
1 change: 1 addition & 0 deletions TheFinestArtist/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<resources>

<color name="black_overlay">#66000000</color>
<color name="white_overlay">#66ffffff</color>

</resources>

0 comments on commit 6d7598d

Please sign in to comment.