mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-24 07:58:34 +01:00
don't pop up dict picker menu in response to dict button if there's
only one for the game's language; open the browser instead.
This commit is contained in:
parent
fe472e0e9a
commit
a4ce83f9cf
1 changed files with 3 additions and 2 deletions
|
@ -109,14 +109,15 @@ public class DictsActivity extends XWListActivity {
|
||||||
public static boolean handleDictsPopup( Context context, View button,
|
public static boolean handleDictsPopup( Context context, View button,
|
||||||
String curDict, int lang )
|
String curDict, int lang )
|
||||||
{
|
{
|
||||||
if ( null == s_safePopup ) {
|
int nDicts = DictLangCache.getLangCount( context, lang );
|
||||||
|
if ( null == s_safePopup && 1 < nDicts ) {
|
||||||
int sdkVersion = Integer.valueOf( android.os.Build.VERSION.SDK );
|
int sdkVersion = Integer.valueOf( android.os.Build.VERSION.SDK );
|
||||||
if ( 11 <= sdkVersion ) {
|
if ( 11 <= sdkVersion ) {
|
||||||
s_safePopup = new SafePopupImpl();
|
s_safePopup = new SafePopupImpl();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean canHandle = null != s_safePopup;
|
boolean canHandle = null != s_safePopup && 1 < nDicts;
|
||||||
if ( canHandle ) {
|
if ( canHandle ) {
|
||||||
s_safePopup.doPopup( context, button, curDict, lang );
|
s_safePopup.doPopup( context, button, curDict, lang );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue