mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
all places where dict lang is displayed can also display word count
This commit is contained in:
parent
64bcb8bb2b
commit
c83e4cc7a3
2 changed files with 5 additions and 16 deletions
|
@ -34,15 +34,11 @@ public class DictLangCache {
|
||||||
new HashMap<String,DictInfo>();
|
new HashMap<String,DictInfo>();
|
||||||
private static String[] s_langNames;
|
private static String[] s_langNames;
|
||||||
|
|
||||||
public static String annotatedDictName( Context context, final String name,
|
public static String annotatedDictName( Context context, String name )
|
||||||
boolean inclNWords )
|
|
||||||
{
|
{
|
||||||
int wordCount = 0;
|
DictInfo info = getInfo( context, name );
|
||||||
if ( inclNWords ) {
|
int wordCount = info.wordCount;
|
||||||
DictInfo info = getInfo( context, name );
|
|
||||||
wordCount = info.wordCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
String langName = getLangName( context, name );
|
String langName = getLangName( context, name );
|
||||||
String result;
|
String result;
|
||||||
if ( 0 == wordCount ) {
|
if ( 0 == wordCount ) {
|
||||||
|
@ -54,12 +50,6 @@ public class DictLangCache {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String annotatedDictName( Context context,
|
|
||||||
String name )
|
|
||||||
{
|
|
||||||
return annotatedDictName( context, name, false );
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String annotatedDictName( Context context, String name,
|
public static String annotatedDictName( Context context, String name,
|
||||||
int lang )
|
int lang )
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,8 +65,7 @@ public class DictsActivity extends XWListActivity
|
||||||
// append language name
|
// append language name
|
||||||
view.setText( DictLangCache.
|
view.setText( DictLangCache.
|
||||||
annotatedDictName( DictsActivity.this,
|
annotatedDictName( DictsActivity.this,
|
||||||
m_dicts[position],
|
m_dicts[position] ) );
|
||||||
true ) );
|
|
||||||
if ( !GameUtils.dictIsBuiltin( DictsActivity.this,
|
if ( !GameUtils.dictIsBuiltin( DictsActivity.this,
|
||||||
m_dicts[position] ) ) {
|
m_dicts[position] ) ) {
|
||||||
view.setDeleteCallback( DictsActivity.this );
|
view.setDeleteCallback( DictsActivity.this );
|
||||||
|
|
Loading…
Reference in a new issue