Skip to content

Commit

Permalink
Fixes, minSdk now 16.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasCz committed Feb 23, 2015
1 parent 964c43c commit 72c5fe5
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
10 changes: 5 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ android {

defaultConfig {
applicationId "jonas.tool.saveForOffline"
minSdkVersion 14
minSdkVersion 16
targetSdkVersion 19
versionCode 11
versionName "2.0.2 Beta"
versionCode 12
versionName "2.0.4 Beta"
}
buildTypes {
release {
Expand All @@ -20,5 +20,5 @@ android {
}

dependencies {
compile "org.jsoup:jsoup:1.8.1"
}
compile "org.jsoup:jsoup:1.8.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class ViewActivity extends Activity
private String title;
private String fileLocation;
private WebView webview;
private TextView loadingText;
private WebView.HitTestResult result;

private boolean save_in_background;
Expand All @@ -41,7 +42,8 @@ public void onCreate(Bundle savedInstanceState)
fileLocation = incomingIntent.getStringExtra("fileLocation");

setProgressBarIndeterminateVisibility(true);


loadingText =(TextView) findViewById(R.id.view_activity_loading_text);
webview = (WebView) findViewById(R.id.webview);
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
String ua = sharedPref.getString("user_agent", "mobile");
Expand Down Expand Up @@ -79,6 +81,7 @@ public void onCreate(Bundle savedInstanceState)

@Override
public void onPageFinished(WebView view, String url) {
// loadingText.setVisibility(View.GONE);
setProgressBarIndeterminateVisibility(false);

}
Expand All @@ -91,6 +94,7 @@ public void onPageFinished(WebView view, String url) {
@Override
public void onPageFinished(WebView view, String url) {
setProgressBarIndeterminateVisibility(false);
// loadingText.setVisibility(View.GONE);

}
});
Expand Down Expand Up @@ -143,6 +147,7 @@ void continueWhenLoaded(WebView webView) {

// Any other code we need to execute after loading a page from a WebArchive...
setProgressBarIndeterminateVisibility(false);
// loadingText.setVisibility(View.GONE);
}


Expand Down
23 changes: 20 additions & 3 deletions app/src/main/res/layout/view_activity.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<WebView
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:orientation="vertical">

<TextView
android:layout_height="wrap_content"
android:text="Loading..."
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:gravity="center_horizontal"
android:paddingTop="48dp"
android:id="@+id/view_activity_loading_text"
android:visibility="gone"/>

<WebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

</LinearLayout>

0 comments on commit 72c5fe5

Please sign in to comment.