Skip to content

Instantly share code, notes, and snippets.

@cyrilmottier
Created November 21, 2012 11:10
Show Gist options
  • Star 49 You must be signed in to star a gist
  • Fork 10 You must be signed in to fork a gist
  • Save cyrilmottier/4124374 to your computer and use it in GitHub Desktop.
Save cyrilmottier/4124374 to your computer and use it in GitHub Desktop.
"Open source licenses" screen
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" lang="en" content="Cyril Mottier" />
<meta name="author" lang="fr" content="Cyril Mottier" />
<style type="text/css">
p.license {
background:grey;
}
body {
font-family: sans-serif;
}
pre {
background-color: #eeeeee;
padding: 1em;
white-space: pre-wrap;
}
</style>
<title>Open source licenses</title>
</head>
<body>
<h3>Notice for files:</h3>
<ul>
<li>ActionBarSherlock</li>
</ul>
<pre>
Copyright 2012 Jake Wharton
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
</pre>
<ul>
<li>Polaris</li>
</ul>
<pre>
Copyright (C) 2012 Cyril Mottier (http://www.cyrilmottier.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
</pre>
</body>
</html>
<?xml version="1.0" encoding="utf-8"?>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/web_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
package com.cyrilmottier.android.citybikes;
import android.os.Bundle;
import com.cyrilmottier.android.avelov.R;
import com.cyrilmottier.android.citybikes.app.BaseActivity;
public class LicensesActivity extends BaseActivity {
private WebView mWebView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.licenses_activity);
((WebView) view.findViewById(R.id.web_view)).loadUrl("file:///android_asset/licenses.html");
}
}
@devisnik
Copy link

devisnik commented May 3, 2013

Great Snippet, thanks.

Should probably be

((WebView)findViewById(R.id.web_view)).loadUrl("file:///android_asset/licenses.html");

in LicensesActivity.java. Although I don't know whether your BaseActivity introduces view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment