Fix typos
This commit is contained in:
parent
4c014bd3e3
commit
0499ef60ac
|
@ -34,8 +34,8 @@ public class AboutActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private static final String TAG = AboutActivity.class.getSimpleName();
|
private static final String TAG = AboutActivity.class.getSimpleName();
|
||||||
|
|
||||||
private WebView webview;
|
private WebView webView;
|
||||||
private LinearLayout webviewContainer;
|
private LinearLayout webViewContainer;
|
||||||
private Subscription subscription;
|
private Subscription subscription;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -44,16 +44,16 @@ public class AboutActivity extends AppCompatActivity {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||||
setContentView(R.layout.about);
|
setContentView(R.layout.about);
|
||||||
webviewContainer = (LinearLayout) findViewById(R.id.webvContainer);
|
webViewContainer = (LinearLayout) findViewById(R.id.webViewContainer);
|
||||||
webview = (WebView) findViewById(R.id.webvAbout);
|
webView = (WebView) findViewById(R.id.webViewAbout);
|
||||||
webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
|
webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
|
||||||
if (UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) {
|
if (UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) {
|
||||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
|
||||||
webview.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
|
webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
|
||||||
}
|
}
|
||||||
webview.setBackgroundColor(Color.TRANSPARENT);
|
webView.setBackgroundColor(Color.TRANSPARENT);
|
||||||
}
|
}
|
||||||
webview.setWebViewClient(new WebViewClient() {
|
webView.setWebViewClient(new WebViewClient() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||||
|
@ -114,15 +114,15 @@ public class AboutActivity extends AppCompatActivity {
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(
|
.subscribe(
|
||||||
webviewData ->
|
webviewData ->
|
||||||
webview.loadDataWithBaseURL("file:///android_asset/", webviewData, "text/html", "utf-8", "about:blank"),
|
webView.loadDataWithBaseURL("file:///android_asset/", webviewData, "text/html", "utf-8", "about:blank"),
|
||||||
error -> Log.e(TAG, Log.getStackTraceString(error))
|
error -> Log.e(TAG, Log.getStackTraceString(error))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
if (webview.canGoBack()) {
|
if (webView.canGoBack()) {
|
||||||
webview.goBack();
|
webView.goBack();
|
||||||
} else {
|
} else {
|
||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
}
|
}
|
||||||
|
@ -144,9 +144,9 @@ public class AboutActivity extends AppCompatActivity {
|
||||||
if(subscription != null) {
|
if(subscription != null) {
|
||||||
subscription.unsubscribe();
|
subscription.unsubscribe();
|
||||||
}
|
}
|
||||||
if (webviewContainer != null && webview != null) {
|
if (webViewContainer != null && webView != null) {
|
||||||
webviewContainer.removeAllViews();
|
webViewContainer.removeAllViews();
|
||||||
webview.destroy();
|
webView.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/webvContainer"
|
android:id="@+id/webViewContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical" >
|
android:orientation="vertical" >
|
||||||
|
|
||||||
<WebView
|
<WebView
|
||||||
android:id="@+id/webvAbout"
|
android:id="@+id/webViewAbout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue