Skip to content

Commit 72c5fe5

Browse files
committed
Fixes, minSdk now 16.
1 parent 964c43c commit 72c5fe5

File tree

3 files changed

+31
-9
lines changed

3 files changed

+31
-9
lines changed

app/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ android {
66

77
defaultConfig {
88
applicationId "jonas.tool.saveForOffline"
9-
minSdkVersion 14
9+
minSdkVersion 16
1010
targetSdkVersion 19
11-
versionCode 11
12-
versionName "2.0.2 Beta"
11+
versionCode 12
12+
versionName "2.0.4 Beta"
1313
}
1414
buildTypes {
1515
release {
@@ -20,5 +20,5 @@ android {
2020
}
2121

2222
dependencies {
23-
compile "org.jsoup:jsoup:1.8.1"
24-
}
23+
compile "org.jsoup:jsoup:1.8.1"
24+
}

app/src/main/java/jonas/tool/saveForOffline/ViewActivity.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public class ViewActivity extends Activity
1919
private String title;
2020
private String fileLocation;
2121
private WebView webview;
22+
private TextView loadingText;
2223
private WebView.HitTestResult result;
2324

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

4344
setProgressBarIndeterminateVisibility(true);
44-
45+
46+
loadingText =(TextView) findViewById(R.id.view_activity_loading_text);
4547
webview = (WebView) findViewById(R.id.webview);
4648
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
4749
String ua = sharedPref.getString("user_agent", "mobile");
@@ -79,6 +81,7 @@ public void onCreate(Bundle savedInstanceState)
7981

8082
@Override
8183
public void onPageFinished(WebView view, String url) {
84+
// loadingText.setVisibility(View.GONE);
8285
setProgressBarIndeterminateVisibility(false);
8386

8487
}
@@ -91,6 +94,7 @@ public void onPageFinished(WebView view, String url) {
9194
@Override
9295
public void onPageFinished(WebView view, String url) {
9396
setProgressBarIndeterminateVisibility(false);
97+
// loadingText.setVisibility(View.GONE);
9498

9599
}
96100
});
@@ -143,6 +147,7 @@ void continueWhenLoaded(WebView webView) {
143147

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

148153

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<WebView
2+
<LinearLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
4-
android:id="@+id/webview"
4+
android:layout_height="match_parent"
55
android:layout_width="match_parent"
6-
android:layout_height="match_parent"/>
6+
android:orientation="vertical">
7+
8+
<TextView
9+
android:layout_height="wrap_content"
10+
android:text="Loading..."
11+
android:textAppearance="?android:attr/textAppearanceMedium"
12+
android:layout_width="match_parent"
13+
android:gravity="center_horizontal"
14+
android:paddingTop="48dp"
15+
android:id="@+id/view_activity_loading_text"
16+
android:visibility="gone"/>
17+
18+
<WebView
19+
android:id="@+id/webview"
20+
android:layout_width="match_parent"
21+
android:layout_height="match_parent"/>
22+
23+
</LinearLayout>
724

0 commit comments

Comments
 (0)