Merge branch 'android_branch' into send_in_background

This commit is contained in:
eehouse@eehouse.org 2011-10-10 18:31:30 -07:00 committed by Andy2
commit 99707e4029
7 changed files with 29 additions and 60 deletions

View file

@ -22,7 +22,7 @@
to come from a domain that you own or have control over. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.eehouse.android.xw4"
android:versionCode="27"
android:versionCode="28"
android:versionName="@string/app_version"
>

View file

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView style="@style/config_separator"
android:text="@string/site_spinner_label"
/>
<Spinner android:id="@+id/site_spinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true"
android:prompt="@string/site_spinner_prompt"
/>
<TextView style="@style/config_separator"
android:text="@string/word_list_label"
/>
<ListView android:id="@+id/words"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="false"
android:layout_marginLeft="30dip"
android:layout_marginRight="30dip"
/>
</LinearLayout>

View file

@ -6,26 +6,19 @@
</head>
<body>
<b>Crosswords 4.4 beta 34 release</b>
<b>Crosswords 4.4 beta 35 release</b>
<ul>
<li>Don't ignore user's choice of wordlists. THIS MEANS THAT
IN-PROGRESS GAMES NOT USING ENGLISH WILL BREAK. (But they were broken
anyway: using English when you didn't want them to.)</li>
<li>Vastly (IMO) improve exchanging tiles: when in exchange mode, draw
board disabled, and replace toolbar with buttons for commiting or
abandoning the exchange</li>
<li>Stop getting confused when there are multiple wordlists with the
same name. They'll all show up, and can be deleted.</li>
<li>Add ability to look up words played by opponents via online
dictionary sites. The list of sites is hard-coded, and I don't have
them for most languages. Suggestions welcomed (including improvements
for English)!
</li>
<li>Don't lose language choice for a game if user downloads a new wordlist</li>
<li>Change how recent score and bonus value are shown after long-tap
on scoreboard entry or bonus square: use Android's Toast feature
instead of drawing directly on the board</li>
<li>Rename 'Turn done' menuitem to 'Pass' when no points will be
scored
</li>
</ul>

View file

@ -3,6 +3,8 @@
<!-- Resources in this file do not require localization -->
<resources>
<string name="app_version">4.4 beta 35</string>
<!-- prefs keys -->
<string name="key_color_tiles">key_color_tiles</string>
<string name="key_show_arrow">key_show_arrow</string>
@ -73,6 +75,7 @@
<string name="key_notagain_newfrom">key_notagain_newfrom</string>
<string name="key_notagain_trading">key_notagain_trading</string>
<string name="key_na_needUrlsForLang">key_na_needUrlsForLang</string>
<string name="key_na_lookup">key_na_lookup</string>
<!-- Name is not localized -->
<string name="app_name">Crosswords</string>
@ -82,7 +85,6 @@
<!-- <string name="default_host">10.0.2.2</string> -->
<string name="dict_url">http://eehouse.org/and_wordlists</string>
<string name="app_version">4.4 beta 34</string>
<string name="game_url_pathf">//%1$s/newgame.php</string>
<!-- Debugging stuff. No point in localizing it. -->

View file

@ -1782,5 +1782,10 @@
lookup site I have for this language. If you have suggestions
for word-lookup sites please email eehouse@eehouse.org
.</string>
<string name="not_again_lookup">This button lets you look up the
words just played online. (Note that not all languages are
supported yet.)</string>
</resources>

View file

@ -40,21 +40,15 @@ import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnDismissListener;
import android.content.DialogInterface.OnCancelListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import junit.framework.Assert;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.pm.ActivityInfo;
import android.net.Uri;
import org.eehouse.android.xw4.jni.*;
import org.eehouse.android.xw4.jni.JNIThread.*;
@ -95,6 +89,7 @@ public class BoardActivity extends XWActivity
private static final int UNDO_ACTION = 11;
private static final int CHAT_ACTION = 12;
private static final int START_TRADE_ACTION = 13;
private static final int LOOKUP_ACTION = 14;
private static final String DLG_TITLE = "DLG_TITLE";
private static final String DLG_TITLESTR = "DLG_TITLESTR";
@ -102,7 +97,6 @@ public class BoardActivity extends XWActivity
private static final String ROOM = "ROOM";
private static final String TOASTSTR = "TOASTSTR";
private static final String WORDS = "WORDS";
private static final String LOOKUPITEM = "LOOKUPITEM";
private BoardView m_view;
private int m_jniGamePtr;
@ -172,7 +166,6 @@ public class BoardActivity extends XWActivity
Dialog dialog = super.onCreateDialog( id );
if ( null == dialog ) {
DialogInterface.OnClickListener lstnr;
DialogInterface.OnClickListener doneLstnr;
AlertDialog.Builder ab;
switch ( id ) {
@ -253,7 +246,11 @@ public class BoardActivity extends XWActivity
lstnr = new DialogInterface.OnClickListener() {
public void onClick( DialogInterface dialog,
int whichButton ) {
launchLookup( m_words );
showNotAgainDlgThen( R.string.
not_again_lookup,
R.string.
key_na_lookup,
LOOKUP_ACTION );
}
};
ab.setNegativeButton( buttonTxt, lstnr );
@ -507,7 +504,8 @@ public class BoardActivity extends XWActivity
// For now undo-last can crash the app or break a game in
// networked case. Disable until this is fixed.
if ( m_gi.serverRole != DeviceRole.SERVER_STANDALONE ) {
if ( null != m_gi
&& m_gi.serverRole != DeviceRole.SERVER_STANDALONE ) {
menu.removeItem( R.id.board_menu_undo_last );
}
return true;
@ -684,6 +682,9 @@ public class BoardActivity extends XWActivity
Toast.LENGTH_SHORT).show();
cmd = JNIThread.JNICmd.CMD_TRADE;
break;
case LOOKUP_ACTION:
launchLookup( m_words );
break;
default:
Assert.fail();
}

View file

@ -2039,7 +2039,6 @@ recordWord( const XP_UCHAR* word, XP_Bool isLegal, void* closure )
{
RecordWordsInfo* info = (RecordWordsInfo*)closure;
XWStreamCtxt* stream = info->stream;
XP_ASSERT( isLegal );
XP_LOGF( "%s(%s)", __func__, word );
if ( 0 < info->nWords++ ) {
stream_putU8( stream, '\n' );