mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
make changes an html file in assets, and load via url; add
surveymonkey url
This commit is contained in:
parent
1f9be1d03c
commit
c83e7773fb
3 changed files with 960 additions and 992 deletions
File diff suppressed because it is too large
Load diff
|
@ -7,6 +7,10 @@
|
|||
<body>
|
||||
<b>Crosswords 4.4 beta 87 release</b>
|
||||
|
||||
<p>Please
|
||||
consider <a href="https://www.surveymonkey.com/s/GX3XLHR">taking this
|
||||
survey</a> to help me improve Crosswords.</p>
|
||||
|
||||
<h3>New with this (and prev.) releases</h3>
|
||||
<ul>
|
||||
<li>Don't prevent board displaying in the landscape orientation on
|
|
@ -38,39 +38,6 @@ import org.eehouse.android.xw4.loc.LocUtils;
|
|||
public class FirstRunDialog {
|
||||
public static void show( final Context context )
|
||||
{
|
||||
String page = null;
|
||||
InputStream inputStream = null;
|
||||
try {
|
||||
inputStream = context.getResources()
|
||||
.openRawResource(R.raw.changes);
|
||||
|
||||
final char[] buf = new char[0x1000];
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
Reader reader = new InputStreamReader( inputStream, "UTF-8" );
|
||||
int nRead;
|
||||
do {
|
||||
nRead = reader.read( buf, 0, buf.length );
|
||||
if ( nRead > 0 ) {
|
||||
stringBuilder.append( buf, 0, nRead );
|
||||
}
|
||||
} while ( nRead >= 0 );
|
||||
|
||||
page = stringBuilder.toString();
|
||||
}
|
||||
catch ( IOException ioe ) {
|
||||
DbgUtils.loge( ioe );
|
||||
}
|
||||
finally {
|
||||
// could just catch NPE....
|
||||
if ( null != inputStream ) {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch ( IOException ioe ) {
|
||||
DbgUtils.loge( ioe );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This won't support e.g mailto refs. Probably want to
|
||||
// launch the browser with an intent eventually.
|
||||
WebView view = new WebView( context );
|
||||
|
@ -86,8 +53,8 @@ public class FirstRunDialog {
|
|||
return result;
|
||||
}
|
||||
});
|
||||
|
||||
view.loadData( page, "text/html", "utf-8" );
|
||||
view.getSettings().setJavaScriptEnabled( true ); // for surveymonkey
|
||||
view.loadUrl("file:///android_asset/changes.html");
|
||||
|
||||
AlertDialog dialog = LocUtils.makeAlertBuilder( context )
|
||||
.setIcon(android.R.drawable.ic_menu_info_details)
|
||||
|
|
Loading…
Reference in a new issue